2024-01-02 17:59:50 +00:00
|
|
|
-- AST builder for parsers
|
|
|
|
-- https://github.com/nvim-treesitter/nvim-treesitter
|
|
|
|
return {
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
build = ":TSUpdate",
|
|
|
|
config = function()
|
|
|
|
require("nvim-treesitter.configs").setup({
|
|
|
|
auto_install = true,
|
|
|
|
highlight = {
|
|
|
|
enable = true,
|
2024-01-12 19:47:25 +00:00
|
|
|
is_supported = function ()
|
|
|
|
if vim.fn.strwidth(vim.fn.getline('.')) > 300
|
|
|
|
or vim.fn.getfsize(vim.fn.expand('%')) > 1024 * 1024 then
|
|
|
|
return false
|
|
|
|
else
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
2024-01-02 17:59:50 +00:00
|
|
|
},
|
|
|
|
enable = {
|
|
|
|
enable = true,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
}
|