diff options
Diffstat (limited to 'lsp/angularls.lua')
| -rw-r--r-- | lsp/angularls.lua | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lsp/angularls.lua b/lsp/angularls.lua index dfb225aa..cdf28c9e 100644 --- a/lsp/angularls.lua +++ b/lsp/angularls.lua @@ -1,3 +1,22 @@ +---@brief +--- +--- https://github.com/angular/vscode-ng-language-service +--- `angular-language-server` can be installed via npm `npm install -g @angular/language-server`. +--- +--- 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 = {"ngserver", "--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, +--- } +--- ``` + -- Angular requires a node_modules directory to probe for @angular/language-service and typescript -- in order to use your projects configured versions. local root_dir = vim.fn.getcwd() @@ -54,25 +73,6 @@ local ng_probe_dirs = vim end) :join(',') ----@brief ---- ---- https://github.com/angular/vscode-ng-language-service ---- `angular-language-server` can be installed via npm `npm install -g @angular/language-server`. ---- ---- 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 = {"ngserver", "--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, ---- } ---- ``` - return { cmd = { 'ngserver', |
