aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-12-29 00:05:32 -0800
committerJustin M. Keyes <justinkz@gmail.com>2019-12-29 09:05:32 +0100
commit34a59242a0d42687a49119cca590e7b4203496ef (patch)
tree1fe385c353a164b79a351f797f3e46952deeb5cc /runtime
parentddffd3173730e744b4c25094be45e3673f7a186d (diff)
downloadrneovim-34a59242a0d42687a49119cca590e7b4203496ef.tar.gz
rneovim-34a59242a0d42687a49119cca590e7b4203496ef.tar.bz2
rneovim-34a59242a0d42687a49119cca590e7b4203496ef.zip
Revert "runtime: Add vim.lsp.get_client_by_name" #11623
reverts 680693e263576e34d5947c43ab0ae3ff0ebfeab5 #11603
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/lsp.txt10
-rw-r--r--runtime/lua/vim/lsp.lua10
2 files changed, 2 insertions, 18 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index d54c227973..d6d16b8481 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -72,9 +72,8 @@ 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()| 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)
+and |vim.lsp.get_client_by_id()| to retrieve a client by its id after it has
+initialized (or {config.on_init}. see below)
*vim.lsp.start_client()*
@@ -266,11 +265,6 @@ 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}])
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 042ed7bcfe..0ecf57f50c 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -697,16 +697,6 @@ function lsp.get_client_by_id(client_id)
return active_clients[client_id]
end
--- Look up an active client by its name, returns nil if it is not yet initialized
--- or is not a valid name.
--- @param client_name string the client name.
-function lsp.get_client_by_name(client_name)
- for _, client in pairs(active_clients) do
- if client.name == client_name then return client end
- end
- return nil
-end
-
-- Stop a client by its id, optionally with force.
-- You can also use the `stop()` function on a client if you already have
-- access to it.