summaryrefslogtreecommitdiff
path: root/.config/nvim/after
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/after')
-rw-r--r--.config/nvim/after/plugin/treesitter.lua47
1 files changed, 47 insertions, 0 deletions
diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua
index ad7f027..9b14eae 100644
--- a/.config/nvim/after/plugin/treesitter.lua
+++ b/.config/nvim/after/plugin/treesitter.lua
@@ -20,4 +20,51 @@ require('nvim-treesitter.configs').setup {
enable = true,
additional_vim_regex_highlighting = false,
},
+
+ indent = {
+ enable = true,
+ },
+
+ incremental_selection = {
+ enable = true,
+ keymaps = {
+ init_selection = '<C-Space>',
+ node_incremental = '<C-Space>',
+ scope_incremental = '<C-s>',
+ node_decremental = '<C-Backspace>',
+ }
+ },
+
+ textobjects = {
+ select = {
+ enable = true,
+ lookahead = true,
+ keymaps = {
+ ['af'] = '@function.outer',
+ ['if'] = '@function.inner',
+ ['ab'] = '@block.outer',
+ ['ib'] = '@block.inner',
+ },
+ },
+ move = {
+ enable = true,
+ set_jumps = true,
+ goto_next_start = {
+ [']f'] = '@function.outer',
+ [']b'] = '@block.outer',
+ },
+ goto_next_end = {
+ [']F'] = '@function.outer',
+ [']B'] = '@block.outer',
+ },
+ goto_previous_start = {
+ ['[f'] = '@function.outer',
+ ['[b'] = '@block.outer',
+ },
+ goto_previous_end = {
+ ['[F'] = '@function.outer',
+ ['[B'] = '@block.outer',
+ },
+ },
+ },
}