diff options
| author | Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com> | 2026-06-13 01:25:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-12 18:25:15 -0400 |
| commit | 400f2473972898ecfd89ac3c55222ace0cc248dd (patch) | |
| tree | c2fb76192e5b3eb6c99367a6085217d0600d0a02 /test/functional/vimscript/executable_spec.lua | |
| parent | c622b454b53a5d9edfc6f5ce71806fe8f487677d (diff) | |
| download | rneovim-400f2473972898ecfd89ac3c55222ace0cc248dd.tar.gz rneovim-400f2473972898ecfd89ac3c55222ace0cc248dd.tar.bz2 rneovim-400f2473972898ecfd89ac3c55222ace0cc248dd.zip | |
feat(autoread): use filewatchers for OS-driven change detection #37971
Problem:
The 'autoread' option only checks for file changes reactively — on
FocusGained, :checktime, CmdlineEnter, etc. — by polling timestamps.
External changes are not detected until the user interacts with Neovim.
Solution:
Add a core module (runtime/lua/nvim/autoread.lua) enabled from
runtime/plugin/autoread.lua that watches each buffer's file using
vim._watch.watch() (libuv fs_event). On change detection it calls
:checktime, which invokes the existing buf_check_timestamp() logic
for reload/prompt handling. Watchers are managed via autocmds tied
to buffer lifecycle events and respect the 'autoread' option (global
and buffer-local).
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions