LanguageServer.jl
LanguageServer.jl copied to clipboard
LanguageServer does not index active project/package
For example, in the root of the Example.jl repo when editiing a file foo.jl using Example gives "Missing reference" and same with functions defined within Example.
I believe this in dup of https://github.com/julia-vscode/julia-vscode/issues/800 and https://github.com/julia-vscode/LanguageServer.jl/pull/498 is a try to fix it but it seems not having any progress yet
Just leaving some breadcrumbs for when I (or someone else) have time to look at this again:
https://github.com/julia-vscode/LanguageServer.jl/blob/781240a00dc9eecefb561e707ee117b23425ed85/src/multienv.jl#L73-L82 looks like it is supposed to handle this (but just for files in test/), but this never works since the package itself is not indexed in the SymbolServer. (It does work if you coerce Pkg to add the package to itself, but then you get the cloud-indexed symbols and not the live ones).
Jesus I thought I was going insane. Experiencing this behavior too, it's really counter-intuitive.
This really makes LSP useless for package development. I get so many missing refs that it is really hard to find real problems in there. https://discourse.julialang.org/t/lsp-missing-reference-woes/98231/8