diff options
author | Erasin Wang | 2023-03-25 16:41:31 +0000 |
---|---|---|
committer | GitHub | 2023-03-25 16:41:31 +0000 |
commit | 851ac6cdd3c5a865d43968ea81d98b5b7c859728 (patch) | |
tree | 5710789c8e4bafb71d7ae984122b1fbf0847d5dd | |
parent | 2f64c768dff1e6b3784d88a5604bd2f1b96b2b3e (diff) |
Add theme keys for (un)checked markup list items (#6434)
-rw-r--r-- | book/src/themes.md | 2 | ||||
-rw-r--r-- | runtime/queries/markdown/highlights.scm | 3 | ||||
-rw-r--r-- | runtime/themes/onelight.toml | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/book/src/themes.md b/book/src/themes.md index 994542c5..7accb67f 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -228,6 +228,8 @@ We use a similar set of scopes as - `list` - `unnumbered` - `numbered` + - `checked` + - `unchecked` - `bold` - `italic` - `strikethrough` diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm index 80c9f958..72bb68dc 100644 --- a/runtime/queries/markdown/highlights.scm +++ b/runtime/queries/markdown/highlights.scm @@ -39,6 +39,9 @@ (list_marker_parenthesis) ] @markup.list.numbered +(task_list_marker_checked) @markup.list.checked +(task_list_marker_unchecked) @markup.list.unchecked + (thematic_break) @punctuation.special [ diff --git a/runtime/themes/onelight.toml b/runtime/themes/onelight.toml index a9d7a0d3..e35abdb3 100644 --- a/runtime/themes/onelight.toml +++ b/runtime/themes/onelight.toml @@ -80,9 +80,11 @@ "markup.list" = { fg = "light-blue" } "markup.list.unnumbered" = { fg = "light-blue" } "markup.list.numbered" = { fg = "light-blue" } +"markup.list.checked" = { fg = "green" } +"markup.list.unchecked" = { fg = "blue" } "markup.bold" = { fg = "yellow", modifiers = ["bold"] } "markup.italic" = { fg = "purple", modifiers = ["italic"] } -"markup.strikethrough" = { modifiers = ["crossed_out"] } +"markup.strikethrough" = { fg = "red", modifiers = ["crossed_out"] } "markup.link" = { fg = "light-blue" } "markup.link.url" = { fg = "cyan", modifiers = ["underlined"] } "markup.link.text" = { fg = "light-blue" } |