From 4bfccba843d4fb2da96996dd827cd03dd9e546fa Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Fri, 2 Apr 2021 11:58:45 -0500 Subject: Comment: highlight text nodes As requested in https://github.com/nvim-treesitter/nvim-treesitter/issues/236#issuecomment-797878646 --- lockfile.json | 2 +- queries/comment/highlights.scm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lockfile.json b/lockfile.json index 025b39dff..64c741620 100644 --- a/lockfile.json +++ b/lockfile.json @@ -18,7 +18,7 @@ "revision": "95c7959c461406381b42113dcf4591008c663d21" }, "comment": { - "revision": "4a47080791683ce1bdfba85255df4d512edbb5d5" + "revision": "814bf323edb504caee2331872b854c9f19eb5d2b" }, "cpp": { "revision": "c61212414a3e95b5f7507f98e83de1d638044adc" diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm index 3a8e1d49d..88ae027db 100644 --- a/queries/comment/highlights.scm +++ b/queries/comment/highlights.scm @@ -10,9 +10,15 @@ ((tag ((name) @text.warning)) (#match? @text.warning "^(TODO|HACK|WARNING)$")) +("text" @text.warning + (#match? @text.warning "^(TODO|HACK|WARNING)$")) + ((tag ((name) @text.danger)) (#match? @text.danger "^(FIXME|XXX|BUG)$")) +("text" @text.danger + (#match? @text.danger "^(FIXME|XXX|BUG)$")) + ; Issue number (#123) ("text" @number (#match? @number "^#[0-9]+$")) ; User mention (@user) -- cgit v1.2.3-70-g09d2