[BUG] typescript-language-server goto_preview_references not working
Closed this issue · 4 comments
Describe the bug
When editing a file with an active tsserver, the reference preview window does not appear when the function
lua require('goto-preview').goto_preview_references()
is invoked on a symbol containing references. References can be previewed successfully on other language servers such as bash and lua.
To Reproduce
Steps to reproduce the behavior:
- Install telescope and goto-preview on vim
- Open a typescript or javascript file and ensure tsserver is running
- Move cursor to a referenced symbol and invoke
lua require('goto-preview').goto_preview_references()
(either by a command or keybinding) - No window appears
Expected behavior
A window containing references to the symbol under the cursor should be displayed upon invoking
lua require('goto-preview').goto_preview_references()
Screenshots
If nessecary I can provide screenshots, but I think my report adequately describes the issue.
Baseline (please complete the following information):
- OS. Debian Bullseye (11)
- Neovim version 0.6.0
- Current config not public
Additional context
-Telescope can find tsserver references itself with no issue
- goto-preview preoperly displays references in other languages (tested bash and lua).
- A blank preview window will appear on non referenced symbols (ie close brackets), while no window appear on referenced symbols (ie a function parameter).
- Using lunarvim IDE layer: https://github.com/LunarVim/LunarVim
Reproduced here. I'll look into it soon. Been short on time lately. Feel free to dive in too if you'd like and I can guide you through your findings. Otherwise I'll check this out as soon as I can.
This is the error coming in from the language server.
"Request textDocument/references failed with message: Cannot read property 'includeDeclaration' of undefined"
.
Still not sure how/when this broke or how to fix it.
@eamccarron feel free to test this out. It should be working fine now.
Sorry for the delay, but I can confirm this is now working as intended.
Thanks for the quick fix! :)