# LSP: documentation not shown for used packages

**URL:** https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202
**Category:** Tooling
**Created:** [January 24, 2024, 4:14pm UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202 "2024-01-24T16:14:52Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [January 24, 2024, 4:14pm UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/1 "2024-01-24T16:14:52Z")

</div>

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](https://github.com/PetrKryslUCSD/VibrationGEPHelpers.jl).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/5/45c4a10972b49dd5fb5563cdb85e936dceb7a0d5.png)  
But:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/6/96183565549d896dafa8ab8b41008168d39958d5.png)  
(From ArnoldiMethod.jl)  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/5/e583dd8040ec291c03e5cde2546255f00497cd59.png)  
(From Arpack.jl)  
Structure of package:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/f/0fb83e938d291ae17ef2d6e0d61fe465eb4ffda9.png)  
Is this is a known problem? With a solution (😉 )?

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?

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [January 25, 2024, 8:05am UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/2 "2024-01-25T08:05:41Z")

</div>

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.](https://github.com/julia-vscode/LanguageServer.jl)

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [January 30, 2024, 1:56am UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/3 "2024-01-30T01:56:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)
#### Post date: [January 30, 2024, 7:39am UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/4 "2024-01-30T07:39:46Z")

</div>

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

 ![Screenshot_2024-01-30_08-32-06](https://global.discourse-cdn.com/julialang/original/3X/2/0/20371eb53f5faf7a6694f7ad5bca8a6381587f86.png)  
 ![Screenshot_2024-01-30_08-32-38](https://global.discourse-cdn.com/julialang/original/3X/6/2/62ce258d93c555a3f6592f33924b0782d8c9b467.png)

This is [`eglot-jl`](https://github.com/non-Jedi/eglot-jl) with an up-to-date LanguageServer:

```julia
(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.

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [January 30, 2024, 6:14pm UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/5 "2024-01-30T18:14:40Z")

</div>

> [@ffevotte](#):
>
> So I’m not sure what could be missing in SublimeText and its LSP extension.

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.

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [January 31, 2024, 10:28am UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/6 "2024-01-31T10:28:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)
#### Post date: [January 31, 2024, 11:14am UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/7 "2024-01-31T11:14:01Z")

</div>

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:

> <https://github.com/non-Jedi/eglot-jl/blob/master/eglot-jl.jl#L40-L41>

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

---

<div class="post-metadata">

### Author: ![Tetrakai](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)
#### Post date: [December 7, 2024, 10:57pm UTC](https://discourse.julialang.org/t/lsp-documentation-not-shown-for-used-packages/109202/8 "2024-12-07T22:57:05Z")

</div>

I just ran into this same issue. Is there a fix?
