Skip to content

Commit c136663

Browse files
authored
docs: cleanup #3792
1 parent ed47a38 commit c136663

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

lsp/angularls.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
--- https://github.com/angular/vscode-ng-language-service
44
--- `angular-language-server` can be installed via npm `npm install -g @angular/language-server`.
55
---
6-
--- Note, that if you override the default `cmd`, you must also update `on_new_config` to set `new_config.cmd` during startup.
7-
---
86
--- ```lua
97
--- local project_library_path = "/path/to/project/lib"
108
--- local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path}
119
---
1210
--- vim.lsp.config('angularls', {
1311
--- cmd = cmd,
14-
--- on_new_config = function(new_config,new_root_dir)
15-
--- new_config.cmd = cmd
16-
--- end,
1712
--- })
1813
--- ```
1914

lsp/volar.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
--- tsdk = '/path/to/node_modules/typescript/lib'
6565
--- }
6666
--- },
67-
--- on_new_config = function(new_config, new_root_dir)
67+
--- before_init = function(params, config)
6868
--- local lib_path = vim.fs.find('node_modules/typescript/lib', { path = new_root_dir, upward = true })[1]
6969
--- if lib_path then
70-
--- new_config.init_options.typescript.tsdk = lib_path
70+
--- config.init_options.typescript.tsdk = lib_path
7171
--- end
7272
--- end
7373
--- })

0 commit comments

Comments
 (0)