[feature] Expose `show_text` or similar without requiring a provider
Closed this issue · 0 comments
Sometimes I have a one-off hover action I'd like to run without keeping a provider around, or really even encapsulating the 'get some text' portion of the operation in a provider.
It would be really convenient to use this repo's logic for showing text in preview windows without needing a provider.
My fork has a hack to get the behavior I want by allowing you to directly run a provider, but there's almost certainly a better way. I'm using this in my config to run a pass-through provider that has no logic for getting text.
A better solution than mine would be to separate the concept of showing text in a hover window from the concept of getting the text.
Something like:
require('hover.actions').show_text(text_record)
where the text record would have the info currently stored on providers (bufnr, focusable, etc.)