-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp: Rename correctly when conflicting #1334
lsp: Rename correctly when conflicting #1334
Conversation
a217da3
to
9c948d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of suggestions / questions, but beside that, LGTM!
One last thing — do we have existing tests that cover moving a file and applying another fix, like no-whitespace-comment
? I know we had some issues with that in the past, as the other linters would not get notified of the rename. If we don't have that covered, it'd be good to test for!
I thought we did, but I have updated a fixer test now to cover this case in: |
8ce3897
to
2bc0e1d
Compare
This updates the server's rename quick action to use the same name generation conflict resolution logic as the fixer. This is done by allowing the server's cache to be used as a new file provider and consolidating the logic for generating changes required for the templating worker and command worker. This also changes the inlay hints to exit early if the file is not parsed. This reduces errors in the server logs when working with empty files. Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
This adapts the LSP and fixer to use the versionsMap functionality in the same way as the linter. Signed-off-by: Charlie Egan <[email protected]>
2bc0e1d
to
864a51b
Compare
This updates the server's rename quick action to use the same name generation conflict resolution logic as the fixer.
This is done by allowing the server's cache to be used as a new file provider and consolidating the logic for generating changes required for the templating worker and command worker. FixViolations is also added to support more targetted fixes.
This also changes the inlay hints to exit early if the file is not parsed. This reduces errors in the server logs when working with empty files.