home: vim: add 'treesitter-textobjects'
This commit is contained in:
parent
be84a4a6fa
commit
b7b3387df7
|
@ -67,6 +67,7 @@ in
|
||||||
lsp_lines-nvim # Show diagnostics *over* regions
|
lsp_lines-nvim # Show diagnostics *over* regions
|
||||||
null-ls-nvim # LSP integration for linters and formatters
|
null-ls-nvim # LSP integration for linters and formatters
|
||||||
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) # Better highlighting
|
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) # Better highlighting
|
||||||
|
nvim-treesitter-textobjects # More textobjects
|
||||||
plenary-nvim # 'null-ls' dependency
|
plenary-nvim # 'null-ls' dependency
|
||||||
|
|
||||||
# UX improvements
|
# UX improvements
|
||||||
|
|
|
@ -9,5 +9,23 @@ ts_config.setup({
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
|
textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
-- Jump to matching text objects
|
||||||
|
lookahead = true,
|
||||||
|
keymaps = {
|
||||||
|
["aa"] = "@parameter.outer",
|
||||||
|
["ia"] = "@parameter.inner",
|
||||||
|
["ab"] = "@block.outer",
|
||||||
|
["ib"] = "@block.inner",
|
||||||
|
["ac"] = "@class.outer",
|
||||||
|
["ic"] = "@class.inner",
|
||||||
|
["af"] = "@function.outer",
|
||||||
|
["if"] = "@function.inner",
|
||||||
|
["ak"] = "@comment.outer",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue