From 1052e92c5d35c55ba4872b93503b3f2a880af69b Mon Sep 17 00:00:00 2001 From: Georgi Dimitrov Date: Thu, 21 Dec 2023 09:59:07 +0000 Subject: [PATCH] neovim: set key bindings for swapping params --- nvim/lua/plugins/treesitter.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua index f566eabc..f05a4cc3 100644 --- a/nvim/lua/plugins/treesitter.lua +++ b/nvim/lua/plugins/treesitter.lua @@ -98,6 +98,15 @@ return { ['[]'] = '@class.outer', }, }, + swap = { + enable = true, + swap_next = { + ['a'] = '@parameter.inner', + }, + swap_previous = { + ['A'] = '@parameter.inner', + }, + }, }, }, config = function(_, opts)