lessfilter poor output
PhilHudson opened this issue · comments
My use-case is using less
to page through Elisp files. I have LESSOPEN
set to | /usr/bin/lesspipe %s
. I'm using a .lessfilter
file (called by lesspipe
) to call source-highlight
.
source-highlight
's default highlighting for Elisp is very detailed, but the colors don't work in a terminal emulator themed with Solarized Dark. I have great hopes for your project, but so far I get either degraded output, with only a few minor keywords highlighted, or no highlighting at all.
I've tried both with and without symlinks.
The relevant section of my .lessfilter
reads either:
# With symlinks
source-highlight --failsafe --infer-lang -f esc \
--style-file=esc.style -i "$1"
or
# Without symlinks
source-highlight --failsafe --infer-lang -f esc-solarized \
--style-file=esc-solarized.style -i "$1"
The former gives me some highlighting, the latter, none.
Am I doing something wrong?
$LESS
is--search-skip-screen --quit-at-eof --quit-if-one-screen --ignore-case --LONG-PROMPT --quiet --RAW-CONTROL-CHARS --no-init --tilde --jump-target=3
$LESSCLOSE
is/usr/bin/lesspipe %s %s
- Debian testing
- Linux quiz 3.16-3-amd64 #1 SMP Debian 3.16.5-1 (2014-10-10) x86_64 GNU/Linux
- less 458 (GNU regular expressions)
- Invoking shell is tcsh
- tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-unknown-linux) options wide,nls,dl,al,kan,rh,nd,color,filec
-rw-r--r-- 1 root root 1168 Mar 12 2014 /usr/share/source-highlight/esc256.outlang
-rw-r--r-- 1 root root 549 Mar 12 2014 /usr/share/source-highlight/esc256.style
lrwxrwxrwx 1 root root 21 Mar 10 02:14 /usr/share/source-highlight/esc.outlang -> esc-solarized.outlang
-rw-r--r-- 1 root root 949 Mar 12 2014 /usr/share/source-highlight/esc.outlang.ORIGINAL
-rw-r--r-- 1 root root 304 Mar 10 01:44 /usr/share/source-highlight/esc-solarized.outlang
-rw-r--r-- 1 root root 888 Mar 10 01:44 /usr/share/source-highlight/esc-solarized.style
lrwxrwxrwx 1 root root 19 Mar 10 02:10 /usr/share/source-highlight/esc.style -> esc-solarized.style
-rw-r--r-- 1 root root 534 Mar 12 2014 /usr/share/source-highlight/esc.style.ORIGINAL
BTW, pygmentize -f terminal256 -O style=solarized_dark256 -g "$1"
works fine with these settings, at least as far as colors go; source-highlight
's default output does more detailed parsing though. I'm falling back on that for the moment.