3 ms·
All LSP clients for vim will give you that; it is whatever command calls `hover` on the language server (e.g. ALEHover for ALE or LanguageClient_textDocument_ho
by sweeneyrod 6y ago
All LSP clients for vim will give you that; it is whatever command calls `hover` on the language server (e.g. ALEHover for ALE or LanguageClient_textDocument_hover for LanguageClient-neovim). Obviously you should bind these to some convenient command like <leader>t.
- dmitryminkovsky 6y agoDo you know if it’s possible in vim to show hover for an arbitrary selection? A visual selection?
- JNRowe 6y agoLike many things in vim it depends on whether you wish to write it ;) You can define your own popup(:h bexpr) however you feel, including per-filetype or buffer. Instead of simply operating on the variables it defines to you can also work upon the selection by querying the register(:h quotestar) instead. As an example, I like displaying wordnet¹ popups when writing prose. Occasionally, I'll also dump diction² output in to a popup too. However, I do think that using messages(:h :messages) might make more sense for selection info in general. That way you can select a text, call a map to display information, and still easily recall that data when you're in another place via :messages at a later time. Depends entirely on your use case, and once again how interested in writing the functionality you are. ¹ http://wordnet.princeton.edu/ http://wordnet.princeton.edu/ ² http://www.gnu.org/software/diction/diction.html http://www.gnu.org/software/diction/diction.html
- dmitryminkovsky 6y agoThank you! Will add this to my Vim to-do.