diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 108582ff..4be51c06 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -42,6 +42,9 @@ return { end end, }, + { + "nvim-treesitter/nvim-treesitter-refactor", + }, }, cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, keys = { @@ -96,6 +99,26 @@ return { goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, }, }, + refactor = { + highlight_definitions = { enable = true }, + smart_rename = { + enable = true, + keymaps = { + smart_rename = "grr", + }, + }, + navigation = { + enable = true, + keymaps = { + goto_definition = false, + list_definitions = false, + list_definitions_toc = false, + + goto_next_usage = { ["]]"] = "Next reference" }, + goto_previous_usage = { ["[["] = "Previous reference" }, + }, + }, + }, }, ---@param opts TSConfig config = function(_, opts)