feat: allow disabling handling updating files on file renames #961
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
When using the Astro TypeScript plugin in addition to the language server, both will attempt to update imports whenever a file is renamed.
Both of them will handle it correctly individually, however if you run both in a row (pressing Yes or Always to the prompt in VS Code) the result will be corrupted, as editors who can handle multiple LSP renaming at the same time won't merge the results, they'll run them sequentially.
This PR adds a setting to disable the language server's handling of this, as more often than not, you want the TS plugin to handle it (so that it might handle additional formats from other plugins as well). This setting is disabled by default in VS Code, as the TS plugin is always included.
Fix #896
Testing
Added tests
Docs
Apart from the setting description, N/A.