omegalul treesitter config

This commit is contained in:
inorishio
2026-01-21 22:59:38 +01:00
parent 8ce88a35bc
commit a806dc285f
3 changed files with 241 additions and 14 deletions
+16 -13
View File
@@ -1,13 +1,16 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = "all",
ignore_install = { "ipkg" },
sync_install = true,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
},
}
local treesitter = require "nvim-treesitter"
treesitter.install { "all" }
vim.api.nvim_create_autocmd("FileType", {
callback = function(args)
local has_parser = pcall(vim.treesitter.get_parser, args.buf)
if not has_parser then
return
end
vim.treesitter.start()
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})