angular/packages/language-service
Charles Lyding 4bb9d0f923 fix(language-service): avoid generating TS suggestion diagnostics for templates (#56241)
Angular's template files are not valid TypeScript. Attempting to get suggestion
diagnostics from the underlying TypeScript language service will result in
a large amount of false positives. Only actual TypeScript files should
be analyzed by the underlying TypeScript language service for suggestions.

PR Close #56241
2024-08-02 15:51:35 +00:00
..
bundles refactor: migrate language-service to prettier formatting (#55405) 2024-04-18 14:18:38 -07:00
src fix(language-service): avoid generating TS suggestion diagnostics for templates (#56241) 2024-08-02 15:51:35 +00:00
test fix(compiler-cli): add warning for unused let declarations (#57033) 2024-07-23 08:27:17 -07:00
testing feat(core): support TypeScript 5.5 (#56096) 2024-05-29 15:33:33 +02:00
api.ts perf(language-service): quick exit if no code fixes can exist (#57000) 2024-07-16 08:41:03 -07:00
BUILD.bazel refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -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 language-service package and tests to work with ESM (#48521) 2022-12-19 19:50:44 +00:00
index.js refactor: update language-service package and tests to work with ESM (#48521) 2022-12-19 19:50:44 +00:00
override_rename_ts_plugin.ts refactor: migrate language-service to prettier formatting (#55405) 2024-04-18 14:18:38 -07:00
package.json build: update Node.js to match Angular CLI engines (#56187) 2024-06-03 18:00:46 +00:00
plugin-factory.ts fix(language-service): use type-only import in plugin factory (#55996) 2024-05-22 09:52:32 -07: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.