You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I jump to definition (vim.lsp.buf.definition) to java.util.List, after a couple of seconds of delay, I get the following error:
Error executing vim.schedule lua callback: BufReadCmd Autocommands for "jdt://*": Vim(lua):E5108: Error executing lua ...itaranto/.local/share/nvim/lazy/nvim-jdtls/lua/jdtls.lua:1192: Must have a `jdtls` client to load class file or jdt uri
stack traceback:
[C]: in function 'assert'
...itaranto/.local/share/nvim/lazy/nvim-jdtls/lua/jdtls.lua:1192: in function 'open_classfile'
[string ":lua"]:1: in main chunk
[C]: in function 'bufload'
/usr/share/nvim/runtime/lua/vim/lsp/util.lua:277: in function 'get_lines'
/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1914: in function 'locations_to_items'
/usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:435: in function 'handler'
/usr/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
stack traceback:
[C]: in function 'bufload'
/usr/share/nvim/runtime/lua/vim/lsp/util.lua:277: in function 'get_lines'
/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1914: in function 'locations_to_items'
/usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:435: in function 'handler'
/usr/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
However, calling start_or_attach explicitly in a Filetype auto-command works just fine:
First I thought this was some sort of race-condition with nvim-lspconfig, so I added nvim-lspconfig as a depencency of nvim-jdls but it still didn't work.
Note: I'm setting my LSP mappings inside an LspAttach auto-command within the config callback of nvim-lspconfig.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I didn't want to create an issue yet since I'm not sure this is a bug or a misconfiguration.
This is my config for
lazy.nvim
:If I jump to definition (
vim.lsp.buf.definition
) tojava.util.List
, after a couple of seconds of delay, I get the following error:However, calling
start_or_attach
explicitly in aFiletype
auto-command works just fine:First I thought this was some sort of race-condition with
nvim-lspconfig
, so I addednvim-lspconfig
as a depencency ofnvim-jdls
but it still didn't work.Note: I'm setting my LSP mappings inside an
LspAttach
auto-command within theconfig
callback ofnvim-lspconfig
.Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions