From dfec7d14b4f03c78c66b9626738d012c512dbbc8 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 14 Jul 2024 17:35:32 +0300 Subject: Neovim: fixed tmux navigation and ; or , for fFtT issues --- .config/nvim/lua/custom/plugins/treesitter.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to '.config/nvim/lua/custom/plugins/treesitter.lua') diff --git a/.config/nvim/lua/custom/plugins/treesitter.lua b/.config/nvim/lua/custom/plugins/treesitter.lua index 67814dd..ec3136c 100644 --- a/.config/nvim/lua/custom/plugins/treesitter.lua +++ b/.config/nvim/lua/custom/plugins/treesitter.lua @@ -35,9 +35,9 @@ return { }, selection_modes = { ['@parameter.outer'] = 'v', -- charwise - ['@function.outer'] = 'V', -- linewise + ['@function.outer'] = 'V', -- linewise ['@class.outer'] = '', -- blockwise - ['@assignment.rhs'] = 'v', -- charwise + ['@assignment.rhs'] = 'v', -- charwise }, }, swap = { @@ -56,6 +56,12 @@ return { -- Repeat movement with ; and , vim.keymap.set({ 'n', 'x', 'o' }, ';', ts_repeat_move.repeat_last_move_next) vim.keymap.set({ 'n', 'x', 'o' }, ',', ts_repeat_move.repeat_last_move_previous) + + -- NOTE: You need this, otherwise the normal ; and , won't work for fFtT + vim.keymap.set({ 'n', 'x', 'o' }, 'f', ts_repeat_move.builtin_f_expr, { expr = true }) + vim.keymap.set({ 'n', 'x', 'o' }, 'F', ts_repeat_move.builtin_F_expr, { expr = true }) + vim.keymap.set({ 'n', 'x', 'o' }, 't', ts_repeat_move.builtin_t_expr, { expr = true }) + vim.keymap.set({ 'n', 'x', 'o' }, 'T', ts_repeat_move.builtin_T_expr, { expr = true }) end, }, } -- cgit v1.3.1