wofr06/lesspipe

Add configuration to use own default colorizer command

Closed this issue · 4 comments

Currently LESSCOLORIZER is used to select one of predefined colorizers. Could it also be used to use own f.e. nvimpager -p?

The issue is here that I would like to have all the complex filtering for file type, category and extension by lesspipe, but if nothing specific fits then run my own colorizer. It is very hard to do it in .lessfilter because one would have to exclude all that filtering done lesspipe - unless I'm missing something.

I'll try to add another colorizer related to neovim's syntax coloring, please stay tuned.

The vimcolor colorizer now uses nvim to chose the colors if installed, otherwise vim is used as before. As this solution is very slow compared to nvimpager I'll still add support for that script.

Finally nvimpager is supported as preferred colorizer. As all colorizers do need a slightly different treatment (see e.g. the code change for nvimpager) using a free form string for the colorizer name is not an option. As for other colorizers the file type (i.e. syntax of the file) can be overridden by appending :filetype to the file name, where filetype is one of the supported types (listing with vimcolor -L)

Thank you!