Skip to content

2 quick questions — setting :extra_paths for jedi #729

Answered by jdtsmith
jdtsmith asked this question in Q&A
Discussion options

You must be logged in to vote

OK I solved this myself. It turns out Emacs 27's fast json-serialize is rather fussy, and can only serialize vectors, not lists (unlike json-encode, which it replaces). Here's how I solved both issues (in .dir-locals.el):

((python-mode
  . ((eval . (let* ((stubs '("micropython_cpython_core" ;order matters
			     "micropython-1_14-frozen/esp32/RELEASE"
			     "micropython-esp32-1_16"))
		    (project-path (expand-file-name
				   (locate-dominating-file default-directory ".dir-locals.el")))
		    (stub-paths
		     (vconcat ; json-serialize hates lists
		      (mapcar (lambda (x) (concat project-path ".stubs/" x "/")) stubs))))
	       (setq eglot-workspace-configuration ;an alist

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jdtsmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant