From 2fa5e702de4efaf8fe5337508ca3077685f5e6bd Mon Sep 17 00:00:00 2001 From: Andrew Miller Date: Sun, 15 Oct 2023 13:47:27 -0600 Subject: [PATCH] docs(language-service): add neovim setup to angular language service docs (#52212) PR Close #52212 --- aio/content/guide/language-service.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/aio/content/guide/language-service.md b/aio/content/guide/language-service.md index 7f621246a109d..1ae3f16a4b713 100644 --- a/aio/content/guide/language-service.md +++ b/aio/content/guide/language-service.md @@ -141,6 +141,31 @@ This lets the Angular Language Service provide diagnostics and completions in `. Either directly install the "Eclipse IDE for Web and JavaScript developers" package which comes with the Angular Language Server included, or from other Eclipse IDE packages, use Help > Eclipse Marketplace to find and install [Eclipse Wild Web Developer](https://marketplace.eclipse.org/content/wild-web-developer-html-css-javascript-typescript-nodejs-angular-json-yaml-kubernetes-xml). +### Neovim + +1. [Setup coc.nvim](https://github.com/neoclide/coc.nvim) + +2. [Configure the Angular Language Service](https://github.com/iamcco/coc-angular/issues/70#issuecomment-1616340751) + +``` +{ + "languageserver": { + "angular": { + "command": "ngserver", + "args": [ + "--stdio", + "--tsProbeLocations", + "/usr/local/lib/node_modules/typescript/lib", + "--ngProbeLocations", + "/usr/local/lib/node_modules/@angular/language-server/bin" + ], + "filetypes": ["ts", "typescript", "html"], + "trace.server.verbosity": "verbose" + } + } +} +``` + ## How the Language Service works When you use an editor with a language service, the editor starts a separate language-service process and communicates with it through an [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call), using the [Language Server Protocol](https://microsoft.github.io/language-server-protocol). @@ -168,4 +193,4 @@ The Angular Language Services then looks at `data.---` within its context, asks -@reviewed 2022-02-28 +@reviewed 2022-02-28 \ No newline at end of file