Replace chroma with go-highlite

This commit is contained in:
2025-06-19 14:18:55 -04:00
parent c271197076
commit f4718e24c8
12 changed files with 318 additions and 1117 deletions
+1 -8
View File
@@ -175,20 +175,13 @@ Style:
The `code_block` element represents a block of code.
| Attribute | Value | Description |
| --------- | ------ | --------------------------------------------------------------- |
| theme | string | Defines the [Chroma][chroma] theme used for syntax highlighting |
[chroma]: https://github.com/alecthomas/chroma
#### Example
Style:
```json
"code_block": {
"color": "200",
"theme": "solarized-dark"
"color": "200"
}
```
+102 -190
View File
@@ -1,195 +1,107 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "252",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "39",
"bold": true
},
"h1": {
"prefix": " ",
"suffix": " ",
"color": "228",
"background_color": "63",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### ",
"color": "35",
"bold": false
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"strong": {
"bold": true
},
"hr": {
"color": "240",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". "
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "30",
"underline": true
},
"link_text": {
"color": "35",
"bold": true
},
"image": {
"color": "212",
"underline": true
},
"image_text": {
"color": "243",
"format": "Image: {{.text}} →"
},
"code": {
"prefix": " ",
"suffix": " ",
"color": "203",
"background_color": "236"
},
"code_block": {
"color": "244",
"margin": 2,
"chroma": {
"text": {
"color": "#C4C4C4"
},
"error": {
"color": "#F1F1F1",
"background_color": "#F05B5B"
},
"comment": {
"color": "#676767"
},
"comment_preproc": {
"color": "#FF875F"
},
"keyword": {
"color": "#00AAFF"
},
"keyword_reserved": {
"color": "#FF5FD2"
},
"keyword_namespace": {
"color": "#FF5F87"
},
"keyword_type": {
"color": "#6E6ED8"
},
"operator": {
"color": "#EF8080"
},
"punctuation": {
"color": "#E8E8A8"
},
"name": {
"color": "#C4C4C4"
},
"name_builtin": {
"color": "#FF8EC7"
},
"name_tag": {
"color": "#B083EA"
},
"name_attribute": {
"color": "#7A7AE6"
},
"name_class": {
"color": "#F1F1F1",
"underline": true,
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "252",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "39",
"bold": true
},
"name_constant": {},
"name_decorator": {
"color": "#FFFF87"
},
"name_exception": {},
"name_function": {
"color": "#00D787"
},
"name_other": {},
"literal": {},
"literal_number": {
"color": "#6EEFC0"
},
"literal_date": {},
"literal_string": {
"color": "#C69669"
},
"literal_string_escape": {
"color": "#AFFFD7"
},
"generic_deleted": {
"color": "#FD5B5B"
},
"generic_emph": {
},
"h1": {
"prefix": " ",
"suffix": " ",
"color": "228",
"background_color": "63",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### ",
"color": "35",
"bold": false
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"generic_inserted": {
"color": "#00D787"
},
"generic_strong": {
},
"strong": {
"bold": true
},
"generic_subheading": {
"color": "#777777"
},
"background": {
"background_color": "#373737"
}
}
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
},
"hr": {
"color": "240",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". "
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "30",
"underline": true
},
"link_text": {
"color": "35",
"bold": true
},
"image": {
"color": "212",
"underline": true
},
"image_text": {
"color": "243",
"format": "Image: {{.text}} →"
},
"code": {
"prefix": " ",
"suffix": " ",
"color": "203",
"background_color": "236"
},
"code_block": {
"color": "244",
"margin": 2
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
}
+95 -185
View File
@@ -1,192 +1,102 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "#f8f8f2",
"margin": 2
},
"block_quote": {
"color": "#f1fa8c",
"italic": true,
"indent": 2
},
"paragraph": {},
"list": {
"color": "#f8f8f2",
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "#bd93f9",
"bold": true
},
"h1": {
"prefix": "# "
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### "
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"color": "#f1fa8c",
"italic": true
},
"strong": {
"color": "#ffb86c",
"bold": true
},
"hr": {
"color": "#6272A4",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". ",
"color": "#8be9fd"
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "#8be9fd",
"underline": true
},
"link_text": {
"color": "#ff79c6"
},
"image": {
"color": "#8be9fd",
"underline": true
},
"image_text": {
"color": "#ff79c6",
"format": "Image: {{.text}} →"
},
"code": {
"color": "#50fa7b"
},
"code_block": {
"color": "#ffb86c",
"margin": 2,
"chroma": {
"text": {
"color": "#f8f8f2"
},
"error": {
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "#f8f8f2",
"background_color": "#ff5555"
},
"comment": {
"color": "#6272A4"
},
"comment_preproc": {
"color": "#ff79c6"
},
"keyword": {
"color": "#ff79c6"
},
"keyword_reserved": {
"color": "#ff79c6"
},
"keyword_namespace": {
"color": "#ff79c6"
},
"keyword_type": {
"color": "#8be9fd"
},
"operator": {
"color": "#ff79c6"
},
"punctuation": {
"color": "#f8f8f2"
},
"name": {
"color": "#8be9fd"
},
"name_builtin": {
"color": "#8be9fd"
},
"name_tag": {
"color": "#ff79c6"
},
"name_attribute": {
"color": "#50fa7b"
},
"name_class": {
"color": "#8be9fd"
},
"name_constant": {
"color": "#bd93f9"
},
"name_decorator": {
"color": "#50fa7b"
},
"name_exception": {},
"name_function": {
"color": "#50fa7b"
},
"name_other": {},
"literal": {},
"literal_number": {
"color": "#6EEFC0"
},
"literal_date": {},
"literal_string": {
"color": "#f1fa8c"
},
"literal_string_escape": {
"color": "#ff79c6"
},
"generic_deleted": {
"color": "#ff5555"
},
"generic_emph": {
"margin": 2
},
"block_quote": {
"color": "#f1fa8c",
"italic": true,
"indent": 2
},
"paragraph": {},
"list": {
"color": "#f8f8f2",
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "#bd93f9",
"bold": true
},
"h1": {
"prefix": "# "
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### "
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"color": "#f1fa8c",
"italic": true
},
"generic_inserted": {
"color": "#50fa7b"
},
"generic_strong": {
},
"strong": {
"color": "#ffb86c",
"bold": true
},
"generic_subheading": {
"color": "#bd93f9"
},
"background": {
"background_color": "#282a36"
}
}
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
},
"hr": {
"color": "#6272A4",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". ",
"color": "#8be9fd"
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "#8be9fd",
"underline": true
},
"link_text": {
"color": "#ff79c6"
},
"image": {
"color": "#8be9fd",
"underline": true
},
"image_text": {
"color": "#ff79c6",
"format": "Image: {{.text}} →"
},
"code": {
"color": "#50fa7b"
},
"code_block": {
"color": "#ffb86c",
"margin": 2
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
}
+1 -2
View File
@@ -1,6 +1,5 @@
{
"code_block": {
"color": "200",
"theme": "solarized-dark"
"color": "200"
}
}
+101 -189
View File
@@ -1,194 +1,106 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "234",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "27",
"bold": true
},
"h1": {
"prefix": " ",
"suffix": " ",
"color": "228",
"background_color": "63",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### ",
"bold": false
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"strong": {
"bold": true
},
"hr": {
"color": "249",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". "
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "36",
"underline": true
},
"link_text": {
"color": "29",
"bold": true
},
"image": {
"color": "205",
"underline": true
},
"image_text": {
"color": "243",
"format": "Image: {{.text}} →"
},
"code": {
"prefix": " ",
"suffix": " ",
"color": "203",
"background_color": "254"
},
"code_block": {
"color": "242",
"margin": 2,
"chroma": {
"text": {
"color": "#2A2A2A"
},
"error": {
"color": "#F1F1F1",
"background_color": "#FF5555"
},
"comment": {
"color": "#8D8D8D"
},
"comment_preproc": {
"color": "#FF875F"
},
"keyword": {
"color": "#279EFC"
},
"keyword_reserved": {
"color": "#FF5FD2"
},
"keyword_namespace": {
"color": "#FB406F"
},
"keyword_type": {
"color": "#7049C2"
},
"operator": {
"color": "#FF2626"
},
"punctuation": {
"color": "#FA7878"
},
"name": {},
"name_builtin": {
"color": "#0A1BB1"
},
"name_tag": {
"color": "#581290"
},
"name_attribute": {
"color": "#8362CB"
},
"name_class": {
"color": "#212121",
"underline": true,
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "234",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "27",
"bold": true
},
"name_constant": {
"color": "#581290"
},
"name_decorator": {
"color": "#A3A322"
},
"name_exception": {},
"name_function": {
"color": "#019F57"
},
"name_other": {},
"literal": {},
"literal_number": {
"color": "#22CCAE"
},
"literal_date": {},
"literal_string": {
"color": "#7E5B38"
},
"literal_string_escape": {
"color": "#00AEAE"
},
"generic_deleted": {
"color": "#FD5B5B"
},
"generic_emph": {
},
"h1": {
"prefix": " ",
"suffix": " ",
"color": "228",
"background_color": "63",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### ",
"bold": false
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"generic_inserted": {
"color": "#00D787"
},
"generic_strong": {
},
"strong": {
"bold": true
},
"generic_subheading": {
"color": "#777777"
},
"background": {
"background_color": "#373737"
}
}
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
},
"hr": {
"color": "249",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". "
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "36",
"underline": true
},
"link_text": {
"color": "29",
"bold": true
},
"image": {
"color": "205",
"underline": true
},
"image_text": {
"color": "243",
"format": "Image: {{.text}} →"
},
"code": {
"prefix": " ",
"suffix": " ",
"color": "203",
"background_color": "254"
},
"code_block": {
"color": "242",
"margin": 2
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
}