gdkrmr / lsp-julia

MIT License
70 stars 19 forks source link

adapt default environment to julia version #33

Open gdkrmr opened 4 years ago

gdkrmr commented 4 years ago

lsp-julia-default-environment contains the julia version number and if we want to set it automatically, we have to query the julia version or similar.

The Julia version number can be queried via:

julia -e "println(VERSION.major, '.', VERSION.minor)"

or

julia -e "println(dirname(Base.load_path()[1]))"

https://github.com/non-Jedi/lsp-julia/issues/25#issuecomment-686627000

non-Jedi commented 4 years ago

You could also do as we do with eglot-jl and let julia determine the appropriate project instead of doing it manually in elisp: https://github.com/non-Jedi/eglot-jl/blob/84cff9d6ef1643f3eac6c9d620cc1e380a9847d9/eglot-jl.jl#L27

gdkrmr commented 4 years ago

Thanks for the tip. I was wondering for a while, if there is any value in making this configurable. If you want to change the default environment with eglot-js, you just use an environmental variable, right?