Closed xorgal closed 1 year ago
vim.api.nvim_create_autocmd("StdinReadPre", {
group = vim.api.nvim_create_augroup("stdinColors", {}),
callback = function()
vim.api.nvim_del_augroup_by_name "stdinColors"
dofile(vim.g.base46_cache .. "syntax")
end,
})
put this in custom/init.lua
Thanks for your comment @siduck, but don't you think this is just a workaround? A change should be added to the code so everyone could benefit.
@teklabania very less people read man pages through nvim! or pipe stdin stuff into nvim so yea, but that solution isnt a workaround. I'd have done the same in core/utils.lua's (lazy_load) function
@teklabania very less people read man pages through nvim!
Have you collected any statistics on this if you're so sure? ;)
Thanks for doing a change to core.
@teklabania very less people read man pages through nvim!
Have you collected any statistics on this if you're so sure? ;)
Thanks for doing a change to core.
i'm just assuming :p .
if there will be more 3 users who bring up this same issue then i'll consider adding this thing into core
Actually, I do agree, nvim might not be the best candidate for viewing man pages. But sometimes it's very convenient to use multiple buffers when reading large page with plenty references.
Anyways, thanks for the fix @siduck, it did work indeed!
Describe the bug
When nvim is set as
MANPAGER
and opening single man page all works good. But, when opening another man page in a new buffer or just opening empty one then colors are being reset.To Reproduce Set nvim as default pager
export MANPAGER='nvim +Man!'
and open itman nvim
Open reference to another man page or just make a new buffer.Expected behavior Do not change color scheme.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):