nvim-telescope / telescope-frecency.nvim

A telescope.nvim extension that offers intelligent prioritization when selecting files from your editing history.
MIT License
777 stars 37 forks source link

fix: get file lock forcibly #153

Closed delphinus closed 10 months ago

delphinus commented 10 months ago

When Neovim ends without removing file locks, it will fail to open frecency ever because file locks remain. This fix makes it remove file locks forcibly when all attempts fail.

  1. In default, when it fails to get file lock, it tries max to 5 times.
  2. When it reaches the count, it tries to unlink the lock file.
  3. When it fails to unlink the file, it tries max to 5 times again.
  4. When it all fails again, it gives up getting locks with this error message below.
    • file_lock get(): failed to unlink the lock file: ……