hare.vim

[vim] Hare vim plugin
git clone https://git.torresjrjr.com/hare.vim.git
Log | Files | Refs | README | LICENSE

commit 02b256d00c24ce4f65d6f913542103bd8361b75b
parent 0e5cb63ba09f71f533fb1dbb5c97cdc4c3fd8bc6
Author: Amelia Clarke <me@rsaihe.dev>
Date:   Thu, 28 Jul 2022 14:32:03 -0700

Add highlight group for string escape sequences

Diffstat:
Msyntax/hare.vim | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/syntax/hare.vim b/syntax/hare.vim @@ -19,9 +19,11 @@ syn match harePreProc "^use .*;" syn match harePreProc "@[a-z]*" syn match hareOperator "\.\.\." "\.\." syn match hareErrorAssertion "\v(^([^/]|//@!)*\)\_s*)@<=!\=@!" +syn match hareEscape "\\[\\\'\"0abfnrtv]" contained +syn match hareEscapeRaw "\\[\\0abfnrtv]" contained -syn region hareString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ -syn region hareString start=+`+ end=+`+ +syn region hareString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=hareEscape +syn region hareString start=+`+ end=+`+ contains=hareEscapeRaw "adapted from c.vim "integer number, or floating point number without a dot and with "f". @@ -72,6 +74,8 @@ hi def link hareNumber Number hi def link hareOctal Number hi def link hareOperator Operator hi def link harePreProc PreProc +hi def link hareEscape SpecialChar +hi def link hareEscapeRaw hareEscape hi def link hareString String hi def link hareTodo Todo hi def link hareType Type