aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-01-05 15:02:13 -0800
committerGitHub <noreply@github.com>2021-01-05 15:02:13 -0800
commit69ce8b95300da53fea099271db39e8a607d85f47 (patch)
tree612133da74dd78c3d061de754bd54e0f739ecc01 /lua
parent[docgen] Update README.md (diff)
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-69ce8b95300da53fea099271db39e8a607d85f47.tar
nvim-lspconfig-69ce8b95300da53fea099271db39e8a607d85f47.tar.gz
nvim-lspconfig-69ce8b95300da53fea099271db39e8a607d85f47.tar.bz2
nvim-lspconfig-69ce8b95300da53fea099271db39e8a607d85f47.tar.lz
nvim-lspconfig-69ce8b95300da53fea099271db39e8a607d85f47.tar.xz
nvim-lspconfig-69ce8b95300da53fea099271db39e8a607d85f47.tar.zst
nvim-lspconfig-69ce8b95300da53fea099271db39e8a607d85f47.zip
Merge pull request #540 from mjlbach/angularls_fix_documentation
angularls: update documentation to note on_init overrides cmd
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/angularls.lua14
1 files changed, 14 insertions, 0 deletions
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")]];