diff options
| author | Lucas Viana <oviana@outlook.com> | 2021-11-19 01:40:13 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-19 05:40:13 +0100 |
| commit | c3e6083b58d1f8c6f5988a63c2ade696f71a8644 (patch) | |
| tree | 2d9a69fe9da08b4649c1471b8d07ebbd74af4729 /lua | |
| parent | angularls: use server root dir for probe locations (#266) (diff) | |
| download | mason-c3e6083b58d1f8c6f5988a63c2ade696f71a8644.tar mason-c3e6083b58d1f8c6f5988a63c2ade696f71a8644.tar.gz mason-c3e6083b58d1f8c6f5988a63c2ade696f71a8644.tar.bz2 mason-c3e6083b58d1f8c6f5988a63c2ade696f71a8644.tar.lz mason-c3e6083b58d1f8c6f5988a63c2ade696f71a8644.tar.xz mason-c3e6083b58d1f8c6f5988a63c2ade696f71a8644.tar.zst mason-c3e6083b58d1f8c6f5988a63c2ade696f71a8644.zip | |
angularls: overload on_new_config with new probe locations (#269)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/angularls/init.lua | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lua/nvim-lsp-installer/servers/angularls/init.lua b/lua/nvim-lsp-installer/servers/angularls/init.lua index 59349efc..b886cbd5 100644 --- a/lua/nvim-lsp-installer/servers/angularls/init.lua +++ b/lua/nvim-lsp-installer/servers/angularls/init.lua @@ -2,6 +2,15 @@ local server = require "nvim-lsp-installer.server" local npm = require "nvim-lsp-installer.installers.npm" return function(name, root_dir) + local cmd = { + npm.executable(root_dir, "ngserver"), + "--stdio", + "--tsProbeLocations", + root_dir, + "--ngProbeLocations", + root_dir, + } + return server.Server:new { name = name, root_dir = root_dir, @@ -9,14 +18,10 @@ return function(name, root_dir) languages = { "angular" }, installer = npm.packages { "@angular/language-server", "typescript" }, default_options = { - cmd = { - npm.executable(root_dir, "ngserver"), - "--stdio", - "--tsProbeLocations", - root_dir, - "--ngProbeLocations", - root_dir, - }, + cmd = cmd, + on_new_config = function(new_config) + new_config.cmd = cmd + end, }, } end |
