This commit is contained in:
siduck 2022-05-12 19:27:11 +05:30
parent 0844431d37
commit 25305eca92
3 changed files with 5 additions and 12 deletions

View File

@ -20,7 +20,6 @@ M.options = {
M.ui = { M.ui = {
hl_override = {}, hl_override = {},
changed_themes = {}, changed_themes = {},
colors = {}, -- dynamically generated, never edit this in chadrc
theme_toggle = { "onedark", "one_light" }, theme_toggle = { "onedark", "one_light" },
theme = "onedark", -- default theme theme = "onedark", -- default theme
transparency = false, transparency = false,

View File

@ -52,7 +52,7 @@ M.bufferline = {
n = { n = {
-- new buffer -- new buffer
["<TAB>n"] = { "<cmd> enew <CR>", "烙 new buffer" }, ["<S-b>"] = { "<cmd> enew <CR>", "烙 new buffer" },
-- cycle through buffers -- cycle through buffers
["<TAB>"] = { "<cmd> BufferLineCycleNext <CR>", " cycle next buffer" }, ["<TAB>"] = { "<cmd> BufferLineCycleNext <CR>", " cycle next buffer" },

View File

@ -89,11 +89,13 @@ end
-- remove plugins defined in chadrc -- remove plugins defined in chadrc
nvchad.remove_default_plugins = function(plugins) nvchad.remove_default_plugins = function(plugins)
local removals = nvchad.load_config().plugins.remove or {} local removals = nvchad.load_config().plugins.remove or {}
if not vim.tbl_isempty(removals) then if not vim.tbl_isempty(removals) then
for _, plugin in pairs(removals) do for _, plugin in pairs(removals) do
plugins[plugin] = nil plugins[plugin] = nil
end end
end end
return plugins return plugins
end end
@ -101,16 +103,6 @@ end
nvchad.plugin_list = function(default_plugins) nvchad.plugin_list = function(default_plugins)
local user_plugins = nvchad.load_config().plugins.user local user_plugins = nvchad.load_config().plugins.user
-- require if string is present
local ok
if type(user_plugins) == "string" then
ok, user_plugins = pcall(require, user_plugins)
if ok and not type(user_plugins) == "table" then
user_plugins = {}
end
end
-- merge default + user plugin table -- merge default + user plugin table
default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins) default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins)
@ -127,10 +119,12 @@ end
nvchad.load_override = function(default_table, plugin_name) nvchad.load_override = function(default_table, plugin_name)
local user_table = nvchad.load_config().plugins.override[plugin_name] local user_table = nvchad.load_config().plugins.override[plugin_name]
if type(user_table) == "table" then if type(user_table) == "table" then
default_table = vim.tbl_deep_extend("force", default_table, user_table) default_table = vim.tbl_deep_extend("force", default_table, user_table)
else else
default_table = default_table default_table = default_table
end end
return default_table return default_table
end end