2024-06-01 03:53:39 +01:00
|
|
|
return {
|
|
|
|
|
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
event = { "BufReadPost", "BufNewFile" },
|
|
|
|
dependencies = {
|
|
|
|
'nvim-treesitter/nvim-treesitter-textobjects'
|
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
local treesitter = require("nvim-treesitter.configs")
|
|
|
|
|
|
|
|
require('nvim-treesitter.install').update({ with_sync = true })
|
2022-10-19 00:47:07 +01:00
|
|
|
|
|
|
|
|
2024-06-01 03:53:39 +01:00
|
|
|
local options = {
|
2024-09-12 21:41:15 +01:00
|
|
|
auto_install = true,
|
2024-06-01 03:53:39 +01:00
|
|
|
highlight = {
|
|
|
|
enable = true,
|
2024-10-07 20:16:38 +01:00
|
|
|
disable = { "latex" },
|
2024-06-01 03:53:39 +01:00
|
|
|
use_languagetree = true,
|
|
|
|
},
|
|
|
|
indent = {
|
|
|
|
enable = true,
|
|
|
|
},
|
|
|
|
}
|
2022-10-19 00:47:07 +01:00
|
|
|
|
2024-06-01 03:53:39 +01:00
|
|
|
treesitter.setup(options)
|
|
|
|
end
|
2023-01-14 04:05:17 +00:00
|
|
|
},
|
2024-06-01 03:53:39 +01:00
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter-context",
|
|
|
|
event = "VeryLazy",
|
|
|
|
config = function()
|
|
|
|
require 'treesitter-context'.setup()
|
|
|
|
end,
|
2023-01-14 04:05:17 +00:00
|
|
|
},
|
2024-06-01 03:53:39 +01:00
|
|
|
{
|
|
|
|
'echasnovski/mini.ai',
|
|
|
|
event = "VeryLazy",
|
|
|
|
version = false,
|
2024-10-11 15:13:51 +01:00
|
|
|
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
|
2024-04-27 16:02:41 +01:00
|
|
|
},
|
2022-10-19 00:47:07 +01:00
|
|
|
}
|