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
commit82c7dbdd09fa18ace0c14d6be302ecb3a393f738 (patch)
tree59efb03fd849bebdbeb9c82cda8acb0c0c8047e6 /scripts/theme-selector/generate.py
parentceb275ec194b0a6fd2c38eb1d1532320f57b4084 (diff)
downloaddotemacs-82c7dbdd09fa18ace0c14d6be302ecb3a393f738.tar.gz
dotemacs-82c7dbdd09fa18ace0c14d6be302ecb3a393f738.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"],