You may already know more than I do, since I don’t know much, but I looked at some documentation for eglot and it seemed to me that you would set the directory-local variableeglot-workspace-configuration in a file .dir-locals.el as described here. I didn’t try it since it wasn’t clear to me what advantage this has over putting the configuration in .JETLSConfig.toml. Maybe I’m missing something. Is there some advantage that you know of?
1 Like
I want the configuration to be global, not specific to a directory.
I think I need the user-specific configuration, which apparently requires translating JSON to elisp. I am just not sure where the :jetls and the plist goes, that’s all.
Yes, JETLS is a Julia server app that works in its own environment.
1 Like
Awesome. I didn’t realize this point. I will give it a try!
I think you’ll want something like this:
(add-hook 'julia-mode-hook #'eglot-ensure)
(with-eval-after-load 'eglot
(let ((jetls-config
'(:code_lens (:references t) ; I would like to get this to work
:formatter (:custom (:executable "runic-fork")))))
(add-to-list 'eglot-server-programs
`(((julia-mode :language-id "julia" :initializationOptions ,jetls-config)
(julia-ts-mode :language-id "julia" :initializationOptions ,jetls-config))
"jetls"
"serve"
"--socket"
:autoport))))
1 Like