Skip to content

Commit

Permalink
neovim: Save when moving between windows
Browse files Browse the repository at this point in the history
  • Loading branch information
juanibiapina committed Jan 20, 2025
1 parent b9de7bd commit dcb82b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dotfiles/nvim/.config/nvim/lua/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ vim.o.joinspaces = false
vim.o.autowriteall = true
vim.o.autoread = true
vim.o.hidden = true
vim.cmd [[autocmd FocusLost * silent! wall]]
-- this is triggering when the completions pop up is shown or hidden
vim.cmd [[autocmd FocusLost * silent! wall]] -- save when focus is lost
vim.cmd [[autocmd BufLeave * silent! wall]] -- save when switching buffers
-- this is triggering when the completions pop up is shown or hidden, so it's disabled
--vim.cmd [[autocmd BufHidden * silent! write]]

-- Enable syntax highligh
Expand Down

0 comments on commit dcb82b3

Please sign in to comment.