34 lines
814 B
Lua
34 lines
814 B
Lua
return {
|
|
"nvim-treesitter/nvim-treesitter",
|
|
build = function() require("nvim-treesitter.install").update({ with_sync = true })() end,
|
|
event = { "BufReadPost" },
|
|
config = function()
|
|
local configs = require("nvim-treesitter.configs")
|
|
configs.setup({
|
|
ensure_installed = {
|
|
"html",
|
|
"json",
|
|
"cmake",
|
|
"make",
|
|
"python",
|
|
"go",
|
|
"rust",
|
|
"yaml",
|
|
"bash",
|
|
},
|
|
highlight = {
|
|
enable = true,
|
|
disable = function(lang, buf)
|
|
local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
|
|
if ok and stats and stats.size > require("commons").constants.big_file_size_limit then
|
|
return true
|
|
end
|
|
end,
|
|
},
|
|
playground = { enable = false },
|
|
incremental_selection = { enable = true },
|
|
indent = { enable = true },
|
|
})
|
|
end,
|
|
}
|