Configure treesitter

This commit is contained in:
2024-12-26 12:10:02 +01:00
parent a71985fcc9
commit f43e1b9df7
2 changed files with 23 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
return {
{
"nvim-treesitter",
lazy = false,
load = function() end,
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true
}
},
after = function(plug)
require("nvim-treesitter.configs").setup(plug.opts)
vim.wo.foldmethod = 'expr'
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
end
},
}