2021-07-17 07:14:52 -04:00
|
|
|
local present, ts_config = pcall(require, "nvim-treesitter.configs")
|
2021-11-17 00:30:57 -05:00
|
|
|
|
2021-07-17 07:14:52 -04:00
|
|
|
if not present then
|
2021-08-16 03:49:09 -04:00
|
|
|
return
|
2021-06-25 12:06:13 -04:00
|
|
|
end
|
|
|
|
|
2022-01-20 19:26:05 -05:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
local chad_defaults = {
|
2021-08-16 03:49:09 -04:00
|
|
|
ensure_installed = {
|
|
|
|
"lua",
|
2021-11-18 20:47:09 -05:00
|
|
|
"vim",
|
2021-08-16 03:49:09 -04:00
|
|
|
},
|
|
|
|
highlight = {
|
|
|
|
enable = true,
|
|
|
|
use_languagetree = true,
|
|
|
|
},
|
2021-07-15 11:43:17 -04:00
|
|
|
}
|
2022-01-20 19:26:05 -05:00
|
|
|
|
|
|
|
M.setup = function (override_flag)
|
|
|
|
if override_flag then
|
|
|
|
chad_defaults = require("core.utils").tbl_override_req("nvim_treesitter", chad_defaults)
|
|
|
|
end
|
|
|
|
ts_config.setup(chad_defaults)
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|