-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
document_highlight() *vim.lsp.buf.document_highlight()*
Send request to the server to resolve document highlights for the current
text document position. This request can be triggered by a key mapping or
by events such as `CursorHold`, e.g.: >vim
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
<
Note: Usage of |vim.lsp.buf.document_highlight()| requires the following
highlight groups to be defined or you won't be able to see the actual
highlights. |hl-LspReferenceText| |hl-LspReferenceRead|
|hl-LspReferenceWrite|
One keymap to highlight, another to clear references.
Perhaps in the first, it should clear then highlight so you don't have multiple items highlighted.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels