summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-11 22:20:48 +0200
committerThomas Voss <thomas.voss@humanwave.nl> 2024-06-12 18:49:56 +0200
commitcc7d8f1f21db59a096e3246c78f6fd6c74634318 (patch)
tree27f4fcea4675f01e751067250649a2cf6b7b07d0 /.config/nvim
parent9b33655f9b35e6c4e48987454e2491c0974fbb40 (diff)
nvim: Save the buffer before building
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 0d7763e..ec708f0 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -68,7 +68,7 @@ vim.keymap.set('n', '<leader>h', function() vim.cmd 'split' end,
{ desc = 'Open a [H]orizontal split' })
vim.keymap.set('n', '<leader>v', function() vim.cmd 'vsplit' end,
{ desc = 'Open a [V]ertical split' })
-vim.keymap.set('n', 'M', ':make<CR>',
+vim.keymap.set('n', 'M', ':w! | make<CR>',
{ desc = 'Run the configured compiler' })
vim.keymap.set('n', 'V', '<C-v>',
{ desc = 'Enter visual-block mode' })