mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-11 04:53:51 -05:00
Update
This commit is contained in:
@@ -36,7 +36,7 @@ syn match rustAssert "\<assert\(\w\)*!" contained
|
||||
syn match rustPanic "\<panic\(\w\)*!" contained
|
||||
syn match rustAsync "\<async\%(\s\|\n\)\@="
|
||||
syn keyword rustKeyword break
|
||||
syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
|
||||
syn keyword rustKeyword box
|
||||
syn keyword rustKeyword continue
|
||||
syn keyword rustKeyword crate
|
||||
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
||||
@@ -68,14 +68,6 @@ syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipw
|
||||
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
|
||||
syn region rustBoxPlacement matchgroup=rustBoxPlacementParens start="(" end=")" contains=TOP contained
|
||||
" Ideally we'd have syntax rules set up to match arbitrary expressions. Since
|
||||
" we don't, we'll just define temporary contained rules to handle balancing
|
||||
" delimiters.
|
||||
syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlacement transparent
|
||||
syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
|
||||
" {} are handled by rustFoldBraces
|
||||
|
||||
syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount
|
||||
syn match rustMacroRepeatCount ".\?[*+]" contained
|
||||
syn match rustMacroVariable "$\w\+"
|
||||
@@ -154,9 +146,9 @@ syn match rustEscapeError display contained /\\./
|
||||
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 start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
||||
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
||||
syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
|
||||
syn region rustString matchgroup=rustStringDelimiter start=+b"+ 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
|
||||
|
||||
" Match attributes with either arbitrary syntax or special highlighting for
|
||||
" derives. We still highlight strings and comments inside of the attribute.
|
||||
@@ -296,6 +288,7 @@ hi def link rustEscapeUnicode rustEscape
|
||||
hi def link rustEscapeError Error
|
||||
hi def link rustStringContinuation Special
|
||||
hi def link rustString String
|
||||
hi def link rustStringDelimiter String
|
||||
hi def link rustCharacterInvalid Error
|
||||
hi def link rustCharacterInvalidUnicode rustCharacterInvalid
|
||||
hi def link rustCharacter Character
|
||||
@@ -352,7 +345,6 @@ hi def link rustLifetime Special
|
||||
hi def link rustLabel Label
|
||||
hi def link rustExternCrate rustKeyword
|
||||
hi def link rustObsoleteExternMod Error
|
||||
hi def link rustBoxPlacementParens Delimiter
|
||||
hi def link rustQuestionMark Special
|
||||
hi def link rustAsync rustKeyword
|
||||
hi def link rustAwait rustKeyword
|
||||
|
||||
Reference in New Issue
Block a user