LSP: implement documentHighlight (#11638)

* implement documentHighlight
* fix bug
* document highlight groups
* use uppercase for help section title
* documentation
This commit is contained in:
Alvaro Muñoz
2020-02-26 20:10:16 +01:00
committed by GitHub
parent 78ec95ce7d
commit ca8699378c
4 changed files with 69 additions and 17 deletions

View File

@@ -196,6 +196,12 @@ M['textDocument/peekDefinition'] = function(_, _, result, _)
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()
util.buf_highlight_references(bufnr, result)
end
local function log_message(_, _, result, client_id)
local message_type = result.type
local message = result.message