diff options
author | Raphael <glephunter@gmail.com> | 2023-08-05 17:03:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 02:03:57 -0700 |
commit | 42630923fc00633d806af97c1792b2ed4a71e1cc (patch) | |
tree | ccf231bfe04b1ff963a39b6fd703c68c527dfa60 /runtime/lua/vim/lsp/buf.lua | |
parent | 1f252a8ac0d1ca23777978fcef07bd7fab309494 (diff) | |
download | rneovim-42630923fc00633d806af97c1792b2ed4a71e1cc.tar.gz rneovim-42630923fc00633d806af97c1792b2ed4a71e1cc.tar.bz2 rneovim-42630923fc00633d806af97c1792b2ed4a71e1cc.zip |
refactor(lsp): use protocol.Methods instead of strings #24570
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 59afaf6fa0..3b1654d11f 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -446,14 +446,14 @@ end --- |quickfix| window. If the symbol can resolve to multiple --- items, the user can pick one in the |inputlist()|. function M.incoming_calls() - call_hierarchy('callHierarchy/incomingCalls') + call_hierarchy(ms.callHierarchy_incomingCalls) end --- Lists all the items that are called by the symbol under the --- cursor in the |quickfix| window. If the symbol can resolve to --- multiple items, the user can pick one in the |inputlist()|. function M.outgoing_calls() - call_hierarchy('callHierarchy/outgoingCalls') + call_hierarchy(ms.callHierarchy_outgoingCalls) end --- List workspace folders. @@ -659,10 +659,10 @@ local function on_code_action_results(results, ctx, options) local reg = client.dynamic_capabilities:get(ms.textDocument_codeAction, { bufnr = ctx.bufnr }) local supports_resolve = vim.tbl_get(reg or {}, 'registerOptions', 'resolveProvider') - or client.supports_method('codeAction/resolve') + or client.supports_method(ms.codeAction_resolve) if not action.edit and client and supports_resolve then - client.request('codeAction/resolve', action, function(err, resolved_action) + client.request(ms.codeAction_resolve, action, function(err, resolved_action) if err then vim.notify(err.code .. ': ' .. err.message, vim.log.levels.ERROR) return |