From 7dd6b72d0c3ecbee08cdcee7e42d520f52c96208 Mon Sep 17 00:00:00 2001 From: Illia Bobyr Date: Mon, 14 Aug 2023 23:18:48 -0700 Subject: [PATCH] doc: Document actual LspStopServer behavior (#1490) Actual behavior was slightly different from the documented one. Co-authored-by: mattn --- 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*