From 9b60fbbff8debf4a2009d4a18bf7d79def52ca12 Mon Sep 17 00:00:00 2001 From: Oleksandr Babak Date: Sun, 8 Sep 2024 13:45:46 +0200 Subject: [PATCH] feat: new rust syntax for c strings --- syntax/rust.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syntax/rust.vim b/syntax/rust.vim index 8407b56e..0d61458f 100644 --- a/syntax/rust.vim +++ b/syntax/rust.vim @@ -146,8 +146,10 @@ syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/ syn match rustEscapeUnicode display contained /\\u{\%(\x_*\)\{1,6}}/ syn match rustStringContinuation display contained /\\\n\s*/ syn region rustString matchgroup=rustStringDelimiter start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation +syn region rustString matchgroup=rustStringDelimiter start=+c"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation syn region rustString matchgroup=rustStringDelimiter start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell syn region rustString matchgroup=rustStringDelimiter start='b\?r\z(#*\)"' end='"\z1' contains=@Spell +syn region rustString matchgroup=rustStringDelimiter start='c\?r\z(#*\)"' end='"\z1' contains=@Spell " Match attributes with either arbitrary syntax or special highlighting for " derives. We still highlight strings and comments inside of the attribute.