From f5d5b06b9c490b6d993e952b786e7a0023c5df46 Mon Sep 17 00:00:00 2001 From: victorkamoto Date: Sun, 14 Apr 2024 04:18:09 +0300 Subject: [PATCH] feat(treesitter): refactor module --- lua/lazyvim/plugins/treesitter.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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)