mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-29 08:20:05 +02:00
New keybindings
This commit is contained in:
parent
d350f910b6
commit
4d01962e24
2 changed files with 8 additions and 7 deletions
|
@ -2,15 +2,16 @@
|
|||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
||||
vim.keymap.set('n', '<leader>fa', '<cmd>lua vim.lsp.buf.format()<CR>')
|
||||
|
||||
vim.keymap.set('n', '<leader>mt', '<cmd>NvimTreeFocus<CR>')
|
||||
vim.keymap.set('n', '<C-o>', '<cmd>ClangdSwitchSourceHeader<CR>')
|
||||
vim.keymap.set('n', '<C-o>', '<cmd>ClangdSwitchSourceHeader<CR>', { desc = 'Swith to source/header file' })
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
vim.keymap.set('n', '<leader>z', require('telescope').extensions.zoxide.list)
|
||||
vim.keymap.set('n', '<leader>z', require('telescope').extensions.zoxide.list, { desc = '[Z]oxide to different dir' })
|
||||
vim.keymap.set('n', '<leader>jl', require('telescope.builtin').jumplist, { desc = '[J]ump [L]ist' })
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
-- is not what someone will guess without a bit more experience.
|
||||
|
@ -33,3 +34,4 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
|
|||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue