commit a31ea855866f6b0de9b0a32ff953eea9ed30ca56
parent e14e6f4c36e6347183073a6d157aa80faf2e8413
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 21 Jun 2022 18:12:48 +0200
Highlight error assertions in red
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/syntax/hare.vim b/syntax/hare.vim
@@ -13,6 +13,7 @@ syn keyword hareLabel case
syn keyword hareBuiltin len offset free alloc assert append abort delete insert
syn keyword hareBuiltin vastart vaarg vaend
syn keyword hareOperator is as
+syn match hareErrorAssertion "!"
syn match hareType "\v<size>((\_\s|//.*)*\()@!"
syn match hareBuiltin "\v<size>((\_\s|//.*)*\()@="
syn match harePreProc "^use .*;"
@@ -63,6 +64,7 @@ hi def link hareBranch Repeat
hi def link hareBuiltin Function
hi def link hareComment Comment
hi def link hareConditional Conditional
+hi def link hareError Error
hi def link hareFloat Number
hi def link hareKeyword Keyword
hi def link hareLabel Label
@@ -79,4 +81,6 @@ hi def link hareSpaceError Error
autocmd InsertEnter * hi link hareSpaceError NONE
autocmd InsertLeave * hi link hareSpaceError Error
+highlight hareErrorAssertion ctermfg=red cterm=bold
+
" vim: tabstop=8 shiftwidth=2 expandtab