config: Seperate plugin and non-plugin configs

This commit is contained in:
Akianonymus 2021-08-22 11:58:15 +05:30 committed by siduck76
parent e08a460543
commit 3ee3b0368a
2 changed files with 155 additions and 151 deletions

View File

@ -2,6 +2,7 @@
local M = {}
-- non plugin ui configs, available without any plugins
M.ui = {
italic_comments = false,
@ -20,23 +21,22 @@ M.ui = {
-- Enable this only if your terminal has the colorscheme set which nvchad uses
-- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal
transparency = false,
}
-- plugin related ui options
plugin = {
M.ui.plugin = {
-- statusline related options
statusline = {
-- these are filetypes, not pattern matched
-- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden
hidden = {},
shown = {
-- "terminal"
},
shown = {},
-- default, round , slant , block , arrow
style = "default",
},
},
}
-- non plugin normal, available without any plugins
M.options = {
clipboard = "unnamedplus",
cmdheight = 1,
@ -60,13 +60,13 @@ M.options = {
-- used for updater
update_url = "https://github.com/NvChad/NvChad",
update_branch = "main",
}
-- these are plugin related options
plugin = {
M.options.plugin = {
autosave = false, -- autosave on changed text or insert mode leave
-- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape
esc_insertmode_timeout = 300,
},
}
-- enable and disable plugins (false for disable)
@ -91,7 +91,8 @@ M.plugin_status = {
vim_matchup = true, -- % magic, match it but improved
}
-- make sure you dont use same keys twice
-- mappings -- don't use a single keymap twice --
-- non plugin mappings
M.mappings = {
-- close current focused buffer
close_buffer = "<leader>x",
@ -131,10 +132,11 @@ M.mappings = {
-- update nvchad from nvchad, chadness 101
update_nvchad = "<leader>uu",
}
-- all plugins related mappings
-- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here
plugin = {
M.mappings.plugin = {
bufferline = {
next_buffer = "<TAB>", -- next buffer
prev_buffer = "<S-Tab>", -- previous buffer
@ -187,7 +189,6 @@ M.mappings = {
git = "<leader>gs",
git_blame = "<leader>gb",
},
},
}
return M

View File

@ -2,6 +2,7 @@
local M = {}
-- non plugin ui configs, available without any plugins
M.ui = {
italic_comments = false,
@ -20,9 +21,10 @@ M.ui = {
-- Enable this only if your terminal has the colorscheme set which nvchad uses
-- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal
transparency = false,
}
-- plugin related ui options
plugin = {
M.ui.plugin = {
-- statusline related options
statusline = {
-- these are filetypes, not pattern matched
@ -36,9 +38,9 @@ M.ui = {
-- default, round , slant , block , arrow
style = "default",
},
},
}
-- non plugin normal, available without any plugins
M.options = {
clipboard = "unnamedplus",
cmdheight = 1,
@ -62,13 +64,13 @@ M.options = {
-- used for updater
update_url = "https://github.com/NvChad/NvChad",
update_branch = "main",
}
-- these are plugin related options
plugin = {
M.options.plugin = {
autosave = false, -- autosave on changed text or insert mode leave
-- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape
esc_insertmode_timeout = 300,
},
}
-- enable and disable plugins (false for disable)
@ -93,7 +95,8 @@ M.plugin_status = {
vim_matchup = true, -- % magic, match it but improved
}
-- make sure you dont use same keys twice
-- mappings -- don't use a single keymap twice --
-- non plugin mappings
M.mappings = {
-- close current focused buffer
close_buffer = "<leader>x",
@ -133,10 +136,11 @@ M.mappings = {
-- update nvchad from nvchad, chadness 101
update_nvchad = "<leader>uu",
}
-- all plugins related mappings
-- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here
plugin = {
M.mappings.plugin = {
bufferline = {
next_buffer = "<TAB>", -- next buffer
prev_buffer = "<S-Tab>", -- previous buffer
@ -189,7 +193,6 @@ M.mappings = {
git = "<leader>gs",
git_blame = "<leader>gb",
},
},
}
return M