home: vim: add 'treesitter-textobjects'
This commit is contained in:
parent
e81aee50e3
commit
a5ec91088d
|
@ -67,6 +67,7 @@ in
|
|||
lsp_lines-nvim # Show diagnostics *over* regions
|
||||
null-ls-nvim # LSP integration for linters and formatters
|
||||
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) # Better highlighting
|
||||
nvim-treesitter-textobjects # More textobjects
|
||||
plenary-nvim # 'null-ls' dependency
|
||||
|
||||
# UX improvements
|
||||
|
|
|
@ -9,5 +9,23 @@ ts_config.setup({
|
|||
indent = {
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue