Compare commits

..

No commits in common. "bc57aa34ed3ea2a5c1ac6ced28eacb67cb793006" and "d556ce0aca97d470ab91c07230c5b7bff83c037c" have entirely different histories.

2 changed files with 33 additions and 22 deletions

View File

@ -19,25 +19,39 @@ return {
event = 'VimEnter', -- Sets the loading event to 'VimEnter' event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading config = function() -- This is the function that runs, AFTER loading
require('which-key').setup() require('which-key').setup()
-- Document existing key chains -- Document existing key chains
require('which-key').add { require('which-key').register {
{ '<leader>c', group = '[C]ode-/[C]hange' }, ['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
{ '<leader>d', group = '[D]ocument/[D]elete', mode = { 'n', 'v' } }, ['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
{ '<leader>r', group = '[R]ename' }, ['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
{ '<leader>s', group = '[S]earch' }, ['<leader>g'] = { name = '[G]it/[G]lobal', _ = 'which_key_ignore' },
{ '<leader>w', group = '[W]orkspace' }, ['<leader>b'] = { name = '[B]uffer/[B]reakpoint', _ = 'which_key_ignore' },
{ '<leader>t', group = '[T]oggle', mode = { 'n', 'v' } }, ['<leader>c'] = { name = '[C]ode/[C]odeium/[C]hange', _ = 'which_key_ignore' },
{ '<leader>h', group = 'Git [H]unk/[H]arpoon', mode = { 'n', 'v' } }, ['<leader>cd'] = { name = '[D]irectory', _ = 'which_key_ignore' },
{ '<leader>g', group = '[G]it/[G]lobal', mode = { 'n', 'v' } }, ['<leader>d'] = { name = '[D]ocument/[D]elete', _ = 'which_key_ignore' },
{ '<leader>b', group = '[B]uffer/[B]reakpoint' }, ['<leader>h'] = { name = 'Git [H]unk/[H]arpoon', _ = 'which_key_ignore' },
{ '<leader>cd', group = '[D]irectory' }, ['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
{ '<leader>dn', group = '[N]o', mode = { 'n', 'v' } }, ['<leader>dn'] = { name = '[N]o', _ = 'which_key_ignore' },
{ '<leader>l', group = '[L]ist', mode = { 'n', 'v' } }, ['<leader>l'] = { name = '[L]ist', _ = 'which_key_ignore' },
{ '<leader>f', group = '[F]ormat/[F]ile', mode = { 'n', 'v' } }, ['<leader>f'] = { name = '[F]ormat/[F]ile', _ = 'which_key_ignore' },
{ '<leader>o', group = '[O]verseer', mode = { 'n', 'v' } }, ['<leader>o'] = { name = '[O]verseer', _ = 'which_key_ignore' },
{ '<leader>p', group = '[P]aste', mode = { 'v' } },
{ '<leader>pn', group = '[N]o', mode = { 'v' } },
} }
-- register which-key VISUAL mode
-- required for visual <leader>hs (hunk stage) to work
require('which-key').register({
['<leader>'] = { name = 'VISUAL <leader>' },
['<leader>h'] = { 'Git [H]unk' },
['<leader>d'] = { name = '[D]elete', _ = 'which_key_ignore' },
['<leader>p'] = { name = '[P]aste', _ = 'which_key_ignore' },
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
['<leader>dn'] = { name = '[N]o', _ = 'which_key_ignore' },
['<leader>pn'] = { name = '[N]o', _ = 'which_key_ignore' },
['<leader>l'] = { name = '[L]ist', _ = 'which_key_ignore' },
['<leader>f'] = { name = '[F]ormat/[F]ile', _ = 'which_key_ignore' },
['<leader>g'] = { name = '[G]lobal', _ = 'which_key_ignore' },
}, { mode = 'v' })
end, end,
}, },
} }

View File

@ -3,17 +3,14 @@
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git' local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system { vim.fn.system {
'git', 'git',
'clone', 'clone',
'--filter=blob:none', '--filter=blob:none',
'--branch=stable', '--branch=stable',
lazyrepo, lazyrepo,
lazypath, lazypath
} }
if vim.v.shell_error ~= 0 then
error('Error cloning lazy.nvim:\n' .. out)
end
end ---@diagnostic disable-next-line: undefined-field end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)