diff options
author | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-26 05:59:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-26 05:59:40 -0800 |
commit | 6e8c5779cf960893850501e4871dc9be671db298 (patch) | |
tree | 7712e1fcb69ca8167cea7ad0deb15c280196038b /runtime/lua/vim/lsp.lua | |
parent | 36d1335a667d54c26ab7cca23bc60998cb8e0fb2 (diff) | |
download | rneovim-6e8c5779cf960893850501e4871dc9be671db298.tar.gz rneovim-6e8c5779cf960893850501e4871dc9be671db298.tar.bz2 rneovim-6e8c5779cf960893850501e4871dc9be671db298.zip |
LSP: Move default buf callbacks to vim.lsp.callbacks (#11452)
- In the process, refactored focusable_preview to a util function.
- Add text for locations_to_items of the current line.
- Improve location callback to handle multiple return values by using
set_qflist.
- Remove update_tagstack and leave note for future travelers.
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 928d19177a..82f4fda66f 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -1,4 +1,4 @@ -local default_callbacks = require 'vim.lsp.default_callbacks' +local default_callbacks = require 'vim.lsp.callbacks' local log = require 'vim.lsp.log' local lsp_rpc = require 'vim.lsp.rpc' local protocol = require 'vim.lsp.protocol' @@ -13,7 +13,7 @@ local validate = vim.validate local lsp = { protocol = protocol; - default_callbacks = default_callbacks; + callbacks = default_callbacks; buf = require'vim.lsp.buf'; util = util; -- Allow raw RPC access. @@ -469,7 +469,7 @@ function lsp.start_client(config) function client.request(method, params, callback) if not callback then callback = resolve_callback(method) - or error(string.format("request callback is empty and no default was found for client %s", client.name)) + or error("not found: request callback for client "..client.name) end local _ = log.debug() and log.debug(log_prefix, "client.request", client_id, method, params, callback) -- TODO keep these checks or just let it go anyway? |