hrsh7th/vim-lamp

Automatically highlight references

Closed this issue · 2 comments

Currently vim-lamp support textDocument/documentHighlight, but in manual way (via LampDocumentHighlight and LampDocumentHighlightClear). I would like to suggest a neat feature that available in most IDE: highlight an item under cursor automatically (with configurable delay) and clear it after leaving from this item. This how it looks in Qt Creator:
изображение
vim-lsp also have this feature, I made a small video to demonstrate how it works:
asciicast

I think the feature can use https://github.com/itchyny/vim-cursorword instead.

Should I do it with LSP?

Oh, didn't know about it! I think something like cursorword plugin will be enough.