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 | |
| parent | 282c1c9db72670719d4d3e7b924d90d14228f06d (diff) | |
Neovim: fixed tmux navigation and ; or , for fFtT issues
Diffstat (limited to '.config/nvim/lua')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/motions.lua | 8 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/treesitter.lua | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/.config/nvim/lua/custom/plugins/motions.lua b/.config/nvim/lua/custom/plugins/motions.lua index b06981c..229225f 100644 --- a/.config/nvim/lua/custom/plugins/motions.lua +++ b/.config/nvim/lua/custom/plugins/motions.lua @@ -2,10 +2,10 @@ return { { 'christoomey/vim-tmux-navigator', config = function() - vim.keymap.set('n', 'C-h', '<cmd>TmuxNavigatorLeft<CR>') - vim.keymap.set('n', 'C-j', '<cmd>TmuxNavigatorDown<CR>') - vim.keymap.set('n', 'C-k', '<cmd>TmuxNavigatorUp<CR>') - vim.keymap.set('n', 'C-l', '<cmd>TmuxNavigatorRight<CR>') + vim.keymap.set('n', '<C-h>', '<cmd>TmuxNavigatorLeft<CR>') + vim.keymap.set('n', '<C-j>', '<cmd>TmuxNavigatorDown<CR>') + vim.keymap.set('nC', '<C-k>', '<cmd>TmuxNavigatorUp<CR>') + vim.keymap.set('n', '<C-l>', '<cmd>TmuxNavigatorRight<CR>') end, }, { 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, }, } |
