neovim/runtime/lua/vim
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
..
_meta feat: ignore swapfile for running Nvim processes #25336 2023-10-04 06:31:25 -07:00
filetype vim-patch:9.0.1820: Rexx files may not be recognised (#24956) 2023-08-31 08:20:00 +08:00
func feat(lua): add vim.func._memoize 2023-09-20 13:42:41 +01:00
lsp feat(lsp)!: replace snippet parser by lpeg grammar 2023-10-02 22:21:35 +02:00
treesitter fix(treesitter): make Visual hl work consistently with foldtext (#25484) 2023-10-03 13:07:03 +08:00
_editor.lua feat: ignore swapfile for running Nvim processes #25336 2023-10-04 06:31:25 -07:00
_init_packages.lua refactor(build): include lpeg as a library 2023-04-27 11:40:00 +02:00
_inspector.lua docs(lua): more improvements (#24387) 2023-07-18 15:42:30 +01:00
_meta.lua feat(lua): add vim.func._memoize 2023-09-20 13:42:41 +01:00
_options.lua docs: do not use deprecated functions #25334 2023-09-24 21:39:59 -07:00
_system.lua fix: windows timeouts have exit code 1 2023-09-05 17:10:04 +01:00
_watch.lua fix(lua): improve annotations for stricter luals diagnostics (#24609) 2023-08-09 11:06:13 +02:00
diagnostic.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
F.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
filetype.lua vim-patch:9.0.1918 2023-09-21 00:32:35 +02:00
fs.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
func.lua feat(lua): add vim.func._memoize 2023-09-20 13:42:41 +01:00
health.lua feat(health): fold successful healthchecks #22866 2023-06-06 08:42:26 -07:00
highlight.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
inspect.lua fix(inspect): escape identifiers that are lua keywords (#19898) 2022-08-23 13:02:55 +02:00
iter.lua feat(vimdoc): support Markdown code blocks (#25127) 2023-09-13 08:38:28 -05:00
keymap.lua docs: fix type warnings 2023-09-23 23:46:45 +01:00
loader.lua fix(lua): improve annotations for stricter luals diagnostics (#24609) 2023-08-09 11:06:13 +02:00
lsp.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
re.lua build: bump lpeg to 1.1.0 (#25016) 2023-09-04 22:42:47 +02:00
secure.lua docs: fix type warnings 2023-09-23 23:46:45 +01:00
shared.lua docs: misc #24561 2023-09-20 04:15:23 -07:00
treesitter.lua feat(treesitter): add foldtext with treesitter highlighting (#25391) 2023-10-01 14:10:51 -05:00
ui.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
uri.lua docs: fix type warnings 2023-09-23 23:46:45 +01:00
version.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
vimhelp.lua feat(runtime): highlight hl groups in syntax.txt (#25050) 2023-09-08 21:05:35 +08:00