mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-10 20:43:52 -05:00
Update
This commit is contained in:
@@ -34,7 +34,7 @@ hi def link coffeeConditional Conditional
|
||||
syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display
|
||||
hi def link coffeeException Exception
|
||||
|
||||
syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\)\>/
|
||||
syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\|debugger\)\>/
|
||||
\ display
|
||||
" The `own` keyword is only a keyword after `for`.
|
||||
syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat
|
||||
|
||||
@@ -4,6 +4,9 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists("main_syntax")
|
||||
let main_syntax = 'eelixir'
|
||||
endif
|
||||
@@ -62,4 +65,7 @@ if main_syntax == 'eelixir'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
endif
|
||||
|
||||
@@ -4,16 +4,22 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" syncing starts 2000 lines before top line so docstrings don't screw things up
|
||||
syn sync minlines=2000
|
||||
|
||||
syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition
|
||||
syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation
|
||||
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
|
||||
syn cluster elixirDeclaration contains=elixirFunctionDeclaration,elixirModuleDeclaration,elixirProtocolDeclaration,elixirImplDeclaration,elixirRecordDeclaration,elixirMacroDeclaration,elixirDelegateDeclaration,elixirOverridableDeclaration,elixirExceptionDeclaration,elixirCallbackDeclaration,elixirStructDeclaration
|
||||
|
||||
syn match elixirComment '#.*' contains=elixirTodo,@Spell
|
||||
syn match elixirComment '^\s*#.*' contains=elixirTodo,@Spell
|
||||
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
|
||||
|
||||
syn keyword elixirKeyword case when with cond for if unless try receive send
|
||||
syn keyword elixirKeyword exit raise throw after rescue catch else
|
||||
syn keyword elixirKeyword do end exit raise throw after rescue catch else
|
||||
syn keyword elixirKeyword quote unquote super spawn spawn_link spawn_monitor
|
||||
|
||||
" Functions used on guards
|
||||
@@ -73,23 +79,20 @@ syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|
|
||||
|
||||
syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial
|
||||
|
||||
syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation
|
||||
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
|
||||
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start="'" end="'" skip="\\'\|\\\\" contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('''\)+ end=+^\s*\z1+ skip=+'\|\\\\+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("""\)+ end=+^\s*\z1+ skip=+"\|\\\\+ contains=@elixirStringContained
|
||||
syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop
|
||||
|
||||
syn region elixirDocStringStart matchgroup=elixirDocString start=+"""+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
|
||||
syn region elixirDocStringStart matchgroup=elixirDocString start=+'''+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
|
||||
syn region elixirDocString start=+\z("""\)+ end=+^\s*\zs\z1+ contains=elixirDocStringStart,elixirTodo,elixirInterpolation,@Spell keepend fold
|
||||
syn region elixirDocString start=+\z('''\)+ end=+^\s*\zs\z1+ contains=elixirDocStringStart,elixirTodo,elixirInterpolation,@Spell keepend fold
|
||||
syn match elixirDocString +\(@\w*doc\s*\)\@<=\%("""\_.\{-}\_^\s*"""\|".\{-\}"\)+ contains=elixirTodo,elixirInterpolation,@Spell fold
|
||||
|
||||
syn match elixirAtomInterpolated ':\("\)\@=' contains=elixirString
|
||||
syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|0[0-7]{0,2}[0-7]\@!\>\|[^x0MC]\)\|(\\[MC]-)+\w\|[^\s\\]\)"
|
||||
|
||||
syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
|
||||
syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
|
||||
syn region elixirElseBlock matchgroup=elixirBlockDefinition start="\<else\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
|
||||
syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
|
||||
|
||||
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigilDelimiter
|
||||
|
||||
@@ -140,8 +143,6 @@ syn match elixirOverridableDeclaration "[^[:space:];#<]\+" contained con
|
||||
syn match elixirExceptionDeclaration "[^[:space:];#<]\+" contained contains=elixirAlias skipwhite skipnl
|
||||
syn match elixirCallbackDeclaration "[^[:space:];#<,()\[\]]\+" contained contains=elixirFunctionDeclaration skipwhite skipnl
|
||||
|
||||
syn cluster elixirDeclaration contains=elixirFunctionDeclaration,elixirModuleDeclaration,elixirProtocolDeclaration,elixirImplDeclaration,elixirRecordDeclaration,elixirMacroDeclaration,elixirDelegateDeclaration,elixirOverridableDeclaration,elixirExceptionDeclaration,elixirCallbackDeclaration,elixirStructDeclaration
|
||||
|
||||
hi def link elixirBlockDefinition Keyword
|
||||
hi def link elixirDefine Define
|
||||
hi def link elixirPrivateDefine Define
|
||||
@@ -157,6 +158,7 @@ hi def link elixirOverridableDefine Define
|
||||
hi def link elixirExceptionDefine Define
|
||||
hi def link elixirCallbackDefine Define
|
||||
hi def link elixirStructDefine Define
|
||||
hi def link elixirModuleDeclaration Type
|
||||
hi def link elixirFunctionDeclaration Function
|
||||
hi def link elixirMacroDeclaration Macro
|
||||
hi def link elixirInclude Include
|
||||
@@ -172,7 +174,7 @@ hi def link elixirVariable Identifier
|
||||
hi def link elixirSelf Identifier
|
||||
hi def link elixirUnusedVariable Comment
|
||||
hi def link elixirNumber Number
|
||||
hi def link elixirDocString String
|
||||
hi def link elixirDocString Comment
|
||||
hi def link elixirAtomInterpolated elixirAtom
|
||||
hi def link elixirRegex elixirString
|
||||
hi def link elixirRegexEscape elixirSpecial
|
||||
@@ -189,4 +191,7 @@ hi def link elixirSigilDelimiter Delimiter
|
||||
|
||||
let b:current_syntax = "elixir"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
endif
|
||||
|
||||
@@ -23,7 +23,7 @@ syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite
|
||||
syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
||||
syn match gitrebaseCommand ".*" contained
|
||||
syn match gitrebaseComment "^#.*" contains=gitrebaseHash
|
||||
syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash
|
||||
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
|
||||
|
||||
hi def link gitrebaseCommit gitrebaseHash
|
||||
|
||||
@@ -127,12 +127,14 @@ hi def link goComplexes Type
|
||||
|
||||
|
||||
" Predefined functions and values
|
||||
syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/
|
||||
syn match goBuiltins /\<\v(make|new|panic|print|println|real|recover)\ze\(/
|
||||
syn keyword goBoolean iota true false nil
|
||||
syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/
|
||||
syn match goBuiltins /\<\v(make|new|panic|print|println|real|recover)\ze\(/
|
||||
syn keyword goPredefinedIdentifiers nil iota
|
||||
syn keyword goBoolean true false
|
||||
|
||||
hi def link goBuiltins Keyword
|
||||
hi def link goBoolean Boolean
|
||||
hi def link goBuiltins Keyword
|
||||
hi def link goPredefinedIdentifiers Identifier
|
||||
hi def link goBoolean Boolean
|
||||
|
||||
" Comments; their contents
|
||||
syn keyword goTodo contained TODO FIXME XXX BUG
|
||||
@@ -177,7 +179,7 @@ else
|
||||
endif
|
||||
|
||||
if g:go_highlight_format_strings != 0
|
||||
syn match goFormatSpecifier /%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
|
||||
syn match goFormatSpecifier /\([^%]\(%%\)*\)\@<=%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
endif
|
||||
|
||||
@@ -273,6 +275,7 @@ hi def link goSpaceError Error
|
||||
syn keyword goTodo contained NOTE
|
||||
hi def link goTodo Todo
|
||||
|
||||
syn match goVarArgs /\.\.\./
|
||||
|
||||
" Operators;
|
||||
if g:go_highlight_operators != 0
|
||||
@@ -287,9 +290,9 @@ if g:go_highlight_operators != 0
|
||||
" match remaining two-char operators: := && || <- ++ --
|
||||
syn match goOperator /:=\|||\|<-\|++\|--/
|
||||
" match ...
|
||||
syn match goOperator /\.\.\./
|
||||
|
||||
hi def link goPointerOperator Operator
|
||||
hi def link goPointerOperator goOperator
|
||||
hi def link goVarArgs goOperator
|
||||
endif
|
||||
hi def link goOperator Operator
|
||||
|
||||
@@ -314,8 +317,7 @@ hi def link goMethod Type
|
||||
|
||||
" Fields;
|
||||
if g:go_highlight_fields != 0
|
||||
syn match goVarArgs /\.\.\.\w\+\>/
|
||||
syn match goField /\.\a\+\([\ \n\r\:\)\[]\)\@=/hs=s+1
|
||||
syn match goField /\.\w\+\([.\ \n\r\:\)\[,]\)\@=/hs=s+1
|
||||
endif
|
||||
hi def link goField Identifier
|
||||
|
||||
@@ -368,13 +370,27 @@ if g:go_highlight_build_constraints != 0
|
||||
hi def link goPackageComment Comment
|
||||
endif
|
||||
|
||||
" :GoSameIds
|
||||
hi def goSameId term=bold cterm=bold ctermbg=white ctermfg=black
|
||||
|
||||
" :GoCoverage commands
|
||||
hi def link goCoverageNormalText Comment
|
||||
hi def goCoverageCovered ctermfg=green
|
||||
hi def goCoverageUncover ctermfg=red
|
||||
|
||||
function! s:hi()
|
||||
" :GoSameIds
|
||||
if &background == 'dark'
|
||||
hi def goSameId term=bold cterm=bold ctermbg=white ctermfg=black guibg=white guifg=black
|
||||
else
|
||||
hi def goSameId term=bold cterm=bold ctermbg=14 guibg=Cyan
|
||||
endif
|
||||
|
||||
" :GoCoverage commands
|
||||
hi def goCoverageCovered ctermfg=green guifg=#A6E22E
|
||||
hi def goCoverageUncover ctermfg=red guifg=#F92672
|
||||
endfunction
|
||||
|
||||
augroup vim-go-hi
|
||||
autocmd!
|
||||
autocmd ColorScheme * call s:hi()
|
||||
augroup end
|
||||
call s:hi()
|
||||
|
||||
" Search backwards for a global declaration to start processing the syntax.
|
||||
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
|
||||
|
||||
@@ -31,7 +31,7 @@ syn match haskellTypeSig
|
||||
\ haskellOperators,
|
||||
\ haskellSeparator,
|
||||
\ haskellParens
|
||||
syn keyword haskelLWhere where
|
||||
syn keyword haskellWhere where
|
||||
syn keyword haskellLet let
|
||||
syn keyword haskellDeclKeyword module class instance newtype deriving in
|
||||
syn match haskellDecl "\<\(type\|data\)\>\s\+\(\<family\>\)\?"
|
||||
@@ -95,7 +95,7 @@ syn region haskellBlockComment start="{-" end="-}"
|
||||
\ @Spell
|
||||
syn region haskellPragma start="{-#" end="#-}"
|
||||
syn match haskellQuasiQuoted "." containedin=haskellQuasiQuote contained
|
||||
syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-z][a-zA-z0-9_']*|" end="|\]"
|
||||
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
|
||||
syn match haskellPreProc "^#.*$"
|
||||
@@ -145,26 +145,21 @@ highlight def link haskellChar String
|
||||
highlight def link haskellBacktick Operator
|
||||
highlight def link haskellQuasiQuoted String
|
||||
highlight def link haskellTodo Todo
|
||||
highlight def link haskellPreProc PreProc
|
||||
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
|
||||
highlight def link haskellPreProc PreProc
|
||||
highlight def link haskellAssocType Type
|
||||
highlight def link haskellImportKeywords Include
|
||||
highlight def link haskellDeclKeyword Keyword
|
||||
highlight def link haskellDecl Keyword
|
||||
highlight def link haskellWhere Keyword
|
||||
highlight def link haskellLet Keyword
|
||||
highlight def link haskellQuotedType Type
|
||||
highlight def link haskellType Type
|
||||
else
|
||||
highlight def link haskellPreProc Macro
|
||||
highlight def link haskellAssocType Structure
|
||||
highlight def link haskellImportKeywords Structure
|
||||
highlight def link haskellDeclKeyword Structure
|
||||
highlight def link haskellDecl Structure
|
||||
highlight def link haskellWhere Structure
|
||||
highlight def link haskellLet Structure
|
||||
highlight def link haskellQuotedType Include
|
||||
highlight def link haskellType Include
|
||||
endif
|
||||
|
||||
if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1
|
||||
|
||||
1967
syntax/perl6.vim
1967
syntax/perl6.vim
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -
|
||||
" TODO: There are some bugs, add << >>
|
||||
"
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
if version < 600
|
||||
@@ -22,12 +22,13 @@ let b:current_syntax = "plantuml"
|
||||
|
||||
syntax sync minlines=100
|
||||
|
||||
syntax match plantumlPreProc /\%(^@startuml\|^@enduml\)\|!\%(include\|ifdef\|define\|endif\)\s*.*/ contains=plantumlDir
|
||||
syntax match plantumlPreProc /\%(^@startuml\|^@enduml\)\|!\%(include\|define\|undev\|ifdef\|endif\|ifndef\)\s*.*/ contains=plantumlDir
|
||||
syntax region plantumlDir start=/\s\+/ms=s+1 end=/$/ contained
|
||||
|
||||
syntax keyword plantumlTypeKeyword namespace component package interface class interface enum object participant activity skinparam abstract
|
||||
syntax keyword plantumlKeyword actor boundary control entity database partition title activate as deactivate note left right top bottom of end destroy
|
||||
syntax keyword plantumlKeyword if then else endif
|
||||
syntax keyword plantumlTypeKeyword actor participant usecase interface abstract enum component state object artifact folder rect node frame cloud database storage agent boundary control entity card
|
||||
syntax keyword plantumlKeyword as also autonumber caption title newpage box alt opt loop par break critical note rnote hnote legend group left right of on link over end activate deactivate destroy create footbox hide show skinparam skin top bottom
|
||||
syntax keyword plantumlKeyword package namespace page up down if else elseif endif partition footer header center rotate ref return is repeat start stop while endwhile fork again kill
|
||||
syntax keyword plantumlKeyword then detach
|
||||
|
||||
syntax keyword plantumlCommentTODO XXX TODO FIXME NOTE contained
|
||||
syntax match plantumlColor /#[0-9A-Fa-f]\{6\}\>/
|
||||
@@ -40,19 +41,18 @@ syntax region plantumlLabel start=/\[/ms=s+1 end=/\]/me=s-1 contained contains=p
|
||||
syntax match plantumlText /\%([0-9A-Za-zÀ-ÿ]\|\s\|[\.,;_-]\)\+/ contained
|
||||
|
||||
" Class
|
||||
syntax region plantumlClass start=/{/ end=/\s*}/ contains=plantumlClassArrows,
|
||||
\ plantumlKeyword,
|
||||
\ @plantumlClassOp
|
||||
syntax region plantumlClassString matchgroup=plantumlClass start=/\s*class\ze [^{]\+{/ end=/\s*\ze}/ contains=plantumlKeyword,
|
||||
\ @plantumlClassOp
|
||||
syntax match plantumlClass /\s*class\ze [^{]\+$/
|
||||
|
||||
syntax match plantumlClassPublic /+\w\+/ contained
|
||||
syntax match plantumlClassPrivate /-\w\+/ contained
|
||||
syntax match plantumlClassProtected /#\w\+/ contained
|
||||
syntax match plantumlClassPrivate /-\w\+/ contained
|
||||
syntax match plantumlClassProtected /#\w\+/ contained
|
||||
syntax match plantumlClassPackPrivate /\~\w\+/ contained
|
||||
|
||||
syntax cluster plantumlClassOp contains=plantumlClassPublic,
|
||||
\ plantumlClassPrivate,
|
||||
\ plantumlClassProtected,
|
||||
\ plantumlClassProtected,
|
||||
\ plantumlClassPackPrivate
|
||||
|
||||
" Strings
|
||||
@@ -154,6 +154,7 @@ highlight default link plantumlDirectedOrVerticalArrowLR Special
|
||||
highlight default link plantumlDirectedOrVerticalArrowRL Special
|
||||
highlight default link plantumlLabel Special
|
||||
highlight default link plantumlText Label
|
||||
highlight default link plantumlClass Type
|
||||
highlight default link plantumlClassPublic Structure
|
||||
highlight default link plantumlClassPrivate Macro
|
||||
highlight default link plantumlClassProtected Statement
|
||||
|
||||
@@ -11,45 +11,167 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn keyword purescriptModule module
|
||||
syn keyword purescriptImport foreign import hiding
|
||||
syn region purescriptQualifiedImport start="\<qualified\>" contains=purescriptType,purescriptDot end="\<as\>"
|
||||
syn keyword purescriptStructure data newtype type class instance derive where
|
||||
syn keyword purescriptStatement forall do case of let in
|
||||
syn keyword purescriptConditional if then else
|
||||
syn match purescriptNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>"
|
||||
syn match purescriptFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
|
||||
syn match purescriptDelimiter "[(),;[\]{}]"
|
||||
syn keyword purescriptInfix infix infixl infixr
|
||||
syn match purescriptOperators "\([-!#$%&\*\+/<=>\?@\\^|~:]\|\<_\>\)"
|
||||
syn match purescriptDot "\."
|
||||
syn match purescriptType "\<\([A-Z][a-zA-Z0-9_]*\|_|_\)\>"
|
||||
syn match purescriptLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
|
||||
syn match purescriptChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
|
||||
syn match purescriptBacktick "`[A-Za-z][A-Za-z0-9_]*`"
|
||||
syn region purescriptString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region purescriptMultilineString start=+"""+ end=+"""+
|
||||
syn region purescriptBlockComment start="{-" end="-}" contains=purescriptBlockComment
|
||||
" Values
|
||||
syn match purescriptIdentifier "\<[_a-z]\(\w\|\'\)*\>"
|
||||
syn match purescriptNumber "0[xX][0-9a-fA-F]\+\|0[oO][0-7]\|[0-9]\+"
|
||||
syn match purescriptFloat "[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\="
|
||||
syn keyword purescriptBoolean true false
|
||||
|
||||
" Delimiters
|
||||
syn match purescriptDelimiter "[,;|.()[\]{}]"
|
||||
|
||||
" Constructor
|
||||
syn match purescriptConstructor "\<[A-Z]\w*\>"
|
||||
syn region purescriptConstructorDecl matchgroup=purescriptConstructor start="\<[A-Z]\w*\>" end="\(|\|$\)"me=e-1,re=e-1 contained
|
||||
\ containedin=purescriptData,purescriptNewtype
|
||||
\ contains=purescriptType,purescriptTypeVar,purescriptDelimiter,purescriptOperatorType,purescriptOperatorTypeSig,@purescriptComment
|
||||
|
||||
" Type
|
||||
syn match purescriptType "\<[A-Z]\w*\>" contained
|
||||
\ containedin=purescriptTypeAlias
|
||||
\ nextgroup=purescriptType,purescriptTypeVar skipwhite
|
||||
syn match purescriptTypeVar "\<[_a-z]\(\w\|\'\)*\>" contained
|
||||
\ containedin=purescriptData,purescriptNewtype,purescriptTypeAlias,purescriptFunctionDecl
|
||||
syn region purescriptTypeExport matchgroup=purescriptType start="\<[A-Z]\(\S\&[^,.]\)*\>("rs=e-1 matchgroup=purescriptDelimiter end=")" contained extend
|
||||
\ contains=purescriptConstructor,purescriptDelimiter
|
||||
|
||||
" Function
|
||||
syn match purescriptFunction "\<[_a-z]\(\w\|\'\)*\>" contained
|
||||
syn match purescriptFunction "(\(\W\&[^(),\"]\)\+)" contained extend
|
||||
syn match purescriptBacktick "`[_A-Za-z][A-Za-z0-9_]*`"
|
||||
|
||||
" Module
|
||||
syn match purescriptModuleName "\(\w\+\.\?\)*" contained excludenl
|
||||
syn match purescriptModuleKeyword "\<module\>"
|
||||
syn match purescriptModule "^module\>\s\+\<\(\w\+\.\?\)*\>"
|
||||
\ contains=purescriptModuleKeyword,purescriptModuleName
|
||||
\ nextgroup=purescriptModuleParams skipwhite skipnl skipempty
|
||||
syn region purescriptModuleParams start="(" end=")" fold contained keepend
|
||||
\ contains=purescriptDelimiter,purescriptType,purescriptTypeExport,purescriptFunction,purescriptStructure,purescriptModuleKeyword,@purescriptComment
|
||||
\ nextgroup=purescriptImportParams skipwhite
|
||||
|
||||
" Import
|
||||
syn match purescriptImportKeyword "\<\(foreign\|import\|qualified\)\>"
|
||||
syn keyword purescriptAsKeyword as contained
|
||||
syn keyword purescriptHidingKeyword hiding contained
|
||||
syn match purescriptImport "\<import\>\s\+\(qualified\s\+\)\?\<\(\w\+\.\?\)*\>"
|
||||
\ contains=purescriptImportKeyword,purescriptModuleName
|
||||
\ nextgroup=purescriptModuleParams,purescriptImportParams skipwhite
|
||||
syn match purescriptImportParams "as\s\+\(\w\+\)" contained
|
||||
\ contains=purescriptModuleName,purescriptAsKeyword
|
||||
\ nextgroup=purescriptModuleParams,purescriptImportParams skipwhite
|
||||
syn match purescriptImportParams "hiding" contained
|
||||
\ contains=purescriptHidingKeyword
|
||||
\ nextgroup=purescriptModuleParams,purescriptImportParams skipwhite
|
||||
|
||||
" Function declaration
|
||||
syn region purescriptFunctionDecl excludenl start="^\z(\s*\)\(foreign\s\+import\_s\+\)\?[_a-z]\(\w\|\'\)*\_s\{-}\(::\|∷\)" end="^\z1\=\S"me=s-1,re=s-1 keepend
|
||||
\ contains=purescriptFunctionDeclStart,purescriptForall,purescriptOperatorType,purescriptOperatorTypeSig,purescriptType,purescriptTypeVar,purescriptDelimiter,@purescriptComment
|
||||
syn match purescriptFunctionDeclStart "^\s*\(foreign\s\+import\_s\+\)\?\([_a-z]\(\w\|\'\)*\)\_s\{-}\(::\|∷\)" contained
|
||||
\ contains=purescriptImportKeyword,purescriptFunction,purescriptOperatorType
|
||||
syn keyword purescriptForall forall
|
||||
syn match purescriptForall "∀"
|
||||
|
||||
" Keywords
|
||||
syn keyword purescriptConditional if then else
|
||||
syn keyword purescriptStatement do case of let in
|
||||
syn keyword purescriptWhere where
|
||||
syn match purescriptStructure "\<\(data\|newtype\|type\|class\)\>"
|
||||
\ nextgroup=purescriptType skipwhite
|
||||
syn keyword purescriptStructure derive
|
||||
syn keyword purescriptStructure instance
|
||||
\ nextgroup=purescriptFunction skipwhite
|
||||
|
||||
" Infix
|
||||
syn match purescriptInfixKeyword "\<\(infix\|infixl\|infixr\)\>"
|
||||
syn match purescriptInfix "^\(infix\|infixl\|infixr\)\>\s\+\([0-9]\+\)\s\+\(type\s\+\)\?\(\S\+\)\s\+as\>"
|
||||
\ contains=purescriptInfixKeyword,purescriptNumber,purescriptAsKeyword,purescriptConstructor,purescriptStructure,purescriptFunction,purescriptBlockComment
|
||||
\ nextgroup=purescriptFunction,purescriptOperator,@purescriptComment
|
||||
|
||||
" Operators
|
||||
syn match purescriptOperator "\([-!#$%&\*\+/<=>\?@\\^|~:]\|\<_\>\)"
|
||||
syn match purescriptOperatorType "\(::\|∷\)"
|
||||
\ nextgroup=purescriptForall,purescriptType skipwhite skipnl skipempty
|
||||
syn match purescriptOperatorFunction "\(->\|<-\|[\\→←]\)"
|
||||
syn match purescriptOperatorTypeSig "\(->\|<-\|=>\|<=\|::\|[∷∀→←⇒⇐]\)" contained
|
||||
\ nextgroup=purescriptType skipwhite skipnl skipempty
|
||||
|
||||
" Type definition
|
||||
syn region purescriptData start="^data\s\+\([A-Z]\w*\)" end="^\S"me=s-1,re=s-1 transparent
|
||||
syn match purescriptDataStart "^data\s\+\([A-Z]\w*\)" contained
|
||||
\ containedin=purescriptData
|
||||
\ contains=purescriptStructure,purescriptType,purescriptTypeVar
|
||||
syn match purescriptForeignData "\<foreign\s\+import\s\+data\>"
|
||||
\ contains=purescriptImportKeyword,purescriptStructure
|
||||
\ nextgroup=purescriptType skipwhite
|
||||
|
||||
syn region purescriptNewtype start="^newtype\s\+\([A-Z]\w*\)" end="^\S"me=s-1,re=s-1 transparent
|
||||
syn match purescriptNewtypeStart "^newtype\s\+\([A-Z]\w*\)" contained
|
||||
\ containedin=purescriptNewtype
|
||||
\ contains=purescriptStructure,purescriptType,purescriptTypeVar
|
||||
|
||||
syn region purescriptTypeAlias start="^type\s\+\([A-Z]\w*\)" end="^\S"me=s-1,re=s-1 transparent
|
||||
syn match purescriptTypeAliasStart "^type\s\+\([A-Z]\w*\)" contained
|
||||
\ containedin=purescriptTypeAlias
|
||||
\ contains=purescriptStructure,purescriptType,purescriptTypeVar
|
||||
|
||||
" String
|
||||
syn match purescriptChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
|
||||
syn region purescriptString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region purescriptMultilineString start=+"""+ end=+"""+ fold
|
||||
|
||||
" Comment
|
||||
syn match purescriptLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
|
||||
syn region purescriptBlockComment start="{-" end="-}" fold
|
||||
\ contains=purescriptBlockComment
|
||||
syn cluster purescriptComment contains=purescriptLineComment,purescriptBlockComment
|
||||
|
||||
syn sync minlines=50
|
||||
|
||||
" highlight links
|
||||
highlight def link purescriptModuleKeyword purescriptKeyword
|
||||
highlight def link purescriptModuleName Include
|
||||
highlight def link purescriptModuleParams purescriptDelimiter
|
||||
highlight def link purescriptImportKeyword purescriptKeyword
|
||||
highlight def link purescriptAsKeyword purescriptKeyword
|
||||
highlight def link purescriptHidingKeyword purescriptKeyword
|
||||
|
||||
highlight def link purescriptImport Structure
|
||||
highlight def link purescriptQualifiedImport Structure
|
||||
highlight def link purescriptModule Structure
|
||||
highlight def link purescriptStructure Structure
|
||||
highlight def link purescriptStatement Statement
|
||||
highlight def link purescriptConditional Conditional
|
||||
highlight def link purescriptWhere purescriptKeyword
|
||||
highlight def link purescriptInfixKeyword purescriptKeyword
|
||||
|
||||
highlight def link purescriptBoolean Boolean
|
||||
highlight def link purescriptNumber Number
|
||||
highlight def link purescriptFloat Float
|
||||
|
||||
highlight def link purescriptDelimiter Delimiter
|
||||
highlight def link purescriptInfix PreProc
|
||||
highlight def link purescriptOperators Operator
|
||||
highlight def link purescriptDot Operator
|
||||
highlight def link purescriptType Include
|
||||
highlight def link purescriptLineComment Comment
|
||||
highlight def link purescriptBlockComment Comment
|
||||
|
||||
highlight def link purescriptOperatorTypeSig purescriptOperatorType
|
||||
highlight def link purescriptOperatorFunction purescriptOperatorType
|
||||
highlight def link purescriptOperatorType purescriptOperator
|
||||
|
||||
highlight def link purescriptConstructorDecl purescriptConstructor
|
||||
highlight def link purescriptConstructor purescriptFunction
|
||||
|
||||
highlight def link purescriptTypeVar Identifier
|
||||
highlight def link purescriptForall purescriptStatement
|
||||
|
||||
highlight def link purescriptChar String
|
||||
highlight def link purescriptBacktick purescriptOperator
|
||||
highlight def link purescriptString String
|
||||
highlight def link purescriptMultilineString String
|
||||
highlight def link purescriptChar String
|
||||
highlight def link purescriptBacktick Operator
|
||||
|
||||
highlight def link purescriptLineComment purescriptComment
|
||||
highlight def link purescriptBlockComment purescriptComment
|
||||
|
||||
" purescript general highlights
|
||||
highlight def link purescriptStructure purescriptKeyword
|
||||
highlight def link purescriptKeyword Keyword
|
||||
highlight def link purescriptStatement Statement
|
||||
highlight def link purescriptOperator Operator
|
||||
highlight def link purescriptFunction Function
|
||||
highlight def link purescriptType Type
|
||||
highlight def link purescriptComment Comment
|
||||
|
||||
let b:current_syntax = "purescript"
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" this file uses line continuations
|
||||
let s:cpo_sav = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Folding Config {{{1
|
||||
if has("folding") && exists("ruby_fold")
|
||||
setlocal foldmethod=syntax
|
||||
@@ -140,7 +144,7 @@ endif
|
||||
syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)*\s*(\@="
|
||||
|
||||
syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained
|
||||
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter
|
||||
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" oneline display contains=rubyBlockParameter
|
||||
|
||||
syn match rubyInvalidVariable "$[^ A-Za-z_-]"
|
||||
syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]#
|
||||
@@ -544,6 +548,9 @@ hi def link rubySpaceError rubyError
|
||||
" Postscript {{{1
|
||||
let b:current_syntax = "ruby"
|
||||
|
||||
let &cpo = s:cpo_sav
|
||||
unlet! s:cpo_sav
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:
|
||||
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1
|
||||
" Vim syntax file
|
||||
" Language: tmux(1) configuration file
|
||||
" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net>
|
||||
" Last Change: $Date: 2010-07-27 18:29:07 $
|
||||
" License: This file is placed in the public domain.
|
||||
"
|
||||
" To install this file:
|
||||
@@ -230,6 +229,8 @@ syn keyword tmuxOptsSet
|
||||
\ set-titles
|
||||
\ set-titles-string
|
||||
\ status
|
||||
\ status-bg
|
||||
\ status-fg
|
||||
\ status-interval
|
||||
\ status-justify
|
||||
\ status-keys
|
||||
@@ -274,6 +275,7 @@ syn keyword tmuxOptsSetw
|
||||
\ window-active-style
|
||||
\ window-status-activity-style
|
||||
\ window-status-bell-style
|
||||
\ window-status-current-bg
|
||||
\ window-status-current-format
|
||||
\ window-status-current-style
|
||||
\ window-status-format
|
||||
|
||||
@@ -124,7 +124,7 @@ syntax keyword typescriptGlobalObjects Array Boolean Date Function Infinity Math
|
||||
|
||||
syntax keyword typescriptExceptions try catch throw finally Error EvalError RangeError ReferenceError SyntaxError TypeError URIError
|
||||
|
||||
syntax keyword typescriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public type namespace from get set
|
||||
syntax keyword typescriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws goto private transient debugger implements protected volatile double import public type namespace from get set
|
||||
"}}}
|
||||
"" typescript/DOM/HTML/CSS specified things"{{{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user