diff options
author | Sooryakiran Ponnath <skp.frl@gmail.com> | 2023-06-20 15:17:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 21:17:13 +0200 |
commit | 3bf887f6e08fa272679187340ca483809275b20a (patch) | |
tree | 72cba1cc22ca39e0774f6bf46d31e735cfe1938e /runtime/lua/vim/lsp.lua | |
parent | 1f0b2dc6cd8fbf650dfbfb3328de6e6284aec9e4 (diff) | |
download | rneovim-3bf887f6e08fa272679187340ca483809275b20a.tar.gz rneovim-3bf887f6e08fa272679187340ca483809275b20a.tar.bz2 rneovim-3bf887f6e08fa272679187340ca483809275b20a.zip |
fix(lsp): always return boolean in lsp.buf_client_attach (#24077)
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 25e69a8006..cb1c101c58 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -1799,6 +1799,7 @@ end --- ---@param bufnr (integer) Buffer handle, or 0 for current ---@param client_id (integer) Client id +---@return boolean success `true` if client was attached successfully; `false` otherwise function lsp.buf_attach_client(bufnr, client_id) validate({ bufnr = { bufnr, 'n', true }, @@ -1887,7 +1888,7 @@ function lsp.buf_attach_client(bufnr, client_id) end if buffer_client_ids[client_id] then - return + return true end -- This is our first time attaching this client to this buffer. buffer_client_ids[client_id] = true |