mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Change julia provider to JuliaEditorSupport/julia-vim, closes #253
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax case match
|
||||
|
||||
syntax keyword fishKeyword begin function end
|
||||
syntax keyword fishConditional if else switch
|
||||
syntax keyword fishRepeat while for in
|
||||
syntax keyword fishLabel case
|
||||
|
||||
syntax match fishComment /#.*/
|
||||
syntax match fishSpecial /\\$/
|
||||
syntax match fishIdentifier /\$[[:alnum:]_]\+/
|
||||
syntax region fishString start=/'/ skip=/\\'/ end=/'/
|
||||
syntax region fishString start=/"/ skip=/\\"/ end=/"/ contains=fishIdentifier
|
||||
syntax match fishCharacter /\v\\[abefnrtv *?~%#(){}\[\]<>&;"']|\\[xX][0-9a-f]{1,2}|\\o[0-7]{1,2}|\\u[0-9a-f]{1,4}|\\U[0-9a-f]{1,8}|\\c[a-z]/
|
||||
syntax match fishStatement /\v;\s*\zs\k+>/
|
||||
syntax match fishCommandSub /\v\(\s*\zs\k+>/
|
||||
|
||||
syntax region fishLineContinuation matchgroup=fishStatement
|
||||
\ start='\v^\s*\zs\k+>' skip='\\$' end='$'
|
||||
\ contains=fishSpecial,fishIdentifier,fishString,fishCharacter,fishStatement,fishCommandSub,fishComment
|
||||
|
||||
highlight default link fishKeyword Keyword
|
||||
highlight default link fishConditional Conditional
|
||||
highlight default link fishRepeat Repeat
|
||||
highlight default link fishLabel Label
|
||||
highlight default link fishComment Comment
|
||||
highlight default link fishSpecial Special
|
||||
highlight default link fishIdentifier Identifier
|
||||
highlight default link fishString String
|
||||
highlight default link fishCharacter Character
|
||||
highlight default link fishStatement Statement
|
||||
highlight default link fishCommandSub fishStatement
|
||||
|
||||
let b:current_syntax = 'fish'
|
||||
|
||||
endif
|
||||
@@ -1,269 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: F#
|
||||
" Last Change: Sun 19 Oct 2014 11:11:44 PM CEST
|
||||
" Maintainer: Gregor Uhlenheuer <kongo2002@googlemail.com>
|
||||
"
|
||||
" Note: This syntax file is a complete rewrite of the original version
|
||||
" of fs.vim from Choy Rim <choy.rim@gmail.com> and a slight
|
||||
" modified version from Thomas Schank <ThomasSchank@gmail.com>
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
" F# is case sensitive.
|
||||
syn case match
|
||||
|
||||
" reset 'iskeyword' setting
|
||||
setl isk&vim
|
||||
|
||||
" Scripting/preprocessor directives
|
||||
syn match fsharpSScript "^\s*#\S\+" transparent contains=fsharpScript,fsharpRegion,fsharpPreCondit
|
||||
|
||||
syn match fsharpScript contained "#"
|
||||
syn keyword fsharpScript contained quitlabels warnings directory cd load use
|
||||
syn keyword fsharpScript contained install_printer remove_printer requirethread
|
||||
syn keyword fsharpScript contained trace untrace untrace_all print_depth
|
||||
syn keyword fsharpScript contained print_length define undef if elif else endif
|
||||
syn keyword fsharpScript contained line error warning light nowarn
|
||||
|
||||
|
||||
" comments
|
||||
syn match fsharpSingleLineComment "//.*$" contains=fsharpTodo,@Spell
|
||||
syn region fsharpDocComment start="///" end="$" contains=fsharpTodo,fsharpXml,@Spell keepend oneline
|
||||
syn region fsharpXml matchgroup=fsharpXmlDoc start="<[^>]\+>" end="</[^>]\+>" contained contains=fsharpXml
|
||||
|
||||
" Double-backtick identifiers
|
||||
syn region fsharpDoubleBacktick start="``" end="``" keepend oneline
|
||||
|
||||
|
||||
" symbol names
|
||||
syn match fsharpSymbol "\%(let\|use\|mutable\|rec\|and\|private\)\@<=!\=\s\+\zs\w\+\ze\s*[^=:]*[=:]"
|
||||
syn match fsharpSymbol "\%(member\)\@<=\s\+\w\+\.\zs\w\+"
|
||||
|
||||
|
||||
" types
|
||||
syn match fsharpTypeName "\%(\<type\s\+\)\@<=\w\+"
|
||||
|
||||
|
||||
" errors
|
||||
syn match fsharpBraceErr "}"
|
||||
syn match fsharpBrackErr "\]"
|
||||
syn match fsharpParenErr ")"
|
||||
syn match fsharpArrErr "|]"
|
||||
syn match fsharpCommentErr "\*)"
|
||||
|
||||
|
||||
" enclosing delimiters
|
||||
syn region fsharpEncl transparent matchgroup=fsharpKeyword start="(" matchgroup=fsharpKeyword end=")" contains=ALLBUT,fsharpParenErr,fsharpScript
|
||||
syn region fsharpEncl transparent matchgroup=fsharpKeyword start="{" matchgroup=fsharpKeyword end="}" contains=ALLBUT,fsharpBraceErr,fsharpScript
|
||||
syn region fsharpEncl transparent matchgroup=fsharpKeyword start="\[" matchgroup=fsharpKeyword end="\]" contains=ALLBUT,fsharpBrackErr,fsharpScript
|
||||
syn region fsharpEncl transparent matchgroup=fsharpKeyword start="\[|" matchgroup=fsharpKeyword end="|\]" contains=ALLBUT,fsharpArrErr,fsharpScript
|
||||
|
||||
|
||||
" comments
|
||||
syn region fsharpMultiLineComment start="(\*" end="\*)" contains=fsharpTodo
|
||||
syn keyword fsharpTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
" keywords
|
||||
syn keyword fsharpKeyword abstract as assert base begin class default delegate
|
||||
syn keyword fsharpKeyword do done downcast downto elif else end exception
|
||||
syn keyword fsharpKeyword extern for fun function global if in inherit inline
|
||||
syn keyword fsharpKeyword interface lazy let match member module mutable
|
||||
syn keyword fsharpKeyword namespace new of override rec static struct then
|
||||
syn keyword fsharpKeyword to type upcast use val void when while with
|
||||
|
||||
syn keyword fsharpKeyword async atomic break checked component const constraint
|
||||
syn keyword fsharpKeyword constructor continue decimal eager event external
|
||||
syn keyword fsharpKeyword fixed functor include method mixin object parallel
|
||||
syn keyword fsharpKeyword process pure return seq tailcall trait
|
||||
|
||||
" additional operator keywords (Microsoft.FSharp.Core.Operators)
|
||||
syn keyword fsharpKeyword box hash sizeof typeof typedefof unbox ref fst snd
|
||||
syn keyword fsharpKeyword stdin stdout stderr
|
||||
|
||||
" math operators (Microsoft.FSharp.Core.Operators)
|
||||
syn keyword fsharpKeyword abs acos asin atan atan2 ceil cos cosh exp floor log
|
||||
syn keyword fsharpKeyword log10 pown round sign sin sinh sqrt tan tanh
|
||||
|
||||
syn keyword fsharpOCaml asr land lor lsl lsr lxor mod sig
|
||||
|
||||
if !exists('g:fsharp_no_linq') || g:fsharp_no_linq == 0
|
||||
syn keyword fsharpLinq orderBy select where yield
|
||||
endif
|
||||
|
||||
" open
|
||||
syn keyword fsharpOpen open
|
||||
|
||||
" exceptions
|
||||
syn keyword fsharpException try failwith failwithf finally invalid_arg raise
|
||||
syn keyword fsharpException rethrow
|
||||
|
||||
" modifiers
|
||||
syn keyword fsharpModifier abstract const extern internal override private
|
||||
syn keyword fsharpModifier protected public readonly sealed static virtual
|
||||
syn keyword fsharpModifier volatile
|
||||
|
||||
" constants
|
||||
syn keyword fsharpConstant null
|
||||
syn keyword fsharpBoolean false true
|
||||
|
||||
" types
|
||||
syn keyword fsharpType array bool byte char decimal double enum exn float
|
||||
syn keyword fsharpType float32 int int16 int32 int64 lazy_t list nativeint
|
||||
syn keyword fsharpType obj option sbyte single string uint uint32 uint64
|
||||
syn keyword fsharpType uint16 unativeint unit
|
||||
|
||||
" core classes
|
||||
syn match fsharpCore "\u\a*\." transparent contains=fsharpCoreClass
|
||||
|
||||
syn keyword fsharpCoreClass Array Async Directory File List Option Path Map Set contained
|
||||
syn keyword fsharpCoreClass String Seq Tuple contained
|
||||
|
||||
syn keyword fsharpCoreMethod printf printfn sprintf eprintf eprintfn fprintf
|
||||
syn keyword fsharpCoreMethod fprintfn
|
||||
|
||||
" options
|
||||
syn keyword fsharpOption Some None
|
||||
|
||||
" operators
|
||||
syn keyword fsharpOperator not and or
|
||||
|
||||
syn match fsharpFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bscdiuxXoEefFgGMOAat]\|\[\^\=.[^]]*\]\)" contained
|
||||
|
||||
syn match fsharpCharacter "'\\\d\d\d'\|'\\[\'ntbr]'\|'.'"
|
||||
syn match fsharpCharErr "'\\\d\d'\|'\\\d'"
|
||||
syn match fsharpCharErr "'\\[^\'ntbr]'"
|
||||
syn region fsharpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=fsharpFormat
|
||||
syn region fsharpString start=+"""+ skip=+\\\\\|\\"+ end=+"""+ contains=fsharpFormat
|
||||
syn region fsharpString start=+@"+ skip=+""+ end=+"+ contains=fsharpFormat
|
||||
|
||||
syn match fsharpFunDef "->"
|
||||
syn match fsharpRefAssign ":="
|
||||
syn match fsharpTopStop ";;"
|
||||
syn match fsharpOperator "\^"
|
||||
syn match fsharpOperator "::"
|
||||
|
||||
syn match fsharpLabel "\<_\>"
|
||||
|
||||
syn match fsharpOperator "&&"
|
||||
syn match fsharpOperator "<"
|
||||
syn match fsharpOperator ">"
|
||||
syn match fsharpOperator "|>"
|
||||
syn match fsharpOperator ":>"
|
||||
syn match fsharpOperator ":?>"
|
||||
syn match fsharpOperator "&&&"
|
||||
syn match fsharpOperator "|||"
|
||||
syn match fsharpOperator "\.\."
|
||||
|
||||
syn match fsharpKeyChar "|[^\]]"me=e-1
|
||||
syn match fsharpKeyChar ";"
|
||||
syn match fsharpKeyChar "\~"
|
||||
syn match fsharpKeyChar "?"
|
||||
syn match fsharpKeyChar "\*"
|
||||
syn match fsharpKeyChar "+"
|
||||
syn match fsharpKeyChar "="
|
||||
syn match fsharpKeyChar "|"
|
||||
syn match fsharpKeyChar "(\*)"
|
||||
|
||||
syn match fsharpOperator "<-"
|
||||
|
||||
syn match fsharpNumber "\<\d\+"
|
||||
syn match fsharpNumber "\<-\=\d\(_\|\d\)*\(u\|u\?[yslLn]\|UL\)\?\>"
|
||||
syn match fsharpNumber "\<-\=0[x|X]\(\x\|_\)\+\(u\|u\?[yslLn]\|UL\)\?\>"
|
||||
syn match fsharpNumber "\<-\=0[o|O]\(\o\|_\)\+\(u\|u\?[yslLn]\|UL\)\?\>"
|
||||
syn match fsharpNumber "\<-\=0[b|B]\([01]\|_\)\+\(u\|u\?[yslLn]\|UL\)\?\>"
|
||||
syn match fsharpFloat "\<-\=\d\(_\|\d\)*\.\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>"
|
||||
syn match fsharpFloat "\<-\=\d\(_\|\d\)*\.\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>"
|
||||
syn match fsharpFloat "\<\d\+\.\d*"
|
||||
|
||||
" modules
|
||||
syn match fsharpModule "\%(\<open\s\+\)\@<=[a-zA-Z.]\+"
|
||||
|
||||
" attributes
|
||||
syn region fsharpAttrib matchgroup=fsharpAttribute start="\[<" end=">]"
|
||||
|
||||
" regions
|
||||
syn region fsharpRegion matchgroup=fsharpPreCondit start="\%(end\)\@<!region.*$"
|
||||
\ end="endregion" fold contains=ALL contained
|
||||
|
||||
if version >= 508 || !exists("did_fs_syntax_inits")
|
||||
if version < 508
|
||||
let did_fs_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink fsharpBraceErr Error
|
||||
HiLink fsharpBrackErr Error
|
||||
HiLink fsharpParenErr Error
|
||||
HiLink fsharpArrErr Error
|
||||
HiLink fsharpCommentErr Error
|
||||
|
||||
HiLink fsharpSingleLineComment Comment
|
||||
HiLink fsharpMultiLineComment Comment
|
||||
HiLink fsharpDocComment Comment
|
||||
HiLink fsharpXml Comment
|
||||
HiLink fsharpDoubleBacktick String
|
||||
|
||||
HiLink fsharpOpen Include
|
||||
HiLink fsharpModPath Include
|
||||
HiLink fsharpScript Include
|
||||
HiLink fsharpPreCondit Include
|
||||
|
||||
HiLink fsharpKeyword Keyword
|
||||
HiLink fsharpCoreMethod Keyword
|
||||
|
||||
HiLink fsharpOCaml Statement
|
||||
HiLink fsharpLinq Statement
|
||||
|
||||
HiLink fsharpSymbol Function
|
||||
|
||||
HiLink fsharpFunDef Operator
|
||||
HiLink fsharpRefAssign Operator
|
||||
HiLink fsharpTopStop Operator
|
||||
HiLink fsharpKeyChar Operator
|
||||
HiLink fsharpOperator Operator
|
||||
|
||||
HiLink fsharpBoolean Boolean
|
||||
HiLink fsharpConstant Constant
|
||||
HiLink fsharpCharacter Character
|
||||
HiLink fsharpNumber Number
|
||||
HiLink fsharpFloat Float
|
||||
|
||||
HiLink fsharpString String
|
||||
HiLink fsharpFormat Special
|
||||
|
||||
HiLink fsharpModifier StorageClass
|
||||
|
||||
HiLink fsharpException Exception
|
||||
|
||||
HiLink fsharpLabel Identifier
|
||||
HiLink fsharpOption Identifier
|
||||
HiLink fsharpTypeName Identifier
|
||||
HiLink fsharpModule Identifier
|
||||
|
||||
HiLink fsharpType Type
|
||||
|
||||
HiLink fsharpCoreClass Typedef
|
||||
HiLink fsharpAttrib Typedef
|
||||
HiLink fsharpXmlDoc Typedef
|
||||
|
||||
HiLink fsharpTodo Todo
|
||||
|
||||
HiLink fsharpEncl Delimiter
|
||||
HiLink fsharpAttribute Delimiter
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = 'fsharp'
|
||||
|
||||
" vim: sw=4 et sts=4
|
||||
|
||||
endif
|
||||
@@ -1,82 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: generic git output
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 May 21
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
syn sync minlines=50
|
||||
|
||||
syn include @gitDiff syntax/diff.vim
|
||||
|
||||
syn region gitHead start=/\%^/ end=/^$/
|
||||
syn region gitHead start=/\%(^commit\%( \x\{40\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/
|
||||
|
||||
" For git reflog and git show ...^{tree}, avoid sync issues
|
||||
syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/
|
||||
syn match gitHead /^\x\{40\} \x\{40}\t.*/
|
||||
|
||||
syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold
|
||||
syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\) \|$\)\@=/ contains=@gitDiff
|
||||
|
||||
syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff
|
||||
syn region gitDiffMerge start=/^\%(@@@@* -\)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff
|
||||
syn match gitDiffAdded "^ \++.*" contained containedin=gitDiffMerge
|
||||
syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge
|
||||
|
||||
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite
|
||||
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
|
||||
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitMode /^\d\{6\}/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
|
||||
syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite
|
||||
|
||||
syn match gitReflogHeader /^Reflog:/ contained containedin=gitHead nextgroup=gitReflogMiddle skipwhite
|
||||
syn match gitReflogHeader /^Reflog message:/ contained containedin=gitHead skipwhite
|
||||
syn match gitReflogMiddle /\S\+@{\d\+} (/he=e-2 nextgroup=gitIdentity
|
||||
|
||||
syn match gitDate /\<\u\l\l \u\l\l \d\=\d \d\d:\d\d:\d\d \d\d\d\d [+-]\d\d\d\d/ contained
|
||||
syn match gitDate /-\=\d\+ [+-]\d\d\d\d\>/ contained
|
||||
syn match gitDate /\<\d\+ \l\+ ago\>/ contained
|
||||
syn match gitType /\<\%(tag\|commit\|tree\|blob\)\>/ contained nextgroup=gitHash skipwhite
|
||||
syn match gitStage /\<\d\t\@=/ contained
|
||||
syn match gitReference /\S\+\S\@!/ contained
|
||||
syn match gitHash /\<\x\{40\}\>/ contained nextgroup=gitIdentity,gitStage,gitHash skipwhite
|
||||
syn match gitHash /^\<\x\{40\}\>/ containedin=gitHead contained nextgroup=gitHash skipwhite
|
||||
syn match gitHashAbbrev /\<\x\{4,40\}\>/ contained nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite
|
||||
|
||||
syn match gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite
|
||||
syn region gitEmail matchgroup=gitEmailDelimiter start=/</ end=/>/ keepend oneline contained containedin=gitIdentity
|
||||
|
||||
syn match gitNotesHeader /^Notes:\ze\n /
|
||||
|
||||
hi def link gitDateHeader gitIdentityHeader
|
||||
hi def link gitIdentityHeader gitIdentityKeyword
|
||||
hi def link gitIdentityKeyword Label
|
||||
hi def link gitNotesHeader gitKeyword
|
||||
hi def link gitReflogHeader gitKeyword
|
||||
hi def link gitKeyword Keyword
|
||||
hi def link gitIdentity String
|
||||
hi def link gitEmailDelimiter Delimiter
|
||||
hi def link gitEmail Special
|
||||
hi def link gitDate Number
|
||||
hi def link gitMode Number
|
||||
hi def link gitHashAbbrev gitHash
|
||||
hi def link gitHash Identifier
|
||||
hi def link gitReflogMiddle gitReference
|
||||
hi def link gitReference Function
|
||||
hi def link gitStage gitType
|
||||
hi def link gitType Type
|
||||
hi def link gitDiffAdded diffAdded
|
||||
hi def link gitDiffRemoved diffRemoved
|
||||
|
||||
let b:current_syntax = "git"
|
||||
|
||||
endif
|
||||
@@ -1,88 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: git commit file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.git/COMMIT_EDITMSG
|
||||
" Last Change: 2013 May 30
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
syn sync minlines=50
|
||||
|
||||
if has("spell")
|
||||
syn spell toplevel
|
||||
endif
|
||||
|
||||
syn include @gitcommitDiff syntax/diff.vim
|
||||
syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff
|
||||
|
||||
syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
|
||||
syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
|
||||
syn match gitcommitOverflow ".*" contained contains=@Spell
|
||||
syn match gitcommitBlank "^[^#].*" contained contains=@Spell
|
||||
syn match gitcommitComment "^#.*"
|
||||
syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent
|
||||
syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
|
||||
syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
|
||||
syn match gitcommitBranch "[^ ']\+" contained
|
||||
syn match gitcommitNoBranch "\%(^# \)\@<=Not currently on any branch." contained containedin=gitcommitComment
|
||||
syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment
|
||||
syn region gitcommitAuthor matchgroup=gitCommitHeader start=/\%(^# \)\@<=\%(Author\|Committer\):/ end=/$/ keepend oneline contained containedin=gitcommitComment transparent
|
||||
syn match gitcommitNoChanges "\%(^# \)\@<=No changes$" contained containedin=gitcommitComment
|
||||
|
||||
syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
|
||||
syn match gitcommitUntrackedFile "\t\@<=.*" contained
|
||||
|
||||
syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but not updated\):/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
|
||||
syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold
|
||||
syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold
|
||||
|
||||
|
||||
syn match gitcommitDiscardedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite
|
||||
syn match gitcommitSelectedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite
|
||||
syn match gitcommitUnmergedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite
|
||||
syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow
|
||||
syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
|
||||
syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow
|
||||
syn match gitcommitDiscardedArrow " -> " contained nextgroup=gitcommitDiscardedFile
|
||||
syn match gitcommitSelectedArrow " -> " contained nextgroup=gitcommitSelectedFile
|
||||
syn match gitcommitUnmergedArrow " -> " contained nextgroup=gitcommitSelectedFile
|
||||
|
||||
syn match gitcommitWarning "\%^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl
|
||||
syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl contained
|
||||
syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$"
|
||||
|
||||
hi def link gitcommitSummary Keyword
|
||||
hi def link gitcommitComment Comment
|
||||
hi def link gitcommitUntracked gitcommitComment
|
||||
hi def link gitcommitDiscarded gitcommitComment
|
||||
hi def link gitcommitSelected gitcommitComment
|
||||
hi def link gitcommitUnmerged gitcommitComment
|
||||
hi def link gitcommitOnBranch Comment
|
||||
hi def link gitcommitBranch Special
|
||||
hi def link gitcommitNoBranch gitCommitBranch
|
||||
hi def link gitcommitDiscardedType gitcommitType
|
||||
hi def link gitcommitSelectedType gitcommitType
|
||||
hi def link gitcommitUnmergedType gitcommitType
|
||||
hi def link gitcommitType Type
|
||||
hi def link gitcommitNoChanges gitcommitHeader
|
||||
hi def link gitcommitHeader PreProc
|
||||
hi def link gitcommitUntrackedFile gitcommitFile
|
||||
hi def link gitcommitDiscardedFile gitcommitFile
|
||||
hi def link gitcommitSelectedFile gitcommitFile
|
||||
hi def link gitcommitUnmergedFile gitcommitFile
|
||||
hi def link gitcommitFile Constant
|
||||
hi def link gitcommitDiscardedArrow gitcommitArrow
|
||||
hi def link gitcommitSelectedArrow gitcommitArrow
|
||||
hi def link gitcommitUnmergedArrow gitcommitArrow
|
||||
hi def link gitcommitArrow gitcommitComment
|
||||
"hi def link gitcommitOverflow Error
|
||||
hi def link gitcommitBlank Error
|
||||
|
||||
let b:current_syntax = "gitcommit"
|
||||
|
||||
endif
|
||||
@@ -1,42 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: git config file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: gitconfig, .gitconfig, *.git/config
|
||||
" Last Change: 2010 May 21
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal iskeyword+=-
|
||||
setlocal iskeyword-=_
|
||||
syn case ignore
|
||||
syn sync minlines=10
|
||||
|
||||
syn match gitconfigComment "[#;].*"
|
||||
syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
|
||||
syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
|
||||
syn match gitconfigVariable "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
|
||||
syn region gitconfigAssignment matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend
|
||||
syn keyword gitconfigBoolean true false yes no contained
|
||||
syn match gitconfigNumber "\d\+" contained
|
||||
syn region gitconfigString matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError
|
||||
syn match gitconfigError +\\.+ contained
|
||||
syn match gitconfigEscape +\\[\\"ntb]+ contained
|
||||
syn match gitconfigEscape +\\$+ contained
|
||||
|
||||
hi def link gitconfigComment Comment
|
||||
hi def link gitconfigSection Keyword
|
||||
hi def link gitconfigVariable Identifier
|
||||
hi def link gitconfigBoolean Boolean
|
||||
hi def link gitconfigNumber Number
|
||||
hi def link gitconfigString String
|
||||
hi def link gitconfigDelim Delimiter
|
||||
hi def link gitconfigEscape Delimiter
|
||||
hi def link gitconfigError Error
|
||||
|
||||
let b:current_syntax = "gitconfig"
|
||||
|
||||
endif
|
||||
@@ -1,44 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: git rebase --interactive
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: git-rebase-todo
|
||||
" Last Change: 2013 May 30
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn match gitrebaseHash "\v<\x{7,40}>" contained
|
||||
syn match gitrebaseCommit "\v<\x{7,40}>" nextgroup=gitrebaseSummary skipwhite
|
||||
syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
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 "^\s*#.*" contains=gitrebaseHash
|
||||
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
|
||||
|
||||
hi def link gitrebaseCommit gitrebaseHash
|
||||
hi def link gitrebaseHash Identifier
|
||||
hi def link gitrebasePick Statement
|
||||
hi def link gitrebaseReword Number
|
||||
hi def link gitrebaseEdit PreProc
|
||||
hi def link gitrebaseSquash Type
|
||||
hi def link gitrebaseFixup Special
|
||||
hi def link gitrebaseExec Function
|
||||
hi def link gitrebaseDrop Comment
|
||||
hi def link gitrebaseSummary String
|
||||
hi def link gitrebaseComment Comment
|
||||
hi def link gitrebaseSquashError Error
|
||||
|
||||
let b:current_syntax = "gitrebase"
|
||||
|
||||
endif
|
||||
@@ -1,27 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: git send-email message
|
||||
" Maintainer: Tim Pope
|
||||
" Filenames: .gitsendemail.*
|
||||
" Last Change: 2010 May 21
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/mail.vim
|
||||
unlet! b:current_syntax
|
||||
syn include @gitsendemailDiff syntax/diff.vim
|
||||
syn region gitsendemailDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^-- %/ fold contains=@gitsendemailDiff
|
||||
|
||||
syn case match
|
||||
|
||||
syn match gitsendemailComment "\%^From.*#.*"
|
||||
syn match gitsendemailComment "^GIT:.*"
|
||||
|
||||
hi def link gitsendemailComment Comment
|
||||
|
||||
let b:current_syntax = "gitsendemail"
|
||||
|
||||
endif
|
||||
679
syntax/glsl.vim
679
syntax/glsl.vim
@@ -1,679 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1
|
||||
|
||||
" Language: OpenGL Shading Language
|
||||
" Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io>
|
||||
|
||||
if exists("b:current_syntax") && b:current_syntax == "glsl"
|
||||
finish
|
||||
endif
|
||||
|
||||
" Statements
|
||||
syn keyword glslConditional if else switch case default
|
||||
syn keyword glslRepeat for while do
|
||||
syn keyword glslStatement discard return break continue
|
||||
|
||||
" Comments
|
||||
syn keyword glslTodo contained TODO FIXME XXX NOTE
|
||||
syn region glslCommentL start="//" skip="\\$" end="$" keepend contains=glslTodo,@Spell
|
||||
syn region glslComment matchgroup=glslCommentStart start="/\*" end="\*/" extend contains=glslTodo,@Spell
|
||||
|
||||
" Preprocessor
|
||||
syn region glslPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|else\|elif\|endif\)" skip="\\$" end="$" keepend
|
||||
syn region glslDefine start="^\s*#\s*\(define\|undef\)" skip="\\$" end="$" keepend
|
||||
syn keyword glslTokenConcat ##
|
||||
syn keyword glslPredefinedMacro __LINE__ __FILE__ __VERSION__ GL_ES
|
||||
syn region glslPreProc start="^\s*#\s*\(error\|pragma\|extension\|version\|line\)" skip="\\$" end="$" keepend
|
||||
|
||||
" Boolean Constants
|
||||
syn keyword glslBoolean true false
|
||||
|
||||
" Integer Numbers
|
||||
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\+\)\=\(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\}\>/
|
||||
syn match glslSwizzle display /\.[rgba]\{1,4\}\>/
|
||||
syn match glslSwizzle display /\.[stpq]\{1,4\}\>/
|
||||
|
||||
" Structure
|
||||
syn keyword glslStructure struct nextgroup=glslIdentifier skipwhite skipempty
|
||||
|
||||
syn match glslIdentifier contains=glslIdentifierPrime "\%([a-zA-Z_]\)\%([a-zA-Z0-9_]\)*" display contained
|
||||
|
||||
" Types
|
||||
syn keyword glslType atomic_uint
|
||||
syn keyword glslType bool
|
||||
syn keyword glslType bvec2
|
||||
syn keyword glslType bvec3
|
||||
syn keyword glslType bvec4
|
||||
syn keyword glslType dmat2
|
||||
syn keyword glslType dmat2x2
|
||||
syn keyword glslType dmat2x3
|
||||
syn keyword glslType dmat2x4
|
||||
syn keyword glslType dmat3
|
||||
syn keyword glslType dmat3x2
|
||||
syn keyword glslType dmat3x3
|
||||
syn keyword glslType dmat3x4
|
||||
syn keyword glslType dmat4
|
||||
syn keyword glslType dmat4x2
|
||||
syn keyword glslType dmat4x3
|
||||
syn keyword glslType dmat4x4
|
||||
syn keyword glslType double
|
||||
syn keyword glslType dvec2
|
||||
syn keyword glslType dvec3
|
||||
syn keyword glslType dvec4
|
||||
syn keyword glslType float
|
||||
syn keyword glslType iimage1D
|
||||
syn keyword glslType iimage1DArray
|
||||
syn keyword glslType iimage2D
|
||||
syn keyword glslType iimage2DArray
|
||||
syn keyword glslType iimage2DMS
|
||||
syn keyword glslType iimage2DMSArray
|
||||
syn keyword glslType iimage2DRect
|
||||
syn keyword glslType iimage3D
|
||||
syn keyword glslType iimageBuffer
|
||||
syn keyword glslType iimageCube
|
||||
syn keyword glslType iimageCubeArray
|
||||
syn keyword glslType image1D
|
||||
syn keyword glslType image1DArray
|
||||
syn keyword glslType image2D
|
||||
syn keyword glslType image2DArray
|
||||
syn keyword glslType image2DMS
|
||||
syn keyword glslType image2DMSArray
|
||||
syn keyword glslType image2DRect
|
||||
syn keyword glslType image3D
|
||||
syn keyword glslType imageBuffer
|
||||
syn keyword glslType imageCube
|
||||
syn keyword glslType imageCubeArray
|
||||
syn keyword glslType int
|
||||
syn keyword glslType isampler1D
|
||||
syn keyword glslType isampler1DArray
|
||||
syn keyword glslType isampler2D
|
||||
syn keyword glslType isampler2DArray
|
||||
syn keyword glslType isampler2DMS
|
||||
syn keyword glslType isampler2DMSArray
|
||||
syn keyword glslType isampler2DRect
|
||||
syn keyword glslType isampler3D
|
||||
syn keyword glslType isamplerBuffer
|
||||
syn keyword glslType isamplerCube
|
||||
syn keyword glslType isamplerCubeArray
|
||||
syn keyword glslType ivec2
|
||||
syn keyword glslType ivec3
|
||||
syn keyword glslType ivec4
|
||||
syn keyword glslType mat2
|
||||
syn keyword glslType mat2x2
|
||||
syn keyword glslType mat2x3
|
||||
syn keyword glslType mat2x4
|
||||
syn keyword glslType mat3
|
||||
syn keyword glslType mat3x2
|
||||
syn keyword glslType mat3x3
|
||||
syn keyword glslType mat3x4
|
||||
syn keyword glslType mat4
|
||||
syn keyword glslType mat4x2
|
||||
syn keyword glslType mat4x3
|
||||
syn keyword glslType mat4x4
|
||||
syn keyword glslType sampler1D
|
||||
syn keyword glslType sampler1DArray
|
||||
syn keyword glslType sampler1DArrayShadow
|
||||
syn keyword glslType sampler1DShadow
|
||||
syn keyword glslType sampler2D
|
||||
syn keyword glslType sampler2DArray
|
||||
syn keyword glslType sampler2DArrayShadow
|
||||
syn keyword glslType sampler2DMS
|
||||
syn keyword glslType sampler2DMSArray
|
||||
syn keyword glslType sampler2DRect
|
||||
syn keyword glslType sampler2DRectShadow
|
||||
syn keyword glslType sampler2DShadow
|
||||
syn keyword glslType sampler3D
|
||||
syn keyword glslType samplerBuffer
|
||||
syn keyword glslType samplerCube
|
||||
syn keyword glslType samplerCubeArray
|
||||
syn keyword glslType samplerCubeArrayShadow
|
||||
syn keyword glslType samplerCubeShadow
|
||||
syn keyword glslType uimage1D
|
||||
syn keyword glslType uimage1DArray
|
||||
syn keyword glslType uimage2D
|
||||
syn keyword glslType uimage2DArray
|
||||
syn keyword glslType uimage2DMS
|
||||
syn keyword glslType uimage2DMSArray
|
||||
syn keyword glslType uimage2DRect
|
||||
syn keyword glslType uimage3D
|
||||
syn keyword glslType uimageBuffer
|
||||
syn keyword glslType uimageCube
|
||||
syn keyword glslType uimageCubeArray
|
||||
syn keyword glslType uint
|
||||
syn keyword glslType usampler1D
|
||||
syn keyword glslType usampler1DArray
|
||||
syn keyword glslType usampler2D
|
||||
syn keyword glslType usampler2DArray
|
||||
syn keyword glslType usampler2DMS
|
||||
syn keyword glslType usampler2DMSArray
|
||||
syn keyword glslType usampler2DRect
|
||||
syn keyword glslType usampler3D
|
||||
syn keyword glslType usamplerBuffer
|
||||
syn keyword glslType usamplerCube
|
||||
syn keyword glslType usamplerCubeArray
|
||||
syn keyword glslType uvec2
|
||||
syn keyword glslType uvec3
|
||||
syn keyword glslType uvec4
|
||||
syn keyword glslType vec2
|
||||
syn keyword glslType vec3
|
||||
syn keyword glslType vec4
|
||||
syn keyword glslType void
|
||||
|
||||
" Qualifiers
|
||||
syn keyword glslQualifier align
|
||||
syn keyword glslQualifier attribute
|
||||
syn keyword glslQualifier binding
|
||||
syn keyword glslQualifier buffer
|
||||
syn keyword glslQualifier ccw
|
||||
syn keyword glslQualifier centroid
|
||||
syn keyword glslQualifier centroid varying
|
||||
syn keyword glslQualifier coherent
|
||||
syn keyword glslQualifier column_major
|
||||
syn keyword glslQualifier const
|
||||
syn keyword glslQualifier cw
|
||||
syn keyword glslQualifier depth_any
|
||||
syn keyword glslQualifier depth_greater
|
||||
syn keyword glslQualifier depth_less
|
||||
syn keyword glslQualifier depth_unchanged
|
||||
syn keyword glslQualifier early_fragment_tests
|
||||
syn keyword glslQualifier equal_spacing
|
||||
syn keyword glslQualifier flat
|
||||
syn keyword glslQualifier fractional_even_spacing
|
||||
syn keyword glslQualifier fractional_odd_spacing
|
||||
syn keyword glslQualifier highp
|
||||
syn keyword glslQualifier in
|
||||
syn keyword glslQualifier index
|
||||
syn keyword glslQualifier inout
|
||||
syn keyword glslQualifier invariant
|
||||
syn keyword glslQualifier invocations
|
||||
syn keyword glslQualifier isolines
|
||||
syn keyword glslQualifier layout
|
||||
syn keyword glslQualifier line_strip
|
||||
syn keyword glslQualifier lines
|
||||
syn keyword glslQualifier lines_adjacency
|
||||
syn keyword glslQualifier local_size_x
|
||||
syn keyword glslQualifier local_size_y
|
||||
syn keyword glslQualifier local_size_z
|
||||
syn keyword glslQualifier location
|
||||
syn keyword glslQualifier lowp
|
||||
syn keyword glslQualifier max_vertices
|
||||
syn keyword glslQualifier mediump
|
||||
syn keyword glslQualifier noperspective
|
||||
syn keyword glslQualifier offset
|
||||
syn keyword glslQualifier origin_upper_left
|
||||
syn keyword glslQualifier out
|
||||
syn keyword glslQualifier packed
|
||||
syn keyword glslQualifier patch
|
||||
syn keyword glslQualifier pixel_center_integer
|
||||
syn keyword glslQualifier point_mode
|
||||
syn keyword glslQualifier points
|
||||
syn keyword glslQualifier precise
|
||||
syn keyword glslQualifier precision
|
||||
syn keyword glslQualifier quads
|
||||
syn keyword glslQualifier r11f_g11f_b10f
|
||||
syn keyword glslQualifier r16
|
||||
syn keyword glslQualifier r16_snorm
|
||||
syn keyword glslQualifier r16f
|
||||
syn keyword glslQualifier r16i
|
||||
syn keyword glslQualifier r16ui
|
||||
syn keyword glslQualifier r32f
|
||||
syn keyword glslQualifier r32i
|
||||
syn keyword glslQualifier r32ui
|
||||
syn keyword glslQualifier r8
|
||||
syn keyword glslQualifier r8_snorm
|
||||
syn keyword glslQualifier r8i
|
||||
syn keyword glslQualifier r8ui
|
||||
syn keyword glslQualifier readonly
|
||||
syn keyword glslQualifier restrict
|
||||
syn keyword glslQualifier rg16
|
||||
syn keyword glslQualifier rg16_snorm
|
||||
syn keyword glslQualifier rg16f
|
||||
syn keyword glslQualifier rg16i
|
||||
syn keyword glslQualifier rg16ui
|
||||
syn keyword glslQualifier rg32f
|
||||
syn keyword glslQualifier rg32i
|
||||
syn keyword glslQualifier rg32ui
|
||||
syn keyword glslQualifier rg8
|
||||
syn keyword glslQualifier rg8_snorm
|
||||
syn keyword glslQualifier rg8i
|
||||
syn keyword glslQualifier rg8ui
|
||||
syn keyword glslQualifier rgb10_a2
|
||||
syn keyword glslQualifier rgb10_a2ui
|
||||
syn keyword glslQualifier rgba16
|
||||
syn keyword glslQualifier rgba16_snorm
|
||||
syn keyword glslQualifier rgba16f
|
||||
syn keyword glslQualifier rgba16i
|
||||
syn keyword glslQualifier rgba16ui
|
||||
syn keyword glslQualifier rgba32f
|
||||
syn keyword glslQualifier rgba32i
|
||||
syn keyword glslQualifier rgba32ui
|
||||
syn keyword glslQualifier rgba8
|
||||
syn keyword glslQualifier rgba8_snorm
|
||||
syn keyword glslQualifier rgba8i
|
||||
syn keyword glslQualifier rgba8ui
|
||||
syn keyword glslQualifier row_major
|
||||
syn keyword glslQualifier sample
|
||||
syn keyword glslQualifier shared
|
||||
syn keyword glslQualifier smooth
|
||||
syn keyword glslQualifier std140
|
||||
syn keyword glslQualifier std430
|
||||
syn keyword glslQualifier stream
|
||||
syn keyword glslQualifier triangle_strip
|
||||
syn keyword glslQualifier triangles
|
||||
syn keyword glslQualifier triangles_adjacency
|
||||
syn keyword glslQualifier uniform
|
||||
syn keyword glslQualifier varying
|
||||
syn keyword glslQualifier vertices
|
||||
syn keyword glslQualifier volatile
|
||||
syn keyword glslQualifier writeonly
|
||||
syn keyword glslQualifier xfb_buffer
|
||||
syn keyword glslQualifier xfb_stride
|
||||
syn keyword glslQualifier xfb_offset
|
||||
|
||||
" Built-in Constants
|
||||
syn keyword glslBuiltinConstant gl_CullDistance
|
||||
syn keyword glslBuiltinConstant gl_MaxAtomicCounterBindings
|
||||
syn keyword glslBuiltinConstant gl_MaxAtomicCounterBufferSize
|
||||
syn keyword glslBuiltinConstant gl_MaxClipDistances
|
||||
syn keyword glslBuiltinConstant gl_MaxClipPlanes
|
||||
syn keyword glslBuiltinConstant gl_MaxCombinedAtomicCounterBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxCombinedAtomicCounters
|
||||
syn keyword glslBuiltinConstant gl_MaxCombinedClipAndCullDistances
|
||||
syn keyword glslBuiltinConstant gl_MaxCombinedImageUniforms
|
||||
syn keyword glslBuiltinConstant gl_MaxCombinedImageUnitsAndFragmentOutputs
|
||||
syn keyword glslBuiltinConstant gl_MaxCombinedShaderOutputResources
|
||||
syn keyword glslBuiltinConstant gl_MaxCombinedTextureImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxComputeAtomicCounterBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxComputeAtomicCounters
|
||||
syn keyword glslBuiltinConstant gl_MaxComputeImageUniforms
|
||||
syn keyword glslBuiltinConstant gl_MaxComputeTextureImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxComputeUniformComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxComputeWorkGroupCount
|
||||
syn keyword glslBuiltinConstant gl_MaxComputeWorkGroupSize
|
||||
syn keyword glslBuiltinConstant gl_MaxCullDistances
|
||||
syn keyword glslBuiltinConstant gl_MaxDrawBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxFragmentAtomicCounterBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxFragmentAtomicCounters
|
||||
syn keyword glslBuiltinConstant gl_MaxFragmentImageUniforms
|
||||
syn keyword glslBuiltinConstant gl_MaxFragmentInputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxFragmentInputVectors
|
||||
syn keyword glslBuiltinConstant gl_MaxFragmentUniformComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxFragmentUniformVectors
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryAtomicCounterBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryAtomicCounters
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryImageUniforms
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryInputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryOutputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryOutputVertices
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryTextureImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryTotalOutputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryUniformComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxGeometryVaryingComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxImageSamples
|
||||
syn keyword glslBuiltinConstant gl_MaxImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxLights
|
||||
syn keyword glslBuiltinConstant gl_MaxPatchVertices
|
||||
syn keyword glslBuiltinConstant gl_MaxProgramTexelOffset
|
||||
syn keyword glslBuiltinConstant gl_MaxSamples
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlAtomicCounterBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlAtomicCounters
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlImageUniforms
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlInputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlOutputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlTextureImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlTotalOutputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTessControlUniformComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTessEvaluationAtomicCounterBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxTessEvaluationAtomicCounters
|
||||
syn keyword glslBuiltinConstant gl_MaxTessEvaluationImageUniforms
|
||||
syn keyword glslBuiltinConstant gl_MaxTessEvaluationInputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTessEvaluationOutputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTessEvaluationTextureImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxTessEvaluationUniformComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTessGenLevel
|
||||
syn keyword glslBuiltinConstant gl_MaxTessPatchComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxTextureCoords
|
||||
syn keyword glslBuiltinConstant gl_MaxTextureImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxTextureUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxTransformFeedbackBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxTransformFeedbackInterleavedComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxVaryingComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxVaryingFloats
|
||||
syn keyword glslBuiltinConstant gl_MaxVaryingVectors
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexAtomicCounterBuffers
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexAtomicCounters
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexAttribs
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexImageUniforms
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexOutputComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexOutputVectors
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexTextureImageUnits
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexUniformComponents
|
||||
syn keyword glslBuiltinConstant gl_MaxVertexUniformVectors
|
||||
syn keyword glslBuiltinConstant gl_MaxViewports
|
||||
syn keyword glslBuiltinConstant gl_MinProgramTexelOffset
|
||||
|
||||
" Built-in Variables
|
||||
syn keyword glslBuiltinVariable gl_BackColor
|
||||
syn keyword glslBuiltinVariable gl_BackLightModelProduct
|
||||
syn keyword glslBuiltinVariable gl_BackLightProduct
|
||||
syn keyword glslBuiltinVariable gl_BackLightProduct
|
||||
syn keyword glslBuiltinVariable gl_BackMaterial
|
||||
syn keyword glslBuiltinVariable gl_BackSecondaryColor
|
||||
syn keyword glslBuiltinVariable gl_ClipDistance
|
||||
syn keyword glslBuiltinVariable gl_ClipPlane
|
||||
syn keyword glslBuiltinVariable gl_ClipVertex
|
||||
syn keyword glslBuiltinVariable gl_Color
|
||||
syn keyword glslBuiltinVariable gl_DepthRange
|
||||
syn keyword glslBuiltinVariable gl_EyePlaneQ
|
||||
syn keyword glslBuiltinVariable gl_EyePlaneR
|
||||
syn keyword glslBuiltinVariable gl_EyePlaneS
|
||||
syn keyword glslBuiltinVariable gl_EyePlaneT
|
||||
syn keyword glslBuiltinVariable gl_Fog
|
||||
syn keyword glslBuiltinVariable gl_FogCoord
|
||||
syn keyword glslBuiltinVariable gl_FogFragCoord
|
||||
syn keyword glslBuiltinVariable gl_FragColor
|
||||
syn keyword glslBuiltinVariable gl_FragCoord
|
||||
syn keyword glslBuiltinVariable gl_FragData
|
||||
syn keyword glslBuiltinVariable gl_FragDepth
|
||||
syn keyword glslBuiltinVariable gl_FrontColor
|
||||
syn keyword glslBuiltinVariable gl_FrontFacing
|
||||
syn keyword glslBuiltinVariable gl_FrontLightModelProduct
|
||||
syn keyword glslBuiltinVariable gl_FrontLightProduct
|
||||
syn keyword glslBuiltinVariable gl_FrontMaterial
|
||||
syn keyword glslBuiltinVariable gl_FrontSecondaryColor
|
||||
syn keyword glslBuiltinVariable gl_GlobalInvocationID
|
||||
syn keyword glslBuiltinVariable gl_HelperInvocation
|
||||
syn keyword glslBuiltinVariable gl_InstanceID
|
||||
syn keyword glslBuiltinVariable gl_InvocationID
|
||||
syn keyword glslBuiltinVariable gl_Layer
|
||||
syn keyword glslBuiltinVariable gl_LightModel
|
||||
syn keyword glslBuiltinVariable gl_LightSource
|
||||
syn keyword glslBuiltinVariable gl_LocalInvocationID
|
||||
syn keyword glslBuiltinVariable gl_LocalInvocationIndex
|
||||
syn keyword glslBuiltinVariable gl_ModelViewMatrix
|
||||
syn keyword glslBuiltinVariable gl_ModelViewMatrixInverse
|
||||
syn keyword glslBuiltinVariable gl_ModelViewMatrixInverseTranspose
|
||||
syn keyword glslBuiltinVariable gl_ModelViewMatrixTranspose
|
||||
syn keyword glslBuiltinVariable gl_ModelViewProjectionMatrix
|
||||
syn keyword glslBuiltinVariable gl_ModelViewProjectionMatrixInverse
|
||||
syn keyword glslBuiltinVariable gl_ModelViewProjectionMatrixInverseTranspose
|
||||
syn keyword glslBuiltinVariable gl_ModelViewProjectionMatrixTranspose
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord0
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord1
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord2
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord3
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord4
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord5
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord6
|
||||
syn keyword glslBuiltinVariable gl_MultiTexCoord7
|
||||
syn keyword glslBuiltinVariable gl_Normal
|
||||
syn keyword glslBuiltinVariable gl_NormalMatrix
|
||||
syn keyword glslBuiltinVariable gl_NormalScale
|
||||
syn keyword glslBuiltinVariable gl_NumSamples
|
||||
syn keyword glslBuiltinVariable gl_NumWorkGroups
|
||||
syn keyword glslBuiltinVariable gl_ObjectPlaneQ
|
||||
syn keyword glslBuiltinVariable gl_ObjectPlaneR
|
||||
syn keyword glslBuiltinVariable gl_ObjectPlaneS
|
||||
syn keyword glslBuiltinVariable gl_ObjectPlaneT
|
||||
syn keyword glslBuiltinVariable gl_PatchVerticesIn
|
||||
syn keyword glslBuiltinVariable gl_Point
|
||||
syn keyword glslBuiltinVariable gl_PointCoord
|
||||
syn keyword glslBuiltinVariable gl_PointSize
|
||||
syn keyword glslBuiltinVariable gl_Position
|
||||
syn keyword glslBuiltinVariable gl_PrimitiveID
|
||||
syn keyword glslBuiltinVariable gl_PrimitiveIDIn
|
||||
syn keyword glslBuiltinVariable gl_ProjectionMatrix
|
||||
syn keyword glslBuiltinVariable gl_ProjectionMatrixInverse
|
||||
syn keyword glslBuiltinVariable gl_ProjectionMatrixInverseTranspose
|
||||
syn keyword glslBuiltinVariable gl_ProjectionMatrixTranspose
|
||||
syn keyword glslBuiltinVariable gl_SampleID
|
||||
syn keyword glslBuiltinVariable gl_SampleMask
|
||||
syn keyword glslBuiltinVariable gl_SampleMaskIn
|
||||
syn keyword glslBuiltinVariable gl_SamplePosition
|
||||
syn keyword glslBuiltinVariable gl_SecondaryColor
|
||||
syn keyword glslBuiltinVariable gl_TessCoord
|
||||
syn keyword glslBuiltinVariable gl_TessLevelInner
|
||||
syn keyword glslBuiltinVariable gl_TessLevelOuter
|
||||
syn keyword glslBuiltinVariable gl_TexCoord
|
||||
syn keyword glslBuiltinVariable gl_TextureEnvColor
|
||||
syn keyword glslBuiltinVariable gl_TextureMatrix
|
||||
syn keyword glslBuiltinVariable gl_TextureMatrixInverse
|
||||
syn keyword glslBuiltinVariable gl_TextureMatrixInverseTranspose
|
||||
syn keyword glslBuiltinVariable gl_TextureMatrixTranspose
|
||||
syn keyword glslBuiltinVariable gl_Vertex
|
||||
syn keyword glslBuiltinVariable gl_VertexID
|
||||
syn keyword glslBuiltinVariable gl_ViewportIndex
|
||||
syn keyword glslBuiltinVariable gl_WorkGroupID
|
||||
syn keyword glslBuiltinVariable gl_WorkGroupSize
|
||||
syn keyword glslBuiltinVariable gl_in
|
||||
syn keyword glslBuiltinVariable gl_out
|
||||
|
||||
" Built-in Functions
|
||||
syn keyword glslBuiltinFunction EmitStreamVertex
|
||||
syn keyword glslBuiltinFunction EmitVertex
|
||||
syn keyword glslBuiltinFunction EndPrimitive
|
||||
syn keyword glslBuiltinFunction EndStreamPrimitive
|
||||
syn keyword glslBuiltinFunction abs
|
||||
syn keyword glslBuiltinFunction acos
|
||||
syn keyword glslBuiltinFunction acosh
|
||||
syn keyword glslBuiltinFunction all
|
||||
syn keyword glslBuiltinFunction any
|
||||
syn keyword glslBuiltinFunction asin
|
||||
syn keyword glslBuiltinFunction asinh
|
||||
syn keyword glslBuiltinFunction atan
|
||||
syn keyword glslBuiltinFunction atanh
|
||||
syn keyword glslBuiltinFunction atomicAdd
|
||||
syn keyword glslBuiltinFunction atomicAnd
|
||||
syn keyword glslBuiltinFunction atomicCompSwap
|
||||
syn keyword glslBuiltinFunction atomicCounter
|
||||
syn keyword glslBuiltinFunction atomicCounterDecrement
|
||||
syn keyword glslBuiltinFunction atomicCounterIncrement
|
||||
syn keyword glslBuiltinFunction atomicExchange
|
||||
syn keyword glslBuiltinFunction atomicMax
|
||||
syn keyword glslBuiltinFunction atomicMin
|
||||
syn keyword glslBuiltinFunction atomicOr
|
||||
syn keyword glslBuiltinFunction atomicXor
|
||||
syn keyword glslBuiltinFunction barrier
|
||||
syn keyword glslBuiltinFunction bitCount
|
||||
syn keyword glslBuiltinFunction bitfieldExtract
|
||||
syn keyword glslBuiltinFunction bitfieldInsert
|
||||
syn keyword glslBuiltinFunction bitfieldReverse
|
||||
syn keyword glslBuiltinFunction ceil
|
||||
syn keyword glslBuiltinFunction clamp
|
||||
syn keyword glslBuiltinFunction cos
|
||||
syn keyword glslBuiltinFunction cosh
|
||||
syn keyword glslBuiltinFunction cross
|
||||
syn keyword glslBuiltinFunction dFdx
|
||||
syn keyword glslBuiltinFunction dFdxCoarse
|
||||
syn keyword glslBuiltinFunction dFdxFine
|
||||
syn keyword glslBuiltinFunction dFdy
|
||||
syn keyword glslBuiltinFunction dFdyCoarse
|
||||
syn keyword glslBuiltinFunction dFdyFine
|
||||
syn keyword glslBuiltinFunction degrees
|
||||
syn keyword glslBuiltinFunction determinant
|
||||
syn keyword glslBuiltinFunction distance
|
||||
syn keyword glslBuiltinFunction dot
|
||||
syn keyword glslBuiltinFunction equal
|
||||
syn keyword glslBuiltinFunction exp
|
||||
syn keyword glslBuiltinFunction exp2
|
||||
syn keyword glslBuiltinFunction faceforward
|
||||
syn keyword glslBuiltinFunction findLSB
|
||||
syn keyword glslBuiltinFunction findMSB
|
||||
syn keyword glslBuiltinFunction floatBitsToInt
|
||||
syn keyword glslBuiltinFunction floatBitsToUint
|
||||
syn keyword glslBuiltinFunction floor
|
||||
syn keyword glslBuiltinFunction fma
|
||||
syn keyword glslBuiltinFunction fract
|
||||
syn keyword glslBuiltinFunction frexp
|
||||
syn keyword glslBuiltinFunction ftransform
|
||||
syn keyword glslBuiltinFunction fwidth
|
||||
syn keyword glslBuiltinFunction fwidthCoarse
|
||||
syn keyword glslBuiltinFunction fwidthFine
|
||||
syn keyword glslBuiltinFunction greaterThan
|
||||
syn keyword glslBuiltinFunction greaterThanEqual
|
||||
syn keyword glslBuiltinFunction groupMemoryBarrier
|
||||
syn keyword glslBuiltinFunction imageAtomicAdd
|
||||
syn keyword glslBuiltinFunction imageAtomicAnd
|
||||
syn keyword glslBuiltinFunction imageAtomicCompSwap
|
||||
syn keyword glslBuiltinFunction imageAtomicExchange
|
||||
syn keyword glslBuiltinFunction imageAtomicMax
|
||||
syn keyword glslBuiltinFunction imageAtomicMin
|
||||
syn keyword glslBuiltinFunction imageAtomicOr
|
||||
syn keyword glslBuiltinFunction imageAtomicXor
|
||||
syn keyword glslBuiltinFunction imageLoad
|
||||
syn keyword glslBuiltinFunction imageSize
|
||||
syn keyword glslBuiltinFunction imageStore
|
||||
syn keyword glslBuiltinFunction imulExtended
|
||||
syn keyword glslBuiltinFunction intBitsToFloat
|
||||
syn keyword glslBuiltinFunction interpolateAtCentroid
|
||||
syn keyword glslBuiltinFunction interpolateAtOffset
|
||||
syn keyword glslBuiltinFunction interpolateAtSample
|
||||
syn keyword glslBuiltinFunction inverse
|
||||
syn keyword glslBuiltinFunction inversesqrt
|
||||
syn keyword glslBuiltinFunction isinf
|
||||
syn keyword glslBuiltinFunction isnan
|
||||
syn keyword glslBuiltinFunction ldexp
|
||||
syn keyword glslBuiltinFunction length
|
||||
syn keyword glslBuiltinFunction lessThan
|
||||
syn keyword glslBuiltinFunction lessThanEqual
|
||||
syn keyword glslBuiltinFunction log
|
||||
syn keyword glslBuiltinFunction log2
|
||||
syn keyword glslBuiltinFunction matrixCompMult
|
||||
syn keyword glslBuiltinFunction max
|
||||
syn keyword glslBuiltinFunction memoryBarrier
|
||||
syn keyword glslBuiltinFunction memoryBarrierAtomicCounter
|
||||
syn keyword glslBuiltinFunction memoryBarrierBuffer
|
||||
syn keyword glslBuiltinFunction memoryBarrierImage
|
||||
syn keyword glslBuiltinFunction memoryBarrierShared
|
||||
syn keyword glslBuiltinFunction min
|
||||
syn keyword glslBuiltinFunction mix
|
||||
syn keyword glslBuiltinFunction mod
|
||||
syn keyword glslBuiltinFunction modf
|
||||
syn keyword glslBuiltinFunction noise1
|
||||
syn keyword glslBuiltinFunction noise2
|
||||
syn keyword glslBuiltinFunction noise3
|
||||
syn keyword glslBuiltinFunction noise4
|
||||
syn keyword glslBuiltinFunction normalize
|
||||
syn keyword glslBuiltinFunction not
|
||||
syn keyword glslBuiltinFunction notEqual
|
||||
syn keyword glslBuiltinFunction outerProduct
|
||||
syn keyword glslBuiltinFunction packDouble2x32
|
||||
syn keyword glslBuiltinFunction packHalf2x16
|
||||
syn keyword glslBuiltinFunction packSnorm2x16
|
||||
syn keyword glslBuiltinFunction packSnorm4x8
|
||||
syn keyword glslBuiltinFunction packUnorm2x16
|
||||
syn keyword glslBuiltinFunction packUnorm4x8
|
||||
syn keyword glslBuiltinFunction pow
|
||||
syn keyword glslBuiltinFunction radians
|
||||
syn keyword glslBuiltinFunction reflect
|
||||
syn keyword glslBuiltinFunction refract
|
||||
syn keyword glslBuiltinFunction round
|
||||
syn keyword glslBuiltinFunction roundEven
|
||||
syn keyword glslBuiltinFunction shadow1D
|
||||
syn keyword glslBuiltinFunction shadow1DLod
|
||||
syn keyword glslBuiltinFunction shadow1DProj
|
||||
syn keyword glslBuiltinFunction shadow1DProjLod
|
||||
syn keyword glslBuiltinFunction shadow2D
|
||||
syn keyword glslBuiltinFunction shadow2DLod
|
||||
syn keyword glslBuiltinFunction shadow2DProj
|
||||
syn keyword glslBuiltinFunction shadow2DProjLod
|
||||
syn keyword glslBuiltinFunction sign
|
||||
syn keyword glslBuiltinFunction sin
|
||||
syn keyword glslBuiltinFunction sinh
|
||||
syn keyword glslBuiltinFunction smoothstep
|
||||
syn keyword glslBuiltinFunction sqrt
|
||||
syn keyword glslBuiltinFunction step
|
||||
syn keyword glslBuiltinFunction tan
|
||||
syn keyword glslBuiltinFunction tanh
|
||||
syn keyword glslBuiltinFunction texelFetch
|
||||
syn keyword glslBuiltinFunction texelFetchOffset
|
||||
syn keyword glslBuiltinFunction texture
|
||||
syn keyword glslBuiltinFunction texture1D
|
||||
syn keyword glslBuiltinFunction texture1DLod
|
||||
syn keyword glslBuiltinFunction texture1DProj
|
||||
syn keyword glslBuiltinFunction texture1DProjLod
|
||||
syn keyword glslBuiltinFunction texture2D
|
||||
syn keyword glslBuiltinFunction texture2DLod
|
||||
syn keyword glslBuiltinFunction texture2DProj
|
||||
syn keyword glslBuiltinFunction texture2DProjLod
|
||||
syn keyword glslBuiltinFunction texture3D
|
||||
syn keyword glslBuiltinFunction texture3DLod
|
||||
syn keyword glslBuiltinFunction texture3DProj
|
||||
syn keyword glslBuiltinFunction texture3DProjLod
|
||||
syn keyword glslBuiltinFunction textureCube
|
||||
syn keyword glslBuiltinFunction textureCubeLod
|
||||
syn keyword glslBuiltinFunction textureGather
|
||||
syn keyword glslBuiltinFunction textureGatherOffset
|
||||
syn keyword glslBuiltinFunction textureGatherOffsets
|
||||
syn keyword glslBuiltinFunction textureGrad
|
||||
syn keyword glslBuiltinFunction textureGradOffset
|
||||
syn keyword glslBuiltinFunction textureLod
|
||||
syn keyword glslBuiltinFunction textureLodOffset
|
||||
syn keyword glslBuiltinFunction textureOffset
|
||||
syn keyword glslBuiltinFunction textureProj
|
||||
syn keyword glslBuiltinFunction textureProjGrad
|
||||
syn keyword glslBuiltinFunction textureProjGradOffset
|
||||
syn keyword glslBuiltinFunction textureProjLod
|
||||
syn keyword glslBuiltinFunction textureProjLodOffset
|
||||
syn keyword glslBuiltinFunction textureProjOffset
|
||||
syn keyword glslBuiltinFunction textureQueryLevels
|
||||
syn keyword glslBuiltinFunction textureQueryLod
|
||||
syn keyword glslBuiltinFunction textureSize
|
||||
syn keyword glslBuiltinFunction transpose
|
||||
syn keyword glslBuiltinFunction trunc
|
||||
syn keyword glslBuiltinFunction uaddCarry
|
||||
syn keyword glslBuiltinFunction uintBitsToFloat
|
||||
syn keyword glslBuiltinFunction umulExtended
|
||||
syn keyword glslBuiltinFunction unpackDouble2x32
|
||||
syn keyword glslBuiltinFunction unpackHalf2x16
|
||||
syn keyword glslBuiltinFunction unpackSnorm2x16
|
||||
syn keyword glslBuiltinFunction unpackSnorm4x8
|
||||
syn keyword glslBuiltinFunction unpackUnorm2x16
|
||||
syn keyword glslBuiltinFunction unpackUnorm4x8
|
||||
syn keyword glslBuiltinFunction usubBorrow
|
||||
|
||||
hi def link glslConditional Conditional
|
||||
hi def link glslRepeat Repeat
|
||||
hi def link glslStatement Statement
|
||||
hi def link glslTodo Todo
|
||||
hi def link glslCommentL glslComment
|
||||
hi def link glslCommentStart glslComment
|
||||
hi def link glslComment Comment
|
||||
hi def link glslPreCondit PreCondit
|
||||
hi def link glslDefine Define
|
||||
hi def link glslTokenConcat glslPreProc
|
||||
hi def link glslPredefinedMacro Macro
|
||||
hi def link glslPreProc PreProc
|
||||
hi def link glslBoolean Boolean
|
||||
hi def link glslDecimalInt glslInteger
|
||||
hi def link glslOctalInt glslInteger
|
||||
hi def link glslHexInt glslInteger
|
||||
hi def link glslInteger Number
|
||||
hi def link glslFloat Float
|
||||
hi def link glslIdentifierPrime glslIdentifier
|
||||
hi def link glslIdentifier Identifier
|
||||
hi def link glslStructure Structure
|
||||
hi def link glslType Type
|
||||
hi def link glslQualifier StorageClass
|
||||
hi def link glslBuiltinConstant Constant
|
||||
hi def link glslBuiltinFunction Function
|
||||
hi def link glslBuiltinVariable Identifier
|
||||
hi def link glslSwizzle Identifier
|
||||
|
||||
if !exists("b:current_syntax")
|
||||
let b:current_syntax = "glsl"
|
||||
endif
|
||||
|
||||
" vim:set sts=2 sw=2 :
|
||||
|
||||
endif
|
||||
122
syntax/gmpl.vim
122
syntax/gmpl.vim
@@ -1,122 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gmpl') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: GMPL
|
||||
" Maintainer: Mark Mba Wright
|
||||
" Latest Revision: 9 July 2012
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn sync fromstart
|
||||
|
||||
|
||||
syn match gmplArithmeticSetOperator "\.\."
|
||||
|
||||
" Integer with - + or nothing in front
|
||||
syn match gmplNumber '\d\+'
|
||||
syn match gmplNumber '[-+]\d\+'
|
||||
|
||||
" Floating point gmplNumber with decimal no E or e (+,-)
|
||||
syn match gmplNumber '\d*\.\d\+'
|
||||
syn match gmplNumber '[-+]\d*\.\d\+'
|
||||
|
||||
" Floating point like gmplNumber with E and no decimal point (+,-)
|
||||
syn match gmplNumber '[-+]\=\d[[:digit:]]*[eE][\-+]\=\d\+'
|
||||
syn match gmplNumber '\d[[:digit:]]*[eE][\-+]\=\d\+'
|
||||
|
||||
" Floating point like gmplNumber with E and decimal point (+,-)
|
||||
syn match gmplNumber '[-+]\=\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+'
|
||||
syn match gmplNumber '\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+'
|
||||
syn match gmplIndex /\<\%(in\>\)\@!\w*/ contained contains=gmplKeyword,gmplNumber
|
||||
syn match gmplLabel '[a-zA-Z][a-zA-Z0-9_]*'
|
||||
syn match gmplArithmeticOperator "[-+]"
|
||||
syn match gmplArithmeticOperator "\.\=[*/\\^]"
|
||||
syn match gmplRelationalOperator "[=~]="
|
||||
syn match gmplRelationalOperator "[<>]=\="
|
||||
" syn match gmplLogicalOperator "[&|~]
|
||||
|
||||
" match indeces
|
||||
|
||||
" comments
|
||||
syn match gmplComment /\/\*.\{-}\*\//
|
||||
syn region gmplComment start="/\*" end="\*/"
|
||||
syn match gmplComment '#.\{-}$'
|
||||
|
||||
" strings
|
||||
syn region gmplString start="\"" end="\""
|
||||
syn region gmplString start="\'" end="\'" contains=gmplStringToken
|
||||
syn match gmplStringToken '\%[a-z]' contained
|
||||
|
||||
" Keywords
|
||||
syn keyword gmplKeyword and else by if cross in diff inter div less mod union not within or symdiff then
|
||||
syn keyword gmplKeyword minimize maximize solve
|
||||
syn keyword gmplType set var param nextgroup=gmplLabel skipwhite
|
||||
|
||||
" Regions
|
||||
syn region gmplIndexExpression start="{" end="}" transparent contains=gmplIndex,gmplIndexExpression
|
||||
syn region gmplIndexGroup start="\[" end="\]" transparent contains=gmplIndex
|
||||
" syn region gmplParen start="(" end=")"
|
||||
|
||||
"" catch errors caused by wrong parenthesis
|
||||
syn match gmplParensError ")\|}\|\]"
|
||||
syn match gmplParensErrA contained "\]"
|
||||
syn match gmplParensErrC contained "}"
|
||||
|
||||
|
||||
hi level1c ctermfg=brown guifg=brown
|
||||
hi level2c ctermfg=darkgreen guifg=darkgreen gui=bold
|
||||
hi level3c ctermfg=Darkblue guifg=Darkblue
|
||||
hi level4c ctermfg=darkmagenta guifg=darkmagenta gui=bold
|
||||
hi level5c ctermfg=darkcyan guifg=darkcyan
|
||||
hi level6c ctermfg=white guifg=white gui=bold
|
||||
hi level7c ctermfg=darkred guifg=darkred
|
||||
hi level8c ctermfg=blue guifg=blue gui=bold
|
||||
hi level9c ctermfg=darkgray guifg=darkgray
|
||||
hi level10c ctermfg=brown guifg=brown gui=bold
|
||||
hi level11c ctermfg=darkgreen guifg=darkgreen
|
||||
hi level12c ctermfg=Darkblue guifg=Darkblue gui=bold
|
||||
hi level13c ctermfg=darkmagenta guifg=darkmagenta
|
||||
hi level14c ctermfg=darkcyan guifg=darkcyan gui=bold
|
||||
hi level15c ctermfg=gray guifg=gray
|
||||
|
||||
" These are the regions for each pair.
|
||||
" This could be improved, perhaps, by makeing them match [ and { also,
|
||||
" but I'm not going to take the time to figure out haw to make the
|
||||
" end pattern match only the proper type.
|
||||
syn region level1 matchgroup=level1c start=/(/ end=/)/ contains=TOP,level1,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level2 matchgroup=level2c start=/(/ end=/)/ contains=TOP,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level3 matchgroup=level3c start=/(/ end=/)/ contains=TOP,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level4 matchgroup=level4c start=/(/ end=/)/ contains=TOP,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level5 matchgroup=level5c start=/(/ end=/)/ contains=TOP,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level6 matchgroup=level6c start=/(/ end=/)/ contains=TOP,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level7 matchgroup=level7c start=/(/ end=/)/ contains=TOP,level7,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level8 matchgroup=level8c start=/(/ end=/)/ contains=TOP,level8,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level9 matchgroup=level9c start=/(/ end=/)/ contains=TOP,level9,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level10 matchgroup=level10c start=/(/ end=/)/ contains=TOP,level10,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level11 matchgroup=level11c start=/(/ end=/)/ contains=TOP,level11,level12,level13,level14,level15, NoInParens
|
||||
syn region level12 matchgroup=level12c start=/(/ end=/)/ contains=TOP,level12,level13,level14,level15, NoInParens
|
||||
syn region level13 matchgroup=level13c start=/(/ end=/)/ contains=TOP,level13,level14,level15, NoInParens
|
||||
syn region level14 matchgroup=level14c start=/(/ end=/)/ contains=TOP,level14,level15, NoInParens
|
||||
syn region level15 matchgroup=level15c start=/(/ end=/)/ contains=TOP,level15, NoInParens
|
||||
|
||||
let b:current_syntax = "gmpl"
|
||||
|
||||
hi def link gmplKeyword Keyword
|
||||
hi def link gmplParensError Error
|
||||
hi def link gmplParensErrA Error
|
||||
hi def link gmplParensErrB Error
|
||||
hi def link gmplParensErrC Error
|
||||
" hi def link gmplIndexExpression Label
|
||||
" hi def link gmplParen Label
|
||||
" hi def link gmplIndexGroup Label
|
||||
hi def link gmplIndex Identifier
|
||||
hi def link gmplNumber Number
|
||||
hi def link gmplComment Comment
|
||||
hi def link gmplType Type
|
||||
hi def link gmplLabel Keyword
|
||||
hi def link gmplString String
|
||||
hi def link gmplStringToken Special
|
||||
|
||||
endif
|
||||
624
syntax/julia.vim
624
syntax/julia.vim
@@ -1,153 +1,551 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: julia
|
||||
" Maintainer: Carlo Baldassi <carlobaldassi@gmail.com>
|
||||
" Last Change: 2013 feb 11
|
||||
|
||||
if exists("b:current_syntax")
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if version < 704
|
||||
" this is used to disable regex syntax like `\@3<='
|
||||
" on older vim versions
|
||||
function! s:d(x)
|
||||
return ''
|
||||
endfunction
|
||||
else
|
||||
function! s:d(x)
|
||||
return string(a:x)
|
||||
endfunction
|
||||
endif
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if !exists("b:julia_syntax_version")
|
||||
let b:julia_syntax_version = get(g:, "default_julia_version", "current")
|
||||
endif
|
||||
if !exists("b:julia_syntax_highlight_deprecated")
|
||||
let b:julia_syntax_highlight_deprecated = get(g:, "julia_syntax_highlight_deprecated", 0)
|
||||
endif
|
||||
|
||||
if b:julia_syntax_version =~? '\<\%(curr\%(ent\)\?\|release\|6\|0\.6\)\>'
|
||||
let b:julia_syntax_version = 6
|
||||
elseif b:julia_syntax_version =~? '\<\%(next\|devel\|7\|0\.7\)\>'
|
||||
let b:julia_syntax_version = 7
|
||||
elseif b:julia_syntax_version =~? '\<\%(prev\%(ious\)\?\|legacy\|5\|0\.5\)\>'
|
||||
let b:julia_syntax_version = 5
|
||||
else
|
||||
echohl WarningMsg | echomsg "Unrecognized or unsupported julia syntax version: " . b:julia_syntax_version | echohl None
|
||||
let b:julia_syntax_version = 6
|
||||
endif
|
||||
|
||||
let s:julia_spellcheck_strings = get(g:, "julia_spellcheck_strings", 0)
|
||||
let s:julia_spellcheck_docstrings = get(g:, "julia_spellcheck_docstrings", 1)
|
||||
let s:julia_spellcheck_comments = get(g:, "julia_spellcheck_comments", 1)
|
||||
|
||||
let s:julia_highlight_operators = get(g:, "julia_highlight_operators", 1)
|
||||
|
||||
" characters which cannot be used in identifiers. This list is very incomplete:
|
||||
" 1) it only cares about charactes below 256
|
||||
" 2) it doesn't distinguish between what's allowed as the 1st char vs in the
|
||||
" rest of an identifier (e.g. digits, `!` and `?`)
|
||||
" Despite these shortcomings, it seems to do a decent job.
|
||||
" note: \U5B and \U5D are '[' and ']'
|
||||
let s:nonid_chars = "\U01-\U07" . "\U0E-\U1F" .
|
||||
\ "\"#$'(,.:;=@`\\U5B{" .
|
||||
\ "\U80-\UA1" . "\UA7\UA8\UAB\UAD\UAF\UB4" . "\UB6-\UB8" . "\UBB\UBF"
|
||||
|
||||
let s:nonidS_chars = "[:space:])\\U5D}" . s:nonid_chars
|
||||
|
||||
" the following excludes '!' since it can be used as an identifier,
|
||||
" and '$' since it can be used in interpolations
|
||||
" note that \U2D is '-'
|
||||
let s:uniop_chars = "+\\U2D~¬√∛∜"
|
||||
|
||||
let s:binop_chars = "=+\\U2D*/\\%÷^&|⊻<>≤≥≡≠≢∈∉⋅×∪∩⊆⊈⊂⊄⊊←→∋∌⊕⊖⊞⊟∘∧⊗⊘↑↓∨⊠±"
|
||||
|
||||
" the following is a list of all remainig valid operator chars,
|
||||
" but it's more efficient when expressed with ranges (see below)
|
||||
" let s:binop_chars_extra = "↔↚↛↠↣↦↮⇎⇏⇒⇔⇴⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿⟵⟶⟷⟷⟹⟺⟻⟼⟽⟾⟿⤀⤁⤂⤃⤄⤅⤆⤇⤌⤍⤎⤏⤐⤑⤔⤕⤖⤗⤘⤝⤞⤟⤠⥄⥅⥆⥇⥈⥊⥋⥎⥐⥒⥓⥖⥗⥚⥛⥞⥟⥢⥤⥦⥧⥨⥩⥪⥫⥬⥭⥰⧴⬱⬰⬲⬳⬴⬵⬶⬷⬸⬹⬺⬻⬼⬽⬾⬿⭀⭁⭂⭃⭄⭇⭈⭉⭊⭋⭌←→" .
|
||||
" \ "∝∊∍∥∦∷∺∻∽∾≁≃≄≅≆≇≈≉≊≋≌≍≎≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≣≦≧≨≩≪≫≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊃⊅⊇⊉⊋⊏⊐⊑⊒⊜⊩⊬⊮⊰⊱⊲⊳⊴⊵⊶⊷⋍⋐⋑⋕⋖⋗⋘⋙⋚⋛⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿⟈⟉⟒⦷⧀⧁⧡⧣⧤⧥⩦⩧⩪⩫⩬⩭⩮⩯⩰⩱⩲⩳⩴⩵⩶⩷⩸⩹⩺⩻⩼⩽⩾⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚⪛⪜⪝⪞⪟⪠⪡⪢⪣⪤⪥⪦⪧⪨⪩⪪⪫⪬⪭⪮⪯⪰⪱⪲⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅⫆⫇⫈⫉⫊⫋⫌⫍⫎⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫷⫸⫹⫺⊢⊣" .
|
||||
" \ "⊔∓∔∸≂≏⊎⊽⋎⋓⧺⧻⨈⨢⨣⨤⨥⨦⨧⨨⨩⨪⨫⨬⨭⨮⨹⨺⩁⩂⩅⩊⩌⩏⩐⩒⩔⩖⩗⩛⩝⩡⩢⩣" .
|
||||
" \ "⊙⊚⊛⊡⊓∗∙∤⅋≀⊼⋄⋆⋇⋉⋊⋋⋌⋏⋒⟑⦸⦼⦾⦿⧶⧷⨇⨰⨱⨲⨳⨴⨵⨶⨷⨸⨻⨼⨽⩀⩃⩄⩋⩍⩎⩑⩓⩕⩘⩚⩜⩞⩟⩠⫛⊍▷⨝⟕⟖⟗" .
|
||||
" \ "⇵⟰⟱⤈⤉⤊⤋⤒⤓⥉⥌⥍⥏⥑⥔⥕⥘⥙⥜⥝⥠⥡⥣⥥⥮⥯↑↓"
|
||||
|
||||
" same as above, but with character ranges, for performance
|
||||
let s:binop_chars_extra = "\\U214B\\U2190-\\U2194\\U219A\\U219B\\U21A0\\U21A3\\U21A6\\U21AE\\U21CE\\U21CF\\U21D2\\U21D4\\U21F4-\\U21FF\\U2208-\\U220D\\U2213\\U2214\\U2217-\\U2219\\U221D\\U2224-\\U222A\\U2237\\U2238\\U223A\\U223B\\U223D\\U223E\\U2240-\\U228B\\U228D-\\U229C\\U229E-\\U22A3\\U22A9\\U22AC\\U22AE\\U22B0-\\U22B7\\U22BB-\\U22BD\\U22C4-\\U22C7\\U22C9-\\U22D3\\U22D5-\\U22ED\\U22F2-\\U22FF\\U25B7\\U27C8\\U27C9\\U27D1\\U27D2\\U27D5-\\U27D7\\U27F0\\U27F1\\U27F5-\\U27F7\\U27F7\\U27F9-\\U27FF\\U2900-\\U2918\\U291D-\\U2920\\U2944-\\U2970\\U29B7\\U29B8\\U29BC\\U29BE-\\U29C1\\U29E1\\U29E3-\\U29E5\\U29F4\\U29F6\\U29F7\\U29FA\\U29FB\\U2A07\\U2A08\\U2A1D\\U2A22-\\U2A2E\\U2A30-\\U2A3D\\U2A40-\\U2A45\\U2A4A-\\U2A58\\U2A5A-\\U2A63\\U2A66\\U2A67\\U2A6A-\\U2AD9\\U2ADB\\U2AF7-\\U2AFA\\U2B30-\\U2B44\\U2B47-\\U2B4C\\UFFE9-\\UFFEC"
|
||||
|
||||
" a Julia identifier, sort of (TODO: the special case of a lone `?` should be
|
||||
" removed as soon as the Julia parser is fixed)
|
||||
let s:idregex = '\%([^' . s:nonidS_chars . '0-9!?' . s:uniop_chars . s:binop_chars . '][^' . s:nonidS_chars . s:uniop_chars . s:binop_chars . s:binop_chars_extra . ']*\|\<?\>\)'
|
||||
|
||||
let s:operators = '\%(' . '\.\%([-+*/^÷%|&!]\|//\|\\\|<<\|>>>\?\)\?=' .
|
||||
\ '\|' . '[:$<>]=\|||\|&&\||>\|<|\|<:\|:>\|::\|<<\|>>>\?\|//\|[-=]>\|\.\{3\}' .
|
||||
\ '\|' . '[' . s:uniop_chars . '!$]' .
|
||||
\ '\|' . '\.\?[' . s:binop_chars . s:binop_chars_extra . ']' .
|
||||
\ '\)'
|
||||
|
||||
syn case match
|
||||
|
||||
syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juliaKeywordItems,@juliaBlocksItems,@juliaTypesItems,@juliaConstItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaNumberItems,@juliaCommentItems,@juliaErrorItems
|
||||
syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems
|
||||
|
||||
syn keyword juliaDirective import importall export using require include
|
||||
syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
|
||||
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaInfixKeyword,juliaRepKeyword,juliaTypedef
|
||||
if b:julia_syntax_version == 5
|
||||
syntax cluster juliaBlocksItems contains=@juliaBlocksItemsAll
|
||||
else
|
||||
syntax cluster juliaBlocksItems contains=@juliaBlocksItemsAll,@juliaBlocksItems0607
|
||||
endif
|
||||
syntax cluster juliaBlocksItemsAll contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock
|
||||
syntax cluster juliaBlocksItems0607 contains=juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
|
||||
if b:julia_syntax_version == 5
|
||||
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems05,@juliaTypesItems0506
|
||||
elseif b:julia_syntax_version == 6
|
||||
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems05,@juliaTypesItems0506,@juliaTypesItems0607
|
||||
else
|
||||
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems05,@juliaTypesItems0506,@juliaTypesItems0607,@juliaTypesItems07
|
||||
endif
|
||||
syntax cluster juliaTypesItemsAll contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
|
||||
syntax cluster juliaTypesItems05 contains=juliaBaseTypeIter05,juliaBaseTypeRange05
|
||||
syntax cluster juliaTypesItems0506 contains=juliaBaseTypeRange0506,juliaBaseTypeSet0506
|
||||
syntax cluster juliaTypesItems0607 contains=juliaBaseTypeBasic0607,juliaBaseTypeArray0607,juliaBaseTypeSet0607,juliaBaseTypeProcess0607,juliaBaseTypeRange0607,juliaBaseTypeTime0607
|
||||
syntax cluster juliaTypesItems07 contains=juliaBaseTypeRange07,juliaBaseTypeSet07
|
||||
|
||||
hi def link juliaDirective Include
|
||||
syntax cluster juliaConstItemsAll contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstIO,juliaConstMMap,juliaConstC,juliaConstGeneric
|
||||
syntax cluster juliaConstItems0506 contains=juliaConstNum0506
|
||||
syntax cluster juliaConstItems07 contains=juliaPossibleEuler
|
||||
if b:julia_syntax_version <= 6
|
||||
syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems0506
|
||||
else
|
||||
syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems0506,@juliaConstItems07
|
||||
endif
|
||||
|
||||
syn region juliaDeclTypeBlock transparent matchgroup=juliaDeclType start="\<\%(type\|immutable\)\>" end="\<end\>" contains=ALL
|
||||
syn keyword juliaTypeAlias typealias
|
||||
syn keyword juliaDeclAbstract abstract
|
||||
syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
|
||||
syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
|
||||
syntax cluster juliaNumberItems contains=juliaNumbers
|
||||
syntax cluster juliaStringItems contains=juliaChar,juliaString,juliabString,juliasString,juliavString,juliaipString,juliabigString,juliaMIMEString,juliaShellString,juliaDocString,juliaRegEx
|
||||
syntax cluster juliaPrintfItems contains=juliaPrintfParBlock,juliaPrintfString
|
||||
syntax cluster juliaOperatorItems contains=juliaOperator,juliaRangeOperator,juliaCTransOperator,juliaTernaryRegion,juliaColon,juliaSemicolon,juliaComma
|
||||
syntax cluster juliaCommentItems contains=juliaCommentL,juliaCommentM
|
||||
syntax cluster juliaErrorItems contains=juliaErrorPar,juliaErrorEnd,juliaErrorElse,juliaErrorCatch,juliaErrorFinally
|
||||
|
||||
hi def link juliaDeclType Structure
|
||||
hi def link juliaTypeAlias Typedef
|
||||
hi def link juliaDeclAbstract Structure
|
||||
syntax cluster juliaSpellcheckStrings contains=@spell
|
||||
syntax cluster juliaSpellcheckDocStrings contains=@spell
|
||||
syntax cluster juliaSpellcheckComments contains=@spell
|
||||
|
||||
" Module
|
||||
syn region juliaModuleBlock transparent matchgroup=juliaModule start="\<module\>" end="\<end\>" contains=ALL
|
||||
if !s:julia_spellcheck_docstrings
|
||||
syntax cluster juliaSpellcheckDocStrings remove=@spell
|
||||
endif
|
||||
if !s:julia_spellcheck_strings
|
||||
syntax cluster juliaSpellcheckStrings remove=@spell
|
||||
endif
|
||||
if !s:julia_spellcheck_comments
|
||||
syntax cluster juliaSpellcheckComments remove=@spell
|
||||
endif
|
||||
|
||||
hi def link juliaModule Structure
|
||||
syntax match juliaSemicolon display ";"
|
||||
syntax match juliaComma display ","
|
||||
syntax match juliaColon display ":"
|
||||
|
||||
syntax match juliaErrorPar display "[])}]"
|
||||
syntax match juliaErrorEnd display "\<end\>"
|
||||
syntax match juliaErrorElse display "\<\%(else\|elseif\)\>"
|
||||
syntax match juliaErrorCatch display "\<catch\>"
|
||||
syntax match juliaErrorFinally display "\<finally\>"
|
||||
syntax match juliaErrorSemicol display contained ";"
|
||||
|
||||
syntax match juliaRangeEnd display contained "\<end\>"
|
||||
|
||||
syntax region juliaParBlock matchgroup=juliaParDelim start="(" end=")" contains=@juliaExpressions,juliaComprehensionFor
|
||||
syntax region juliaParBlockInRange matchgroup=juliaParDelim contained start="(" end=")" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeEnd,juliaComprehensionFor
|
||||
syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\[" end="\]" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeEnd,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS
|
||||
syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=@juliaExpressions
|
||||
|
||||
if b:julia_syntax_version >= 6
|
||||
let s:keywords = '\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>'
|
||||
let s:infixkeywords = '\<\%(in\|isa\)\>'
|
||||
else
|
||||
let s:keywords = '\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\)\>'
|
||||
let s:infixkeywords = '\<\%(in\)\>'
|
||||
endif
|
||||
|
||||
exec 'syntax match juliaKeyword display "' . s:keywords . '"'
|
||||
exec 'syntax match juliaInfixKeyword display "\%(=\s*\)\@<!' . s:infixkeywords . '\S\@!\%(\s*=\)\@!"'
|
||||
syntax match juliaRepKeyword display "\<\%(break\|continue\)\>"
|
||||
syntax region juliaConditionalBlock matchgroup=juliaConditional start="\<if\>" end="\<end\>" contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock fold
|
||||
syntax region juliaConditionalEIBlock matchgroup=juliaConditional transparent contained start="\<elseif\>" end="\<\%(end\|else\|elseif\)\>"me=s-1 contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock
|
||||
syntax region juliaConditionalEBlock matchgroup=juliaConditional transparent contained start="\<else\>" end="\<end\>"me=s-1 contains=@juliaExpressions
|
||||
syntax region juliaWhileBlock matchgroup=juliaRepeat start="\<while\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaForBlock matchgroup=juliaRepeat start="\<for\>" end="\<end\>" contains=@juliaExpressions,juliaOuter fold
|
||||
syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="\<begin\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="\<function\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="\<macro\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="\<quote\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaTypeBlock matchgroup=juliaBlKeyword start="\<type\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaImmutableBlock matchgroup=juliaBlKeyword start="\<immutable\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaStructBlock matchgroup=juliaBlKeyword start="\<struct\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="\<mutable struct\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaLetBlock matchgroup=juliaBlKeyword start="\<let\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
syntax region juliaDoBlock matchgroup=juliaBlKeyword start="\<do\>" end="\<end\>" contains=@juliaExpressions fold
|
||||
exec 'syntax region juliaModuleBlock matchgroup=juliaBlKeyword start="\%(\%(\.\s*\)\@'.s:d(6).'<!\|\%(@\s*\.\s*\)\@'.s:d(6).'<=\)\<\%(bare\)\?module\>" end="\<end\>" contains=@juliaExpressions fold'
|
||||
syntax region juliaExceptionBlock matchgroup=juliaException start="\<try\>" end="\<end\>" contains=@juliaExpressions,juliaCatchBlock,juliaFinallyBlock fold
|
||||
syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="\<catch\>" end="\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock
|
||||
syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="\<finally\>" end="\<end\>"me=s-1 contains=@juliaExpressions
|
||||
syntax match juliaTypedef "\<\%(abstract\|typealias\|bitstype\)\>"
|
||||
" AbstractBlock needs to come after to take precedence
|
||||
syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="\<abstract type\>" end="\<end\>" fold contains=@juliaExpressions
|
||||
syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="\<primitive type\>" end="\<end\>" fold contains=@juliaExpressions
|
||||
|
||||
exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\<for\>" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor'
|
||||
syntax match juliaComprehensionIf contained "\<if\>"
|
||||
|
||||
exec 'syntax match juliaOuter contained "\<outer\ze\s\+' . s:idregex . '\>"'
|
||||
|
||||
syntax match juliaBaseTypeBasic display "\<\%(Tuple\|NTuple\|Symbol\|\%(Intrinsic\)\?Function\|Union\|Type\%(Name\|Constructor\|Var\)\?\|Any\|ANY\|Vararg\|Top\|None\|Nothing\|Ptr\|Void\|Exception\|Module\|Box\|Expr\|LambdaStaticData\|\%(Data\|Union\)Type\|\%(LineNumber\|Label\|Goto\|Quote\|Top\|Symbol\|Getfield\)Node\|\%(Weak\|Global\)\?Ref\|Associative\|Method\(Table\)\?\|GetfieldNode\|Nullable\|Pair\|Val\|TypeMap\%(Level\|Entry\)\)\>"
|
||||
syntax match juliaBaseTypeBasic0607 display "\<\%(UnionAll\|CodeInfo\)\>"
|
||||
syntax match juliaBaseTypeNum display "\<\%(U\?Int\%(8\|16\|32\|64\|128\)\?\|Float\%(16\|32\|64\)\|Complex\%(32\|64\|128\)\?\|Bool\|Char\|Number\|Signed\|Unsigned\|Integer\|AbstractFloat\|Real\|Rational\|Irrational\|Enum\|BigInt\|BigFloat\|MathConst\)\>"
|
||||
syntax match juliaBaseTypeC display "\<\%(FileOffset\|C\%(u\?\%(char\|short\|int\|long\(long\)\?\|w\?string\)\|float\|double\|\%(ptrdiff\|s\?size\|wchar\|off\|u\?intmax\)_t\)\)\>"
|
||||
syntax match juliaBaseTypeError display "\<\%(\%(Bounds\|Divide\|Domain\|\%(Stack\)\?Overflow\|EOF\|Undef\%(Ref\|Var\)\|System\|Type\|Parse\|Argument\|Key\|Load\|Method\|Inexact\|OutOfMemory\|Init\|Assertion\|Unicode\|ReadOnlyMemory\)Error\|\%(Interrupt\|Error\|ProcessExited\|Captured\|Composite\|InvalidState\|Null\|Remote\)Exception\|DimensionMismatch\|SegmentationFault\)\>"
|
||||
syntax match juliaBaseTypeIter display "\<\%(EachLine\|Enumerate\|Cartesian\%(Index\|Range\)\|LinSpace\)\>"
|
||||
syntax match juliaBaseTypeIter05 display "\<\%(Zip\|Filter\)\>"
|
||||
syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abstract\)\?String\>"
|
||||
syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|SparseVector\|VecElement\)\>"
|
||||
syntax match juliaBaseTypeArray0607 display "\<\%(Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|RowVector\)\>"
|
||||
syntax match juliaBaseTypeDict display "\<\%(WeakKey\|ObjectId\)\?Dict\>"
|
||||
syntax match juliaBaseTypeSet display "\<Set\>"
|
||||
syntax match juliaBaseTypeSet0506 display "\<IntSet\>"
|
||||
syntax match juliaBaseTypeSet0607 display "\<AbstractSet\>"
|
||||
syntax match juliaBaseTypeSet07 display "\<BitSet\>"
|
||||
syntax match juliaBaseTypeIO display "\<\%(IO\%(Stream\|Buffer\|Context\)\?\|RawFD\|StatStruct\|DevNull\|FileMonitor\|PollingFileWatcher\|Timer\|Base64\%(Decode\|Encode\)Pipe\|\%(UDP\|TCP\)Socket\|\%(Abstract\)\?Channel\|BufferStream\|ReentrantLock\)\>"
|
||||
syntax match juliaBaseTypeProcess display "\<\%(ProcessGroup\|Pipe\|Cmd\)\>"
|
||||
syntax match juliaBaseTypeProcess0607 display "\<PipeBuffer\>"
|
||||
syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\)\>"
|
||||
syntax match juliaBaseTypeRange05 display "\<FloatRange\>"
|
||||
syntax match juliaBaseTypeRange0506 display "\<Range\>"
|
||||
syntax match juliaBaseTypeRange0607 display "\<\%(ExponentialBackOff\|StepRangeLen\)\>"
|
||||
syntax match juliaBaseTypeRange07 display "\<AbstractRange\>"
|
||||
syntax match juliaBaseTypeRegex display "\<Regex\%(Match\)\?\>"
|
||||
syntax match juliaBaseTypeFact display "\<Factorization\>"
|
||||
syntax match juliaBaseTypeSort display "\<\%(Insertion\|\(Partial\)\?Quick\|Merge\)Sort\>"
|
||||
syntax match juliaBaseTypeRound display "\<Round\%(ingMode\|FromZero\|Down\|Nearest\%(Ties\%(Away\|Up\)\)\?\|ToZero\|Up\)\>"
|
||||
syntax match juliaBaseTypeSpecial display "\<\%(LocalProcess\|ClusterManager\)\>"
|
||||
syntax match juliaBaseTypeRandom display "\<\%(AbstractRNG\|MersenneTwister\|RandomDevice\)\>"
|
||||
syntax match juliaBaseTypeDisplay display "\<\%(Text\(Display\)\?\|Display\|MIME\|HTML\)\>"
|
||||
syntax match juliaBaseTypeTime display "\<\%(Date\%(Time\)\?\)\>"
|
||||
syntax match juliaBaseTypeTime0607 display "\<DateFormat\>"
|
||||
syntax match juliaBaseTypeOther display "\<\%(RemoteRef\|Task\|Condition\|VersionNumber\|IPv[46]\|SerializationState\|WorkerConfig\|Future\|RemoteChannel\|IPAddr\|Stack\%(Trace\|Frame\)\|\(Caching\|Worker\)Pool\|AbstractSerializer\)\>"
|
||||
|
||||
syntax match juliaConstNum display "\%(\<\%(\%(NaN\|Inf\)\%(16\|32\|64\)\?\|pi\|π\)\>\)"
|
||||
syntax match juliaConstNum0506 display "\%(\<\%(eu\?\|eulergamma\|γ\|catalan\|φ\|golden\)\>\)"
|
||||
" Note: recognition of ℯ, which Vim does not consider a valid identifier, is
|
||||
" complicated. We detect possible uses by just looking for the character (for
|
||||
" performance) and then check that it's actually used by its own.
|
||||
" (This also tries to detect preceding number constants; it does so in a crude
|
||||
" way.)
|
||||
syntax match juliaPossibleEuler "ℯ" contains=juliaEuler
|
||||
exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . ']\|' . s:operators . '\)\%([.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze\%($\|[' . s:nonidS_chars . ']\|' . s:operators . '\)"'
|
||||
syntax match juliaConstBool display "\<\%(true\|false\)\>"
|
||||
syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|CPU_CORES\|OS_NAME\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|JULIA_HOME\|PROGRAM_FILE\)\>"
|
||||
syntax match juliaConstIO display "\<\%(STD\%(OUT\|IN\|ERR\)\)\>"
|
||||
syntax match juliaConstC display "\<\%(WORD_SIZE\|C_NULL\)\>"
|
||||
syntax match juliaConstGeneric display "\<\%(nothing\|Main\)\>"
|
||||
|
||||
syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro
|
||||
|
||||
exec 'syntax match juliaMacro contained "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
||||
syntax match juliaMacro contained "@\.\ze[^0-9]"
|
||||
exec 'syntax region juliaMacroCallP contained transparent start="@' . s:idregex . '\%(\.' . s:idregex . '\)*(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
|
||||
exec 'syntax region juliaMacroCallP contained transparent start="@.(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
|
||||
exec 'syntax region juliaMacroCall contained transparent start="\(@' . s:idregex . '\%(\.' . s:idregex . '\)*\)\@=\1\%([^(]\|$\)" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExpressions,juliaMacro,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
|
||||
exec 'syntax region juliaMacroCall contained transparent start="\(@.\)\@=\1\%([^(]\|$\)" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExpressions,juliaMacro,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
|
||||
|
||||
syntax match juliaNumbers transparent "\<\d\|\.\d\|\<im\>" contains=juliaNumber,juliaFloat,juliaComplexUnit
|
||||
|
||||
"integer regexes
|
||||
let s:dec_regex = '\d\%(_\?\d\)*\%(\>\|im\>\|\ze\D\)'
|
||||
let s:hex_regex = '0x\x\%(_\?\x\)*\%(\>\|im\>\|\ze\X\)'
|
||||
let s:bin_regex = '0b[01]\%(_\?[01]\)*\%(\>\|im\>\|\ze[^01]\)'
|
||||
let s:oct_regex = '0o\o\%(_\?\o\)*\%(\>\|im\>\|\ze\O\)'
|
||||
|
||||
let s:int_regex = '\%(' . s:hex_regex .
|
||||
\ '\|' . s:bin_regex .
|
||||
\ '\|' . s:oct_regex .
|
||||
\ '\|' . s:dec_regex .
|
||||
\ '\)'
|
||||
|
||||
"floating point regexes
|
||||
" starting with a dot, optional exponent
|
||||
let s:float_regex1 = '\.\d\%(_\?\d\)*\%([eEf][-+]\?\d\+\)\?\%(\>\|im\>\|\ze\D\)'
|
||||
" with dot, optional exponent
|
||||
let s:float_regex2 = '\d\%(_\?\d\)*\.\%(\d\%(_\?\d\)*\)\?\%([eEf][-+]\?\d\+\)\?\%(\>\|im\>\|\ze\D\)'
|
||||
" without dot, with exponent
|
||||
let s:float_regex3 = '\d\%(_\?\d\)*[eEf][-+]\?\d\+\%(\>\|im\>\|\ze\D\)'
|
||||
|
||||
"hex floating point numbers
|
||||
" starting with a dot
|
||||
let s:hexfloat_regex1 = '0x\.\%\(\x\%(_\?\x\)*\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze\X\)'
|
||||
" starting with a digit
|
||||
let s:hexfloat_regex2 = '0x\x\%(_\?\x\)*\%\(\.\%\(\x\%(_\?\x\)*\)\?\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze\X\)'
|
||||
|
||||
let s:float_regex = '\%(' . s:float_regex3 .
|
||||
\ '\|' . s:float_regex2 .
|
||||
\ '\|' . s:float_regex1 .
|
||||
\ '\|' . s:hexfloat_regex2 .
|
||||
\ '\|' . s:hexfloat_regex1 .
|
||||
\ '\)'
|
||||
|
||||
exec 'syntax match juliaNumber contained "' . s:int_regex . '" contains=juliaComplexUnit'
|
||||
exec 'syntax match juliaFloat contained "' . s:float_regex . '" contains=juliaComplexUnit'
|
||||
syntax match juliaComplexUnit display contained "\<im\>"
|
||||
|
||||
exec 'syntax match juliaOperator "' . s:operators . '"'
|
||||
syntax match juliaRangeOperator display ":"
|
||||
exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|^\s*:\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol'
|
||||
|
||||
let s:interp_dollar = '\([' . s:nonidS_chars . s:uniop_chars . s:binop_chars . '!?]\|^\)\@'.s:d(1).'<=\$'
|
||||
|
||||
exec 'syntax match juliaDollarVar display contained "' . s:interp_dollar . s:idregex . '"'
|
||||
exec 'syntax region juliaDollarPar matchgroup=juliaDollarVar contained start="' .s:interp_dollar . '(" end=")" contains=@juliaExpressions'
|
||||
exec 'syntax region juliaDollarSqBra matchgroup=juliaDollarVar contained start="' .s:interp_dollar . '\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
|
||||
|
||||
syntax match juliaChar "'\\\?.'" contains=juliaSpecialChar
|
||||
syntax match juliaChar display "'\\\o\{3\}'" contains=juliaOctalEscapeChar
|
||||
syntax match juliaChar display "'\\x\x\{2\}'" contains=juliaHexEscapeChar
|
||||
syntax match juliaChar display "'\\u\x\{1,4\}'" contains=juliaUniCharSmall
|
||||
syntax match juliaChar display "'\\U\x\{1,8\}'" contains=juliaUniCharLarge
|
||||
|
||||
exec 'syntax match juliaCTransOperator "[[:space:]}' . s:nonid_chars . s:uniop_chars . s:binop_chars . '!?]\@'.s:d(1).'<!\.\?' . "'" . '"'
|
||||
|
||||
syntax region juliaString matchgroup=juliaStringDelim start=+\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckStrings
|
||||
syntax region juliabString matchgroup=juliaStringDelim start=+\<b\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
||||
syntax region juliasString matchgroup=juliaStringDelim start=+\<s\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
||||
syntax region juliavString matchgroup=juliaStringDelim start=+\<v\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+
|
||||
syntax region juliaipString matchgroup=juliaStringDelim start=+\<ip\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+
|
||||
syntax region juliabigString matchgroup=juliaStringDelim start=+\<big\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+
|
||||
syntax region juliaMIMEString matchgroup=juliaStringDelim start=+\<MIME\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
||||
|
||||
syntax region juliaDocString matchgroup=juliaStringDelim start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
||||
|
||||
exec 'syntax region juliaPrintfMacro contained transparent start="@s\?printf(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaPrintfParBlock'
|
||||
syntax region juliaPrintfMacro contained transparent start="@s\?printf\s\+" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExprsPrintf,juliaMacro,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS
|
||||
syntax region juliaPrintfParBlock contained matchgroup=juliaParDelim start="(" end=")" contains=@juliaExprsPrintf
|
||||
syntax region juliaPrintfString contained matchgroup=juliaStringDelim start=+"+ skip=+\%(\\\\\)*\\"+ end=+"+ contains=@juliaSpecialChars,@juliaPrintfChars
|
||||
|
||||
syntax region juliaShellString matchgroup=juliaStringDelim start=+`+ skip=+\%(\\\\\)*\\`+ end=+`+ contains=@juliaStringVars,juliaSpecialChar
|
||||
|
||||
syntax cluster juliaStringVars contains=juliaStringVarsPar,juliaStringVarsSqBra,juliaStringVarsCurBra,juliaStringVarsPla
|
||||
syntax region juliaStringVarsPar contained matchgroup=juliaStringVarDelim start="$(" end=")" contains=@juliaExpressions
|
||||
syntax region juliaStringVarsSqBra contained matchgroup=juliaStringVarDelim start="$\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS
|
||||
syntax region juliaStringVarsCurBra contained matchgroup=juliaStringVarDelim start="${" end="}" contains=@juliaExpressions
|
||||
exec 'syntax match juliaStringVarsPla contained "\$' . s:idregex . '"'
|
||||
|
||||
" TODO improve RegEx
|
||||
syntax region juliaRegEx matchgroup=juliaStringDelim start=+\<r\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1[imsx]*+
|
||||
|
||||
syntax cluster juliaSpecialChars contains=juliaSpecialChar,juliaOctalEscapeChar,juliaHexEscapeChar,juliaUniCharSmall,juliaUniCharLarge
|
||||
syntax match juliaSpecialChar display contained "\\."
|
||||
syntax match juliaOctalEscapeChar display contained "\\\o\{3\}"
|
||||
syntax match juliaHexEscapeChar display contained "\\x\x\{2\}"
|
||||
syntax match juliaUniCharSmall display contained "\\u\x\{1,4\}"
|
||||
syntax match juliaUniCharLarge display contained "\\U\x\{1,8\}"
|
||||
|
||||
syntax cluster juliaPrintfChars contains=juliaErrorPrintfFmt,juliaPrintfFmt
|
||||
syntax match juliaErrorPrintfFmt display contained "\\\?%."
|
||||
syntax match juliaPrintfFmt display contained "%\%(\d\+\$\)\=[-+' #0]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjqzt]\|ll\|hh\)\=[aAbdiuoxXDOUfFeEgGcCsSpn]"
|
||||
syntax match juliaPrintfFmt display contained "%%"
|
||||
syntax match juliaPrintfFmt display contained "\\%\%(\d\+\$\)\=[-+' #0]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjqzt]\|ll\|hh\)\=[aAbdiuoxXDOUfFeEgGcCsSpn]"hs=s+1
|
||||
syntax match juliaPrintfFmt display contained "\\%%"hs=s+1
|
||||
|
||||
" this is used to restrict the search for Symbols to when colons appear at all
|
||||
" (for performance reasons)
|
||||
syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon
|
||||
|
||||
let s:quotable = '\%(' . s:idregex . '\|?\|' . s:operators . '\|' . s:float_regex . '\|' . s:int_regex . '\)'
|
||||
let s:quoting_colon = '\%(\%(^\s*\|\s\{6,\}\|[' . s:nonid_chars . s:uniop_chars . s:binop_chars . '?]\s*\)\@'.s:d(6).'<=\|\%(\<\%(return\|if\|else\%(if\)\?\|while\|try\|begin\)\s*\)\@'.s:d(9).'<=\)\zs:'
|
||||
let s:quoting_colonS = '\s\@'.s:d(1).'<=:'
|
||||
|
||||
" note: juliaSymbolS only works within whitespace-sensitive contexts,
|
||||
" such as in macro calls without parentheses, or within square brackets.
|
||||
" It is used to override the recognition of expressions like `a :b` as
|
||||
" ranges rather than symbols in those contexts.
|
||||
" (Note that such `a :b` expressions only allows at most 5 spaces between
|
||||
" the identifier and the colon anyway.)
|
||||
|
||||
exec 'syntax match juliaSymbol contained "' .s:quoting_colon . s:quotable . '"'
|
||||
exec 'syntax match juliaSymbolS contained "' . s:quoting_colonS . s:quotable . '"'
|
||||
|
||||
" same as above for quoted expressions such as :(expr)
|
||||
" (includes :(?) as a special case, although it really shouldn't work...)
|
||||
exec 'syntax region juliaQuotedParBlock matchgroup=juliaQParDelim start="' . s:quoting_colon . '(" end=")" contains=@juliaExpressions'
|
||||
exec 'syntax match juliaQuotedQMarkPar "' . s:quoting_colon . '(\s*?\s*)" contains=juliaQuotedQMark'
|
||||
exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained start="' . s:quoting_colonS . '(" end=")" contains=@juliaExpressions'
|
||||
exec 'syntax match juliaQuotedQMarkParS contained "' . s:quoting_colonS . '(\s*?\s*)" contains=juliaQuotedQMark'
|
||||
|
||||
" force precedence over Symbols
|
||||
syntax match juliaOperator display "::"
|
||||
|
||||
syntax region juliaCommentL matchgroup=juliaCommentDelim start="#\ze\%([^=]\|$\)" end="$" keepend contains=juliaTodo,@juliaSpellcheckComments
|
||||
syntax region juliaCommentM matchgroup=juliaCommentDelim start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
||||
syntax keyword juliaTodo contained TODO FIXME XXX
|
||||
|
||||
|
||||
" Misc. blocks
|
||||
syn region juliaMiscBlockBlock transparent matchgroup=juliaMiscBlock start="\<\%(quote\|do\|begin\|let\)\>" end="\<end\>" contains=ALL
|
||||
" the following are disabled by default, but
|
||||
" can be enabled by entering e.g.
|
||||
" :hi link juliaParDelim Delimiter
|
||||
hi def link juliaParDelim juliaNone
|
||||
hi def link juliaSemicolon juliaNone
|
||||
hi def link juliaComma juliaNone
|
||||
|
||||
hi def link juliaMiscBlock Repeat
|
||||
|
||||
" Braces and Brackets
|
||||
syn region juliaBracketsBlock matchgroup=juliaBrackets start='\[' end='\]' contains=ALLBUT,juliaRepeatBlock contained
|
||||
syn region juliaBracesBlock matchgroup=juliaBraces start='{' end='}' contains=ALLBUT,juliaRepeatBlock contained
|
||||
|
||||
" Repeat
|
||||
syn region juliaRepeatBlock transparent matchgroup=juliaRepeat start="\<\%(while\|for\)\>" end="\<end\>" contains=@juliaTop
|
||||
|
||||
hi def link juliaRepeat Repeat
|
||||
|
||||
" Conditional
|
||||
syn keyword juliaElse else elseif
|
||||
syn region juliaIfBlock transparent matchgroup=juliaIf start="\<if\>" end="\<end\>" contains=@juliaTop
|
||||
|
||||
hi def link juliaElse Conditional
|
||||
hi def link juliaIf Conditional
|
||||
hi def link juliaColon juliaOperator
|
||||
|
||||
|
||||
" try catch end
|
||||
syn keyword juliaCatch catch contained
|
||||
syn region juliaTryBlock transparent matchgroup=juliaTry start="\<try\>" end="\<end\>" contains=@juliaTop
|
||||
hi def link juliaKeyword Keyword
|
||||
hi def link juliaInfixKeyword Keyword
|
||||
hi def link juliaRepKeyword Keyword
|
||||
hi def link juliaBlKeyword Keyword
|
||||
hi def link juliaConditional Conditional
|
||||
hi def link juliaRepeat Repeat
|
||||
hi def link juliaException Exception
|
||||
hi def link juliaTypedef Keyword
|
||||
exec 'hi! def link juliaOuter ' . (b:julia_syntax_version >= 7 ? 'Keyword' : 'NONE')
|
||||
hi def link juliaBaseTypeBasic Type
|
||||
hi def link juliaBaseTypeNum Type
|
||||
hi def link juliaBaseTypeC Type
|
||||
hi def link juliaBaseTypeError Type
|
||||
hi def link juliaBaseTypeIter Type
|
||||
hi def link juliaBaseTypeString Type
|
||||
hi def link juliaBaseTypeArray Type
|
||||
hi def link juliaBaseTypeDict Type
|
||||
hi def link juliaBaseTypeSet Type
|
||||
hi def link juliaBaseTypeIO Type
|
||||
hi def link juliaBaseTypeProcess Type
|
||||
hi def link juliaBaseTypeRange Type
|
||||
hi def link juliaBaseTypeRegex Type
|
||||
hi def link juliaBaseTypeFact Type
|
||||
hi def link juliaBaseTypeSort Type
|
||||
hi def link juliaBaseTypeRound Type
|
||||
hi def link juliaBaseTypeSpecial Type
|
||||
hi def link juliaBaseTypeRandom Type
|
||||
hi def link juliaBaseTypeDisplay Type
|
||||
hi def link juliaBaseTypeTime Type
|
||||
hi def link juliaBaseTypeOther Type
|
||||
for t in ["Basic", "Array", "Set", "Range", "Time", "Process"]
|
||||
let h = b:julia_syntax_version >= 6 ? "Type" : "NONE"
|
||||
exec "hi! def link juliaBaseType" . t . "0607 " . h
|
||||
endfor
|
||||
for t in ["Iter", "Range"]
|
||||
let h = b:julia_syntax_version == 5 ? "Type" : b:julia_syntax_version == 6 ? "juliaDeprecated" : "NONE"
|
||||
exec "hi! def link juliaBaseType" . t . "05 " . h
|
||||
endfor
|
||||
for t in ["Range", "Set"]
|
||||
let h = b:julia_syntax_version <= 6 ? "Type" : "juliaDeprecated"
|
||||
exec "hi! def link juliaBaseType" . t . "0506 " . h
|
||||
endfor
|
||||
for t in ["Range", "Set"]
|
||||
let h = b:julia_syntax_version >= 7 ? "Type" : "NONE"
|
||||
exec "hi! def link juliaBaseType" . t . "07 " . h
|
||||
endfor
|
||||
|
||||
hi def link juliaTry Exception
|
||||
hi def link juliaCatch Exception
|
||||
" NOTE: deprecated constants are not highlighted as such. For once,
|
||||
" one can still legitimately use them by importing Base.MathConstants.
|
||||
" Plus, one-letter variables like `e` and `γ` can be used with other
|
||||
" meanings.
|
||||
hi def link juliaConstNum Constant
|
||||
let h = b:julia_syntax_version <= 6 ? "Constant" : "NONE"
|
||||
exec "hi! def link juliaConstNum0506 " . h
|
||||
let h = b:julia_syntax_version >= 7 ? "Constant" : "NONE"
|
||||
exec "hi! def link juliaEuler " . h
|
||||
|
||||
hi def link juliaConstEnv Constant
|
||||
hi def link juliaConstIO Constant
|
||||
hi def link juliaConstC Constant
|
||||
hi def link juliaConstLimits Constant
|
||||
hi def link juliaConstGeneric Constant
|
||||
hi def link juliaRangeEnd Constant
|
||||
hi def link juliaConstBool Boolean
|
||||
|
||||
" one word statements
|
||||
syn keyword juliaStatement return continue break
|
||||
hi def link juliaComprehensionFor Keyword
|
||||
hi def link juliaComprehensionIf Keyword
|
||||
|
||||
hi def link juliaStatement Statement
|
||||
hi def link juliaDollarVar Identifier
|
||||
|
||||
" misc
|
||||
syn keyword juliaDeclaration const global local
|
||||
syn keyword juliaComprehensionFor for
|
||||
hi def link juliaMacro Macro
|
||||
hi def link juliaSymbol Identifier
|
||||
hi def link juliaSymbolS Identifier
|
||||
hi def link juliaQParDelim Identifier
|
||||
hi def link juliaQuotedQMarkPar Identifier
|
||||
hi def link juliaQuotedQMarkParS Identifier
|
||||
hi def link juliaQuotedQMark juliaOperatorHL
|
||||
|
||||
hi def link juliaDeclaration Keyword
|
||||
hi def link juliaComprehensionFor Keyword
|
||||
hi def link juliaNumber Number
|
||||
hi def link juliaFloat Float
|
||||
hi def link juliaComplexUnit Constant
|
||||
|
||||
" Built in types
|
||||
syn keyword juliaType Uint Uint8 Uint16 Uint32 Uint64 Uint128
|
||||
syn keyword juliaType Int Int8 Int16 Int32 Int64 Int128
|
||||
syn keyword juliaType Float Float16 Float32 Float64
|
||||
syn keyword juliaType AbstractArray AbstractMatrix AbstractVector Array Vector Matrix
|
||||
syn keyword juliaType String ByteString UTF8String SubString
|
||||
syn keyword juliaType Bool Nothing Union Type
|
||||
hi def link juliaChar Character
|
||||
|
||||
hi def link juliaString String
|
||||
hi def link juliabString String
|
||||
hi def link juliasString String
|
||||
hi def link juliavString String
|
||||
hi def link juliarString String
|
||||
hi def link juliaipString String
|
||||
hi def link juliabigString String
|
||||
hi def link juliaMIMEString String
|
||||
hi def link juliaPrintfString String
|
||||
hi def link juliaShellString String
|
||||
hi def link juliaDocString String
|
||||
hi def link juliaStringDelim String
|
||||
hi def link juliaStringVarsPla Identifier
|
||||
hi def link juliaStringVarDelim Identifier
|
||||
|
||||
hi def link juliaType Type
|
||||
hi def link juliaRegEx String
|
||||
|
||||
hi def link juliaSpecialChar SpecialChar
|
||||
hi def link juliaOctalEscapeChar SpecialChar
|
||||
hi def link juliaHexEscapeChar SpecialChar
|
||||
hi def link juliaUniCharSmall SpecialChar
|
||||
hi def link juliaUniCharLarge SpecialChar
|
||||
|
||||
" Comments
|
||||
syn keyword juliaTodo contained TODO FIXME XXX
|
||||
syn cluster juliaCommentGroup contains=juliaTodo
|
||||
syn region juliaComment start="#" end="$" contains=@juliaCommentGroup,@Spell
|
||||
hi def link juliaPrintfFmt SpecialChar
|
||||
|
||||
hi def link juliaComment Comment
|
||||
hi def link juliaTodo Todo
|
||||
if s:julia_highlight_operators
|
||||
hi! def link juliaOperatorHL Operator
|
||||
else
|
||||
hi! def link juliaOperatorHL juliaNone
|
||||
endif
|
||||
hi def link juliaOperator juliaOperatorHL
|
||||
hi def link juliaRangeOperator juliaOperatorHL
|
||||
hi def link juliaCTransOperator juliaOperatorHL
|
||||
hi def link juliaTernaryOperator juliaOperatorHL
|
||||
|
||||
hi def link juliaCommentL Comment
|
||||
hi def link juliaCommentM Comment
|
||||
hi def link juliaCommentDelim Comment
|
||||
hi def link juliaTodo Todo
|
||||
|
||||
" Strings
|
||||
syn region juliaString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@juliaStringGroup,@Spell
|
||||
syn region juliaTripleString start=+"""+ end=+"""+
|
||||
syn region juliaCharacter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@juliaCharacterGroup
|
||||
hi def link juliaErrorPar juliaError
|
||||
hi def link juliaErrorEnd juliaError
|
||||
hi def link juliaErrorElse juliaError
|
||||
hi def link juliaErrorCatch juliaError
|
||||
hi def link juliaErrorFinally juliaError
|
||||
hi def link juliaErrorSemicol juliaError
|
||||
hi def link juliaErrorPrintfFmt juliaError
|
||||
|
||||
hi def link juliaString String
|
||||
hi def link juliaTripleString String
|
||||
hi def link juliaCharacter Character
|
||||
hi def link juliaError Error
|
||||
|
||||
if b:julia_syntax_highlight_deprecated == 1
|
||||
hi! def link juliaDeprecated Todo
|
||||
else
|
||||
hi! def link juliaDeprecated NONE
|
||||
end
|
||||
|
||||
" Functions
|
||||
syn region juliaFunctionBlock transparent matchgroup=juliaFunction start="\<\%\(function\|macro\)\>" end="\<end\>" contains=@juliaTop
|
||||
hi def link juliaFunction Function
|
||||
|
||||
|
||||
" Numbers
|
||||
syn match juliaNumber "\<\d\+\([Ee]\d\+\)\?\>"
|
||||
syn match juliaNumber "\<0x\x\+\>"
|
||||
syn match juliaNumber "\<0\o\+\>"
|
||||
|
||||
syn match juliaFloat "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
|
||||
syn match juliaFloat "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
|
||||
syn match juliaFloat "\<\d\+[Ee][-+]\d\+\>"
|
||||
syn keyword juliaFloatSpecial NaN Inf
|
||||
|
||||
hi def link juliaNumber Number
|
||||
hi def link juliaFloat Float
|
||||
hi def link juliaFloatSpecial Float
|
||||
|
||||
|
||||
" Operators
|
||||
syn keyword juliaIn in
|
||||
hi def link juliaIn Operator
|
||||
|
||||
|
||||
" Constants
|
||||
syn keyword juliaBool true false nothing
|
||||
hi def link juliaBool Boolean
|
||||
|
||||
syn keyword juliaIdentifierSpecial STDOUT, STDIN, STDERR
|
||||
|
||||
hi def link juliaIdentifierSpecial Identifier
|
||||
|
||||
|
||||
" Macros
|
||||
syn match juliaMacro display "@[_[:alpha:]][_[:alnum:]!]*\%(\.[_[:alpha:]][_[:alnum:]!]*\)*"
|
||||
|
||||
hi def link juliaMacro Macro
|
||||
|
||||
|
||||
syn cluster juliaTop contains=ALLBUT,juliaComprehensionFor
|
||||
|
||||
" Ragel
|
||||
syn include @ragel syntax/ragel.vim
|
||||
syn region ragelLine start="%%" end="$" contains=@ragel
|
||||
|
||||
syntax sync fromstart
|
||||
|
||||
let b:current_syntax = "julia"
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user