which keys is strong

This commit is contained in:
Christoph J. Scherr 2024-07-08 16:02:49 +02:00
parent 77f0411be1
commit 032dce6eca
3 changed files with 7 additions and 9 deletions

View File

@ -63,8 +63,8 @@ vim.keymap.set('n', '<leader>w"', '<cmd>vnew<cr>', { desc = 'Split the window ve
vim.keymap.set('n', '<leader>w%', '<cmd>new<cr>', { desc = 'Split the window horizontally (new buffer)' })
-- window actions
vim.keymap.set('n', '<leader>wbn', '<cmd>enew<cr>', { desc = 'Open a [N]ew [B]uffer' })
vim.keymap.set('n', '<leader>wbc', '<cmd>bw<cr>', { desc = '[C]lose current [B]uffer' }) -- :bd would keep in background
vim.keymap.set('n', '<leader>wbn', '<cmd>enew<cr>', { desc = 'Open a [N]ew buffer' })
vim.keymap.set('n', '<leader>wbc', '<cmd>bw<cr>', { desc = '[C]lose current buffer' }) -- :bd would keep in background
vim.keymap.set('n', '<C-Up>', '<cmd>resize +1<cr>', { desc = 'Resize window' })
vim.keymap.set('n', '<C-Down>', '<cmd>resize -1<cr>', { desc = 'Resize window' })
vim.keymap.set('n', '<C-Left>', '<cmd>vertical resize +1<cr>', { desc = 'Resize window vertically' })

View File

@ -118,7 +118,7 @@ return {
end, { desc = '[F]ind [/] in Open Files' })
-- Shortcut for searching your Neovim configuration files
vim.keymap.set('n', '<leader>fnf', function()
vim.keymap.set('n', '<localleader>fnf', function()
builtin.find_files { cwd = vim.fn.stdpath 'config' }
end, { desc = '[F]ind [N]eovim [F]iles' })
end,

View File

@ -192,18 +192,16 @@ return {
local wk = require 'which-key'
local defaults = {
mode = { 'n', 'v' },
[';'] = { name = '+telescope' },
[';f'] = { name = '+find' },
['<localleader>'] = { name = '+select', f = { name = '[F]ind' } },
['g'] = { name = '+goto' },
[']'] = { name = '+next' },
['['] = { name = '+prev' },
['<leader>d'] = { name = '+[D]ebug' },
['<leader>c'] = { name = '+[C]ode/[C]olor' },
['<leader>d'] = { name = '+[D]ebug', w = { name = '[W]indow' }, c = { name = '[C]hange' } },
['<leader>c'] = { name = '+[C]ode/[C]olor', t = { name = '+[T]rouble' } },
['<leader>g'] = { name = '+[G]ood tools' },
['<leader>f'] = { name = '+[F]ormatting' },
['<leader>r'] = { name = '[R]ename' },
['<localleader>f'] = { name = '[F]ind' },
['<leader>w'] = { name = '[W]orkspace' },
['<leader>w'] = { name = '[W]orkspace', b = { name = 'buffer' } },
['<leader>t'] = { name = '[T]oggle', ['🚫'] = 'which_key_ignore' },
}
wk.register(defaults, opts)