dash.nvim icon indicating copy to clipboard operation
dash.nvim copied to clipboard

Previews?

Open mrjones2014 opened this issue 4 years ago • 9 comments

Is it possible to enable previews? Might only be possible in GUI vim since the docs are HTML documents.

mrjones2014 avatar Sep 26 '21 00:09 mrjones2014

Could possibly use a terminal browser like elinks for this?

mrjones2014 avatar Sep 26 '21 02:09 mrjones2014

I have this sorta working on a branch, but the previews aren't very helpful as, for example, for MDN, the visible part is basically just a bunch of links at the top.

https://github.com/mrjones2014/dash.nvim/tree/matjones/experimental-previews

CleanShot-2021-10-02-at-15 54 26

mrjones2014 avatar Oct 02 '21 19:10 mrjones2014

As part of #24 we'll need to map keywords/docsets to their directory name on disk -- once that work is completed we can use that to implement something like this: https://github.com/sunaku/dasht/blob/master/bin/dasht-query-line#L101

mrjones2014 avatar Nov 01 '21 15:11 mrjones2014

Just discovered https://www.brow.sh/

this might work better since it can actually render CSS properly.

mrjones2014 avatar Nov 07 '21 19:11 mrjones2014

got previews kinda working with brow.sh but not really usable -- its super blurred

CleanShot-2021-11-07-at-18 11 10

mrjones2014 avatar Nov 07 '21 23:11 mrjones2014

Wdym it's blurry? I have nearsightedness and this is perfectly readable to me.

lukelex avatar Nov 08 '21 16:11 lukelex

@lukelex ... you're telling me you can read this code sample? lmao

CleanShot-2021-11-08-at-14 01 17

mrjones2014 avatar Nov 08 '21 19:11 mrjones2014

You know, it might be worth discussing this on the neovim issue tracker, or in their Matrix channel. I know they're quite keen on a documentation browser within nvim, because I've talked about this with them before. Perhaps they're willing to meet you half way on this. Something that can parse HTML/Markdown, where the user can also fuzzy-find over the rendered view, would be perfect.

xbc5 avatar Dec 05 '21 22:12 xbc5

Most likely they were talking about plaintext or markdown documentation though, not HTML.

mrjones2014 avatar Dec 06 '21 13:12 mrjones2014