LSP: documentation not shown for used packages

Sublime Text (4) + LSP-julia.
Documentation is available for functions and types from standard packages (or base), but not from other used packages. Case at hand: GitHub - PetrKryslUCSD/VibrationGEPHelpers.jl: Generalized Eigenvalue Problem helper functions.


But:

(From ArnoldiMethod.jl)

(From Arpack.jl)
Structure of package:

Is this is a known problem? With a solution (:wink: )?

Edit: Tested with VSCode: all works. LinearMap, partialschur, … I am not sure, but I think VSCode does not use LSP-julia(?). Is the problem there?

The core implementation of the Language Server Protocol for Julia is GitHub - julia-vscode/LanguageServer.jl: An implementation of the Microsoft Language Server Protocol for the Julia language.

1 Like

For sure. However I do believe there are differences in the clients: VSCode behaves differently from ST (4). Tested on precisely the same package, ST (4) fails to display symbols for certain dependencies, while VSCode handles all well.

That’s interesting. As another data point, it seems to work for Emacs as well:


This is eglot-jl with an up-to-date LanguageServer:

(eglot-jl-20221128.1655) pkg> st
Status `~/.emacs.d/elpa/eglot-jl-20221128.1655/Project.toml`
  [2b0e0bc5] LanguageServer v4.5.0
  [cf896787] SymbolServer v7.3.0

I’m relatively familiar with the eglot-jl code base, and almost positive that it does not do anything fancy: simply starts the LanguageServer and communicate with it. So I’m not sure what could be missing in SublimeText and its LSP extension.

1 Like

I do not know that either, but I do see that the editor does not do the same thing as VSCode. Since I believe they share the same implementation of the server component (LanguageServer.jl), I think that difference would be in the code that handles the communication on the client side.

The main questions are what environment ST/VS Code/emacs use for package resolution in this specific case, and whether that environment is instantiated.

1 Like

Good point, thanks!

In case that helps fixing things in SublimeText, this is how eglot-jl determines the project path that the LanguageServer will use:

(In this code, src_path refers to the directory of the source file currently being edited)