aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorThore Weilbier <thore@weilbier.net>2020-04-26 06:47:48 +0200
committerGitHub <noreply@github.com>2020-04-25 21:47:48 -0700
commit68511924d02af03812ae4b56aea6d94009f8096e (patch)
tree8b62b116b341f80f064f81c397435246f70797c4 /runtime/lua/vim/lsp/util.lua
parentc5217c67df2e08b73ef3a8217b0d9c953467fde1 (diff)
downloadrneovim-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/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua25
1 files changed, 0 insertions, 25 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 80e4399fe1..49798a452f 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -621,31 +621,6 @@ function M.open_floating_preview(contents, filetype, opts)
return floating_bufnr, floating_winnr
end
-local function validate_lsp_position(pos)
- validate { pos = {pos, 't'} }
- validate {
- line = {pos.line, 'n'};
- character = {pos.character, 'n'};
- }
- return true
-end
-
-function M.open_floating_peek_preview(bufnr, start, finish, opts)
- validate {
- bufnr = {bufnr, 'n'};
- start = {start, validate_lsp_position, 'valid start Position'};
- finish = {finish, validate_lsp_position, 'valid finish Position'};
- opts = { opts, 't', true };
- }
- local width = math.max(finish.character - start.character + 1, 1)
- local height = math.max(finish.line - start.line + 1, 1)
- local floating_winnr = api.nvim_open_win(bufnr, false, M.make_floating_popup_options(width, height, opts))
- api.nvim_win_set_cursor(floating_winnr, {start.line+1, start.character})
- api.nvim_command("autocmd CursorMoved * ++once lua pcall(vim.api.nvim_win_close, "..floating_winnr..", true)")
- return floating_winnr
-end
-
-
local function highlight_range(bufnr, ns, hiname, start, finish)
if start[1] == finish[1] then
-- TODO care about encoding here since this is in byte index?