my-nvim-lua/lua/plugins/configs/treesitter.lua

27 lines
461 B
Lua
Raw Normal View History

local present, ts_config = pcall(require, "nvim-treesitter.configs")
2021-11-17 05:30:57 +00:00
if not present then
return
2021-06-25 16:06:13 +00:00
end
local default = {
ensure_installed = {
"lua",
"vim",
},
highlight = {
enable = true,
use_languagetree = true,
},
}
local M = {}
M.setup = function(override_flag)
if override_flag then
default = require("core.utils").tbl_override_req("nvim_treesitter", default)
end
ts_config.setup(default)
end
return M