neovim/runtime/lua
Justin M. Keyes 29fe883aa9
feat: ignore swapfile for running Nvim processes #25336
Problem:
The swapfile "E325: ATTENTION" dialog is displayed when editing a file
already open in another (running) Nvim. Usually this behavior is
annoying and irrelevant:
- "Recover" and the other options ("Open readonly", "Quit", "Abort") are
  almost never wanted.
- swapfiles are less relevant for "multi-Nvim" since 'autoread' is
  enabled by default.
  - Even less relevant if user enables 'autowrite'.

Solution:
Define a default SwapExists handler which does the following:
1. If the swapfile is owned by a running Nvim process, automatically
   chooses "(E)dit anyway" (caveat: this creates a new, extra swapfile,
   which is mostly harmless and ignored except by `:recover` or `nvim -r`.
2. Shows a 1-line "ignoring swapfile..." message.
3. Users can disable the default SwapExists handler via `autocmd! nvim_swapfile`.
2023-10-04 06:31:25 -07:00
..
nvim fix: checkhealth warning even if init.lua exists #25306 2023-09-24 10:43:55 -07:00
provider feat(lua): rename vim.loop -> vim.uv (#22846) 2023-06-03 12:06:00 +02:00
vim feat: ignore swapfile for running Nvim processes #25336 2023-10-04 06:31:25 -07:00
_vim9script.lua feat(lua): rename vim.loop -> vim.uv (#22846) 2023-06-03 12:06:00 +02:00
coxpcall.lua build(lua): vendor coxpcall 2023-09-10 11:43:37 +02:00
editorconfig.lua fix(editorconfig): do not set 'endofline' 2023-08-27 19:27:25 +01:00
man.lua feat(man): respect 'wrapmargin' when wrapping man pages (#24091) 2023-06-21 14:42:23 -05:00