chore(nvim): harpoon and other efficiency stuff

This commit is contained in:
Afonso Franco 2024-04-27 16:02:41 +01:00
parent f4fb84348d
commit 9c6e3a5d18
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
6 changed files with 122 additions and 124 deletions

View file

@ -4,11 +4,6 @@ if not present then
end
require('nvim-treesitter.install').update({ with_sync = true })
local present, orgmode = pcall(require, "orgmode")
if present then
require('orgmode').setup_ts_grammar()
end
local options = {
@ -22,6 +17,26 @@ local options = {
indent = {
enable = true,
},
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ab"] = "@block.outer",
["ib"] = "@block.inner",
},
selection_modes = {
['@block.outer'] = 'v', -- charwise
['@block.inner'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise
},
include_surrounding_whitespace = true,
},
},
}
treesitter.setup(options)