This commit is contained in:
2025-08-29 23:21:21 +02:00
parent 20a49c3f58
commit e46f58fd20
14 changed files with 219 additions and 152 deletions

View File

@@ -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`