trunk icon indicating copy to clipboard operation
trunk copied to clipboard

Trunk does not detect changes if files saved with neovim

Open danielnehrig opened this issue 2 years ago • 1 comments

Trunk does not detect file changes with neovim. Upon saving the file in neovim on version (0.6.1 and 0.7 nightly both using the --clean flag) no changes are detected by trunk

on the other hand with vim changes are detected there is probably a difference on how files are written to disc in both

though trunk should detect any change that happens to a file.

Reproduce:

  1. Install Trunk: cargo install trunk
  2. Install neovim (brew install neovim, ...)
  3. create a trunk project
  4. open nvim and a file :e ./src/main.rs
  5. save the file :w

Expected:

Trunk sees any kind of file change.

Infos:

trunk --version
trunk 0.14.0
rustc --version
rustc 1.58.0 (02072b482 2022-01-11)

danielnehrig avatar Mar 16 '22 12:03 danielnehrig

this is happening because of the backupcopy option in neovim non the less i think since the file is still written there should be changes detected if any maintainer disagrees feel free to close since i found a solution for myself

danielnehrig avatar Mar 16 '22 20:03 danielnehrig

To save anyone else time because the problem still exists in 2023. Yes, neovim and watch aren't working well but setting nobackupcopy is a solution.

I created a local .vimrc in the tree with the line set nobackupcopy and now trunk is notified when a file within the directory being watched is modified by neovim.

FrankReh avatar May 03 '23 13:05 FrankReh

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 06 '23 00:10 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 19 '23 00:10 github-actions[bot]