From 9a5f74d66bf45ac3c75a7757e146e158265814ce Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 16 Dec 2025 14:22:41 -0500 Subject: docs: ":lsp ..." in Nvim 0.12 #4243 --- README.md | 6 +++--- doc/lspconfig.txt | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d6d8841a..b1da3af4 100644 --- a/README.md +++ b/README.md @@ -166,9 +166,9 @@ Most of the time, the reason for failure is present in the logs. ## Commands * `:LspInfo` (alias to `:checkhealth vim.lsp`) shows the status of active and configured language servers. -* `:LspStart ` Start the requested server name. Will only successfully start if the command detects a root directory matching the current config. -* `:LspStop []` Stops the given server. Defaults to stopping all servers active on the current buffer. To force stop use `:LspStop!` -* `:LspRestart []` Restarts the given client, and attempts to reattach to all previously attached buffers. Defaults to restarting all active servers. +* `:lsp enable ` (`:LspStart ` for Nvim 0.11 or older) Start the requested server name. Will only successfully start if the command detects a root directory matching the current config. +* `:lsp disable ` (`:LspStop []` for Nvim 0.11 or older) Stops the given server. Defaults to stopping all servers active on the current buffer. To force stop use `:LspStop!` +* `:lsp restart ` (`:LspRestart []` for Nvim 0.11 or older) Restarts the given client, and attempts to reattach to all previously attached buffers. Defaults to restarting all active servers. ## Contributions diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt index ce0181e1..3fd42dc2 100644 --- a/doc/lspconfig.txt +++ b/doc/lspconfig.txt @@ -81,17 +81,26 @@ Alias to `:checkhealth vim.lsp`. Shows the status of active LSP clients and servers. :LspStart [config_name] *:LspStart* + +Note: Use `:lsp enable` with Nvim 0.12+. |:lsp-enable| + Launches the requested (configured) client, but only if it successfully resolves a root directory. Note: Defaults to all configured servers matching the current buffer filetype. :LspStop [client_id] or [config_name] *:LspStop* + +Note: Use `:lsp disable` with Nvim 0.12+. |:lsp-disable| + Stops the server with the given client-id or config name. Defaults to stopping all servers active on the current buffer. To force stop language servers: >vim :LspStop! :LspRestart [client_id] or [config_name] *:LspRestart* + +Note: Use `:lsp restart` with Nvim 0.12+. |:lsp-restart| + Restarts the client with the given client-id or config name, and attempts to reattach to all previously attached buffers. Defaults to restarting all active servers. To force stop language servers when restarting: >vim -- cgit v1.2.3-70-g09d2