Description
Currently, the rename functionality (LSP) only propagates changes to files that are already open in a buffer. If a component or variable is implemented in files that are not currently open, those files remain unchanged, leading to broken references and manual cleanup.
Steps to Reproduce
- Open a project.
- Open File A (where a component is defined) and File B (where it is used).
- Keep File C (which also uses the component) closed.
- Trigger a rename in File A.
- Result: File B is updated, but File C still uses the old name.
Reference to Previous Discussion
This issue was previously mentioned here: #2003 by @developemmanuel . I am reopening this as asked by @siduck
Expected Behavior
The rename operation should reach across the entire workspace/project. Even if a file isn't open, the LSP should be able to:
- Identify the reference via "Go to Definition" logic (which currently works even for closed files).
- Apply the text edit to the file on disk or prompt to load all affected files into buffers.
Insights
Interestingly, the "Go to Definition" (gd) command works perfectly for closed files. The logic to locate the references exists, but it seems the rename handler is restricted to the current buffer list.
I'd be happy to help test a PR for the fix!
Best regards
Description
Currently, the rename functionality (LSP) only propagates changes to files that are already open in a buffer. If a component or variable is implemented in files that are not currently open, those files remain unchanged, leading to broken references and manual cleanup.
Steps to Reproduce
Reference to Previous Discussion
This issue was previously mentioned here: #2003 by @developemmanuel . I am reopening this as asked by @siduck
Expected Behavior
The rename operation should reach across the entire workspace/project. Even if a file isn't open, the LSP should be able to:
Insights
Interestingly, the "Go to Definition" (
gd) command works perfectly for closed files. The logic to locate the references exists, but it seems the rename handler is restricted to the current buffer list.I'd be happy to help test a PR for the fix!
Best regards