When deleting the current worktree, we end up with still the buffer open inside that worktree, the :pwd becomes E187: Unknown, and we are unable to use Switch_Worktree because of E344: Can't find directory "/home/...the_deleted_worktree".
Sidenote: Harpoon also throws lots of errors, making it really impossible to do anything but shutdown and restart neovim.
A good solution could be to first open the parent dir of the worktree we just deleted.
When deleting the current worktree, we end up with still the buffer open inside that worktree, the
:pwdbecomesE187: Unknown, and we are unable to use Switch_Worktree because ofE344: Can't find directory "/home/...the_deleted_worktree".Sidenote: Harpoon also throws lots of errors, making it really impossible to do anything but shutdown and restart neovim.
A good solution could be to first open the parent dir of the worktree we just deleted.