nvimrc: enable treesitter rename
This commit is contained in:
parent
29cd1391ad
commit
f9df2583f0
7
nvimrc
7
nvimrc
|
@ -553,6 +553,12 @@ require 'nvim-treesitter.configs'.setup {
|
|||
refactor = {
|
||||
highlight_definitions = { enable = true },
|
||||
highlight_current_scope = { enable = true },
|
||||
smart_rename = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
smart_rename = "grr",
|
||||
},
|
||||
},
|
||||
navigation = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
|
@ -597,6 +603,7 @@ local on_attach = function(client, bufnr)
|
|||
vim.api.nvim_exec([[autocmd User LspDiagnosticsChanged call lightline#update()]], false)
|
||||
|
||||
local opts = { noremap=true, silent=false }
|
||||
-- Go to definition is now handled by treesitter, with LSP fallback:
|
||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<Cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
|
|
Loading…
Reference in New Issue