aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2025-11-19 01:19:49 +0100
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2025-11-19 01:19:49 +0100
commite06e7ab1ee41aeff9e29f43de47ac25eef474808 (patch)
tree840203659da32facd0be3a5f48e4f512544ac68f
parent92306ea966e213ccf20e9b2d3c5d8f9e1947778f (diff)
refactored some lexer configurations to make them more pleasurable to look at
* color.target is yellow in terminal.tes which looks awful and it should be used sparingly. The largest part of text in any lexer should be in the default colors. * bash.tes now discerns between double and single quote strings like most lexers. * autodetect GNUmakefiles * yaml.tes now uses color.string for keys - this is for consistency with JSON where keys will also always be strings.
-rw-r--r--lib/lexers/bash.tes8
-rw-r--r--lib/lexers/batch.tes3
-rw-r--r--lib/lexers/make.tes3
-rw-r--r--lib/lexers/yaml.tes2
4 files changed, 10 insertions, 6 deletions
diff --git a/lib/lexers/bash.tes b/lib/lexers/bash.tes
index 862a0c1..893fc8d 100644
--- a/lib/lexers/bash.tes
+++ b/lib/lexers/bash.tes
@@ -35,10 +35,12 @@
:M[color.number],3M[color.set]
:M[color.keyword],4M[color.set]
:M[color.string],5M[color.set]
- :M[color.string],6M[color.set]
+ :M[color.string2],6M[color.set]
:M[color.operator],7M[color.set]
- :M[color.target],8M[color.set] !* Identifiers, e.g. FOO=... *!
+ !!:M[color.target],8M[color.set] !* Identifiers, e.g. FOO=... *!
:M[color.variable],9M[color.set]
:M[color.variable],10M[color.set]
- :M[color.string2],11M[color.set] !* Backticks *!
+ :M[color.preproc],11M[color.set] !* Backticks *!
+ :M[color.target],12M[color.set] !* Heredoc delimiter *!
+ :M[color.preproc2],13M[color.set] !* Heredoc *!
}
diff --git a/lib/lexers/batch.tes b/lib/lexers/batch.tes
index dddd802..97717a1 100644
--- a/lib/lexers/batch.tes
+++ b/lib/lexers/batch.tes
@@ -17,7 +17,8 @@
:M[color.keyword],2M[color.set]
:M[color.target],3M[color.set] !* Labels *!
:M[color.preproc],4M[color.set] !* Hide Cmd @ *!
- :M[color.preproc2],5M[color.set] !* External Cmd *!
+ !!:M[color.preproc2],5M[color.set] !* External Cmd *!
:M[color.variable],6M[color.set]
:M[color.operator],7M[color.set]
+ :M[color.preproc2],8M[color.set] !* After label *!
}
diff --git a/lib/lexers/make.tes b/lib/lexers/make.tes
index 4ff519a..68acda1 100644
--- a/lib/lexers/make.tes
+++ b/lib/lexers/make.tes
@@ -3,6 +3,7 @@
@[lexer.test.make]{
:EN*/MakefileQ*"S -1 '
:EN*/makefileQ*"S -1 '
+ :EN*/GNUmakefileQ*"S -1 '
:EN*.makQ*
}
@@ -13,5 +14,5 @@
:M[color.variable],3M[color.set]
:M[color.operator],4M[color.set]
:M[color.target],5M[color.set]
- :M[color.error],6M[color.set]
+ :M[color.error],9M[color.set]
}
diff --git a/lib/lexers/yaml.tes b/lib/lexers/yaml.tes
index 631f83a..2102afa 100644
--- a/lib/lexers/yaml.tes
+++ b/lib/lexers/yaml.tes
@@ -17,7 +17,7 @@
ESSETILEXERyaml
0ESSETKEYWORDStrue false yes no
:M[color.comment],1M[color.set]
- :M[color.target],2M[color.set]
+ :M[color.string],2M[color.set]
:M[color.keyword],3M[color.set]
:M[color.number],4M[color.set]
:M[color.variable],5M[color.set]