diff options
| author | Federico Igne <6771224+dyamon@users.noreply.github.com> | 2022-03-09 22:33:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-09 14:33:32 -0800 |
| commit | 096398a07c2dc08d785266f9f55ddcb462ba0749 (patch) | |
| tree | 869829d2c26e7a0e75926538d74f4262a8c970f9 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-096398a07c2dc08d785266f9f55ddcb462ba0749.tar nvim-lspconfig-096398a07c2dc08d785266f9f55ddcb462ba0749.tar.gz nvim-lspconfig-096398a07c2dc08d785266f9f55ddcb462ba0749.tar.bz2 nvim-lspconfig-096398a07c2dc08d785266f9f55ddcb462ba0749.tar.lz nvim-lspconfig-096398a07c2dc08d785266f9f55ddcb462ba0749.tar.xz nvim-lspconfig-096398a07c2dc08d785266f9f55ddcb462ba0749.tar.zst nvim-lspconfig-096398a07c2dc08d785266f9f55ddcb462ba0749.zip | |
fix(lspstop): make LspStop behave as described in the docs (#1764)
This bug was introduced in #1324.
When calling `:LspStop <args>`, the current code tries to match a string
with the format "123 (blablabla)", which will result in terminating the
server with ID 123. This is fine when using autocompletion, but if doing
this programmatically (or just following the docs) something like
`:LspStop 1` will not match anything, resulting in terminating *all*
managed servers.
This should be enough to fix the bug, allow terminating multiple servers
at once and keeping the nice UX provided by the autocompletion.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/util.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index 11586d50..25ca1689 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -395,7 +395,7 @@ end function M.get_clients_from_cmd_args(arg) local result = {} - for id in (arg or ''):gmatch '(%d+) %((%w+)%)' do + for id in (arg or ''):gmatch '(%d+)' do result[id] = vim.lsp.get_client_by_id(tonumber(id)) end if vim.tbl_isempty(result) then |
