coc-angular
年糕小豆汤Editor services for Angular templates
Published Package Summary
Angular Language Service
fork from angular/vscode-ng-language-service v17.0.2 commit
An angular language service coc extension for (neo)vim 💖
Note: only version <= 13.3.6 support view-engine
Install
:CocInstall coc-angular

Using
This extension provides a rich editing experience for Angular templates, both inline and external templates including:
- Completions lists
- AOT Diagnostic messages
- Quick info
- Go to definition
Note: This extension does not support syntax highlight for external or inline templates.
Configuring compiler options for the Angular Language Service
The Angular Language Service uses the same set of options that are used to compile the application.
To get the most complete information in the editor, set the strictTemplates option in tsconfig.json,
as shown in the following example:
"angularCompilerOptions": {
"strictTemplates": true
}
For more information, see the Angular compiler options guide.
Versioning
The language service extension relies on the @angular/language-service and typescript packages
for its backend. @angular/language-service is always bundled with the extension, and is always
the latest version at the time of the release.
typescript is loaded, in order of priority, from:
- The path specified by
typescript.tsdkin project or global settings. - (Recommended) The version of
typescriptbundled with the Angular Language Service extension. - The version of
typescriptpresent in the current workspace's node_modules.
We suggest not specifying typescript.tsdk in your VSCode settings
per method (1) above. If the typescript package is loaded by methods (1) or (3), there is a potential
for a mismatch between the API expected by @angular/language-service and the API provided by typescript.
This could lead to a failure of the language service extension.
For more information, please see #594.
Buy Me A Coffee ☕️

- Editor services for Angular templates
- workspaceContains:angular.json
- workspaceContains:node_modules/@angular/core/core.d.ts
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-angular@17.0.2.
| Command (:CocCommand) | Description |
|---|---|
| angular.restartNgServer | Restart Angular Language server |
| angular.openLogFile | Open Angular Server log |
| angular.getTemplateTcb | View Template Typecheck Block |
| angular.goToComponentWithTemplateFile | Go to component |
| angular.goToTemplateForComponent | Go to template |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"enum": [
"off",
"terse",
"normal",
"verbose"
],
"type": "string",
"default": "off",
"description": "Enables logging of the Angular server to a file. This log can be used to diagnose Angular Server issues. The log may contain file paths, source code, and other potentially sensitive information from your project."
}Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"default": "off",
"description": "enable angular language server trace log?"
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"markdownDescription": "Enabling this option will force the language service to use [strictTemplates](https://angular.io/guide/angular-compiler-options#stricttemplates) and ignore the user settings in the `tsconfig.json`."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Prompt to enable Strict Mode."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable/disable snippet completions from Angular language server. Requires using TypeScript 4.3+ in the workspace and the `legacy View Engine` option to be disabled."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+, strict null checks to be enabled and the `legacy View Engine` option to be disabled."
}