diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-14 17:35:32 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-14 17:35:32 +0300 |
| commit | dfec7d14b4f03c78c66b9626738d012c512dbbc8 (patch) | |
| tree | 4328fd3ed3cdfc9cb28f73300affca0eb3c3fbc6 /.config/nvim/lua/custom/plugins/treesitter.lua | |
| parent | 282c1c9db72670719d4d3e7b924d90d14228f06d (diff) | |
Neovim: fixed tmux navigation and ; or , for fFtT issues
Diffstat (limited to '.config/nvim/lua/custom/plugins/treesitter.lua')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/treesitter.lua | 10 |
1 files changed, 8 insertions, 2 deletions
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'] = '<c-v>', -- 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, }, } |
