add mapping, highlights for keybind cheatsheet | disable indentline in it

This commit is contained in:
siduck 2021-12-04 21:04:04 +05:30
parent 653a2f5337
commit 6347a00023
4 changed files with 25 additions and 3 deletions

View File

@ -21,6 +21,7 @@ local purple = colors.purple
local red = colors.red
local white = colors.white
local yellow = colors.yellow
local orange = colors.orange
local one_bg3 = colors.one_bg3
-- functions for setting highlights
@ -45,7 +46,7 @@ fg("EndOfBuffer", black)
-- For floating windows
fg("FloatBorder", blue)
bg("NormalFloat", one_bg)
bg("NormalFloat", darker_black)
-- Pmenu
bg("Pmenu", one_bg)
@ -138,10 +139,29 @@ bg("TelescopeNormal", darker_black)
fg_bg("TelescopePreviewTitle", black, green)
fg_bg("TelescopePromptTitle", black, red)
fg_bg("TelescopeResultsTitle", darker_black,darker_black)
fg_bg("TelescopeResultsTitle", darker_black, darker_black)
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
if ui.transparency then
bg("NvimTreeNormal", "NONE")

View File

@ -116,6 +116,7 @@ M.mappings = {
-- custom = {}, -- custom user mappings
misc = {
cheatsheet = "<leader>ch",
close_buffer = "<leader>x",
copy_whole_file = "<C-a>", -- copy all contents of current buffer
line_number_toggle = "<leader>n", -- toggle line number

View File

@ -31,7 +31,6 @@ M.misc = function()
map("n", "<Esc>", ":noh <CR>")
-- center cursor when moving (goto_definition)
-- yank from current cursor to end of line
map("n", "Y", "yg$")
@ -81,6 +80,7 @@ M.misc = function()
end
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.copy_whole_file, ":%y+ <CR>") -- copy whole file content
map("n", maps.misc.new_buffer, ":enew <CR>") -- new buffer

View File

@ -33,6 +33,7 @@ M.blankline = function()
"lspinfo",
"TelescopePrompt",
"TelescopeResults",
"nvchad_cheatsheet",
},
buftype_exclude = { "terminal" },
show_trailing_blankline_indent = false,