add mapping, highlights for keybind cheatsheet | disable indentline in it
This commit is contained in:
parent
653a2f5337
commit
6347a00023
4 changed files with 25 additions and 3 deletions
|
@ -21,6 +21,7 @@ local purple = colors.purple
|
||||||
local red = colors.red
|
local red = colors.red
|
||||||
local white = colors.white
|
local white = colors.white
|
||||||
local yellow = colors.yellow
|
local yellow = colors.yellow
|
||||||
|
local orange = colors.orange
|
||||||
local one_bg3 = colors.one_bg3
|
local one_bg3 = colors.one_bg3
|
||||||
|
|
||||||
-- functions for setting highlights
|
-- functions for setting highlights
|
||||||
|
@ -45,7 +46,7 @@ fg("EndOfBuffer", black)
|
||||||
|
|
||||||
-- For floating windows
|
-- For floating windows
|
||||||
fg("FloatBorder", blue)
|
fg("FloatBorder", blue)
|
||||||
bg("NormalFloat", one_bg)
|
bg("NormalFloat", darker_black)
|
||||||
|
|
||||||
-- Pmenu
|
-- Pmenu
|
||||||
bg("Pmenu", one_bg)
|
bg("Pmenu", one_bg)
|
||||||
|
@ -138,10 +139,29 @@ bg("TelescopeNormal", darker_black)
|
||||||
|
|
||||||
fg_bg("TelescopePreviewTitle", black, green)
|
fg_bg("TelescopePreviewTitle", black, green)
|
||||||
fg_bg("TelescopePromptTitle", black, red)
|
fg_bg("TelescopePromptTitle", black, red)
|
||||||
fg_bg("TelescopeResultsTitle", darker_black,darker_black)
|
fg_bg("TelescopeResultsTitle", darker_black, darker_black)
|
||||||
|
|
||||||
bg("TelescopeSelection", black2)
|
bg("TelescopeSelection", black2)
|
||||||
|
|
||||||
|
-- keybinds cheatsheet
|
||||||
|
|
||||||
|
fg_bg("CheatsheetBorder", black, black)
|
||||||
|
bg("CheatsheetSectionContent", black)
|
||||||
|
fg("CheatsheetHeading", white)
|
||||||
|
|
||||||
|
local section_title_colors = {
|
||||||
|
white,
|
||||||
|
blue,
|
||||||
|
red,
|
||||||
|
green,
|
||||||
|
yellow,
|
||||||
|
purple,
|
||||||
|
orange,
|
||||||
|
}
|
||||||
|
for i, color in ipairs(section_title_colors) do
|
||||||
|
vim.cmd("highlight CheatsheetTitle" .. i .. " guibg = " .. color .. " guifg=" .. black)
|
||||||
|
end
|
||||||
|
|
||||||
-- Disable some highlight in nvim tree if transparency enabled
|
-- Disable some highlight in nvim tree if transparency enabled
|
||||||
if ui.transparency then
|
if ui.transparency then
|
||||||
bg("NvimTreeNormal", "NONE")
|
bg("NvimTreeNormal", "NONE")
|
||||||
|
|
|
@ -116,6 +116,7 @@ M.mappings = {
|
||||||
-- custom = {}, -- custom user mappings
|
-- custom = {}, -- custom user mappings
|
||||||
|
|
||||||
misc = {
|
misc = {
|
||||||
|
cheatsheet = "<leader>ch",
|
||||||
close_buffer = "<leader>x",
|
close_buffer = "<leader>x",
|
||||||
copy_whole_file = "<C-a>", -- copy all contents of current buffer
|
copy_whole_file = "<C-a>", -- copy all contents of current buffer
|
||||||
line_number_toggle = "<leader>n", -- toggle line number
|
line_number_toggle = "<leader>n", -- toggle line number
|
||||||
|
|
|
@ -31,7 +31,6 @@ M.misc = function()
|
||||||
map("n", "<Esc>", ":noh <CR>")
|
map("n", "<Esc>", ":noh <CR>")
|
||||||
|
|
||||||
-- center cursor when moving (goto_definition)
|
-- center cursor when moving (goto_definition)
|
||||||
|
|
||||||
|
|
||||||
-- yank from current cursor to end of line
|
-- yank from current cursor to end of line
|
||||||
map("n", "Y", "yg$")
|
map("n", "Y", "yg$")
|
||||||
|
@ -81,6 +80,7 @@ M.misc = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function required_mappings()
|
local function required_mappings()
|
||||||
|
map("n", maps.misc.cheatsheet, ":lua require('nvchad.cheatsheet').show() <CR>") -- show keybinds
|
||||||
map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() <CR>") -- close buffer
|
map("n", maps.misc.close_buffer, ":lua require('core.utils').close_buffer() <CR>") -- close buffer
|
||||||
map("n", maps.misc.copy_whole_file, ":%y+ <CR>") -- copy whole file content
|
map("n", maps.misc.copy_whole_file, ":%y+ <CR>") -- copy whole file content
|
||||||
map("n", maps.misc.new_buffer, ":enew <CR>") -- new buffer
|
map("n", maps.misc.new_buffer, ":enew <CR>") -- new buffer
|
||||||
|
|
|
@ -33,6 +33,7 @@ M.blankline = function()
|
||||||
"lspinfo",
|
"lspinfo",
|
||||||
"TelescopePrompt",
|
"TelescopePrompt",
|
||||||
"TelescopeResults",
|
"TelescopeResults",
|
||||||
|
"nvchad_cheatsheet",
|
||||||
},
|
},
|
||||||
buftype_exclude = { "terminal" },
|
buftype_exclude = { "terminal" },
|
||||||
show_trailing_blankline_indent = false,
|
show_trailing_blankline_indent = false,
|
||||||
|
|
Loading…
Reference in a new issue