nvim: add descriptions for key prefixes
This commit is contained in:
parent
8f85805bf1
commit
5341e11831
@ -70,6 +70,7 @@ if vim.fn.executable('lldb-vscode') > 0 then
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
end
|
||||
|
||||
require('which-key').register({ ['<Leader>d'] = { name = 'DAP' } })
|
||||
map('n', '<Leader>dc', dap.continue, 'Continue')
|
||||
map('n', '<F10>', dap.step_over, 'DAP: step over')
|
||||
map('n', '<F11>', dap.step_into, 'DAP: step into')
|
||||
|
@ -14,6 +14,7 @@ require 'nvim-treesitter.configs'.setup {
|
||||
|
||||
require('orgmode').setup {}
|
||||
require('orgmode').setup_ts_grammar()
|
||||
require('which-key').register({ ['<Leader>o'] = { name = 'Orgmode' } })
|
||||
|
||||
local ffgroup = vim.api.nvim_create_augroup('config_ff', { clear = true })
|
||||
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||
|
@ -64,7 +64,9 @@ require('gitlinker').setup({
|
||||
}
|
||||
})
|
||||
|
||||
require('which-key').register({ ['<Leader>g'] = { name = 'Git' } })
|
||||
map('n', '<Leader>gc', ':Git commit<CR>', 'commit')
|
||||
map('n', '<Leader>gp', ':Git push<CR>', 'push')
|
||||
map('n', '<Leader>gau', ':Git add --update --patch<CR>', 'add -u -p')
|
||||
require('which-key').register({ ['<Leader>ga'] = { name = 'add' } })
|
||||
map('n', '<Leader>gau', ':Git add --update --patch<CR>', '--update --patch')
|
||||
map('n', '<Leader>gl', ':Git log --decorate<CR>', 'log')
|
||||
|
@ -13,6 +13,8 @@ local on_attach = function(client, bufnr)
|
||||
map('n', 'gr', vim.lsp.buf.references, 'Show references', bufnr)
|
||||
map('n', 'K', vim.lsp.buf.hover, 'Hover', bufnr)
|
||||
map('i', '<C-K>', vim.lsp.buf.hover, 'Hover', bufnr)
|
||||
require('which-key').register({ ['<Leader>l'] = { name = 'LSP' } })
|
||||
require('which-key').register({ ['<Leader>lw'] = { name = 'workspace' } })
|
||||
map('n', '<Leader>lwa', vim.lsp.buf.add_workspace_folder,
|
||||
'Add workspace folder', bufnr)
|
||||
map('n', '<Leader>lwr', vim.lsp.buf.remove_workspace_folder,
|
||||
|
@ -29,6 +29,7 @@ telescope.setup({
|
||||
|
||||
local t_builtin = require('telescope.builtin')
|
||||
local my = require('my.functions')
|
||||
require('which-key').register({ ['<Leader>t'] = { name = 'Telescope' } })
|
||||
map('n', '<Leader>tb', t_builtin.buffers, 'Buffers')
|
||||
map('n', '<Leader>tf', function()
|
||||
t_builtin.find_files({ cwd = my.get_project_root() })
|
||||
@ -125,6 +126,7 @@ map('n', '<F21>', mind.open_project, 'Open project mind') -- <S-F9> = <F21>
|
||||
require('nvim-surround').setup({})
|
||||
|
||||
vim.g.table_mode_map_prefix = '<Leader>T'
|
||||
require('which-key').register({ ['<Leader>T'] = { name = 'Table mode' } })
|
||||
|
||||
require('dressing').setup({
|
||||
input = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user