Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does Neovim handle outside changes then? Or is there a plugin to make it work? AFAIK it doesn't reload any bufferes when files change. IntelliJ is the only other one I know that does it transparently.


In vanilla neovim you can use autoread... this does depend on a focus event like entering and leaving the pane or switching buffers. However, for my workflow which is "go to a different terminal pane and do some things then switch back" as soon as I focus the buffer it updates.

Where as with Zed it'll just keep showing the old content and in fact closing and opening file wont even change what it shows in Zed. It's really really annoying. I have to exit zed and open it again. This means if you are working with AI agents you end up having to do this often.


Very strange, this has always worked for me with Zed - both with local and remote ssh sessions.

I use `"autosave": "on_focus_change"` which may be keeping my buffer in sync with the file contents as I switch between terminal and zed.


You can configure Neovim to either auto reload or to ask you whenever a file is changed. (Can't remember which one is the default, probably to ask.)


I'm ~80% sure auto-reload is on by default, and 100% sure that it's on in a fresh LazyVim install.


vim.o.autoread (default on) When a file has been detected to have been changed outside of Vim and it has not been changed inside of Vim, automatically read it again.


Thanks, just found something about that.


Plain vim asks what to do by default. A single 'l' does a reload.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: