[nvim] mini.ai and treesitter-textobjects

This commit is contained in:
Afonso Franco 2024-10-11 15:13:51 +01:00
parent cf5d16e792
commit 5144c74839
Signed by: afonso
SSH key fingerprint: SHA256:PQTRDHPH3yALEGtHXnXBp3Orfcn21pK20t0tS1kHg54

View file

@ -38,6 +38,18 @@ return {
'echasnovski/mini.ai',
event = "VeryLazy",
version = false,
opts = {}
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects'
},
config = function()
local gen_spec = require('mini.ai').gen_spec
require('mini.ai').setup({
custom_textobjects = {
-- Function definition (needs treesitter queries with these captures)
F = gen_spec.treesitter({ a = '@function.outer', i = '@function.inner' }),
},
n_lines = 1000
})
end
},
}