kevinhwang91 / nvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.
BSD 3-Clause "New" or "Revised" License
2.34k stars 49 forks source link

Peek folded line snippet without opening #5

Closed kevinhwang91 closed 2 years ago

kevinhwang91 commented 2 years ago

Feature description

high priority for this feature if the document is improved.

Describe the solution you'd like

using a floating window and show the rendered code.

Additional context

No response

xiyaowong commented 2 years ago

👍🏻

kevinhwang91 commented 2 years ago

https://user-images.githubusercontent.com/17562139/176708958-a14aec97-3596-44c4-9a7a-580fa584ed79.mp4

kevinhwang91 commented 2 years ago

Feel free to share your idea. about UI.

If you using the magic window feature in nvim-bqf, I think you will like the trace action fired by double click with mouse.

kevinhwang91 commented 2 years ago

done

wookayin commented 2 years ago

in 98b07fc2606c40ae5bf0eaf67e74d8b82a69f040

Great job, thanks Kevin!

wookayin commented 2 years ago

For those who might find this issue later about usage:

The programmatic API to open the preview window (configure your own mappings):

Keys like q, <Tab> will work as per the configuration. Window options (winblend, highlight, etc.) are also supported.

grassleaf99 commented 9 months ago

ufo-peek.mp4

@kevinhwang91 Sorry if this is a silly question but how can I scroll in peek folded line? In the video, it seems that to scroll, I have to use the mouse

rockyzhang24 commented 9 months ago

@grassleaf99 see https://github.com/kevinhwang91/nvim-ufo#preview-function-table