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.
In default, when it fails to get file lock, it tries max to 5 times.
When it reaches the count, it tries to unlink the lock file.
When it fails to unlink the file, it tries max to 5 times again.
When it all fails again, it gives up getting locks with this error message below.
file_lock get(): failed to unlink the lock file: ……
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.
file_lock get(): failed to unlink the lock file: ……