LanguageServer.jl
LanguageServer.jl copied to clipboard
[Nvim] LanguageServer does not find types defined inside an `@eval` block.
As the title says, when I define a type inside @eval block the language is not able to find it.
Here's a MWE
x = :MyAbstractType
y = :MyConcreteType
@eval begin
abstract type $(x) end
struct $(y) <: $(x)
a::Real
end
end
z = MyConcreteType(3)
This code works fine in the REPL but in nvim I get this warning from lsp:
I'm using julia 1.11.3 installed with juliaup and nvim v0.10.4 on linux. Here you can find my nvim config.
I think @eval in active environment is not supported.
https://discourse.julialang.org/t/symbolserver-cstparser-and-juliasyntax/124075
So, we only use this strategy for packages that are not in the current workspace but are referenced by the active project (roughly).