From 8a0d4d065faf9adbc5b99289561562e93e3f704d Mon Sep 17 00:00:00 2001 From: Rolo Date: Wed, 18 Oct 2023 02:58:50 -0700 Subject: [PATCH 1/2] feat(highlights): add more comment highlights some additions are inspired by https://github.com/folke/todo-comments.nvim --- runtime/queries/comment/highlights.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/runtime/queries/comment/highlights.scm b/runtime/queries/comment/highlights.scm index 6255d2858905..2584a8761d7d 100644 --- a/runtime/queries/comment/highlights.scm +++ b/runtime/queries/comment/highlights.scm @@ -7,31 +7,31 @@ ; Hint level tags ((tag (name) @hint) - (#match? @hint "^(HINT|MARK)$")) + (#match? @hint "^(HINT|MARK|PASSED|STUB|MOCK)$")) ("text" @hint - (#match? @hint "^(HINT|MARK)$")) + (#match? @hint "^(HINT|MARK|PASSED|STUB|MOCK)$")) ; Info level tags ((tag (name) @info) - (#match? @info "^(INFO|NOTE|TODO)$")) + (#match? @info "^(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK)$")) ("text" @info - (#match? @info "^(INFO|NOTE|TODO)$")) + (#match? @info "^(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK))$")) ; Warning level tags ((tag (name) @warning) - (#match? @warning "^(HACK|WARN|WARNING)$")) + (#match? @warning "^(HACK|WARN|WARNING|TEST|TEMP)$")) ("text" @warning - (#match? @warning "^(HACK|WARN|WARNING)$")) + (#match? @warning "^(HACK|WARN|WARNING|TEST|TEMP)$")) ; Error level tags ((tag (name) @error) - (#match? @error "^(BUG|FIXME|ISSUE|XXX)$")) + (#match? @error "^(BUG|FIXME|ISSUE|XXX|FIX|SAFETY|FIXIT|FAILED|DEBUG)$")) ("text" @error - (#match? @error "^(BUG|FIXME|ISSUE|XXX)$")) + (#match? @error "^(BUG|FIXME|ISSUE|XXX|FIX|SAFETY|FIXIT|FAILED|DEBUG)$")) (tag (name) @ui.text From 9e1e340ac90ff917c16d43b917d2973a81687f52 Mon Sep 17 00:00:00 2001 From: Rolo Date: Wed, 18 Oct 2023 10:45:54 -0700 Subject: [PATCH 2/2] fix(highlights): remove invalid `)` in pattern --- runtime/queries/comment/highlights.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/queries/comment/highlights.scm b/runtime/queries/comment/highlights.scm index 2584a8761d7d..9583f9c53414 100644 --- a/runtime/queries/comment/highlights.scm +++ b/runtime/queries/comment/highlights.scm @@ -17,7 +17,7 @@ (#match? @info "^(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK)$")) ("text" @info - (#match? @info "^(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK))$")) + (#match? @info "^(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK)$")) ; Warning level tags ((tag (name) @warning)