diff options
author | Thore Weilbier <thore@weilbier.net> | 2020-04-26 06:47:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 21:47:48 -0700 |
commit | 68511924d02af03812ae4b56aea6d94009f8096e (patch) | |
tree | 8b62b116b341f80f064f81c397435246f70797c4 /runtime/lua/vim/lsp/callbacks.lua | |
parent | c5217c67df2e08b73ef3a8217b0d9c953467fde1 (diff) | |
download | rneovim-68511924d02af03812ae4b56aea6d94009f8096e.tar.gz rneovim-68511924d02af03812ae4b56aea6d94009f8096e.tar.bz2 rneovim-68511924d02af03812ae4b56aea6d94009f8096e.zip |
LSP: remove obsolete "peek definition" code #12178
The method with the name 'textDocument/peekDefinition' is not part of
the official language server protocol specification. Therefore no
language server can/will support this. Thereby all related code and
documentation as been removed.
Diffstat (limited to 'runtime/lua/vim/lsp/callbacks.lua')
-rw-r--r-- | runtime/lua/vim/lsp/callbacks.lua | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/runtime/lua/vim/lsp/callbacks.lua b/runtime/lua/vim/lsp/callbacks.lua index 9c30085f37..bd2cbf1ea7 100644 --- a/runtime/lua/vim/lsp/callbacks.lua +++ b/runtime/lua/vim/lsp/callbacks.lua @@ -151,21 +151,6 @@ M['textDocument/signatureHelp'] = function(_, method, result) end) end -M['textDocument/peekDefinition'] = function(_, _, result, _) - if not (result and result[1]) then return end - local loc = result[1] - local bufnr = vim.uri_to_bufnr(loc.uri) or error("not found: "..tostring(loc.uri)) - local start = loc.range.start - local finish = loc.range["end"] - util.open_floating_peek_preview(bufnr, start, finish, { offset_x = 1 }) - local headbuf = util.open_floating_preview({"Peek:"}, nil, { - offset_y = -(finish.line - start.line); - width = finish.character - start.character + 2; - }) - -- TODO(ashkan) change highlight group? - api.nvim_buf_add_highlight(headbuf, -1, 'Keyword', 0, -1) -end - M['textDocument/documentHighlight'] = function(_, _, result, _) if not result then return end local bufnr = api.nvim_get_current_buf() |