diff --git a/modules/nvim.nix b/modules/nvim.nix index 391fbc4..9f3bfed 100644 --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -263,7 +263,9 @@ in keymaps = [ { mode = "n"; key = "w"; action = "w"; options.desc = "Save"; } { mode = "n"; key = "q"; action = "q"; options.desc = "Quit window"; } - { mode = "n"; key = "Q"; action = "qa"; options.desc = "Quit all (exit nvim)"; } + # `confirm` prompts Save/Discard/Cancel per modified buffer rather than + # aborting with E37, so quitting never dead-ends and never writes silently. + { mode = "n"; key = "Q"; action = "confirm qa"; options.desc = "Quit all (prompt to save)"; } # Restore the saved session for the current directory (persistence.nvim). { mode = "n"; key = "S"; action.__raw = "function() require('persistence').load() end"; options.desc = "Restore session"; } { mode = "n"; key = "e"; action = "Neotree toggle"; options.desc = "File tree"; }