From af870100716f20ee4daef9cc527a9ecf41b54114 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 17 May 2017 11:07:28 +0200 Subject: Update --- syntax/c.vim | 4 +- syntax/crystal.vim | 2 +- syntax/glsl.vim | 14 +-- syntax/gotexttmpl.vim | 4 +- syntax/haskell.vim | 42 +++---- syntax/html.vim | 4 +- syntax/javascript.vim | 8 +- syntax/markdown.vim | 4 +- syntax/nginx.vim | 41 ++++--- syntax/plantuml.vim | 314 +++++++++++++++++++++++++++++++++++--------------- syntax/pug.vim | 5 +- syntax/ruby.vim | 12 +- syntax/swift.vim | 9 +- syntax/terraform.vim | 62 ++++++++++ syntax/tmux.vim | 16 ++- syntax/vue.vim | 129 ++++++++------------- 16 files changed, 434 insertions(+), 236 deletions(-) (limited to 'syntax') diff --git a/syntax/c.vim b/syntax/c.vim index 0dff4be1..c37af28f 100644 --- a/syntax/c.vim +++ b/syntax/c.vim @@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1 " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2016 Nov 17 +" Last Change: 2016 Nov 18 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -365,7 +365,7 @@ syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" if !exists("c_no_if0") syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold - syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse + syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse if !exists("c_no_if0_fold") syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold else diff --git a/syntax/crystal.vim b/syntax/crystal.vim index c361ad70..0ddf7653 100644 --- a/syntax/crystal.vim +++ b/syntax/crystal.vim @@ -177,7 +177,7 @@ end syn match crystalAliasDeclaration "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable nextgroup=crystalAliasDeclaration2 skipwhite syn match crystalAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable syn match crystalMethodDeclaration "[^[:space:];#(]\+" contained contains=crystalConstant,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable -syn match crystalFunctionDeclaration "[^[:space:];#=]\+" contained contains=crystalConstant +syn match crystalFunctionDeclaration "[^[:space:];#(=]\+" contained contains=crystalConstant syn match crystalTypeDeclaration "[^[:space:];#=]\+" contained contains=crystalConstant syn match crystalClassDeclaration "[^[:space:];#<]\+" contained contains=crystalConstant,crystalOperator syn match crystalModuleDeclaration "[^[:space:];#<]\+" contained contains=crystalConstant,crystalOperator diff --git a/syntax/glsl.vim b/syntax/glsl.vim index f0424b50..e77354bb 100644 --- a/syntax/glsl.vim +++ b/syntax/glsl.vim @@ -28,15 +28,15 @@ syn region glslPreProc start="^\s*#\s*\(error\|pragma\|extension\|versi syn keyword glslBoolean true false " Integer Numbers -syn match glslDecimalInt display "\(0\|[1-9]\d*\)" -syn match glslOctalInt display "0\o\+" -syn match glslHexInt display "0[xX]\x\+" +syn match glslDecimalInt display "\(0\|[1-9]\d*\)[uU]\?" +syn match glslOctalInt display "0\o\+[uU]\?" +syn match glslHexInt display "0[xX]\x\+[uU]\?" " Float Numbers -syn match glslFloat display "\d\+\.\([eE][+-]\=\d\+\)\=" -syn match glslFloat display "\.\d\+\([eE][+-]\=\d\+\)\=" -syn match glslFloat display "\d\+[eE][+-]\=\d\+" -syn match glslFloat display "\d\+\.\d\+\([eE][+-]\=\d\+\)\=" +syn match glslFloat display "\d\+\.\([eE][+-]\=\d\+\)\=\(lf\|LF\|f\|F\)\=" +syn match glslFloat display "\.\d\+\([eE][+-]\=\d\+\)\=\(lf\|LF\|f\|F\)\=" +syn match glslFloat display "\d\+[eE][+-]\=\d\+\(lf\|LF\|f\|F\)\=" +syn match glslFloat display "\d\+\.\d\+\([eE][+-]\=\d\+\)\=\(lf\|LF\|f\|F\)\=" " Swizzles syn match glslSwizzle display /\.[xyzw]\{1,4\}\>/ diff --git a/syntax/gotexttmpl.vim b/syntax/gotexttmpl.vim index 0b8987c0..11539355 100644 --- a/syntax/gotexttmpl.vim +++ b/syntax/gotexttmpl.vim @@ -76,8 +76,8 @@ hi def link goTplVariable Special syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable,goTplIdentifier display syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable display -syn region goTplComment start="{{/\*" end="\*/}}" display -syn region goTplComment start="\[\[/\*" end="\*/\]\]" display +syn region goTplComment start="{{\(- \)\?/\*" end="\*/\( -\)\?}}" display +syn region goTplComment start="\[\[\(- \)\?/\*" end="\*/\( -\)\?\]\]" display hi def link gotplAction PreProc hi def link goTplComment Comment diff --git a/syntax/haskell.vim b/syntax/haskell.vim index e301742b..1a26d1c0 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -13,11 +13,7 @@ elseif exists("b:current_syntax") finish endif -if !exists('g:haskell_disable_TH') - let g:haskell_disable_TH = 0 -endif - -if exists('g:haskell_backpack') && g:haskell_backpack == 1 +if get(g:, 'haskell_backpack', 0) syn keyword haskellBackpackStructure unit signature syn keyword haskellBackpackDependency dependency endif @@ -63,7 +59,7 @@ syn match haskellImport "^\s*\\s\+\(\\s\+\)\?\(\\s\+ \ haskellBlockComment, \ haskellPragma syn keyword haskellKeyword do case of -if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1 +if get(g:, 'haskell_enable_static_pointers', 0) syn keyword haskellStatic static endif syn keyword haskellConditional if then else @@ -107,29 +103,29 @@ syn match haskellPreProc "^#.*$" syn keyword haskellTodo TODO FIXME contained " Treat a shebang line at the start of the file as a comment syn match haskellShebang "\%^#!.*$" -if exists('g:haskell_disable_TH') && g:haskell_disable_TH == 0 +if !get(g:, 'haskell_disable_TH', 0) syn match haskellQuasiQuoted "." containedin=haskellQuasiQuote contained syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-zA-Z][a-zA-z0-9._']*|" end="|\]" syn region haskellTHBlock matchgroup=haskellTH start="\[\(d\|t\|p\)\?|" end="|]" contains=TOP syn region haskellTHDoubleBlock matchgroup=haskellTH start="\[||" end="||]" contains=TOP endif -if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1 +if get(g:, 'haskell_enable_typeroles', 0) syn keyword haskellTypeRoles phantom representational nominal contained syn region haskellTypeRoleBlock matchgroup=haskellTypeRoles start="type\s\+role" end="$" keepend \ contains= \ haskellType, \ haskellTypeRoles endif -if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1 +if get(g:, 'haskell_enable_quantification', 0) syn keyword haskellForall forall endif -if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1 +if get(g:, 'haskell_enable_recursivedo', 0) syn keyword haskellRecursiveDo mdo rec endif -if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1 +if get(g:, 'haskell_enable_arrowsyntax', 0) syn keyword haskellArrowSyntax proc endif -if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1 +if get(g:, 'haskell_enable_pattern_synonyms', 0) syn keyword haskellPatternKeyword pattern endif @@ -161,7 +157,7 @@ highlight def link haskellAssocType Type highlight def link haskellQuotedType Type highlight def link haskellType Type highlight def link haskellImportKeywords Include -if exists('g:haskell_classic_highlighting') && g:haskell_classic_highlighting == 1 +if get(g:, 'haskell_classic_highlighting', 0) highlight def link haskellDeclKeyword Keyword highlight def link haskellDecl Keyword highlight def link haskellWhere Keyword @@ -173,35 +169,35 @@ else highlight def link haskellLet Structure endif -if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1 +if get(g:, 'haskell_enable_quantification', 0) highlight def link haskellForall Operator endif -if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1 +if get(g:, 'haskell_enable_recursivedo', 0) highlight def link haskellRecursiveDo Keyword endif -if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1 +if get(g:, 'haskell_enable_arrowsyntax', 0) highlight def link haskellArrowSyntax Keyword endif -if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1 +if get(g:, 'haskell_enable_static_pointers', 0) highlight def link haskellStatic Keyword endif -if exists('g:haskell_classic_highlighting') && g:haskell_classic_highlighting == 1 - if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1 +if get(g:, 'haskell_classic_highlighting', 0) + if get(g:, 'haskell_enable_pattern_synonyms', 0) highlight def link haskellPatternKeyword Keyword endif - if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1 + if get(g:, 'haskell_enable_typeroles', 0) highlight def link haskellTypeRoles Keyword endif else - if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1 + if get(g:, 'haskell_enable_pattern_synonyms', 0) highlight def link haskellPatternKeyword Structure endif - if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1 + if get(g:, 'haskell_enable_typeroles', 0) highlight def link haskellTypeRoles Structure endif endif -if exists('g:haskell_backpack') && g:haskell_backpack == 1 +if get(g:, 'haskell_backpack', 0) highlight def link haskellBackpackStructure Structure highlight def link haskellBackpackDependency Include endif diff --git a/syntax/html.vim b/syntax/html.vim index 3f58cf02..9ae35217 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -121,9 +121,11 @@ syn keyword htmlArg contained download media syn keyword htmlArg contained nonce " , , ,