Closed MatthiasGrandl closed 1 year ago
I think it's doable to allow page file.type
just echo file
when it's too short without spawning neovim. But in this case syntax highlighting could be achieved only through bat
.
That said, I have no idea how to enable treesitter highlighting on echoed text
Just drafted a new release where page -O -- file
will echo file
if it's too short with syntax highlighting enabled through bat
Well the point is I want to avoid using bat and have neovim do all the heavy lifting.
Yeah I have seen syncat. It might be a good alternative, but it seems configuration heavy and since neovim is already configured, I thought it would be nice to use it instead.
Sorry, I see no way to get neovim's highlighting outside of neovim. Perhaps it's possible to somehow leverage treesitter as syncat does, through, the outcome most likely wouldn't be worth the effort.
Fair enough, thanks for evaluating the idea!
As a replacement for
bat
andcat
, it would be nice to have a "cat mode". nvimpager already has this, although it has a few problems, like cat mode not honoring tabstop settings and not working with some plugins like treesitter.I think a good cat mode would be super usefull, because treesitter syntax highlighting is just so much better than what
bat
has to offer.