summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-08-08 20:06:10 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-08-08 20:06:10 +0200
commit35fd372acade33a609b87e39862fb77cba363296 (patch)
treec5f45a7cf8a216328b6a9cf4d0a381d33e341c98 /.config/nvim
parent1418ee478531d6db6bbceecc38e5cc5b88d245df (diff)
nvim: Prefer silent mappings
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index d4fbb0c..d461371 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -55,7 +55,7 @@ end
vim.keymap.set('x', '<leader>a', 'gg0oG$',
{ desc = 'Select the [A]ll of the buffer' })
vim.keymap.set('o', '<leader>a', ':normal! ggVG<CR>',
- { desc = 'Text object of [A]ll of the buffer' })
+ { desc = 'Text object of [A]ll of the buffer', silent = true })
vim.keymap.set('n', '<C-h>', '<C-w><C-h>',
{ desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>',
@@ -69,21 +69,22 @@ vim.keymap.set('n', '<leader>h', function() vim.cmd 'split' end,
vim.keymap.set('n', '<leader>v', function() vim.cmd 'vsplit' end,
{ desc = 'Open a [V]ertical split' })
vim.keymap.set('n', 'M', ':w! | make<CR>',
- { desc = 'Run the configured compiler' })
+ { desc = 'Run the configured compiler', silent = true })
vim.keymap.set('x', '<C-j>', ":m '>+1<CR>gv=gv",
- { desc = 'Move a selection down a line' })
+ { desc = 'Move a selection down a line', silent = true })
vim.keymap.set('x', '<C-k>', ":m '<-2<CR>gv=gv",
- { desc = 'Move a selection up a line' })
+ { desc = 'Move a selection up a line', silent = true })
vim.keymap.set({ 'n', 'o', 'x' }, '€', '$',
{ desc = 'Go to end of the line' })
-vim.keymap.set('n', '<Esc>', '<Cmd>nohlsearch<CR>',
- { desc = 'Disable highlighting of currently highlighted search matches' })
+vim.keymap.set('n', '<Esc>', ':nohlsearch<CR>',
+ { desc = 'Disable highlighting of currently highlighted search matches',
+ silent = true })
vim.keymap.set('n', '<leader>t', function() vim.cmd.normal('"zx"zph') end,
{ desc = '[T]ranspose the current and next characters' })
vim.keymap.set('n', '<leader>T', function() vim.cmd.normal('"zX"zp') end,
{ desc = '[T]ranspose the current and previous characters' })
vim.keymap.set('n', '-', ':Ex<CR>',
- { desc = 'Open Netrw' })
+ { desc = 'Open Netrw', silent = true })
vim.keymap.set('n', 'gJ', function()
vim.cmd [[
let save = winsaveview()