diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-02-07 17:22:03 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-02-07 19:48:37 +0000 |
commit | 59cf827f99d53ec8dbb90e48a7561c0cb8b8ca6f (patch) | |
tree | 3c91c211ce567cef3643d824f2b8027b2b60aec2 /runtime/lua/vim/lsp/codelens.lua | |
parent | cca8a78ea2ac0803d9e97ee761db9d3e31a77aeb (diff) | |
download | rneovim-59cf827f99d53ec8dbb90e48a7561c0cb8b8ca6f.tar.gz rneovim-59cf827f99d53ec8dbb90e48a7561c0cb8b8ca6f.tar.bz2 rneovim-59cf827f99d53ec8dbb90e48a7561c0cb8b8ca6f.zip |
refactor(lsp): move client code to a regular Lua class
Problem:
The LSP client code is implemented as a complicated closure-class
(class defined in a single function).
Solution:
Move LSP client code to a more conventional Lua class and move to a
separate file.
Diffstat (limited to 'runtime/lua/vim/lsp/codelens.lua')
-rw-r--r-- | runtime/lua/vim/lsp/codelens.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/codelens.lua b/runtime/lua/vim/lsp/codelens.lua index 199da288f4..a045a6bad4 100644 --- a/runtime/lua/vim/lsp/codelens.lua +++ b/runtime/lua/vim/lsp/codelens.lua @@ -48,7 +48,7 @@ local function execute_lens(lens, bufnr, client_id) local client = vim.lsp.get_client_by_id(client_id) assert(client, 'Client is required to execute lens, client_id=' .. client_id) - client._exec_cmd(lens.command, { bufnr = bufnr }, function(...) + client:_exec_cmd(lens.command, { bufnr = bufnr }, function(...) vim.lsp.handlers[ms.workspace_executeCommand](...) M.refresh() end) |