aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorGuilherme Soares <48023091+guilhas07@users.noreply.github.com>2024-10-18 10:46:51 +0100
committerGitHub <noreply@github.com>2024-10-18 02:46:51 -0700
commitdda84e6dd99c7d67fd3f9b68ea2162521a2312a7 (patch)
treea5e16f8b40b11fd0dbe3c3c9a1b107fc882e0ea4 /lua
parentdocs(lsp_ai): description string instead of table (#3374) (diff)
downloadnvim-lspconfig-dda84e6dd99c7d67fd3f9b68ea2162521a2312a7.tar
nvim-lspconfig-dda84e6dd99c7d67fd3f9b68ea2162521a2312a7.tar.gz
nvim-lspconfig-dda84e6dd99c7d67fd3f9b68ea2162521a2312a7.tar.bz2
nvim-lspconfig-dda84e6dd99c7d67fd3f9b68ea2162521a2312a7.tar.lz
nvim-lspconfig-dda84e6dd99c7d67fd3f9b68ea2162521a2312a7.tar.xz
nvim-lspconfig-dda84e6dd99c7d67fd3f9b68ea2162521a2312a7.tar.zst
nvim-lspconfig-dda84e6dd99c7d67fd3f9b68ea2162521a2312a7.zip
fix(LspStop): correctly stop servers and notify user #3378
## Problem The current `LspStop` behavior is confusing and wrong: **Server name:** - If the server with the given `server_name` is **not attached**: - No notification is shown, and **all** LSP servers are stopped. - If the server with the given `server_name` is **attached**: - **Incorrectly** closes all LSP servers. - If no servers are attached: - `server_name` is notified as missing. **Server ID:** - If the server with the given `server_id` is **not attached**: - Uses `get_managed_clients()` function https://github.com/neovim/nvim-lspconfig/blob/541f3a2781de481bb84883889e4d9f0904250a56/plugin/lspconfig.lua#L45-L47 Which doesn't return all servers (e.g., `null-ls`), so it doesn't close all LSP clients. - If the server with the given `server_id` is **attached**: - The correct LSP server is stopped (including `null-ls`). **No arguments:** - If servers are **attached**: - Stops all servers. - If no servers are attached: - **Incorrectly** notifies the user with: `config "" not found`. ## Solution **Server name:** - If the server with the given `server_name` is **not attached**: - Notify the user, but **do not close** any servers. - If the server with the given `server_name` is **attached**: - Close the specified server. **Server ID:** - If the server with the given `server_id` is **not attached**: - Notify the user, but **do not close** any servers. - If the server with the given `server_id` is **attached**: - Close the specified server. **No arguments:** - If servers are **attached**: - Stops all servers. - If no servers are attached: - No-op.
Diffstat (limited to 'lua')
0 files changed, 0 insertions, 0 deletions