diff options
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/blade.vim | 6 | ||||
-rw-r--r-- | syntax/ember-script.vim | 8 | ||||
-rw-r--r-- | syntax/emblem.vim | 53 | ||||
-rw-r--r-- | syntax/go.vim | 59 | ||||
-rw-r--r-- | syntax/kotlin.vim | 8 | ||||
-rw-r--r-- | syntax/pgsql.vim | 1 | ||||
-rw-r--r-- | syntax/pug.vim | 4 |
7 files changed, 78 insertions, 61 deletions
diff --git a/syntax/blade.vim b/syntax/blade.vim index 5b885db6..83b36907 100644 --- a/syntax/blade.vim +++ b/syntax/blade.vim @@ -21,6 +21,12 @@ unlet! b:current_syntax syn case match syn clear htmlError +if has('patch-7.4.1142') + syn iskeyword @,48-57,_,192-255,@-@ +else + setlocal iskeyword+=@-@ +endif + syn region bladeEcho matchgroup=bladeDelimiter start="@\@<!{{" end="}}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend syn region bladeEcho matchgroup=bladeDelimiter start="{!!" end="!!}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" contains=bladeTodo containedin=ALLBUT,@bladeExempt keepend diff --git a/syntax/ember-script.vim b/syntax/ember-script.vim index 87d6d05d..43814b51 100644 --- a/syntax/ember-script.vim +++ b/syntax/ember-script.vim @@ -1,10 +1,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 " Language: ember-script -" Maintainer: heartsentwined <heartsentwined@cogito-lab.com> -" URL: http://github.com/heartsentwined/vim-ember-script -" Version: 1.0.1 -" Last Change: 2013 Apr 17 +" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> +" URL: http://github.com/yalesov/vim-ember-script +" Version: 1.0.3 +" Last Change: 2016 Jul 5 " License: GPL-3.0 if exists('b:current_syntax') && b:current_syntax == 'ember-script' diff --git a/syntax/emblem.vim b/syntax/emblem.vim index 584d72d9..5ac72127 100644 --- a/syntax/emblem.vim +++ b/syntax/emblem.vim @@ -1,10 +1,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Language: emblem -" Maintainer: heartsentwined <heartsentwined@cogito-lab.com> -" URL: http://github.com/heartsentwined/vim-emblem -" Version: 1.2.0 -" Last Change: 2013 Apr 22 +" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> +" URL: http://github.com/yalesov/vim-emblem +" Version: 2.0.0 +" Last Change: 2016 Jul 5 " License: GPL-3.0 " Quit when a syntax file is already loaded. @@ -31,7 +31,7 @@ syn match eblClass '\v(\w|-)+' nextgroup=@eblComponent contained display hi def link eblIdOp eblId hi def link eblClassOp eblClass -syn region eblHbsAttrRegion matchgroup=eblHbsAttrRegionOp start='{' end='}' contains=@eblHbsHelpers nextgroup=@eblComponent keepend contained display +syn region eblHbsAttrRegion matchgroup=eblHbsAttrRegionOp start='{\|(\|\[' end='}\|)\|\]' contains=@eblHbsHelpers nextgroup=@eblComponent keepend contained display hi def link eblHbsAttrRegionOp eblOperator syn match eblInlineText '\v\s+[^:]+.*$' contains=eblItpl contained display @@ -40,7 +40,7 @@ hi def link eblInlineText eblRaw syn cluster eblHbsComponent contains=eblHbsArg,eblHbsAttr,eblHbsTextOp,eblLineOp syn match eblHbsOp '\v\s*\=+' nextgroup=@eblHbsHelpers skipwhite contained display -syn match eblHbsHelper '\v\w(\w|-|\.)*' nextgroup=@eblHbsComponent skipwhite contained display +syn match eblHbsHelper '\v\w(\w|-|\.|\/)*' nextgroup=@eblHbsComponent skipwhite contained display syn match eblHbsTextOp '|' nextgroup=eblHbsText contained display syn match eblHbsText '.*' contained display hi def link eblHbsOp eblOperator @@ -48,24 +48,38 @@ hi def link eblHbsHelper eblFunction hi def link eblHbsTextOp eblOperator hi def link eblHbsText eblRaw -syn cluster eblHbsHelpers contains=eblHbsHelper,eblHbsCtrlFlowHelper,eblHbsEachHelper - -syn match eblHbsCtrlFlowHelper '\v<(if|unless|else|with)>' nextgroup=@eblHbsComponent skipwhite contained display -syn match eblHbsEachHelper '\v<each>' nextgroup=eblHbsEachArg skipwhite contained display -syn match eblHbsEachArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsIn,eblLineOp skipwhite contained display -syn match eblHbsIn '\v<in>' nextgroup=eblHbsInArg skipwhite contained display -syn match eblHbsInArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblLineOp skipwhite contained display -hi def link eblHbsCtrlFlowHelper eblKeyword -hi def link eblHbsEachHelper eblKeyword -hi def link eblHbsEachArg eblLiteral -hi def link eblHbsIn eblKeyword -hi def link eblHbsInArg eblLiteral +syn cluster eblHbsHelpers contains=eblHbsHelper,eblHbsCtrlFlowHelper,eblHbsEachHelper,eblHbsWithHelper + +syn match eblHbsCtrlFlowHelper '\v<(else if|if|unless|else)>' nextgroup=@eblHbsComponent skipwhite contained display +syn match eblHbsEachHelper '\v<each>' nextgroup=eblHbsEachArg skipwhite contained display +syn match eblHbsEachArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsIn,eblLineOp skipwhite contained display +syn match eblHbsIn '\v<in>' nextgroup=eblHbsInArg skipwhite contained display +syn match eblHbsInArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblLineOp skipwhite contained display +syn match eblHbsWithHelper '\v<with>' nextgroup=eblHbsWithArg skipwhite contained display +syn match eblHbsWithArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsAs skipwhite contained display +syn match eblHbsAs '\v<as>' nextgroup=eblHbsAsBlockStartArg skipwhite contained display +syn match eblHbsAsBlockStartArg /\v\|/ nextgroup=eblHbsAsBlockFirstArg skipwhite contained display +syn match eblHbsAsBlockFirstArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsAsBlockSecondArg,eblHbsAsBlockEndArg skipwhite contained display +syn match eblHbsAsBlockSecondArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsAsBlockEndArg skipwhite contained display +syn match eblHbsAsBlockEndArg /\v\|/ nextgroup=eblLineOp skipwhite contained display +hi def link eblHbsCtrlFlowHelper eblKeyword +hi def link eblHbsEachHelper eblKeyword +hi def link eblHbsEachArg eblLiteral +hi def link eblHbsIn eblKeyword +hi def link eblHbsInArg eblLiteral +hi def link eblHbsWithHelper eblKeyword +hi def link eblHbsWithArg eblLiteral +hi def link eblHbsAs eblKeyword +hi def link eblHbsAsBlockStartArg eblOperator +hi def link eblHbsAsBlockFirstArg eblLiteral +hi def link eblHbsAsBlockSecondArg eblLiteral +hi def link eblHbsAsBlockEndArg eblOperator syn match eblHbsArg /\v\s*((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=@eblHbsComponent skipwhite contained display syn match eblHbsAttr '\v\s*(\w|-)+\=@=' contains=eblHbsAttrBind nextgroup=eblHbsAttrOp contained display syn match eblHbsAttrBind /\v<(\w|-)+Bind>/ contained display syn match eblHbsAttrOp '=' nextgroup=eblHbsAttrLit contained display -syn match eblHbsAttrLit /\v(["'])[^\1]{-}\1|[^: ]+/ contains=eblItpl nextgroup=@eblHbsComponent skipwhite contained display +syn match eblHbsAttrLit /\v(["'])[^\1]{-}\1|[^\.: ]+/ contains=eblItpl nextgroup=@eblHbsComponent skipwhite contained display hi def link eblHbsArg eblLiteral hi def link eblHbsAttr eblAttr hi def link eblhbsAttrBind eblBind @@ -106,6 +120,7 @@ hi def link eblKnownEvent eblEvent syn region eblItpl matchgroup=eblItplOp start='#{' end='}' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display syn region eblItpl matchgroup=eblItplOp start='{{' end='}}' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display +syn region eblItpl matchgroup=eblItplOp start='(' end=')' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display hi def link eblItplOp eblOperator syn match eblHbsPartialOp '\s*>' nextgroup=@eblHbsHelpers skipwhite contained display diff --git a/syntax/go.vim b/syntax/go.vim index 0a49059d..781364a6 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -73,12 +73,8 @@ if !exists("g:go_highlight_fields") let g:go_highlight_fields = 0 endif -if !exists("g:go_highlight_structs") - let g:go_highlight_structs = 0 -endif - -if !exists("g:go_highlight_interfaces") - let g:go_highlight_interfaces = 0 +if !exists("g:go_highlight_types") + let g:go_highlight_types = 0 endif if !exists("g:go_highlight_build_constraints") @@ -100,12 +96,10 @@ endif syn case match syn keyword goDirective package import -syn keyword goDeclaration var const type -syn keyword goDeclType struct interface +syn keyword goDeclaration var const hi def link goDirective Statement hi def link goDeclaration Keyword -hi def link goDeclType Keyword " Keywords within functions syn keyword goStatement defer go goto return break continue fallthrough @@ -131,10 +125,6 @@ hi def link goUnsignedInts Type hi def link goFloats Type hi def link goComplexes Type -" Treat func specially: it's a declaration at the start of a line, but a type -" elsewhere. Order matters here. -syn match goDeclaration /\<func\>/ - " Predefined functions and values syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/ @@ -303,38 +293,43 @@ hi def link goOperator Operator " Functions; if g:go_highlight_functions != 0 - syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/ - syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/ + syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction skipwhite skipnl + syn match goReceiver /([^),]\+)/ contained nextgroup=goFunction contains=goReceiverType skipwhite skipnl + syn match goReceiverType /\(\s\|*\)\w\+)/hs=s+1,he=e-1 contained + syn match goFunction /\w\+/ contained +else + syn keyword goDeclaration func endif +hi def link goReceiverType Type hi def link goFunction Function " Methods; if g:go_highlight_methods != 0 - syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/ + syn match goMethod /\.\w\+(/hs=s+1,he=e-1 endif hi def link goMethod Type " Fields; if g:go_highlight_fields != 0 - syn match goField /\(\.\)\@<=\a\+\([\ \n\r\:\)]\)\@=/ + syn match goVarArgs /\.\.\.\w\+\>/ + syn match goField /\.\a\+\([\ \n\r\:\)\[]\)\@=/hs=s+1 endif -hi def link goField Type +hi def link goField Identifier -" Structs; -if g:go_highlight_structs != 0 - syn match goStruct /\(.\)\@<=\w\+\({\)\@=/ - syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/ -endif -hi def link goStruct Function -hi def link goStructDef Function - -" Interfaces; -if g:go_highlight_interfaces != 0 - syn match goInterface /\(.\)\@<=\w\+\({\)\@=/ - syn match goInterfaceDef /\(type\s\+\)\@<=\w\+\(\s\+interface\s\+{\)\@=/ +" Structs & Interfaces; +if g:go_highlight_types != 0 + syn match goTypeConstructor /\<\w\+{/he=e-1 + syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl + syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl + syn match goDeclType /\<interface\|struct\>/ contained skipwhite skipnl +else + syn keyword goDeclType struct interface + syn keyword goDeclaration type endif -hi def link goInterface Function -hi def link goInterfaceDef Function +hi def link goTypeConstructor Type +hi def link goTypeName Type +hi def link goTypeDecl Keyword +hi def link goDeclType Keyword " Build Constraints if g:go_highlight_build_constraints != 0 diff --git a/syntax/kotlin.vim b/syntax/kotlin.vim index 9209255c..946a8f2c 100644 --- a/syntax/kotlin.vim +++ b/syntax/kotlin.vim @@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1 " Vim syntax file " Language: Kotlin " Maintainer: Alexander Udalov -" Latest Revision: 24 February 2016 +" Latest Revision: 4 July 2016 if exists("b:current_syntax") finish @@ -22,14 +22,14 @@ syn keyword ktInclude import package syn keyword ktType Any Boolean Byte Char Double Float Int Long Nothing Short Unit syn keyword ktModifier annotation companion enum inner internal private protected public abstract final open override sealed vararg dynamic -syn keyword ktStructure class object interface fun val var constructor init +syn keyword ktStructure class object interface typealias fun val var constructor init -syn keyword ktReservedKeyword async typealias typeof yield +syn keyword ktReservedKeyword typeof syn keyword ktBoolean true false syn keyword ktConstant null -syn keyword ktModifier data tailrec lateinit reified external inline noinline crossinline const operator infix +syn keyword ktModifier data tailrec lateinit reified external inline noinline crossinline const operator infix coroutine suspend syn keyword ktTodo TODO FIXME XXX contained syn match ktShebang "\v^#!.*$" diff --git a/syntax/pgsql.vim b/syntax/pgsql.vim index 3a2763ed..ddd13e74 100644 --- a/syntax/pgsql.vim +++ b/syntax/pgsql.vim @@ -127,6 +127,7 @@ syn match pgsqlKeyword "\<for\_s\+\(search\|order\_s\+by\)\>" syn match pgsqlKeyword "\<\(no\_s\+\)\?inherit\>" syn match pgsqlKeyword "\<\(not\_s\+\)\?of\>" syn match pgsqlKeyword "\<primary\_s\+key\>" +syn match pgsqlKeyword "\<foreign\_s\+key\>" syn match pgsqlKeyword "\<replica\_s\+identity\>" syn match pgsqlKeyword "\<using\(\_s\+index\(\_s\+tablespace\)\?\)\?\>" syn match pgsqlKeyword "\<with\(out\)\?\_s\+function\>" diff --git a/syntax/pug.vim b/syntax/pug.vim index d8416a88..992fef64 100644 --- a/syntax/pug.vim +++ b/syntax/pug.vim @@ -34,8 +34,8 @@ syn cluster pugTop contains=pugBegin,pugComment,pugHtmlComment,pugJavascript syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText syn match pugTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@pugComponent syn cluster pugComponent contains=pugAttributes,pugIdChar,pugBlockExpansionChar,pugClassChar,pugPlainChar,pugJavascript,pugTagBlockChar,pugTagInlineText -syn match pugComment '\s*\/\/.*$' -syn region pugCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend +syn match pugComment '\(\s\+\|^\)\/\/.*$' +syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->" syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent syn match pugClassChar "\." contained nextgroup=pugClass |