mrjones2014 / dash.nvim

🏃💨 Search Dash.app from your Neovim fuzzy finder. Built with Rust 🦀 and Lua
Mozilla Public License 2.0
235 stars 16 forks source link

Previews? #3

Open mrjones2014 opened 3 years ago

mrjones2014 commented 3 years ago

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

mrjones2014 commented 3 years ago

Could possibly use a terminal browser like elinks for this?

mrjones2014 commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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

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

mrjones2014 commented 2 years ago

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

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

lukelex commented 2 years ago

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

mrjones2014 commented 2 years ago

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

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

xbc5 commented 2 years ago

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.

mrjones2014 commented 2 years ago

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