feat: added keybind to toggle foldcolumn + small fix
This commit is contained in:
parent
942c2fdb40
commit
aed10e596d
2 changed files with 13 additions and 2 deletions
|
@ -183,7 +183,7 @@ function PALETTE:set_ui_colors()
|
||||||
vim.api.nvim_set_hl(0, "VertSplit", HIGHLIGHT(self.black.normal, self.black.normal, nil)) -- Split divider color
|
vim.api.nvim_set_hl(0, "VertSplit", HIGHLIGHT(self.black.normal, self.black.normal, nil)) -- Split divider color
|
||||||
vim.api.nvim_set_hl(0, "SignColumn", HIGHLIGHT(nil, nil, nil)) -- Gutter color
|
vim.api.nvim_set_hl(0, "SignColumn", HIGHLIGHT(nil, nil, nil)) -- Gutter color
|
||||||
vim.api.nvim_set_hl(0, "CursorLine", HIGHLIGHT(nil, nil, nil)) -- Line number color
|
vim.api.nvim_set_hl(0, "CursorLine", HIGHLIGHT(nil, nil, nil)) -- Line number color
|
||||||
vim.api.nvim_set_hl(0, "CursorLineSign", HIGHLIGHT(nil, nil, nil)) -- CursorLine color (in sign column)
|
vim.api.nvim_set_hl(0, "CursorLineSign", HIGHLIGHT(nil, self.black.normal, nil)) -- CursorLine color (in sign column)
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", HIGHLIGHT(self.yellow.normal, self.black.normal, {bold=true})) -- CursorLine color (in number column)
|
vim.api.nvim_set_hl(0, "CursorLineNr", HIGHLIGHT(self.yellow.normal, self.black.normal, {bold=true})) -- CursorLine color (in number column)
|
||||||
vim.api.nvim_set_hl(0, "LineNr", HIGHLIGHT(self.black.bright, nil, nil)) -- Number column color
|
vim.api.nvim_set_hl(0, "LineNr", HIGHLIGHT(self.black.bright, nil, nil)) -- Number column color
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,9 @@
|
||||||
&&&
|
&&&
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
local KEYBINDS = { }
|
local KEYBINDS = {
|
||||||
|
foldcolumn = false,
|
||||||
|
}
|
||||||
|
|
||||||
--|| GLOBAL KEYBINDS
|
--|| GLOBAL KEYBINDS
|
||||||
function KEYBINDS:set_global_keys(opts)
|
function KEYBINDS:set_global_keys(opts)
|
||||||
|
@ -38,6 +40,15 @@ function KEYBINDS:set_global_keys(opts)
|
||||||
vim.keymap.set('n', '<C-t>', ':NvimTreeToggle<CR>', {noremap=true})
|
vim.keymap.set('n', '<C-t>', ':NvimTreeToggle<CR>', {noremap=true})
|
||||||
-- Esc goes back to normal mode in terminal
|
-- Esc goes back to normal mode in terminal
|
||||||
vim.keymap.set('t', '<ESC>', '<C-\\><C-n>', opts)
|
vim.keymap.set('t', '<ESC>', '<C-\\><C-n>', opts)
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'zi', function()
|
||||||
|
if self.foldcolumn then
|
||||||
|
vim.opt.foldcolumn = '0'
|
||||||
|
else
|
||||||
|
vim.opt.foldcolumn = '2'
|
||||||
|
end
|
||||||
|
self.foldcolumn = not self.foldcolumn
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function KEYBINDS:set_navigation_keys(opts)
|
function KEYBINDS:set_navigation_keys(opts)
|
||||||
|
|
Loading…
Reference in a new issue