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

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
},
}

View File

@@ -18,6 +18,7 @@ vim.opt.splitbelow = true
vim.opt.inccommand = 'split'
vim.opt.wrap = false
vim.opt.foldlevelstart = 99
vim.opt.linebreak = true
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4