From 3e204a102925b7f2a4dc2f76fb555f12ea2e9f6a Mon Sep 17 00:00:00 2001 From: Illia Bobyr Date: Mon, 14 Aug 2023 19:29:46 -0700 Subject: [PATCH] doc: Document actual LspStopServer behavior Actual behavior was slightly different from the documented one. --- doc/vim-lsp.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/vim-lsp.txt b/doc/vim-lsp.txt index ab2f29c1a..57b549d6a 100644 --- a/doc/vim-lsp.txt +++ b/doc/vim-lsp.txt @@ -1909,9 +1909,17 @@ Prints the status of all registered servers. Use `:verbose LspStatus` to additionally show each server's workspace_config. See also |vim-lsp-healthcheck|. -LspStopServer *:LspStopServer* +LspStopServer [name] *:LspStopServer* -Stop all active servers. +If 'name' is not specified, then all active servers that handle files matching +the current buffer type are stopped. This is often what you want. For +example, if you have multiple files of different types open, `LspStopServer` +will only stop the server for the current buffer. + +When 'name' is provided, it acts as an additional restriction, only stopping +server that handles the current buffer type, if it also matches the specifie +name. 'name' value is compred to the 'name' property in the +|lsp#register_server()| call. ============================================================================== Autocommands *vim-lsp-autocommands*