<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/nvim/autoread.lua, branch master</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>fix(autoread): 'autoread' error if file goes missing #40276</title>
<updated>2026-06-15T17:14:46+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-06-15T17:14:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=4ed844be59ff6ee7f061a0d58a21bf7bea27c3d8'/>
<id>4ed844be59ff6ee7f061a0d58a21bf7bea27c3d8</id>
<content type='text'>
Problem:
'autoread' error if file goes missing.

    E211: File "runtime/lua/nvim/autoread.lua" no longer available
    vim.schedule callback: /usr/local/share/nvim/runtime/lua/nvim/autoread.lua:146:
    Vim:E211: File "test/functional/options/autoread_spec.lua" no longer available
    stack traceback:
    [C]: in function 'checktime'
    /usr/local/share/nvim/runtime/lua/nvim/autoread.lua:146:
    in function &lt;/usr/local/share/nvim/runtime/lua/nvim/autoread.lua:138&gt;

Solution:
Ignore E211 thrown by `:checktime`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
'autoread' error if file goes missing.

    E211: File "runtime/lua/nvim/autoread.lua" no longer available
    vim.schedule callback: /usr/local/share/nvim/runtime/lua/nvim/autoread.lua:146:
    Vim:E211: File "test/functional/options/autoread_spec.lua" no longer available
    stack traceback:
    [C]: in function 'checktime'
    /usr/local/share/nvim/runtime/lua/nvim/autoread.lua:146:
    in function &lt;/usr/local/share/nvim/runtime/lua/nvim/autoread.lua:138&gt;

Solution:
Ignore E211 thrown by `:checktime`.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(autoread): handle autocmd errors</title>
<updated>2026-06-14T20:00:38+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-06-14T18:20:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d34cfe1cb83ad839001a9c5dc8ef588686ca2ff9'/>
<id>d34cfe1cb83ad839001a9c5dc8ef588686ca2ff9</id>
<content type='text'>
Problem:
Any random ftplugin or other autocmd, can throw an error when
`:checktime` reloads a buffer. This causes a trace which makes it look
like an issue with `autoread.lua`.

    vim.schedule callback: …/runtime/lua/nvim/autoread.lua:146:
    FileType Autocommands for "*"..function &lt;SNR&gt;1_LoadFTPlugin[20] ..script
    …/runtime/ftplugin/help.lua: Vim(runtime):E5113: Lua chunk:
    …/runtime/lua/vim/treesitter.lua:216: Index out of bounds
    stack traceback:
    [C]: in function 'nvim_buf_get_text'
    …/runtime/lua/vim/treesitter.lua:216: in function 'get_node_text'
    …/runtime/lua/vim/treesitter/query.lua:558: in function 'handler'
    …/runtime/lua/vim/treesitter/query.lua:843: in function '_match_predicates'
    …/runtime/lua/vim/treesitter/query.lua:1082: in function '(for generator)'
    …/runtime/ftplugin/help.lua:91: in function 'runnables'
    …/runtime/ftplugin/help.lua:124: in main chunk
    [C]: in function 'checktime'
    …/runtime/lua/nvim/autoread.lua:146: in function &lt;…/runtime/lua/nvim/autoread.lua:138&gt;

Solution:
Use pcall() and surface the error via nvim_echo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Any random ftplugin or other autocmd, can throw an error when
`:checktime` reloads a buffer. This causes a trace which makes it look
like an issue with `autoread.lua`.

    vim.schedule callback: …/runtime/lua/nvim/autoread.lua:146:
    FileType Autocommands for "*"..function &lt;SNR&gt;1_LoadFTPlugin[20] ..script
    …/runtime/ftplugin/help.lua: Vim(runtime):E5113: Lua chunk:
    …/runtime/lua/vim/treesitter.lua:216: Index out of bounds
    stack traceback:
    [C]: in function 'nvim_buf_get_text'
    …/runtime/lua/vim/treesitter.lua:216: in function 'get_node_text'
    …/runtime/lua/vim/treesitter/query.lua:558: in function 'handler'
    …/runtime/lua/vim/treesitter/query.lua:843: in function '_match_predicates'
    …/runtime/lua/vim/treesitter/query.lua:1082: in function '(for generator)'
    …/runtime/ftplugin/help.lua:91: in function 'runnables'
    …/runtime/ftplugin/help.lua:124: in main chunk
    [C]: in function 'checktime'
    …/runtime/lua/nvim/autoread.lua:146: in function &lt;…/runtime/lua/nvim/autoread.lua:138&gt;

Solution:
Use pcall() and surface the error via nvim_echo.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(autoread): surface autoread activity via 'busy' flag</title>
<updated>2026-06-14T20:00:38+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-06-14T12:07:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2abb9785d3ca6ea73c7f10898638a43dcb507dba'/>
<id>2abb9785d3ca6ea73c7f10898638a43dcb507dba</id>
<content type='text'>
Problem:
Old 'autoread' only did `:checktime` on focus-change and shell (":!")
commands, and only for non-hidden buffers. Since 'autoread' is now
driven by OS filewatcher events, buffers are updated much more eagerly.
This should be surfaced to the user somehow, either via a carefully
placed notification, or a minimal UI indicator.

A "notification" would be noisy, unless it is conditional on specific
circumstances (e.g. when "many" buffers are updated).

Solution:
Use the existing 'busy' buffer-local option as a subtle hint about
activity.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Old 'autoread' only did `:checktime` on focus-change and shell (":!")
commands, and only for non-hidden buffers. Since 'autoread' is now
driven by OS filewatcher events, buffers are updated much more eagerly.
This should be surfaced to the user somehow, either via a carefully
placed notification, or a minimal UI indicator.

A "notification" would be noisy, unless it is conditional on specific
circumstances (e.g. when "many" buffers are updated).

Solution:
Use the existing 'busy' buffer-local option as a subtle hint about
activity.
</pre>
</div>
</content>
</entry>
<entry>
<title>test(autoread): make "debounce" test actually valid</title>
<updated>2026-06-13T18:55:49+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-06-13T09:15:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=aeea633deb2cb7c7f20c508310db00b628ad24bd'/>
<id>aeea633deb2cb7c7f20c508310db00b628ad24bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(autoread): use filewatchers for OS-driven change detection #37971</title>
<updated>2026-06-12T22:25:15+00:00</updated>
<author>
<name>Oleksandr Chekhovskyi</name>
<email>oleksandr.chekhovskyi@gmail.com</email>
</author>
<published>2026-06-12T22:25:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=400f2473972898ecfd89ac3c55222ace0cc248dd'/>
<id>400f2473972898ecfd89ac3c55222ace0cc248dd</id>
<content type='text'>
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).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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).</pre>
</div>
</content>
</entry>
</feed>
