From c8f778728103593222e1ebc7a23d742728360580 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Jun 2024 06:08:02 +0300 Subject: [PATCH 1/6] Patch TwoDark theme for better Man page syntax highlighting --- assets/patches/TwoDark.tmTheme.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/assets/patches/TwoDark.tmTheme.patch b/assets/patches/TwoDark.tmTheme.patch index 05f1fc6990..b6570fbc7f 100644 --- a/assets/patches/TwoDark.tmTheme.patch +++ b/assets/patches/TwoDark.tmTheme.patch @@ -2,6 +2,24 @@ diff --git themes/TwoDark/TwoDark.tmTheme themes/TwoDark/TwoDark.tmTheme index 87fd358..56376d3 100644 --- themes/TwoDark/TwoDark.tmTheme +++ themes/TwoDark/TwoDark.tmTheme +@@ -125,7 +125,7 @@ + name + Classes + scope +- support.class, entity.name.class, entity.name.type.class ++ support.class, entity.name.class, entity.name.type.class, entity.name + settings + + foreground +@@ -290,7 +290,7 @@ + name + Headings + scope +- markup.heading punctuation.definition.heading, entity.name.section ++ markup.heading punctuation.definition.heading, entity.name.section, markup.heading - text.html.markdown + settings + + fontStyle @@ -533,7 +533,7 @@ name Json key From 9744971b199ceac39a812a0db600cc0fdfcc2dcd Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Jun 2024 06:52:21 +0300 Subject: [PATCH 2/6] Patch OneHalfDark theme for better Man page syntax highlighting --- assets/patches/OneHalfDark.tmTheme.patch | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 assets/patches/OneHalfDark.tmTheme.patch diff --git a/assets/patches/OneHalfDark.tmTheme.patch b/assets/patches/OneHalfDark.tmTheme.patch new file mode 100644 index 0000000000..1ac3e5e8d4 --- /dev/null +++ b/assets/patches/OneHalfDark.tmTheme.patch @@ -0,0 +1,47 @@ +diff --git themes/onehalf/sublimetext/OneHalfDark.tmTheme themes/onehalf/sublimetext/OneHalfDark.tmTheme +index b16050c..b021071 100644 +--- themes/onehalf/sublimetext/OneHalfDark.tmTheme ++++ themes/onehalf/sublimetext/OneHalfDark.tmTheme +@@ -28,7 +28,7 @@ + + + name +- OneHalfLight ++ OneHalfDark + semanticClass + theme.dark.one_half_dark + uuid +@@ -155,7 +155,7 @@ + name + Classes + scope +- support.class, entity.name.class, entity.name.type.class ++ support.class, entity.name.class, entity.name.type.class, entity.name + settings + + foreground +@@ -188,7 +188,7 @@ + name + Storage + scope +- storage ++ storage, meta.mapping.key string + settings + + foreground +@@ -309,7 +309,7 @@ + name + Markdown: Headings + scope +- markup.heading punctuation.definition.heading, entity.name.section ++ markup.heading punctuation.definition.heading, entity.name.section, markup.heading - text.html.markdown + settings + + fontStyle +@@ -660,4 +660,4 @@ + + + +- +\ No newline at end of file ++ From 753bfaff4962a64884c7e1012eedf7f079fd289c Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Jun 2024 08:58:42 +0300 Subject: [PATCH 3/6] Improve Ansi theme for better Man page syntax highlighting --- assets/themes/ansi.tmTheme | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/themes/ansi.tmTheme b/assets/themes/ansi.tmTheme index 957f42bba6..f103b418de 100644 --- a/assets/themes/ansi.tmTheme +++ b/assets/themes/ansi.tmTheme @@ -69,7 +69,7 @@ name Labels scope - entity.name.label + entity.name.label, variable.parameter settings foreground @@ -80,7 +80,7 @@ name Classes scope - support.class, entity.name.class, entity.name.type.class + support.class, entity.name.class, entity.name.type.class, entity.name settings foreground @@ -234,7 +234,7 @@ name Headings scope - markup.heading punctuation.definition.heading, entity.name.section + markup.heading punctuation.definition.heading, entity.name.section, markup.heading - text.html.markdown settings fontStyle From 5a12f187fa5df90296682f74c39f8be7cf0dfffd Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Jun 2024 09:02:05 +0300 Subject: [PATCH 4/6] Patch 1337 theme for better Man page syntax highlighting --- assets/patches/1337.tmTheme.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 assets/patches/1337.tmTheme.patch diff --git a/assets/patches/1337.tmTheme.patch b/assets/patches/1337.tmTheme.patch new file mode 100644 index 0000000000..b927a74f41 --- /dev/null +++ b/assets/patches/1337.tmTheme.patch @@ -0,0 +1,22 @@ +diff --git themes/1337-Scheme/1337.tmTheme themes/1337-Scheme/1337.tmTheme +index fdff5bf..8cfc888 100644 +--- themes/1337-Scheme/1337.tmTheme ++++ themes/1337-Scheme/1337.tmTheme +@@ -280,7 +280,7 @@ SOFTWARE. + name + PHP Namespaces + scope +- support.other.namespace, entity.name.type.namespace ++ support.other.namespace, entity.name.type.namespace, entity.name + settings + + foreground +@@ -561,7 +561,7 @@ SOFTWARE. + name + diff.header + scope +- meta.diff, meta.diff.header ++ meta.diff, meta.diff.header, markup.heading + settings + + foreground From 0d2afe79af9f9d93a49f9911274a896645aaa108 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Jun 2024 09:05:19 +0300 Subject: [PATCH 5/6] Improve base16 themes for better Man page syntax highlighting --- assets/themes/base16-256.tmTheme | 4 ++-- assets/themes/base16.tmTheme | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/themes/base16-256.tmTheme b/assets/themes/base16-256.tmTheme index a4547e564d..b64b444e93 100644 --- a/assets/themes/base16-256.tmTheme +++ b/assets/themes/base16-256.tmTheme @@ -257,7 +257,7 @@ name Tags scope - entity.name.tag + entity.name.tag, entity.name settings foreground @@ -312,7 +312,7 @@ name Headings scope - markup.heading punctuation.definition.heading, entity.name.section + markup.heading punctuation.definition.heading, entity.name.section, markup.heading - text.html.markdown settings fontStyle diff --git a/assets/themes/base16.tmTheme b/assets/themes/base16.tmTheme index 7b030068ed..b49f81175d 100644 --- a/assets/themes/base16.tmTheme +++ b/assets/themes/base16.tmTheme @@ -256,7 +256,7 @@ name Tags scope - entity.name.tag + entity.name.tag, entity.name settings foreground @@ -311,7 +311,7 @@ name Headings scope - markup.heading punctuation.definition.heading, entity.name.section + markup.heading punctuation.definition.heading, entity.name.section, markup.heading - text.html.markdown settings fontStyle From 09bdcde6c5f3d8767e40cee2d60b26902600d6cb Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 9 Jun 2024 09:06:50 +0300 Subject: [PATCH 6/6] Update changelog to mention theme improvements for Manpage --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c05a649a6..fd30fa960d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,8 @@ ## Themes +- Patched/improved themes for better Manpage syntax highlighting support, see #2994 (@keith-hall). + ## `bat` as a library - Changes to `syntax_mapping::SyntaxMapping` #2755 (@cyqsimon)