LanguageServer.jl icon indicating copy to clipboard operation
LanguageServer.jl copied to clipboard

LanguageServer does not index active project/package

Open fredrikekre opened this issue 4 years ago • 7 comments

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.

fredrikekre avatar Oct 08 '21 13:10 fredrikekre

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

Roger-luo avatar Nov 02 '21 22:11 Roger-luo

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).

fredrikekre avatar Oct 17 '22 07:10 fredrikekre

Jesus I thought I was going insane. Experiencing this behavior too, it's really counter-intuitive.

jarbus avatar Jan 17 '23 19:01 jarbus

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

PetrKryslUCSD avatar May 04 '23 13:05 PetrKryslUCSD