1 require'nvim-treesitter'.setup {
2 -- A list of parser names, or "all"
3 ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
5 -- Automatically install missing parsers when entering buffer
6 -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
12 -- to disable slow treesitter highlight for large files
13 disable = function(lang, buf)
14 local max_filesize = 100 * 1024 -- 100 KB
15 local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
16 if ok and stats and stats.size > max_filesize then
20 additional_vim_regex_highlighting = false,