aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-selector/generate.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-08 06:25:48 -0500
committerCraig Jennings <c@cjennings.net>2026-06-08 06:25:48 -0500
commit3023edd91e7f672392e0045b43fb9cfadc26a9ac (patch)
tree2ab8ae4206b3493394ec9872f580b6e0399c3415 /scripts/theme-selector/generate.py
parentbc5f62a80a8fdbc6c0421c8177d9b3f896028cfc (diff)
downloaddotemacs-3023edd91e7f672392e0045b43fb9cfadc26a9ac.tar.gz
dotemacs-3023edd91e7f672392e0045b43fb9cfadc26a9ac.zip
feat(theme-selector): split C and C++ code samples, add Java
The combined C/C++ preview is now a dedicated C sample and a dedicated C++ sample, plus a new Java sample. Each is tokenized to exercise every syntax category the language actually has: C++ hits all 19 (including [[nodiscard]] attributes, a std::regex raw string, and a Doxygen doc comment); C hits 18 (no regex literal exists in C); Java hits 17 (no preprocessor and no global builtins). C also gained a doc comment and a __attribute__ decorator over the old combined sample.
Diffstat (limited to 'scripts/theme-selector/generate.py')
-rw-r--r--scripts/theme-selector/generate.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/theme-selector/generate.py b/scripts/theme-selector/generate.py
index 167fc7c64..269ee039d 100644
--- a/scripts/theme-selector/generate.py
+++ b/scripts/theme-selector/generate.py
@@ -3,7 +3,7 @@ HERE=os.path.dirname(os.path.abspath(__file__))
ns={}
src=open(os.path.join(HERE,'samples.py')).read()
exec(src[:src.index('cols=')], ns)
-SAMPLES={"Elisp":ns['ELS'],"Go":ns['GOS'],"Python":ns['PYS'],"TypeScript":ns['TSS'],"Shell":ns['SHS'],"C/C++":ns['CS']}
+SAMPLES={"Elisp":ns['ELS'],"Go":ns['GOS'],"Python":ns['PYS'],"TypeScript":ns['TSS'],"Java":ns['JAS'],"C":ns['CS'],"C++":ns['CPS'],"Shell":ns['SHS']}
COLS=ns['COLS']
MAP={k:v[0] for k,v in COLS.items()}; BOLD={k:v[1] for k,v in COLS.items()}; MAP['str']='#5d9b86'; MAP['bg']='#000000'
PALETTE=[["#67809c","blue"],["#e8bd30","gold"],["#9b5fd0","regal"],["#2ba178","emerald"],["#5d9b86","sage"],