diff --git a/book/src/themes.md b/book/src/themes.md index 7474122f7206..29d3926e310b 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -171,8 +171,9 @@ We use a similar set of scopes as - `bold` - `italic` - `link` - - `url` - - `label` + - `url` - urls pointed to by links + - `label` - non-url link references + - `text` - url and image descriptions in links - `quote` - `raw` - `inline` diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm index a0bd3462bb8d..f12254e99ec6 100644 --- a/runtime/queries/markdown/highlights.scm +++ b/runtime/queries/markdown/highlights.scm @@ -21,6 +21,11 @@ (link_destination) @markup.link.url (link_label) @markup.link.label +[ + (link_text) + (image_description) +] @markup.link.text + [ (list_marker_plus) (list_marker_minus) diff --git a/theme.toml b/theme.toml index ca0b2805797d..d2c1fc32a13c 100644 --- a/theme.toml +++ b/theme.toml @@ -32,6 +32,7 @@ label = "honey" "markup.bold" = { modifiers = ["bold"] } "markup.italic" = { modifiers = ["italic"] } "markup.link.url" = { fg = "silver", modifiers = ["underlined"] } +"markup.link.text" = "almond" "markup.raw" = "almond" "diff.plus" = "#35bf86"