You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
didChangeWatchedFiles is not sent immediately to LS after applying edits from rename response #1225
When performing a rename that affects multiple files (many of which are not opened in the IDEA), the subsequent find usages returns only usages from the files that are currently opened. After a significant delay (or after opening the git commit window), the missing usages start to appear.
Preconditions
The symbol to be renamed has usages in several files, including files that are not opened in IDEA.
Steps to Reproduce
Open any file in IDEA containing the symbol to be renamed.
Run find usages on that symbol and note the total count.
Perform rename for that symbol. The language server returns edits that modify multiple files (including unopened files).
Immediately run find usages again.
Actual Result
The second find usages lists usages only in opened files (or a subset), so the total count is smaller than before the rename.
After ~60 seconds (in my tests), or earlier if I open the Git Commit window to view pending changes, additional usages appear and the count increases.
Expected Result
The second Find Usages should match the first Find Usages count (pre-rename), reflecting all updated files right away, even if those files are not opened in the editor.
Technical Notes
The edits returned by the language server are applied to files on disk.
However, didChangeWatchedFiles request are not sent to LS immediately.
If I remember didChangeWatchedFiles uses IJ virtual file listener to know when files changed where events are fired when you do ctrl+s or when you click outside IJ idea.
@angelozerr Yes, you are right it's related to saving. I've submitted a PR that adds immediate document saving to fix this behavior. Could you please review it?
Activity
angelozerr commentedon Aug 20, 2025
Do you rhink you could investigate the problem and create a pr?
angelozerr commentedon Aug 20, 2025
If I remember didChangeWatchedFiles uses IJ virtual file listener to know when files changed where events are fired when you do ctrl+s or when you click outside IJ idea.
Perhaps it is the problem?
sergeysavchuk commentedon Aug 20, 2025
@angelozerr sure, I can investigate this problem over the next few days and will come back with more detailed technical findings.
sergeysavchuk commentedon Aug 25, 2025
@angelozerr Yes, you are right it's related to saving. I've submitted a PR that adds immediate document saving to fix this behavior. Could you please review it?
fix: save the documents a workspace edit changes that are not open in…