aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorHirokazu Hata <h.hata.ai.t@gmail.com>2019-12-29 02:28:00 +0900
committerAshkan Kiani <ashkan.k.kiani@gmail.com>2019-12-28 09:28:00 -0800
commit680693e263576e34d5947c43ab0ae3ff0ebfeab5 (patch)
treedbe9427c527791ad2ca1185de3cb83ef010cf10b /runtime/doc
parent4f4c06a7a46e13e59381183818e839691b55702b (diff)
downloadrneovim-680693e263576e34d5947c43ab0ae3ff0ebfeab5.tar.gz
rneovim-680693e263576e34d5947c43ab0ae3ff0ebfeab5.tar.bz2
rneovim-680693e263576e34d5947c43ab0ae3ff0ebfeab5.zip
runtime: Add vim.lsp.get_client_by_name (#11603)
Since the client name is more obvious than the client id for the user, add an API to get the lsp client by the client name.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index d6d16b8481..d54c227973 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -72,8 +72,9 @@ the option in an |after-directory| ftplugin, e.g. "after/ftplugin/python.vim".
*lsp-core-api*
These are the core api functions for working with clients. You will mainly be
using |vim.lsp.start_client()| and |vim.lsp.buf_attach_client()| for operations
-and |vim.lsp.get_client_by_id()| to retrieve a client by its id after it has
-initialized (or {config.on_init}. see below)
+and |vim.lsp.get_client_by_id()| and |vim.lsp.get_client_by_name()| to retrieve
+a client by its id or name after it has initialized (or {config.on_init}. see
+below)
*vim.lsp.start_client()*
@@ -265,6 +266,11 @@ vim.lsp.get_client_by_id({client_id})
Look up an active client by its id, returns nil if it is not yet initialized
or is not a valid id. Returns |lsp-client|
+ *vim.lsp.get_client_by_name()*
+vim.lsp.get_client_by_name({client_name})
+
+ Look up an active client by its name, returns nil if it is not yet initialized
+ or is not a valid name. Returns |lsp-client|
*vim.lsp.stop_client()*
vim.lsp.stop_client({client_id}, [{force}])