BREAKING CHANGE | re-implementation of custom config

This commit is contained in:
siduck
2022-04-27 21:12:28 +05:30
parent d906bb0d9c
commit adecbe719f
20 changed files with 835 additions and 1309 deletions

View File

@@ -1,10 +1,10 @@
local present, ts_config = pcall(require, "nvim-treesitter.configs")
local present, treesitter = pcall(require, "nvim-treesitter.configs")
if not present then
return
end
local default = {
local options = {
ensure_installed = {
"lua",
"vim",
@@ -15,12 +15,7 @@ local default = {
},
}
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
-- check for any override
options = require("core.utils").load_override(options, "nvim-treesitter/nvim-treesitter")
return M
treesitter.setup(options)