angular/packages/language-service
Charles Lyding 67a4a7b27e refactor(language-service): reuse code fixes map for has fix check (#58759)
The error codes that have fixes are present in a Map instance and
can be directly leveraged to determine if an error code can be fixed.
This avoids multiple levels of iteration that would otherwise be needed.

PR Close #58759
2024-11-20 08:10:15 -08:00
..
bundles refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
src refactor(language-service): reuse code fixes map for has fix check (#58759) 2024-11-20 08:10:15 -08:00
test fix(language-service): add fix for individual unused imports (#58719) 2024-11-19 12:19:14 -08:00
testing feat(language-service): support migrating full classes to signal inputs in VSCode (#57975) 2024-09-30 13:29:21 -07:00
api.ts feat(language-service): support migrating full classes to signal inputs in VSCode (#57975) 2024-09-30 13:29:21 -07:00
BUILD.bazel refactor(platform-server): Add an ssr benchmark setup. (#57647) 2024-10-04 10:45:22 -07:00
build.sh feat(language-service): support writing code refactorings (#56895) 2024-07-15 11:35:40 -07:00
index.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
index.js refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
override_rename_ts_plugin.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
package.json build: update Node.js to match Angular CLI engines (#56187) 2024-06-03 18:00:46 +00:00
plugin-factory.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
README.md feat(language-service): Provide plugin to delegate rename requests to Angular (#44696) 2022-01-21 11:18:48 -08:00

Override Rename Ts Plugin

When the user wants to rename a symbol in the ts file VSCode will ask the rename providers for the answer in turn. If the first extension returns the result, the VSCode will break the loop and apply the result. If the first extension cannot rename the symbol, VSCode will ask the second extension in the list (built-in TS/JS extension, Angular LS extension, etc.). In other words, VSCode takes the result from only one rename provider and the order depends on registration timing, scoring.

Because the built-in ts extension and Angular extension have the same high score, if the built-in ts extension is the first(depends on the time the extension was registered), the result will be provided by the built-in extension. We want Angular to provide it, so this plugin will delegate rename requests and reject the request for the built-in ts server.

The Angular LS only provides the rename info when working within an Angular project. If we cannot locate Angular sources in the project files, the built-in extension should provide the rename info.

This plugin will apply to the built-in TS/JS extension and delegate rename requests to the Angular LS. It provides the rename info only when it is an Angular project. Otherwise, it will return info by the default built-in ts server rename provider.

See here for more info.