Open horta opened 10 months ago
I have used fzf with html2text to create a prototype for terminal only:
Command to replicate it:
# html files for C language
cd ~/.dedoc/docsets/c
find * -type f | fzf --preview '~/bin/html2text --colour --width $FZF_PREVIEW_COLUMNS {}'
where html2text
binary was compiled from https://github.com/jugglerchris/rust-html2text/blob/main/examples/html2text.rs
Interesting, I think adding an option to save docs as HTML should be possible and the command system should work out of the box. There's one really tricky problem though, devdocs documentations are split into sections, one HTML file can contain multiple sections. The worst possible case is the Lua doc which is only one big HTML file. We'd still need to traverse all files using treesitter and split them when downloading, but that sounds interesting... I'll try to add this soon :)
Another interesting alternative is pandoc. The vim plugin devdocs.vim has a lua pandoc writer that outputs vim help syntax.
The project https://github.com/toiletbril/dedoc uses rust library https://crates.io/crates/html2text which renders html very nicely in my terminal
vs
Thank you for the plugin, btw!