mirror of
https://github.com/He4eT/dotfiles.git
synced 2026-05-04 23:47:23 +00:00
nvim: fixup "go to definition" for tsserver
This commit is contained in:
parent
cf511b3692
commit
0cf92226bf
1 changed files with 12 additions and 0 deletions
|
|
@ -313,6 +313,18 @@ require('lspconfig').lua_ls.setup {
|
|||
},
|
||||
}
|
||||
|
||||
require('lspconfig').tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
handlers = {
|
||||
-- https://github.com/holoiii/nvim/commit/73a4db74fe463f5064346ba63870557fedd134ad
|
||||
["textDocument/definition"] = function(err, result, ...)
|
||||
result = vim.tbl_islist(result) and result[1] or result
|
||||
vim.lsp.handlers["textDocument/definition"](err, result, ...)
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
-- nvim-cmp setup
|
||||
|
||||
local cmp = require 'cmp'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue