1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-06-07 09:46:06 +02:00
helix/runtime/queries/comment/highlights.scm
Alexander Brevig fd89c3c833
fix: close #9771 fix comments with `(` and `)` (#9800)
* fix: close #9771 update OCaml

* fix: no longer match on ( ) as the underlying grammar handles these

* fix: implement excellent corrections from review

* fix: module -> namespace to match theme scopes
2024-03-08 10:54:17 +09:00

44 lines
1007 B
Scheme

":" @punctuation.delimiter
; Hint level tags
((tag (name) @hint)
(#match? @hint "^(HINT|MARK|PASSED|STUB|MOCK)$"))
("text" @hint
(#match? @hint "^(HINT|MARK|PASSED|STUB|MOCK)$"))
; Info level tags
((tag (name) @info)
(#match? @info "^(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK)$"))
("text" @info
(#match? @info "^(INFO|NOTE|TODO|PERF|OPTIMIZE|PERFORMANCE|QUESTION|ASK)$"))
; Warning level tags
((tag (name) @warning)
(#match? @warning "^(HACK|WARN|WARNING|TEST|TEMP)$"))
("text" @warning
(#match? @warning "^(HACK|WARN|WARNING|TEST|TEMP)$"))
; Error level tags
((tag (name) @error)
(#match? @error "^(BUG|FIXME|ISSUE|XXX|FIX|SAFETY|FIXIT|FAILED|DEBUG)$"))
("text" @error
(#match? @error "^(BUG|FIXME|ISSUE|XXX|FIX|SAFETY|FIXIT|FAILED|DEBUG)$"))
(tag
(name) @ui.text
(user)? @constant)
; Issue number (#123)
("text" @constant.numeric
(#match? @constant.numeric "^#[0-9]+$"))
; User mention (@user)
("text" @tag
(#match? @tag "^[@][a-zA-Z0-9_-]+$"))
(uri) @markup.link.url