Running CocCommand workspace.renameCurrentFile with watchman installed doesn't update import paths in other files most of the time.
The odds of it working are around 10% I'd say (re-ran it like 200 times :D )
After extensive testing, it seems like the rename gets picked up by watchman just fine, the issue was with the ts-server RPC...
When getEditsForFileRename gets called, it returns [].
It works 100% of the time, it seems to be a timing issue with the wait delay not being long enough. I imagine this number might have to be even bigger for slower systems, since I'm on a workstation.
Would you be open to a PR increasing it to a bigger number or do you have other ideas?
Hello, I'm on
coc-tsserver
latest master commit (9ff880e
), latestwatchman
(2023.11.27.00-1
) .Running
CocCommand workspace.renameCurrentFile
with watchman installed doesn't update import paths in other files most of the time.The odds of it working are around 10% I'd say (re-ran it like 200 times :D )
After extensive testing, it seems like the rename gets picked up by
watchman
just fine, the issue was with the ts-server RPC... WhengetEditsForFileRename
gets called, it returns[]
.I managed to track it down to src/server/features/updatePathOnRename.ts, if I change the line to:
It works 100% of the time, it seems to be a timing issue with the wait delay not being long enough. I imagine this number might have to be even bigger for slower systems, since I'm on a workstation.
Would you be open to a PR increasing it to a bigger number or do you have other ideas?