config: Seperate plugin and non-plugin configs
This commit is contained in:
parent
e08a460543
commit
3ee3b0368a
151
lua/chadrc.lua
151
lua/chadrc.lua
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
-- non plugin ui configs, available without any plugins
|
||||||
M.ui = {
|
M.ui = {
|
||||||
italic_comments = false,
|
italic_comments = false,
|
||||||
|
|
||||||
@ -20,23 +21,22 @@ M.ui = {
|
|||||||
-- Enable this only if your terminal has the colorscheme set which nvchad uses
|
-- 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
|
-- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal
|
||||||
transparency = false,
|
transparency = false,
|
||||||
|
}
|
||||||
|
|
||||||
-- plugin related ui options
|
-- plugin related ui options
|
||||||
plugin = {
|
M.ui.plugin = {
|
||||||
-- statusline related options
|
-- statusline related options
|
||||||
statusline = {
|
statusline = {
|
||||||
-- these are filetypes, not pattern matched
|
-- these are filetypes, not pattern matched
|
||||||
-- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden
|
-- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden
|
||||||
hidden = {},
|
hidden = {},
|
||||||
shown = {
|
shown = {},
|
||||||
-- "terminal"
|
-- default, round , slant , block , arrow
|
||||||
},
|
style = "default",
|
||||||
-- default, round , slant , block , arrow
|
|
||||||
style = "default",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- non plugin normal, available without any plugins
|
||||||
M.options = {
|
M.options = {
|
||||||
clipboard = "unnamedplus",
|
clipboard = "unnamedplus",
|
||||||
cmdheight = 1,
|
cmdheight = 1,
|
||||||
@ -60,13 +60,13 @@ M.options = {
|
|||||||
-- used for updater
|
-- used for updater
|
||||||
update_url = "https://github.com/NvChad/NvChad",
|
update_url = "https://github.com/NvChad/NvChad",
|
||||||
update_branch = "main",
|
update_branch = "main",
|
||||||
|
}
|
||||||
|
|
||||||
-- these are plugin related options
|
-- these are plugin related options
|
||||||
plugin = {
|
M.options.plugin = {
|
||||||
autosave = false, -- autosave on changed text or insert mode leave
|
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
|
-- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape
|
||||||
esc_insertmode_timeout = 300,
|
esc_insertmode_timeout = 300,
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- enable and disable plugins (false for disable)
|
-- enable and disable plugins (false for disable)
|
||||||
@ -91,7 +91,8 @@ M.plugin_status = {
|
|||||||
vim_matchup = true, -- % magic, match it but improved
|
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 = {
|
M.mappings = {
|
||||||
-- close current focused buffer
|
-- close current focused buffer
|
||||||
close_buffer = "<leader>x",
|
close_buffer = "<leader>x",
|
||||||
@ -131,62 +132,62 @@ M.mappings = {
|
|||||||
|
|
||||||
-- update nvchad from nvchad, chadness 101
|
-- update nvchad from nvchad, chadness 101
|
||||||
update_nvchad = "<leader>uu",
|
update_nvchad = "<leader>uu",
|
||||||
|
}
|
||||||
|
|
||||||
-- all plugins related mappings
|
-- all plugins related mappings
|
||||||
-- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here
|
-- 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 = {
|
bufferline = {
|
||||||
next_buffer = "<TAB>", -- next buffer
|
next_buffer = "<TAB>", -- next buffer
|
||||||
prev_buffer = "<S-Tab>", -- previous buffer
|
prev_buffer = "<S-Tab>", -- previous buffer
|
||||||
},
|
},
|
||||||
chadsheet = {
|
chadsheet = {
|
||||||
default_keys = "<leader>dk",
|
default_keys = "<leader>dk",
|
||||||
user_keys = "<leader>uk",
|
user_keys = "<leader>uk",
|
||||||
},
|
},
|
||||||
comment = {
|
comment = {
|
||||||
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
||||||
},
|
},
|
||||||
dashboard = {
|
dashboard = {
|
||||||
bookmarks = "<leader>bm",
|
bookmarks = "<leader>bm",
|
||||||
new_file = "<leader>fn", -- basically create a new buffer
|
new_file = "<leader>fn", -- basically create a new buffer
|
||||||
open = "<leader>db", -- open dashboard
|
open = "<leader>db", -- open dashboard
|
||||||
session_load = "<leader>l", -- load a saved session
|
session_load = "<leader>l", -- load a saved session
|
||||||
session_save = "<leader>s", -- save a session
|
session_save = "<leader>s", -- save a session
|
||||||
},
|
},
|
||||||
-- note: this is an edditional mapping to escape, escape key will still work
|
-- note: this is an edditional mapping to escape, escape key will still work
|
||||||
better_escape = {
|
better_escape = {
|
||||||
esc_insertmode = { "jk" }, -- multiple mappings allowed
|
esc_insertmode = { "jk" }, -- multiple mappings allowed
|
||||||
},
|
},
|
||||||
nvimtree = {
|
nvimtree = {
|
||||||
toggle = "<C-n>", -- file manager
|
toggle = "<C-n>", -- file manager
|
||||||
},
|
},
|
||||||
neoformat = {
|
neoformat = {
|
||||||
format = "<leader>fm",
|
format = "<leader>fm",
|
||||||
},
|
},
|
||||||
telescope = {
|
telescope = {
|
||||||
buffers = "<leader>fb",
|
buffers = "<leader>fb",
|
||||||
find_files = "<leader>ff",
|
find_files = "<leader>ff",
|
||||||
git_commits = "<leader>cm",
|
git_commits = "<leader>cm",
|
||||||
git_status = "<leader>gt",
|
git_status = "<leader>gt",
|
||||||
help_tags = "<leader>fh",
|
help_tags = "<leader>fh",
|
||||||
live_grep = "<leader>fw",
|
live_grep = "<leader>fw",
|
||||||
oldfiles = "<leader>fo",
|
oldfiles = "<leader>fo",
|
||||||
themes = "<leader>th",
|
themes = "<leader>th",
|
||||||
},
|
},
|
||||||
telescope_media = {
|
telescope_media = {
|
||||||
media_files = "<leader>fp",
|
media_files = "<leader>fp",
|
||||||
},
|
},
|
||||||
truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers
|
truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers
|
||||||
ataraxis_mode = "<leader>zz", -- center
|
ataraxis_mode = "<leader>zz", -- center
|
||||||
focus_mode = "<leader>zf",
|
focus_mode = "<leader>zf",
|
||||||
minimalistic_mode = "<leader>zm", -- as it is
|
minimalistic_mode = "<leader>zm", -- as it is
|
||||||
},
|
},
|
||||||
vim_fugitive = {
|
vim_fugitive = {
|
||||||
diff_get_2 = "<leader>gh",
|
diff_get_2 = "<leader>gh",
|
||||||
diff_get_3 = "<leader>gl",
|
diff_get_3 = "<leader>gl",
|
||||||
git = "<leader>gs",
|
git = "<leader>gs",
|
||||||
git_blame = "<leader>gb",
|
git_blame = "<leader>gb",
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
-- non plugin ui configs, available without any plugins
|
||||||
M.ui = {
|
M.ui = {
|
||||||
italic_comments = false,
|
italic_comments = false,
|
||||||
|
|
||||||
@ -20,25 +21,26 @@ M.ui = {
|
|||||||
-- Enable this only if your terminal has the colorscheme set which nvchad uses
|
-- 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
|
-- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal
|
||||||
transparency = false,
|
transparency = false,
|
||||||
|
}
|
||||||
|
|
||||||
-- plugin related ui options
|
-- plugin related ui options
|
||||||
plugin = {
|
M.ui.plugin = {
|
||||||
-- statusline related options
|
-- statusline related options
|
||||||
statusline = {
|
statusline = {
|
||||||
-- these are filetypes, not pattern matched
|
-- these are filetypes, not pattern matched
|
||||||
-- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden
|
-- if a filetype is present in shown, it will always show the statusline, irrespective of filetypes in hidden
|
||||||
hidden = {
|
hidden = {
|
||||||
"NvimTree",
|
"NvimTree",
|
||||||
"terminal",
|
"terminal",
|
||||||
"dashboard",
|
"dashboard",
|
||||||
},
|
|
||||||
shown = {},
|
|
||||||
-- default, round , slant , block , arrow
|
|
||||||
style = "default",
|
|
||||||
},
|
},
|
||||||
|
shown = {},
|
||||||
|
-- default, round , slant , block , arrow
|
||||||
|
style = "default",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- non plugin normal, available without any plugins
|
||||||
M.options = {
|
M.options = {
|
||||||
clipboard = "unnamedplus",
|
clipboard = "unnamedplus",
|
||||||
cmdheight = 1,
|
cmdheight = 1,
|
||||||
@ -62,13 +64,13 @@ M.options = {
|
|||||||
-- used for updater
|
-- used for updater
|
||||||
update_url = "https://github.com/NvChad/NvChad",
|
update_url = "https://github.com/NvChad/NvChad",
|
||||||
update_branch = "main",
|
update_branch = "main",
|
||||||
|
}
|
||||||
|
|
||||||
-- these are plugin related options
|
-- these are plugin related options
|
||||||
plugin = {
|
M.options.plugin = {
|
||||||
autosave = false, -- autosave on changed text or insert mode leave
|
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
|
-- timeout to be used for using escape with a key combination, see mappings.plugin.better_escape
|
||||||
esc_insertmode_timeout = 300,
|
esc_insertmode_timeout = 300,
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- enable and disable plugins (false for disable)
|
-- enable and disable plugins (false for disable)
|
||||||
@ -93,7 +95,8 @@ M.plugin_status = {
|
|||||||
vim_matchup = true, -- % magic, match it but improved
|
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 = {
|
M.mappings = {
|
||||||
-- close current focused buffer
|
-- close current focused buffer
|
||||||
close_buffer = "<leader>x",
|
close_buffer = "<leader>x",
|
||||||
@ -133,62 +136,62 @@ M.mappings = {
|
|||||||
|
|
||||||
-- update nvchad from nvchad, chadness 101
|
-- update nvchad from nvchad, chadness 101
|
||||||
update_nvchad = "<leader>uu",
|
update_nvchad = "<leader>uu",
|
||||||
|
}
|
||||||
|
|
||||||
-- all plugins related mappings
|
-- all plugins related mappings
|
||||||
-- to get short info about a plugin, see the respective string in plugin_status, if not present, then info here
|
-- 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 = {
|
bufferline = {
|
||||||
next_buffer = "<TAB>", -- next buffer
|
next_buffer = "<TAB>", -- next buffer
|
||||||
prev_buffer = "<S-Tab>", -- previous buffer
|
prev_buffer = "<S-Tab>", -- previous buffer
|
||||||
},
|
},
|
||||||
chadsheet = {
|
chadsheet = {
|
||||||
default_keys = "<leader>dk",
|
default_keys = "<leader>dk",
|
||||||
user_keys = "<leader>uk",
|
user_keys = "<leader>uk",
|
||||||
},
|
},
|
||||||
comment = {
|
comment = {
|
||||||
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
||||||
},
|
},
|
||||||
dashboard = {
|
dashboard = {
|
||||||
bookmarks = "<leader>bm",
|
bookmarks = "<leader>bm",
|
||||||
new_file = "<leader>fn", -- basically create a new buffer
|
new_file = "<leader>fn", -- basically create a new buffer
|
||||||
open = "<leader>db", -- open dashboard
|
open = "<leader>db", -- open dashboard
|
||||||
session_load = "<leader>l", -- load a saved session
|
session_load = "<leader>l", -- load a saved session
|
||||||
session_save = "<leader>s", -- save a session
|
session_save = "<leader>s", -- save a session
|
||||||
},
|
},
|
||||||
-- note: this is an edditional mapping to escape, escape key will still work
|
-- note: this is an edditional mapping to escape, escape key will still work
|
||||||
better_escape = {
|
better_escape = {
|
||||||
esc_insertmode = { "jk" }, -- multiple mappings allowed
|
esc_insertmode = { "jk" }, -- multiple mappings allowed
|
||||||
},
|
},
|
||||||
nvimtree = {
|
nvimtree = {
|
||||||
toggle = "<C-n>", -- file manager
|
toggle = "<C-n>", -- file manager
|
||||||
},
|
},
|
||||||
neoformat = {
|
neoformat = {
|
||||||
format = "<leader>fm",
|
format = "<leader>fm",
|
||||||
},
|
},
|
||||||
telescope = {
|
telescope = {
|
||||||
buffers = "<leader>fb",
|
buffers = "<leader>fb",
|
||||||
find_files = "<leader>ff",
|
find_files = "<leader>ff",
|
||||||
git_commits = "<leader>cm",
|
git_commits = "<leader>cm",
|
||||||
git_status = "<leader>gt",
|
git_status = "<leader>gt",
|
||||||
help_tags = "<leader>fh",
|
help_tags = "<leader>fh",
|
||||||
live_grep = "<leader>fw",
|
live_grep = "<leader>fw",
|
||||||
oldfiles = "<leader>fo",
|
oldfiles = "<leader>fo",
|
||||||
themes = "<leader>th",
|
themes = "<leader>th",
|
||||||
},
|
},
|
||||||
telescope_media = {
|
telescope_media = {
|
||||||
media_files = "<leader>fp",
|
media_files = "<leader>fp",
|
||||||
},
|
},
|
||||||
truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers
|
truezen = { -- distraction free modes mapping, hide statusline, tabline, line numbers
|
||||||
ataraxis_mode = "<leader>zz", -- center
|
ataraxis_mode = "<leader>zz", -- center
|
||||||
focus_mode = "<leader>zf",
|
focus_mode = "<leader>zf",
|
||||||
minimalistic_mode = "<leader>zm", -- as it is
|
minimalistic_mode = "<leader>zm", -- as it is
|
||||||
},
|
},
|
||||||
vim_fugitive = {
|
vim_fugitive = {
|
||||||
diff_get_2 = "<leader>gh",
|
diff_get_2 = "<leader>gh",
|
||||||
diff_get_3 = "<leader>gl",
|
diff_get_3 = "<leader>gl",
|
||||||
git = "<leader>gs",
|
git = "<leader>gs",
|
||||||
git_blame = "<leader>gb",
|
git_blame = "<leader>gb",
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user