Skip to content

Commit 7dd6b72

Browse files
ilya-bobyrmattn
andauthored
doc: Document actual LspStopServer behavior (#1490)
Actual behavior was slightly different from the documented one. Co-authored-by: mattn <[email protected]>
1 parent 42d223c commit 7dd6b72

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

doc/vim-lsp.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,9 +1909,17 @@ Prints the status of all registered servers. Use `:verbose LspStatus` to
19091909
additionally show each server's workspace_config.
19101910
See also |vim-lsp-healthcheck|.
19111911

1912-
LspStopServer *:LspStopServer*
1912+
LspStopServer [name] *:LspStopServer*
19131913

1914-
Stop all active servers.
1914+
If 'name' is not specified, then all active servers that handle files matching
1915+
the current buffer type are stopped. This is often what you want. For
1916+
example, if you have multiple files of different types open, `LspStopServer`
1917+
will only stop the server for the current buffer.
1918+
1919+
When 'name' is provided, it acts as an additional restriction, only stopping
1920+
server that handles the current buffer type, if it also matches the specifie
1921+
name. 'name' value is compred to the 'name' property in the
1922+
|lsp#register_server()| call.
19151923

19161924
==============================================================================
19171925
Autocommands *vim-lsp-autocommands*

0 commit comments

Comments
 (0)