Language server in emacs: can it work any better than in VS Code?

Is there any reason to expect the language server to work better in emacs? In other words, can it avoid the problem with the invisible source code?

If I understand how it works, it seems to me that Emacs is exposed to the same language server failings as vs code?

I’ve observed false warnings, which can be traced to StaticLint.jl, showing up in both VSCode and emacs LSP.

julia> import StaticLint

julia> code = "function f(a::T, invert=false)::T where {T <: Integer}; invert ? -a : a; end";

julia> StaticLint.lint_string(code, StaticLint.FileServer(), gethints=true)

The output ends with “Possible method call error”. This shows up as warnings in both VSCode and emacs, for the perfectly valid code:

function f(a::T, invert=false)::T where {T <: Integer}; invert ? -a : a; end
1 Like

I can’t speak to Emacs, but I found the LSP to work infinitely better when I set it up in Neovim, compared to VSCode. I suspect the underlying reason is that it gives me exact control over what the “project folder” should be. For my typical workflows, I want to be using the environment in my test subfolder. The logging is also much better, so if something goes wrong, I can figure out what exactly it is. With that, when everything works, I’m not really getting any false positives from the LSP, and I’m finding it extremely useful (unlike my limited experience in VSCode)

3 Likes