Open catgoose opened 4 months ago
I think this happens on every interaction with lsp on vue files. Rename asks twice to handle renaming, references etc. vim.lsp.buf.references
displays No references found
message and then displays references.
I think this happens on every interaction with lsp on vue files. Rename asks twice to handle renaming, references etc.
vim.lsp.buf.references
displaysNo references found
message and then displays references.![]()
Yeah I actually wrote a plug-in to make this work better:
https://github.com/catgoose/vue-goto-definition.nvim
I might try to implement some fix for the LSP rename because it really does not work well.
My lspconfig: https://github.com/catgoose/nvim/blob/4a81fde7ff8ee086416e5c06121e41c182bb7e19/lua/plugins/lspconfig.lua#L152-L171
In neovim (and other IDE I would assume) when calling
vim.lsp.buf.definition
on a symbol in a .vue file that is imported from a typescript file results in calls being made from bothtsserver
and the@vue/typescript-plugin
LSPFor example:
When calling
vim.lsp.buf.definition
on useCounterStore and overriding theon_list
functionality:vim.lsp.buf.definition({on_list = function(list) vim.print(list) end})
results in the following tables being printed:
I believe the first table is from
tsserver
while the second is from@vue/typescript-plugin
.Also if you run
:lua vim.lsp.buf.definition({on_list = function(list) vim.print(list) end})
the resultant output is:
If we were still using takeover mode, this would not be an issue, but would it even be possible to disable
tsserver
goto definition in .vue files and still be able to use@vue/typescript-plugin
?