add variable renaming to lsp
This commit is contained in:
@ -21,6 +21,7 @@ return {
|
||||
return { desc = desc, buffer = ev.buf, silent = true }
|
||||
end
|
||||
|
||||
keymap.set('n', 'gr', vim.lsp.buf.rename, opts('Rename'))
|
||||
keymap.set('n', 'K', vim.lsp.buf.hover, opts('Show documentation'))
|
||||
keymap.set('n', 'gR', '<cmd>Telescope lsp_references<cr>', opts('Show LSP references'))
|
||||
keymap.set('n', 'gD', vim.lsp.buf.declaration, opts('Go to declaration'))
|
||||
@ -81,12 +82,12 @@ return {
|
||||
['ts_ls'] = function()
|
||||
lspconfig['ts_ls'].setup({
|
||||
capabilities = capabilities,
|
||||
-- cmd = { "typescript-language-server", "--stdio" },
|
||||
cmd = { "typescript-language-server", "--stdio" },
|
||||
init_options = {
|
||||
hostInfo = "neovim",
|
||||
prferences = {
|
||||
includePackagesJsonAutoImports = "on",
|
||||
}
|
||||
-- preferences = {
|
||||
-- includePackagesJsonAutoImports = "on",
|
||||
-- }
|
||||
}
|
||||
})
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user