From ca869f36ed78b07dd345ecd419b424d91b54a0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Donk=C3=B3?= Date: Wed, 1 Mar 2023 00:48:58 +0100 Subject: [PATCH] Extend the set of tags highlighted in comments --- runtime/queries/comment/highlights.scm | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/runtime/queries/comment/highlights.scm b/runtime/queries/comment/highlights.scm index 88685d59a1aa..3b25531a8d96 100644 --- a/runtime/queries/comment/highlights.scm +++ b/runtime/queries/comment/highlights.scm @@ -5,17 +5,33 @@ ":" @punctuation.delimiter +; Hint level tags +((tag (name) @hint) + (#match? @hint "^(HINT|MARK)$")) + +("text" @hint + (#match? @hint "^(HINT|MARK)$")) + +; Info level tags +((tag (name) @info) + (#match? @info "^(INFO|NOTE|TODO)$")) + +("text" @info + (#match? @info "^(INFO|NOTE|TODO)$")) + +; Warning level tags ((tag (name) @warning) - (#match? @warning "^(TODO|HACK|WARNING)$")) + (#match? @warning "^(HACK|WARN|WARNING)$")) ("text" @warning - (#match? @warning "^(TODO|HACK|WARNING)$")) + (#match? @warning "^(HACK|WARN|WARNING)$")) +; Error level tags ((tag (name) @error) - (match? @error "^(FIXME|XXX|BUG)$")) + (match? @error "^(BUG|FIXME|ISSUE|XXX)$")) ("text" @error - (match? @error "^(FIXME|XXX|BUG)$")) + (match? @error "^(BUG|FIXME|ISSUE|XXX)$")) (tag (name) @ui.text