less cannot be taughtrequires third-party tools to highlight syntax elements, but Vim can be used as a pager, i.e. a replacement for less. There are more advanced plugins, but the basic script actually ships with Vim ($VIMRUNTIME/macros/less.sh). For the full information, see Using vim as a syntax-highlighting pager on the Vim Tips Wiki.
If you're already using Vim, the consistency (and support of almost any file type) makes this worth a try.