new structure

This commit is contained in:
00xJ4CK committed 2024-12-31 02:19:32 +05:45
1 parent d3f06cbee8
commit 2a0e6f86c6
72 files changed
+2659 -2947

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
local ai = require('mini.ai')
ai.setup({
custom_textobjects = {
o = ai.gen_spec.treesitter({
a = { '@block.outer', '@conditional.outer', '@loop.outer' },
i = { '@block.inner', '@conditional.inner', '@loop.inner' },
}, {}),
f = ai.gen_spec.treesitter({ a = '@function.outer', i = '@function.inner' }, {}),
c = ai.gen_spec.treesitter({ a = '@class.outer', i = '@class.inner' }, {}),
t = { '<([%p%w]-)%f[^<%w][^<>]->.-</%1>', '^<.->().*()</[^/]->$' },
},
mappings = {
-- Main textobject prefixes
around = 'a',
inside = 'i',
-- Next/last variants
around_next = 'an',
inside_next = 'in',
around_last = 'al',
inside_last = 'il',
-- Move cursor to corresponding edge of `a` textobject
goto_left = 'g[',
goto_right = 'g]',
},
-- How to search for object
-- 'cover', 'cover_or_next', 'cover_or_prev','cover_or_nearest', 'next', 'previous', 'nearest'.
search_method = 'cover_or_next',
n_lines = 500,
silent = false,
})