tree-wide: Format files | Reformat chadrc | Misc (#268)
chadrc: looks cleaner this way move close buffer to misc as it is not dependent on buffer plugin
This commit is contained in:
parent
29f3259c42
commit
98086892a7
260
lua/chadrc.lua
260
lua/chadrc.lua
|
@ -1,131 +1,141 @@
|
||||||
local M = {
|
local M = {}
|
||||||
ui = {
|
|
||||||
theme = "onedark",
|
M.ui = {
|
||||||
fav_themes = { "onedark", "gruvchad" }, -- for theme toggle
|
theme = "onedark",
|
||||||
theme_toggler = false,
|
-- for theme toggle
|
||||||
hidden_statusline = {
|
fav_themes = {
|
||||||
-- these are filetypes, not pattern matched
|
"onedark",
|
||||||
"NvimTree",
|
"gruvchad",
|
||||||
"toggleterm",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
options = {
|
theme_toggler = false,
|
||||||
permanent_undo = true,
|
hidden_statusline = {
|
||||||
ruler = false,
|
-- these are filetypes, not pattern matched
|
||||||
hidden = true,
|
"NvimTree",
|
||||||
ignorecase = true,
|
"toggleterm",
|
||||||
mouse = "a",
|
|
||||||
cmdheight = 1,
|
|
||||||
updatetime = 250,
|
|
||||||
timeoutlen = 400,
|
|
||||||
clipboard = "unnamedplus",
|
|
||||||
number = true,
|
|
||||||
numberwidth = 2,
|
|
||||||
expandtab = true,
|
|
||||||
shiftwidth = 2,
|
|
||||||
smartindent = true,
|
|
||||||
mapleader = " ",
|
|
||||||
autosave = false,
|
|
||||||
enable_insertNav = true, -- navigation in insertmode
|
|
||||||
},
|
},
|
||||||
-- enable and disable plugins (true for disable)
|
}
|
||||||
plugin_status = {
|
|
||||||
-- UI
|
M.options = {
|
||||||
nvim_bufferline = true,
|
permanent_undo = true,
|
||||||
galaxyline = true,
|
ruler = false,
|
||||||
nvim_colorizer = true,
|
hidden = true,
|
||||||
dashboard_nvim = true,
|
ignorecase = true,
|
||||||
blankline = true,
|
mouse = "a",
|
||||||
truezen_nvim = true,
|
cmdheight = 1,
|
||||||
better_esc = true,
|
updatetime = 250,
|
||||||
-- lsp stuff
|
timeoutlen = 400,
|
||||||
lspkind = true,
|
clipboard = "unnamedplus",
|
||||||
lspsignature = true,
|
number = true,
|
||||||
-- git stuff
|
numberwidth = 2,
|
||||||
gitsigns = true,
|
expandtab = true,
|
||||||
vim_fugitive = true,
|
shiftwidth = 2,
|
||||||
-- misc
|
smartindent = true,
|
||||||
neoformat = true,
|
mapleader = " ",
|
||||||
vim_matchup = true,
|
autosave = false,
|
||||||
autosave_nvim = true,
|
enable_insertNav = true, -- navigation in insertmode
|
||||||
nvim_comment = true,
|
}
|
||||||
neoscroll_nvim = true,
|
|
||||||
telescope_media = true,
|
-- enable and disable plugins (false for disable)
|
||||||
cheatsheet = false,
|
M.plugin_status = {
|
||||||
|
-- UI
|
||||||
|
nvim_bufferline = true,
|
||||||
|
galaxyline = true,
|
||||||
|
nvim_colorizer = true,
|
||||||
|
dashboard_nvim = true,
|
||||||
|
blankline = true,
|
||||||
|
truezen_nvim = true,
|
||||||
|
better_esc = true,
|
||||||
|
-- lsp stuff
|
||||||
|
lspkind = true,
|
||||||
|
lspsignature = true,
|
||||||
|
-- git stuff
|
||||||
|
gitsigns = true,
|
||||||
|
vim_fugitive = true,
|
||||||
|
-- misc
|
||||||
|
neoformat = true,
|
||||||
|
vim_matchup = true,
|
||||||
|
autosave_nvim = true,
|
||||||
|
nvim_comment = true,
|
||||||
|
neoscroll_nvim = true,
|
||||||
|
telescope_media = true,
|
||||||
|
cheatsheet = false,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- make sure you dont use same keys twice
|
||||||
|
M.mappings = {
|
||||||
|
-- plugin specific
|
||||||
|
truezen = {
|
||||||
|
ataraxisMode = "<leader>zz",
|
||||||
|
minimalisticmode = "<leader>zm",
|
||||||
|
focusmode = "<leader>zf",
|
||||||
},
|
},
|
||||||
-- make sure you dont use same keys twice
|
comment_nvim = {
|
||||||
mappings = {
|
comment_toggle = "<leader>/",
|
||||||
truezen = {
|
},
|
||||||
ataraxisMode = "<leader>zz",
|
nvimtree = {
|
||||||
minimalisticmode = "<leader>zm",
|
treetoggle = "<C-n>", -- file manager
|
||||||
focusmode = "<leader>zf",
|
},
|
||||||
},
|
neoformat = {
|
||||||
comment_nvim = {
|
format = "<leader>fm",
|
||||||
comment_toggle = "<leader>/",
|
},
|
||||||
},
|
dashboard = {
|
||||||
nvimtree = {
|
open = "<leader>db",
|
||||||
treetoggle = "<C-n>",
|
newfile = "<leader>fn",
|
||||||
},
|
bookmarks = "<leader>bm",
|
||||||
neoformat = {
|
sessionload = "<leader>l",
|
||||||
format = "<leader>fm",
|
sessionsave = "<leader>s",
|
||||||
},
|
},
|
||||||
dashboard = {
|
telescope = {
|
||||||
open = "<leader>db",
|
live_grep = "<leader>fw",
|
||||||
newfile = "<leader>fn",
|
git_status = "<leader>gt",
|
||||||
bookmarks = "<leader>bm",
|
git_commits = "<leader>cm",
|
||||||
sessionload = "<leader>l",
|
find_files = "<leader>ff",
|
||||||
sessionsave = "<leader>s",
|
buffers = "<leader>fb",
|
||||||
},
|
help_tags = "<leader>fh",
|
||||||
telescope = {
|
oldfiles = "<leader>fo",
|
||||||
live_grep = "<leader>fw",
|
themes = "<leader>th",
|
||||||
git_status = "<leader>gt",
|
},
|
||||||
git_commits = "<leader>cm",
|
telescope_media = {
|
||||||
find_files = "<leader>ff",
|
media_files = "<leader>fp",
|
||||||
buffers = "<leader>fb",
|
},
|
||||||
help_tags = "<leader>fh",
|
chadsheet = {
|
||||||
oldfiles = "<leader>fo",
|
default_keys = "<leader>dk",
|
||||||
themes = "<leader>th",
|
user_keys = "<leader>uk",
|
||||||
},
|
},
|
||||||
telescope_media = {
|
bufferline = {
|
||||||
media_files = "<leader>fp",
|
new_buffer = "<S-t>",
|
||||||
},
|
newtab = "<C-t>b",
|
||||||
chadsheet = {
|
cycleNext = "<TAB>", -- next buffer
|
||||||
default_keys = "<leader>dk",
|
cyclePrev = "<S-Tab>", -- previous buffer
|
||||||
user_keys = "<leader>uk",
|
},
|
||||||
},
|
fugitive = {
|
||||||
bufferline = {
|
Git = "<leader>gs",
|
||||||
new_buffer = "<S-t>",
|
diffget_2 = "<leader>gh",
|
||||||
newtab = "<C-t>b",
|
diffget_3 = "<leader>gl",
|
||||||
close = "<S-x>",
|
git_blame = "<leader>gb",
|
||||||
cycleNext = "<TAB>",
|
},
|
||||||
cyclePrev = "<S-Tab>",
|
toggleterm = {
|
||||||
},
|
toggle_window = "<leader>w",
|
||||||
fugitive = {
|
toggle_vert = "<leader>v",
|
||||||
Git = "<leader>gs",
|
toggle_hori = "<leader>h",
|
||||||
diffget_2 = "<leader>gh",
|
hide_term = "JK",
|
||||||
diffget_3 = "<leader>gl",
|
},
|
||||||
git_blame = "<leader>gb",
|
-- navigation in insert mode
|
||||||
},
|
insert_nav = {
|
||||||
toggleterm = {
|
forward = "<C-l>",
|
||||||
toggle_window = "<leader>w",
|
backward = "<C-h>",
|
||||||
toggle_vert = "<leader>v",
|
top_of_line = "<C-a>",
|
||||||
toggle_hori = "<leader>h",
|
end_of_line = "<C-e>",
|
||||||
hide_term = "JK",
|
prev_line = "<C-j>",
|
||||||
},
|
next_line = "<C-k>",
|
||||||
insert_nav = {
|
},
|
||||||
forward = "<C-l>",
|
-- non plugin
|
||||||
backward = "<C-h>",
|
misc = {
|
||||||
top_of_line = "<C-a>",
|
esc_Termmode = "jk", -- get out of terminal mode
|
||||||
end_of_line = "<C-e>",
|
close_buffer = "<S-x>", -- close current focused buffer
|
||||||
prev_line = "<C-j>",
|
copywhole_file = "<C-a>",
|
||||||
next_line = "<C-k>",
|
toggle_linenr = "<leader>n", -- show or hide line number
|
||||||
},
|
theme_toggle = "<leader>x",
|
||||||
misc = {
|
|
||||||
esc_Termmode = "jk",
|
|
||||||
copywhole_file = "<C-a>",
|
|
||||||
toggle_linenr = "<leader>n",
|
|
||||||
theme_toggle = "<leader>x",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,10 @@ map("n", miscMap.toggle_linenr, ":set nu!<CR>", opt)
|
||||||
-- get out of terminal with jk
|
-- get out of terminal with jk
|
||||||
map("t", miscMap.esc_Termmode, "<C-\\><C-n>", opt)
|
map("t", miscMap.esc_Termmode, "<C-\\><C-n>", opt)
|
||||||
|
|
||||||
|
-- close current focused buffer, terminal or normal
|
||||||
|
-- todo: don't close if non-terminal buffer is saved
|
||||||
|
map("n", miscMap.close_buffer, ":bd!<CR>", opt)
|
||||||
|
|
||||||
M.toggleterm = function()
|
M.toggleterm = function()
|
||||||
local m = user_map.toggleterm
|
local m = user_map.toggleterm
|
||||||
|
|
||||||
|
@ -131,7 +135,6 @@ M.bufferline = function()
|
||||||
|
|
||||||
map("n", m.new_buffer, ":enew<CR>", opt) -- new buffer
|
map("n", m.new_buffer, ":enew<CR>", opt) -- new buffer
|
||||||
map("n", m.newtab, ":tabnew<CR>", opt) -- new tab
|
map("n", m.newtab, ":tabnew<CR>", opt) -- new tab
|
||||||
map("n", m.close, ":bd!<CR>", opt) -- close buffer
|
|
||||||
|
|
||||||
-- move between tabs
|
-- move between tabs
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#343642",
|
lightbg = "#343642",
|
||||||
lightbg2 = "#2f313d",
|
lightbg2 = "#2f313d",
|
||||||
pmenu_bg = "#b389ef",
|
pmenu_bg = "#b389ef",
|
||||||
folder_bg = "#BD93F9"
|
folder_bg = "#BD93F9",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#3d454b",
|
lightbg = "#3d454b",
|
||||||
lightbg2 = "#333b41",
|
lightbg2 = "#333b41",
|
||||||
pmenu_bg = "#83c092",
|
pmenu_bg = "#83c092",
|
||||||
folder_bg = "#7fbbb3"
|
folder_bg = "#7fbbb3",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#2d3139",
|
lightbg = "#2d3139",
|
||||||
lightbg2 = "#262a32",
|
lightbg2 = "#262a32",
|
||||||
pmenu_bg = "#89b482",
|
pmenu_bg = "#89b482",
|
||||||
folder_bg = "#6d8dad"
|
folder_bg = "#6d8dad",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#2d3339",
|
lightbg = "#2d3339",
|
||||||
lightbg2 = "#252b31",
|
lightbg2 = "#252b31",
|
||||||
pmenu_bg = "#8aac8b",
|
pmenu_bg = "#8aac8b",
|
||||||
folder_bg = "#6b8bab"
|
folder_bg = "#6b8bab",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#3f4551",
|
lightbg = "#3f4551",
|
||||||
lightbg2 = "#393f4b",
|
lightbg2 = "#393f4b",
|
||||||
pmenu_bg = "#A3BE8C",
|
pmenu_bg = "#A3BE8C",
|
||||||
folder_bg = "#7797b7"
|
folder_bg = "#7797b7",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#d6d6d6",
|
lightbg = "#d6d6d6",
|
||||||
lightbg2 = "#5e5f65",
|
lightbg2 = "#5e5f65",
|
||||||
pmenu_bg = "#5e5f65",
|
pmenu_bg = "#5e5f65",
|
||||||
folder_bg = "#6C6C6C"
|
folder_bg = "#6C6C6C",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#2d3139",
|
lightbg = "#2d3139",
|
||||||
lightbg2 = "#262a32",
|
lightbg2 = "#262a32",
|
||||||
pmenu_bg = "#A3BE8C",
|
pmenu_bg = "#A3BE8C",
|
||||||
folder_bg = "#61afef"
|
folder_bg = "#61afef",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#252631",
|
lightbg = "#252631",
|
||||||
lightbg2 = "#22232e",
|
lightbg2 = "#22232e",
|
||||||
pmenu_bg = "#7aa2f7",
|
pmenu_bg = "#7aa2f7",
|
||||||
folder_bg = "#7aa2f7"
|
folder_bg = "#7aa2f7",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
|
@ -29,7 +29,7 @@ local colors = {
|
||||||
lightbg = "#373B41",
|
lightbg = "#373B41",
|
||||||
lightbg2 = "#2D3035",
|
lightbg2 = "#2D3035",
|
||||||
pmenu_bg = "#a4b595",
|
pmenu_bg = "#a4b595",
|
||||||
folder_bg = "#6f8dab"
|
folder_bg = "#6f8dab",
|
||||||
}
|
}
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
Loading…
Reference in New Issue