Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customizing environment language server run from #15

Merged
merged 1 commit into from
May 21, 2020
Merged

Conversation

non-Jedi
Copy link
Owner

Fixes #13.

This commit remove Pkg from the Project.toml since it can be loaded
with the standard library in LOAD_PATH. This is convenient when
developing LanguageServer.jl since it doesn't have Pkg in its
dependencies.

Thoughts on loading Pkg by assuming standard library is on LOAD_PATH
@ffevotte?

Fixes #13.

This commit remove Pkg from the Project.toml since it can be loaded
with the standard library in LOAD_PATH. This is convenient when
developing LanguageServer.jl since it doesn't have Pkg in its
dependencies.
@ffevotte
Copy link
Collaborator

ffevotte commented May 21, 2020

I guess it is a bit unorthodox, but I think it is a relatively safe assumption that "@stdlib" will always be in LOAD_PATH. And I can see the benefit to keep using eglot when developing LanguageServer itself.

There used to be a recommendation in the README.org to run

JULIA_LOAD_PATH="@" julia --project=path/to/eglot-jl/ path/to/eglot-jl/eglot-jl.jl path/to/project ""

but it isn't there anymore, so unless users keep doing it by sheer force of habit, such things are not likely to happen.

To err on the side of caution, it would also be possible to explicitly set LOAD_PATH before importing Pkg:

empty!(LOAD_PATH)
push!(LOAD_PATH, "@stdlib")
import Pkg
[...]

I'm not sure such precautions are needed, though...

@non-Jedi non-Jedi merged commit 73c0b3e into master May 21, 2020
@non-Jedi non-Jedi deleted the fix-13 branch May 21, 2020 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add customizable variable for pointing at alternative LanguageServer.jl environment
2 participants