Without any extra plugins (I'm assuming diffview.nvim might change the story here), selecting a PR with GHLitePRSelect shows a scratch buffer without any highlighting.
Proposal
https://github.com/neovim/neovim/issues/30415#issuecomment-2368519968 provides a code snippet that shows how nvim_open_term can be used to colorize terminal data from tools like gh. So if gh outputs colorized output, then that raw output can be passed to nvim_open_term to get colorized output in a Nvim buffer. This would also avoid ^M characters appearing in the buffer.
Problem
Without any extra plugins (I'm assuming diffview.nvim might change the story here), selecting a PR with
GHLitePRSelect
shows a scratch buffer without any highlighting.Proposal
https://github.com/neovim/neovim/issues/30415#issuecomment-2368519968 provides a code snippet that shows how
nvim_open_term
can be used to colorize terminal data from tools likegh
. So ifgh
outputs colorized output, then that raw output can be passed tonvim_open_term
to get colorized output in a Nvim buffer. This would also avoid^M
characters appearing in the buffer.Note: this may require
text=false
here: https://github.com/daliusd/ghlite.nvim/blob/408dbc06cbc258569d74c9c37ac95a7a979a7e91/lua/ghlite/utils.lua#L5