From ffaf12680fd5e97fe09ec4f5bb2acf441b1b8d0f Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 7 May 2025 20:05:04 +0300 Subject: Replaced treewalker with iswap which works better (like keeping whitespace for cases like switch statements) --- .config/nvim/lua/plugins/iswap.lua | 17 +++++++++++++++++ .config/nvim/lua/plugins/treewalker.lua | 12 ------------ 2 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 .config/nvim/lua/plugins/iswap.lua delete mode 100644 .config/nvim/lua/plugins/treewalker.lua (limited to '.config/nvim/lua/plugins') diff --git a/.config/nvim/lua/plugins/iswap.lua b/.config/nvim/lua/plugins/iswap.lua new file mode 100644 index 0000000..2de3b7a --- /dev/null +++ b/.config/nvim/lua/plugins/iswap.lua @@ -0,0 +1,17 @@ +return { + 'mizlan/iswap.nvim', + event = 'VeryLazy', + keys = { + { 'H', 'IMoveNodeWithLeft', silent = true }, + { 'L', 'IMoveNodeWithRight', silent = true }, + }, + opts = { + -- Post-operation flashing highlight style, + -- either 'simultaneous' or 'sequential', or false to disable + -- default 'sequential' + flash_style = false, + + -- Move cursor to the other element in ISwap*With commands + move_cursor = true, + }, +} diff --git a/.config/nvim/lua/plugins/treewalker.lua b/.config/nvim/lua/plugins/treewalker.lua deleted file mode 100644 index af4992b..0000000 --- a/.config/nvim/lua/plugins/treewalker.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - 'aaronik/treewalker.nvim', - keys = { - { 'H', 'Treewalker SwapLeft', silent = true }, - { 'L', 'Treewalker SwapRight', silent = true }, - }, - opts = { - highlight = true, - highlight_duration = 250, - highlight_group = 'CursorLine', - }, -} -- cgit v1.3.1