From 6a1a1de330ce1e571b4860e4143ccc2d59cf5c6e Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Mon, 4 Jan 2021 14:22:40 -0800 Subject: angularls: update documentation to note on_init overrides cmd --- lua/lspconfig/angularls.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lspconfig/angularls.lua b/lua/lspconfig/angularls.lua index c714b310..04525ec7 100644 --- a/lua/lspconfig/angularls.lua +++ b/lua/lspconfig/angularls.lua @@ -45,6 +45,20 @@ https://github.com/angular/vscode-ng-language-service `angular-language-server` can be installed via npm `npm install @angular/language-server`. Be aware there is no global binary and must be run via `node_modules/@angular/language-server/index.js` which can be added as the default cmd. + +Note, that if you override the default `cmd`, you must also update `on_new_config` to set `new_config.cmd` during startup. + +```lua +local project_library_path = "/path/to/project/lib" +local cmd = {"node", "/path/to/node_modules/@angular/language-server/index.js", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path} + +require'lspconfig'.angularls.setup{ + cmd = cmd, + on_new_config = function(new_config,new_root_dir) + new_config.cmd = cmd + end, +} +``` ]]; default_config = { root_dir = [[root_pattern("angular.json", ".git")]]; -- cgit v1.2.3-70-g09d2 From ebde444d5b3e95d87570b6006bd0555bdc52b508 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Tue, 5 Jan 2021 23:01:53 +0000 Subject: [docgen] Update README.md skip-checks: true --- CONFIG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CONFIG.md b/CONFIG.md index ea566087..185e2ceb 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -103,6 +103,20 @@ https://github.com/angular/vscode-ng-language-service `angular-language-server` can be installed via npm `npm install @angular/language-server`. Be aware there is no global binary and must be run via `node_modules/@angular/language-server/index.js` which can be added as the default cmd. + +Note, that if you override the default `cmd`, you must also update `on_new_config` to set `new_config.cmd` during startup. + +```lua +local project_library_path = "/path/to/project/lib" +local cmd = {"node", "/path/to/node_modules/@angular/language-server/index.js", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path} + +require'lspconfig'.angularls.setup{ + cmd = cmd, + on_new_config = function(new_config,new_root_dir) + new_config.cmd = cmd + end, +} +``` ```lua @@ -4953,6 +4967,12 @@ This server accepts configuration via the `settings` key. null +- **`Lua.runtime.plugin`**: `string` + + Default: `".vscode/lua/plugin.lua"` + + null + - **`Lua.runtime.special`**: `object` null -- cgit v1.2.3-70-g09d2