up
This commit is contained in:
@@ -1,15 +1,35 @@
|
||||
-- Toggles group mappings
|
||||
-- toggles group mappings
|
||||
--
|
||||
|
||||
local wk = require 'which-key'
|
||||
local gitsigns = require 'gitsigns'
|
||||
|
||||
local function toggle_light_dark_theme()
|
||||
if vim.o.background == 'light' then
|
||||
vim.o.background = 'dark'
|
||||
else
|
||||
vim.o.background = 'light'
|
||||
end
|
||||
end
|
||||
|
||||
local function toggle_conceal()
|
||||
local lvl = vim.o.conceallevel
|
||||
if lvl > DefaultConcealLevel then
|
||||
vim.o.conceallevel = DefaultConcealLevel
|
||||
else
|
||||
vim.o.conceallevel = FullConcealLevel
|
||||
end
|
||||
end
|
||||
|
||||
wk.add {
|
||||
mode = { 'n' },
|
||||
-- gitsigns
|
||||
{ '<leader>tb', gitsigns.toggle_current_line_blame, desc = 'toggle git show [b]lame line' },
|
||||
{ '<leader>tD', gitsigns.preview_hunk_inline, desc = 'toggle git show [D]eleted' },
|
||||
{ '<leader>td', gitsigns.preview_hunk_inline, desc = 'toggle git show [d]eleted' },
|
||||
{ '<leader>tm', '<CMD>RenderMarkdown buf_toggle<CR>', desc = 'toggle [m]arkdown rendering for current' },
|
||||
{ '<leader>tt', toggle_light_dark_theme, desc = 'toggle light/dark [t]heme' },
|
||||
{ '<leader>tc', toggle_conceal, desc = 'toggle [c]onceal' },
|
||||
{ '<leader>tz', ':setlocal spell!<cr>', desc = 'toggle [z]pellcheck' },
|
||||
}
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
|
||||
Reference in New Issue
Block a user