diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-08-29 21:55:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-29 21:55:35 +0200 |
commit | 89a9c159f23fb7b3e24e6d09068adfc24a73afcb (patch) | |
tree | ffc62c1104f8222091cf262a37dbb52bf01f5a61 /runtime/syntax | |
parent | 6e82351130ddb8d13cf3748b47f07cae77886fc7 (diff) |
Update runtime files
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/cpp.vim | 21 | ||||
-rw-r--r-- | runtime/syntax/gemtext.vim | 24 | ||||
-rw-r--r-- | runtime/syntax/scala.vim | 24 | ||||
-rw-r--r-- | runtime/syntax/structurizr.vim | 76 |
4 files changed, 131 insertions, 14 deletions
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index 3ad79d5545..5437580a0a 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -2,7 +2,7 @@ " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> -" Last Change: 2021 May 04 +" Last Change: 2021 Aug 23 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -60,7 +60,7 @@ if !exists("cpp_no_cpp14") syn match cppFloat display contained "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" syn match cppFloat display contained "\<\.\d\+\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" - syn region cppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell + syn region cppString start=+\(L\|u\|u8\|U\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell endif " C++ 17 extensions @@ -69,6 +69,20 @@ if !exists("cpp_no_cpp17") syn match cppCast "\<reinterpret_pointer_cast\s*$" syn match cppFloat display contained "\<0x\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" syn match cppFloat display contained "\<0x\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + + " TODO: push this up to c.vim if/when supported in C23 + syn match cppCharacter "u8'[^\\]'" + syn match cppCharacter "u8'[^']*'" contains=cSpecial + if exists("c_gnu") + syn match cppSpecialError "u8'\\[^'\"?\\abefnrtv]'" + syn match cppSpecialCharacter "u8'\\['\"?\\abefnrtv]'" + else + syn match cppSpecialError "u8'\\[^'\"?\\abfnrtv]'" + syn match cppSpecialCharacter "u8'\\['\"?\\abfnrtv]'" + endif + syn match cppSpecialCharacter display "u8'\\\o\{1,3}'" + syn match cppSpecialCharacter display "u8'\\x\x\+'" + endif " C++ 20 extensions @@ -99,6 +113,9 @@ hi def link cppType Type hi def link cppStorageClass StorageClass hi def link cppStructure Structure hi def link cppBoolean Boolean +hi def link cppCharacter cCharacter +hi def link cppSpecialCharacter cSpecialCharacter +hi def link cppSpecialError cSpecialError hi def link cppConstant Constant hi def link cppRawStringDelimiter Delimiter hi def link cppRawString String diff --git a/runtime/syntax/gemtext.vim b/runtime/syntax/gemtext.vim new file mode 100644 index 0000000000..8c2bd29928 --- /dev/null +++ b/runtime/syntax/gemtext.vim @@ -0,0 +1,24 @@ +" Vim syntax file +" Language: Gemtext markup language +" Maintainer: Suneel Freimuth <suneelfreimuth1@gmail.com> +" Latest Revision: 2020-11-21 +" Filenames: *.gmi + +if exists('b:current_syntax') + finish +endif + +syntax match Heading /^#\{1,3}.\+$/ +syntax match List /^\* / +syntax match LinkURL /^=>\s*\S\+/ +syntax match Quote /^>.\+/ +syntax region Preformatted start=/^```/ end=/```/ + +highlight default link Heading Special +highlight default link List Statement +highlight default link LinkURL Underlined +highlight default link Quote Constant +highlight default link Preformatted Identifier + +let b:current_syntax = 'gemtext' + diff --git a/runtime/syntax/scala.vim b/runtime/syntax/scala.vim index 89a936ad17..16e114778d 100644 --- a/runtime/syntax/scala.vim +++ b/runtime/syntax/scala.vim @@ -3,8 +3,7 @@ " Maintainer: Derek Wyatt " URL: https://github.com/derekwyatt/vim-scala " License: Same as Vim -" Last Change: 2021 Aug 11 -" by Jesse Atkinson, PR #8746 +" Last Change: 23 August 2021 " ---------------------------------------------------------------------------- if !exists('main_syntax') @@ -103,9 +102,9 @@ syn match scalaTypeTypeDeclaration /(/ contained nextgroup=scalaTypeTypeExtensio syn match scalaTypeTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeTypeDeclaration contains=scalaTypeTypeExtension skipwhite syn match scalaTypeTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals skipwhite syn match scalaTypeTypeEquals /=\ze[^>]/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite -syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeTypeDeclaration skipwhite +syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeTypeDeclaration skipwhite syn match scalaTypeTypePostDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypePostExtension skipwhite -syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite +syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeTypePostDeclaration skipwhite hi link scalaTypeTypeDeclaration Type hi link scalaTypeTypeExtension Keyword hi link scalaTypeTypePostDeclaration Special @@ -114,21 +113,23 @@ hi link scalaTypeTypePostExtension Keyword syn match scalaTypeDeclaration /(/ contained nextgroup=scalaTypeExtension contains=scalaRoundBrackets skipwhite syn match scalaTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeDeclaration contains=scalaTypeExtension skipwhite syn match scalaTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeExtension skipwhite -syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeDeclaration skipwhite +syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeDeclaration skipwhite hi link scalaTypeDeclaration Type hi link scalaTypeExtension Keyword hi link scalaTypePostExtension Keyword syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration -hi link scalaTypeAnnotation Normal +hi clear scalaTypeAnnotation -syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained -syn match scalaCaseFollowing /`[^`]\+`/ contained +syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained contains=scalaCapitalWord +syn match scalaCaseFollowing /`[^`]\+`/ contained contains=scalaCapitalWord hi link scalaCaseFollowing Special -syn keyword scalaKeywordModifier abstract override final lazy implicit implicitly private protected sealed null require super +syn keyword scalaKeywordModifier abstract override final lazy implicit private protected sealed null super +syn keyword scalaSpecialFunction implicitly require hi link scalaKeywordModifier Function +hi link scalaSpecialFunction Function syn keyword scalaSpecial this true false ne eq syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite @@ -152,14 +153,14 @@ hi link scalaTripleIString String syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup() hi link scalaInterpolation Function -hi link scalaInterpolationB Normal +hi clear scalaInterpolationB syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup() hi link scalaFString String hi link scalaFInterpolation Function -hi link scalaFInterpolationB Normal +hi clear scalaFInterpolationB syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar @@ -200,7 +201,6 @@ hi link scalaDocLinks Function hi link scalaParameterAnnotation Function hi link scalaParamAnnotationValue Keyword hi link scalaCommentAnnotation Function -hi link scalaCommentCodeBlockBrackets String hi link scalaCommentCodeBlock String hi link scalaTodo Todo diff --git a/runtime/syntax/structurizr.vim b/runtime/syntax/structurizr.vim new file mode 100644 index 0000000000..73629b1495 --- /dev/null +++ b/runtime/syntax/structurizr.vim @@ -0,0 +1,76 @@ +" Vim syntax file +" Language: Structurizr DSL +" Maintainer: Bastian Venthur <venthur@debian.org> +" Last Change: 2021-08-16 +" Remark: For a language reference, see +" https://github.com/structurizr/dsl + + +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" comments +syn match scomment "#.*$" +syn match scomment "//.*$" +syn region scomment start="/\*" end="\*/" + +" keywords +syn keyword skeyword animation +syn keyword skeyword autoLayout +syn keyword skeyword branding +syn keyword skeyword component +syn keyword skeyword configuration +syn keyword skeyword container +syn keyword skeyword containerinstance +syn keyword skeyword custom +syn keyword skeyword deployment +syn keyword skeyword deploymentenvironment +syn keyword skeyword deploymentgroup +syn keyword skeyword deploymentnode +syn keyword skeyword dynamic +syn keyword skeyword element +syn keyword skeyword enterprise +syn keyword skeyword exclude +syn keyword skeyword filtered +syn keyword skeyword group +syn keyword skeyword healthcheck +syn keyword skeyword impliedrelationships +syn keyword skeyword include +syn keyword skeyword infrastructurenode +syn keyword skeyword model +syn keyword skeyword person +syn keyword skeyword perspectives +syn keyword skeyword properties +syn keyword skeyword relationship +syn keyword skeyword softwaresystem +syn keyword skeyword softwaresysteminstance +syn keyword skeyword styles +syn keyword skeyword systemcontext +syn keyword skeyword systemlandscape +syn keyword skeyword tags +syn keyword skeyword terminology +syn keyword skeyword theme +syn keyword skeyword title +syn keyword skeyword url +syn keyword skeyword users +syn keyword skeyword views +syn keyword skeyword workspace + +syn match skeyword "\!adrs\s\+" +syn match skeyword "\!constant\s\+" +syn match skeyword "\!docs\s\+" +syn match skeyword "\!identifiers\s\+" +syn match skeyword "\!include\s\+" + +syn region sstring oneline start='"' end='"' + +syn region sblock start='{' end='}' fold transparent + +hi def link sstring string +hi def link scomment comment +hi def link skeyword keyword + +let b:current_syntax = "structurizr" |