Update (periodic rebuild)

I originally meant to run this before adding haproxy, but accidentally
pushed that into my branch.  If you'd like to see that content, it's at
414ad25c3a.
This commit is contained in:
Dan Reif
2018-04-30 12:00:42 -07:00
parent b4d7993e7e
commit 3e0c887365
53 changed files with 2770 additions and 1423 deletions

View File

@@ -22,6 +22,7 @@ function! dart#fmt(q_args) abort
if executable('dartfmt')
let buffer_content = join(getline(1, '$'), "\n")
let joined_lines = system(printf('dartfmt %s', a:q_args), buffer_content)
if buffer_content ==# joined_lines[:-2] | return | endif
if 0 == v:shell_error
let win_view = winsaveview()
let lines = split(joined_lines, "\n")
@@ -129,6 +130,15 @@ function! s:PackageMap() abort
return [v:true, map]
endfunction
" Toggle whether dartfmt is run on save or not.
function! dart#ToggleFormatOnSave() abort
if get(g:, "dart_format_on_save", 0)
let g:dart_format_on_save = 0
return
endif
let g:dart_format_on_save = 1
endfunction
" Finds a file name '.packages' in the cwd, or in any directory above the open
" file.
"

View File

@@ -94,44 +94,61 @@ let landmark_role = [
\ ]
" Ref: https://www.w3.org/TR/dpub-aria-1.0/
" Version: W3C Candidate Recommendation 15 December 2016
" Version: W3C Recommendation 14 December 2017
let dpub_role = [
\ 'dpub-abstract',
\ 'dpub-afterword',
\ 'dpub-appendix',
\ 'dpub-biblioentry',
\ 'dpub-bibliography',
\ 'dpub-biblioref',
\ 'dpub-chapter',
\ 'dpub-cover',
\ 'dpub-epilogue',
\ 'dpub-footnote',
\ 'dpub-footnotes',
\ 'dpub-foreword',
\ 'dpub-glossary',
\ 'dpub-glossdef',
\ 'dpub-glossref',
\ 'dpub-glossterm',
\ 'dpub-index',
\ 'dpub-locator',
\ 'dpub-noteref',
\ 'dpub-notice',
\ 'dpub-pagebreak',
\ 'dpub-pagelist',
\ 'dpub-part',
\ 'dpub-preface',
\ 'dpub-prologue',
\ 'dpub-pullquote',
\ 'dpub-qna',
\ 'dpub-subtitle',
\ 'dpub-tip',
\ 'dpub-title',
\ 'dpub-toc'
\ 'doc-abstract',
\ 'doc-acknowledgments',
\ 'doc-afterword',
\ 'doc-appendix',
\ 'doc-backlink',
\ 'doc-biblioentry',
\ 'doc-bibliography',
\ 'doc-biblioref',
\ 'doc-chapter',
\ 'doc-colophon',
\ 'doc-conclusion',
\ 'doc-cover',
\ 'doc-credit',
\ 'doc-credits',
\ 'doc-dedication',
\ 'doc-endnote',
\ 'doc-endnotes',
\ 'doc-epigraph',
\ 'doc-epilogue',
\ 'doc-errata',
\ 'doc-example',
\ 'doc-footnote',
\ 'doc-foreword',
\ 'doc-glossary',
\ 'doc-glossref',
\ 'doc-index',
\ 'doc-introduction',
\ 'doc-noteref',
\ 'doc-notice',
\ 'doc-pagebreak',
\ 'doc-pagelist',
\ 'doc-part',
\ 'doc-preface',
\ 'doc-prologue',
\ 'doc-pullquote',
\ 'doc-qna',
\ 'doc-subtitle',
\ 'doc-tip',
\ 'doc-toc'
\ ]
" Ref: https://www.w3.org/TR/graphics-aria-1.0/
" Version: W3C Candidate Recommendation 29 March 2018
let graphic_role = [
\ 'graphics-document',
\ 'graphics-object',
\ 'graphics-symbol'
\ ]
let role = extend(widget_role, document_structure)
let role = extend(role, landmark_role)
let role = extend(role, dpub_role)
let role = extend(role, graphic_role)
" https://www.w3.org/TR/wai-aria-1.1/#states_and_properties
let global_states_and_properties = {

View File

@@ -374,6 +374,8 @@ let abutton_dec = 'details\\|embed\\|iframe\\|keygen\\|label\\|menu\\|select\\|t
let crossorigin = ['anonymous', 'use-credentials']
let referrerpolicy = ['no-referrer', 'no-referrer-when-downgrade', 'same-origin', 'origin', 'strict-origin', 'origin-when-cross-origin', 'strict-origin-when-cross-origin', 'unsafe-url']
let g:xmldata_html5 = {
\ 'vimxmlentities': ['AElig', 'Aacute', 'Acirc', 'Agrave', 'Alpha', 'Aring', 'Atilde', 'Auml', 'Beta', 'Ccedil', 'Chi', 'Dagger', 'Delta', 'ETH', 'Eacute', 'Ecirc', 'Egrave', 'Epsilon', 'Eta', 'Euml', 'Gamma', 'Iacute', 'Icirc', 'Igrave', 'Iota', 'Iuml', 'Kappa', 'Lambda', 'Mu', 'Ntilde', 'Nu', 'OElig', 'Oacute', 'Ocirc', 'Ograve', 'Omega', 'Omicron', 'Oslash', 'Otilde', 'Ouml', 'Phi', 'Pi', 'Prime', 'Psi', 'Rho', 'Scaron', 'Sigma', 'THORN', 'Tau', 'Theta', 'Uacute', 'Ucirc', 'Ugrave', 'Upsilon', 'Uuml', 'Xi', 'Yacute', 'Yuml', 'Zeta', 'aacute', 'acirc', 'acute', 'aelig', 'agrave', 'alefsym', 'alpha', 'amp', 'and', 'ang', 'apos', 'aring', 'asymp', 'atilde', 'auml', 'bdquo', 'beta', 'brvbar', 'bull', 'cap', 'ccedil', 'cedil', 'cent', 'chi', 'circ', 'clubs', 'cong', 'copy', 'crarr', 'cup', 'curren', 'dArr', 'dagger', 'darr', 'deg', 'delta', 'diams', 'divide', 'eacute', 'ecirc', 'egrave', 'empty', 'emsp', 'ensp', 'epsilon', 'equiv', 'eta', 'eth', 'euml', 'euro', 'exist', 'fnof', 'forall', 'frac12', 'frac14', 'frac34', 'frasl', 'gamma', 'ge', 'gt', 'hArr', 'harr', 'hearts', 'hellip', 'iacute', 'icirc', 'iexcl', 'igrave', 'image', 'infin', 'int', 'iota', 'iquest', 'isin', 'iuml', 'kappa', 'lArr', 'lambda', 'lang', 'laquo', 'larr', 'lceil', 'ldquo', 'le', 'lfloor', 'lowast', 'loz', 'lrm', 'lsaquo', 'lsquo', 'lt', 'macr', 'mdash', 'micro', 'middot', 'minus', 'mu', 'nabla', 'nbsp', 'ndash', 'ne', 'ni', 'not', 'notin', 'nsub', 'ntilde', 'nu', 'oacute', 'ocirc', 'oelig', 'ograve', 'oline', 'omega', 'omicron', 'oplus', 'or', 'ordf', 'ordm', 'oslash', 'otilde', 'otimes', 'ouml', 'para', 'part', 'permil', 'perp', 'phi', 'pi', 'piv', 'plusmn', 'pound', 'prime', 'prod', 'prop', 'psi', 'quot', 'rArr', 'radic', 'rang', 'raquo', 'rarr', 'rceil', 'rdquo', 'real', 'reg', 'rfloor', 'rho', 'rlm', 'rsaquo', 'rsquo', 'sbquo', 'scaron', 'sdot', 'sect', 'shy', 'sigma', 'sigmaf', 'sim', 'spades', 'sub', 'sube', 'sum', 'sup', 'sup1', 'sup2', 'sup3', 'supe', 'szlig', 'tau', 'there4', 'theta', 'thetasym', 'thinsp', 'thorn', 'tilde', 'times', 'trade', 'uArr', 'uacute', 'uarr', 'ucirc', 'ugrave', 'uml', 'upsih', 'upsilon', 'uuml', 'weierp', 'xi', 'yacute', 'yen', 'yuml', 'zeta', 'zwj', 'zwnj'],
@@ -392,7 +394,7 @@ let g:xmldata_html5 = {
\ ],
\ 'area': [
\ [],
\ extend(copy(global_attributes), {'alt': [], 'href': [], 'target': [], 'rel': linktypes, 'media': [], 'hreflang': lang_tag, 'type': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'coords': [], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url']})
\ extend(copy(global_attributes), {'alt': [], 'href': [], 'target': [], 'rel': linktypes, 'media': [], 'hreflang': lang_tag, 'type': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'coords': [], 'referrerpolicy': referrerpolicy})
\ ],
\ 'article': [
\ flow_elements + ['style'],
@@ -490,6 +492,10 @@ let g:xmldata_html5 = {
\ filter(copy(phrasing_elements), "!(v:val =~ 'dfn')"),
\ global_attributes
\ ],
\ 'dialog': [
\ flow_elements,
\ extend(copy(global_attributes), {'open': []})
\ ],
\ 'div': [
\ flow_elements + ['style'],
\ global_attributes
@@ -580,11 +586,11 @@ let g:xmldata_html5 = {
\ ],
\ 'iframe': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'srcdoc': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', ''], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'allowfullscreen': [], 'allowpaymentrequest': [], 'allowpresentation': [], 'allowusermedia': []})
\ extend(copy(global_attributes), {'src': [], 'srcdoc': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', ''], 'referrerpolicy': referrerpolicy, 'allowfullscreen': [], 'allowpaymentrequest': [], 'allowpresentation': [], 'allowusermedia': []})
\ ],
\ 'img': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'decoding': ['async', 'sync', 'auto'], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'crossorigin': ['anonymous', 'use-credentials']})
\ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'decoding': ['async', 'sync', 'auto'], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': referrerpolicy, 'crossorigin': ['anonymous', 'use-credentials']})
\ ],
\ 'input': [
\ [],
@@ -616,7 +622,7 @@ let g:xmldata_html5 = {
\ ],
\ 'link': [
\ [],
\ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any'], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'crossorigin': crossorigin, 'preload': ['preload', ''], 'prefetch': ['prefetch', ''], 'as': ['report', 'document', 'document', 'object', 'embed', 'audio', 'font', 'image', 'audioworklet', 'paintworklet', 'script', 'serviceworker', 'sharedworker', 'worker', 'style', 'track', 'video', 'image', 'manifest', 'xslt', 'fetch', '']})
\ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any'], 'referrerpolicy': referrerpolicy, 'crossorigin': crossorigin, 'preload': ['preload', ''], 'prefetch': ['prefetch', ''], 'as': ['report', 'document', 'document', 'object', 'embed', 'audio', 'font', 'image', 'audioworklet', 'paintworklet', 'script', 'serviceworker', 'sharedworker', 'worker', 'style', 'track', 'video', 'image', 'manifest', 'xslt', 'fetch', '']})
\ ],
\ 'main': [
\ flow_elements + ['style'],

View File

@@ -30,8 +30,8 @@ CompilerSet errorformat=
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:in\ %*[^:]:\ %m,
\%E%f:%l:\ %m,
\%-C%\tfrom\ %f:%l:in\ %.%#,
\%-Z%\tfrom\ %f:%l,
\%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#,
\%-Z%\t%\\d%#:%#\ %#from\ %f:%l,
\%-Z%p^,
\%-G%.%#

View File

@@ -22,12 +22,12 @@ CompilerSet makeprg=rake
CompilerSet errorformat=
\%D(in\ %f),
\%\\s%#from\ %f:%l:%m,
\%\\s%#from\ %f:%l:,
\%\\s%##\ %f:%l:%m%\\&%.%#%\\D:%\\d%#:%.%#,
\%\\s%##\ %f:%l%\\&%.%#%\\D:%\\d%#,
\%\\s%#[%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%#:%.%#,
\%\\s%#%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%#:%.%#,
\%\\s%#%\\d%#:%#\ %#from\ %f:%l:%m,
\%\\s%#%\\d%#:%#\ %#from\ %f:%l:,
\%\\s%##\ %f:%l:%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
\%\\s%##\ %f:%l%\\&%.%#%\\D:%\\d%\\+,
\%\\s%#[%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
\%\\s%#%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
\%\\s%#%f:%l:,
\%m\ [%f:%l]:,
\%+Erake\ aborted!,

View File

@@ -25,7 +25,7 @@ CompilerSet errorformat=
\%E%.%#:in\ `load':\ %f:%l:%m,
\%E%f:%l:in\ `%*[^']':\ %m,
\%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#,
\%E\ \ %\\d%\\+)%.%#,
\%E\ \ \ \ \ Failure/Error:\ %m,
\%C\ \ \ \ \ %m,
\%C%\\s%#,
\%-G%.%#

View File

@@ -23,21 +23,21 @@ set cpo-=C
" default settings runs script normally
" add '-c' switch to run syntax check only:
"
" CompilerSet makeprg=ruby\ -wc\ $*
" CompilerSet makeprg=ruby\ -c
"
" or add '-c' at :make command line:
"
" :make -c %<CR>
"
CompilerSet makeprg=ruby\ -w\ $*
CompilerSet makeprg=ruby
CompilerSet errorformat=
\%+E%f:%l:\ parse\ error,
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:in\ %*[^:]:\ %m,
\%E%f:%l:\ %m,
\%-C%\tfrom\ %f:%l:in\ %.%#,
\%-Z%\tfrom\ %f:%l,
\%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#,
\%-Z%\t%\\d%#:%#\ %#from\ %f:%l,
\%-Z%p^,
\%-G%.%#

View File

@@ -31,6 +31,7 @@ syntax match jsFlowWildcardReturn contained /*/ skipwhite skipempty nextgroup=
syntax region jsFlowFunctionGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncArgs
syntax region jsFlowClassGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsClassBlock
syntax region jsFlowClassFunctionGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncArgs
syntax region jsFlowTypeStatement start=/type\%(\s\+\k\)\@=/ end=/=\@=/ contains=jsFlowTypeOperator oneline skipwhite skipempty nextgroup=jsFlowTypeValue keepend
syntax region jsFlowTypeValue contained matchgroup=jsFlowNoise start=/=/ end=/[\n;]/ contains=@jsFlowCluster,jsFlowGroup,jsFlowMaybe
@@ -83,6 +84,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
HiLink jsFlowReturnGroup jsFlowGroup
HiLink jsFlowFunctionGroup PreProc
HiLink jsFlowClassGroup PreProc
HiLink jsFlowClassFunctionGroup PreProc
HiLink jsFlowArrowArguments PreProc
HiLink jsFlowArrow PreProc
HiLink jsFlowReturnArrow PreProc

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
if exists('+regexpengine') && ('&regexpengine' == 0)
setlocal regexpengine=1
endif
set isfname+=@-@
set path+=./../templates,./../files,templates,files
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
if exists("g:loaded_haskellvim_cabal")
finish
endif
let g:loaded_haskellvim_cabal = 1
endif

View File

@@ -32,11 +32,7 @@ let &l:path =
setlocal includeexpr=elixir#util#get_filename(v:fname)
setlocal suffixesadd=.ex,.exs,.eex,.erl,.yrl,.hrl
if empty(&formatprg)
setlocal formatprg=mix\ format\ -
endif
let &l:define = 'def\(macro|guard|delegate\)p'
let &l:define = 'def\(macro\|guard\|delegate\)\=p\='
silent! setlocal formatoptions-=t formatoptions+=croqlj

View File

@@ -1,20 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
if exists("g:loaded_haskellvim_haskell")
finish
endif
let g:loaded_haskellvim_haskell = 1
function! haskell#sortImports(line1, line2)
exe a:line1 . "," . a:line2 . "sort /import\\s\\+\\(qualified\\s\\+\\)\\?/"
endfunction
function! haskell#formatImport(line1, line2)
exec a:line1 . ",". a:line2 . "s/import\\s\\+\\([A-Z].*\\)/import \\1"
endfunction
command! -buffer -range HaskellSortImports call haskell#sortImports(<line1>, <line2>)
command! -buffer -range HaskellFormatImport call haskell#formatImport(<line1>, <line2>)
endif

View File

@@ -11,7 +11,12 @@ endif
let b:did_ftplugin = 1
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal
\ comments=:#
\ commentstring=#\ %s
\ shiftwidth=2
\ softtabstop=2
\ expandtab
\ iskeyword+=-
endif

View File

@@ -1,6 +1,6 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'purescript') == -1
setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--
setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--\ \|,:--
setlocal include=^import
setlocal includeexpr=printf('%s.purs',substitute(v:fname,'\\.','/','g'))

View File

@@ -320,7 +320,7 @@ function! GetHaskellIndent()
" newtype Foo = Foo
" >>deriving
if l:prevline =~ '\C\s*\<\(newtype\|data\)\>[^{]\+' && l:line =~ '\C^\s*\<deriving\>'
if l:prevline =~ '\C^\s*\<\(newtype\|data\)\>[^{]\+' && l:line =~ '\C^\s*\<deriving\>'
return match(l:prevline, '\S') + &shiftwidth
endif

File diff suppressed because it is too large Load Diff

View File

@@ -89,22 +89,22 @@ function s:SynAt(l,c)
endfunction
function s:ParseCino(f)
let [divider, n, cstr] = [0] + matchlist(&cino,
\ '\%(.*,\)\=\%(\%d'.char2nr(a:f).'\(-\)\=\([.s0-9]*\)\)\=')[1:2]
for c in split(cstr,'\zs')
if c == '.' && !divider
let [s, n, divider] = [strridx(&cino, a:f)+1, '', 0]
while s && &cino[ s ] =~ '[^,]'
if &cino[ s ] == '.'
let divider = 1
elseif c ==# 's'
elseif &cino[ s ] ==# 's'
if n !~ '\d'
return n . s:sw() + 0
endif
let n = str2nr(n) * s:sw()
break
else
let [n, divider] .= [c, 0]
let [n, divider] .= [&cino[ s ], 0]
endif
endfor
return str2nr(n) / max([str2nr(divider),1])
let s += 1
endwhile
return str2nr(n) / max([divider, 1])
endfunction
" Optimized {skip} expr, only callable from the search loop which
@@ -208,18 +208,15 @@ function s:ExprCol()
let bal = 0
while s:SearchLoop('[{}?:]','bW',s:skip_expr)
if s:LookingAt() == ':'
if getline('.')[col('.')-2] == ':'
call cursor(0,col('.')-1)
continue
endif
let bal -= 1
let bal -= !search('\m:\%#','bW')
elseif s:LookingAt() == '?'
if getline('.')[col('.'):col('.')+1] =~ '^\.\d\@!'
continue
" ?. conditional chain, not ternary start
elseif !bal
return 1
endif
else
let bal += 1
endif
elseif s:LookingAt() == '{'
return !s:IsBlock()
elseif !s:GetPair('{','}','bW',s:skip_expr)
@@ -316,8 +313,8 @@ function s:IsContOne(cont)
endfunction
function s:IsSwitch()
return search('\m\C\%'.join(b:js_cache[1:],'l\%').
\ 'c{\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>','nW'.s:z)
return search(printf('\m\C\%%%dl\%%%dc%s',b:js_cache[1],b:js_cache[2],
\ '{\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>'),'nW'.s:z)
endfunction
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
@@ -367,8 +364,8 @@ function GetJavascriptIndent()
return -1
endif
let s:l1 = max([0,prevnonblank(v:lnum) - (s:rel ? 2000 : 1000),
\ get(get(b:,'hi_indent',{}),'blocklnr')])
let nest = get(get(b:,'hi_indent',{}),'blocklnr')
let s:l1 = max([0, prevnonblank(v:lnum) - (s:rel ? 2000 : 1000), nest])
call cursor(v:lnum,1)
if s:PreviousToken() is ''
return
@@ -376,7 +373,7 @@ function GetJavascriptIndent()
let [l:lnum, lcol, pline] = getpos('.')[1:2] + [getline('.')[:col('.')-1]]
let l:line = substitute(l:line,'^\s*','','')
let l:line_raw = l:line
let l:line_s = l:line[0]
if l:line[:1] == '/*'
let l:line = substitute(l:line,'^\%(\/\*.\{-}\*\/\s*\)*','','')
endif
@@ -450,7 +447,7 @@ function GetJavascriptIndent()
let pval = s:ParseCino('(')
if !pval
let [Wval, vcol] = [s:ParseCino('W'), virtcol('.')]
if search('\m\S','W',num)
if search('\m'.get(g:,'javascript_indent_W_pat','\S'),'W',num)
return s:ParseCino('w') ? vcol : virtcol('.')-1
endif
return Wval ? s:Nat(num_ind + Wval) : vcol
@@ -460,7 +457,7 @@ function GetJavascriptIndent()
" main return
if l:line =~ '^[])}]\|^|}'
if l:line_raw[0] == ')'
if l:line_s == ')'
if s:ParseCino('M')
return indent(l:lnum)
elseif num && &cino =~# 'm' && !s:ParseCino('m')
@@ -470,10 +467,8 @@ function GetJavascriptIndent()
return num_ind
elseif num
return s:Nat(num_ind + get(l:,'case_offset',s:sw()) + l:switch_offset + b_l + is_op)
endif
let nest = get(get(b:,'hi_indent',{}),'blocklnr')
if nest
return indent(nest) + s:sw() + b_l + is_op
elseif nest
return indent(nextnonblank(nest+1)) + b_l + is_op
endif
return b_l + is_op
endfunction

View File

@@ -27,13 +27,13 @@ function JuliaMatch(lnum, str, regex, st, ...)
let s = a:st
let e = a:0 > 0 ? a:1 : -1
while 1
let f = match(a:str, a:regex, s)
let f = match(a:str, '\C' . a:regex, s)
if e >= 0 && f >= e
return -1
endif
if f >= 0
let attr = synIDattr(synID(a:lnum,f+1,1),"name")
if attr =~ s:skipPatterns
if attr =~# s:skipPatterns
let s = f+1
continue
endif
@@ -84,7 +84,7 @@ function GetJuliaNestingStruct(lnum, ...)
let i = JuliaMatch(a:lnum, line, '@\@<!\<else\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && blocks_stack[-1] =~ '\<\%(else\)\=if\>'
if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(else\)\=if\>'
let blocks_stack[-1] = 'else'
else
call add(blocks_stack, 'else')
@@ -135,7 +135,7 @@ function GetJuliaNestingStruct(lnum, ...)
let i = JuliaMatch(a:lnum, line, '@\@<!\<\%(while\|for\|\%(staged\)\?function\|macro\|begin\|\%(mutable\s\+\)\?struct\|\%(\%(abstract\|primitive\)\s\+\)\?type\|immutable\|let\|quote\|do\)\>', s)
if i >= 0 && i == fb
if match(line, '\<\%(mutable\|abstract\|primitive\)', i) != -1
if match(line, '\C\<\%(mutable\|abstract\|primitive\)', i) != -1
let s = i+11
else
let s = i+1
@@ -290,16 +290,11 @@ function LastBlockIndent(lnum)
endfunction
function GetJuliaIndent()
let s:save_ignorecase = &ignorecase
set noignorecase
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" At the start of the file use zero indent.
if lnum == 0
let &ignorecase = s:save_ignorecase
unlet s:save_ignorecase
return 0
endif
@@ -387,8 +382,6 @@ function GetJuliaIndent()
let num_closed_blocks -= 1
endwhile
let &ignorecase = s:save_ignorecase
unlet s:save_ignorecase
return ind
endfunction

View File

@@ -33,6 +33,12 @@ function! GetNixIndent()
return 0
endif
" Skip indentation for single line comments explicitly, in case a
" comment was just inserted (eg. visual block mode)
if getline(v:lnum) =~ '^\s*#'
return indent(v:lnum)
endif
if synIDattr(synID(v:lnum, 1, 1), "name") !~ s:skip_syntax
let current_line = getline(v:lnum)
let last_line = getline(lnum)
@@ -63,7 +69,7 @@ function! GetNixIndent()
let ind = indent(v:lnum)
let bslnum = searchpair('''''', '', '''''', 'bnW',
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "InterpolationSpecial$"')
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "StringSpecial$"')
if ind <= indent(bslnum)
let ind = indent(bslnum) + &sw

View File

@@ -42,11 +42,15 @@ endfunction
function! s:IsExcludedFromIndentAtPosition(line, column)
let name = s:SyntaxNameAtPosition(a:line, a:column)
return name ==# "swiftComment" || name ==# "swiftString"
return s:IsSyntaxNameExcludedFromIndent(name)
endfunction
function! s:IsExcludedFromIndent()
return s:SyntaxName() ==# "swiftComment" || s:SyntaxName() ==# "swiftString"
return s:IsSyntaxNameExcludedFromIndent(s:SyntaxName())
endfunction
function! s:IsSyntaxNameExcludedFromIndent(name)
return a:name ==# "swiftComment" || a:name ==# "swiftString" || a:name ==# "swiftInterpolatedWrapper" || a:name ==# "swiftMultilineInterpolatedWrapper" || a:name ==# "swiftMultilineString"
endfunction
function! s:IsCommentLine(lnum)
@@ -103,10 +107,10 @@ function! SwiftIndent(...)
return indent(openingSquare) + shiftwidth()
endif
if line =~ ":$"
if line =~ ":$" && (line =~ '^\s*case\W' || line =~ '^\s*default\W')
let switch = search("switch", "bWn")
return indent(switch)
elseif previous =~ ":$"
elseif previous =~ ":$" && (previous =~ '^\s*case\W' || previous =~ '^\s*default\W')
return previousIndent + shiftwidth()
endif
@@ -133,12 +137,26 @@ function! SwiftIndent(...)
return previousIndent + shiftwidth()
elseif line =~ "}.*{"
let openingBracket = searchpair("{", "", "}", "bWn", "s:IsExcludedFromIndent()")
let bracketLine = getline(openingBracket)
let numOpenParensBracketLine = s:NumberOfMatches("(", bracketLine, openingBracket)
let numCloseParensBracketLine = s:NumberOfMatches(")", bracketLine, openingBracket)
if numOpenParensBracketLine > numCloseParensBracketLine
let line = line(".")
let column = col(".")
call cursor(openingParen, column)
let openingParenCol = searchpairpos("(", "", ")", "bWn", "s:IsExcludedFromIndent()")[1]
call cursor(line, column)
return openingParenCol
endif
return indent(openingBracket)
elseif currentCloseBrackets > currentOpenBrackets
let column = col(".")
call cursor(line("."), 1)
let line = line(".")
call cursor(line, 1)
let openingBracket = searchpair("{", "", "}", "bWn", "s:IsExcludedFromIndent()")
call cursor(line("."), column)
call cursor(line, column)
let bracketLine = getline(openingBracket)
@@ -151,8 +169,23 @@ function! SwiftIndent(...)
let openingParen = searchpair("(", "", ")", "bWn", "s:IsExcludedFromIndent()")
call cursor(line, column)
return indent(openingParen)
elseif numOpenParensBracketLine > numCloseParensBracketLine
let line = line(".")
let column = col(".")
call cursor(openingParen, column)
let openingParenCol = searchpairpos("(", "", ")", "bWn", "s:IsExcludedFromIndent()")[1]
call cursor(line, column)
return openingParenCol
endif
return indent(openingBracket)
elseif line =~ '^\s*)$'
let line = line(".")
let column = col(".")
call cursor(line, 1)
let openingParen = searchpair("(", "", ")", "bWn", "s:IsExcludedFromIndent()")
call cursor(line, column)
return indent(openingParen)
else
" - Current line is blank, and the user presses 'o'
return previousIndent
@@ -196,8 +229,19 @@ function! SwiftIndent(...)
return previousIndent + shiftwidth()
endif
let previousParen = match(previous, "(")
return indent(previousParen) + shiftwidth()
let previousParen = match(previous, '\v\($')
if previousParen != -1
return previousIndent + shiftwidth()
endif
let line = line(".")
let column = col(".")
call cursor(previousNum, col([previousNum, "$"]))
let previousParen = searchpairpos("(", "", ")", "cbWn", "s:IsExcludedFromIndent()")
call cursor(line, column)
" Match the last non escaped paren on the previous line
return previousParen[1]
endif
if numOpenBrackets > numCloseBrackets
@@ -206,7 +250,7 @@ function! SwiftIndent(...)
call cursor(previousNum, column)
let openingParen = searchpair("(", "", ")", "bWn", "s:IsExcludedFromIndent()")
call cursor(line, column)
return indent(openingParen) + shiftwidth()
return openingParen + 1
endif
" - Previous line has close then open braces, indent previous + 1 'sw'
@@ -226,11 +270,23 @@ function! SwiftIndent(...)
" - Line above has (unmatched) open paren, next line needs indent
if numOpenParens > 0
let savePosition = getcurpos()
let lastColumnOfPreviousLine = col([previousNum, "$"]) - 1
" Must be at EOL because open paren has to be above (left of) the cursor
call cursor(previousNum, [previousNum, col("$")])
let previousParen = searchpair("(", "", ")", "cbWn", "s:IsExcludedFromIndent()")
call cursor(previousNum, lastColumnOfPreviousLine)
let previousParen = searchpairpos("(", "", ")", "cbWn", "s:IsExcludedFromIndent()")[1]
" If the paren on the last line is the last character, indent the contents
" at shiftwidth + previous indent
if previousParen == lastColumnOfPreviousLine
return previousIndent + shiftwidth()
endif
" The previous line opens a closure and doesn't close it
if numOpenBrackets > numCloseBrackets
return previousParen + shiftwidth()
endif
call setpos(".", savePosition)
return indent(previousParen) + shiftwidth()
return previousParen
endif
return cindent

View File

@@ -3,24 +3,125 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1
runtime syntax/groovy.vim
syn keyword jenkinsfileBuiltInVariable currentBuild
syn keyword jenkinsfileSection pipeline agent stages steps
syn keyword jenkinsfileDirective environment options parameters triggers stage tools input when
syn keyword jenkinsfileOption contained buildDiscarder disableConcurrentBuilds overrideIndexTriggers skipDefaultCheckout nextgroup=jenkinsfileOptionParams
syn keyword jenkinsfileOption contained skipStagesAfterUnstable checkoutToSubdirectory timeout retry timestamps nextgroup=jenkinsfileOptionParams
syn region jenkinsfileOptionParams contained start="(" end=")" transparent contains=@groovyTop
syn match jenkinsfileOptionO /[a-zA-Z]\+([^)]*)/ contains=jenkinsfileOption,jenkinsfileOptionParams transparent containedin=groovyParenT1
syn keyword jenkinsfileCoreStep checkout
syn keyword jenkinsfileCoreStep docker skipwhite nextgroup=jenkinsFileDockerConfigBlock
syn keyword jenkinsfileCoreStep node
syn keyword jenkinsfileCoreStep scm
syn keyword jenkinsfileCoreStep sh
syn keyword jenkinsfileCoreStep stage
syn keyword jenkinsfileCoreStep parallel
syn keyword jenkinsfileCoreStep steps
syn keyword jenkinsfileCoreStep step
syn keyword jenkinsfileCoreStep tool
syn keyword jenkinsfilePluginStep docker
syn keyword jenkinsfilePluginStep emailext
syn keyword jenkinsfilePluginStep exwsAllocate
syn keyword jenkinsfilePluginStep exws
syn keyword jenkinsfilePluginStep httpRequest
syn keyword jenkinsfilePluginStep junit
" TODO: These should probably be broken out.
syn keyword jenkinsfileCoreStep post always changed failure success unstable aborted
syn region jenkinsFileDockerConfigBlock contained start="{" end="}" contains=groovyString,jenkinsfileDockerKeyword transparent
syn keyword jenkinsFileDockerKeyword contained image args dockerfile additionalBuildArgs
syn keyword jenkinsfilePipelineStep Applitools ArtifactoryGradleBuild Consul MavenDescriptorStep OneSky VersionNumber
syn keyword jenkinsfilePipelineStep ViolationsToBitbucketServer ViolationsToGitHub ViolationsToGitLab _OcAction _OcContextInit
syn keyword jenkinsfilePipelineStep _OcWatch acceptGitLabMR acsDeploy activateDTConfiguration addBadge addErrorBadge
syn keyword jenkinsfilePipelineStep addGitLabMRComment addInfoBadge addInteractivePromotion addShortText addWarningBadge
syn keyword jenkinsfilePipelineStep allure anchore androidApkMove androidApkUpload androidLint ansiColor ansiblePlaybook
syn keyword jenkinsfilePipelineStep ansibleTower ansibleVault appMonBuildEnvironment appMonPublishTestResults appMonRegisterTestRun
syn keyword jenkinsfilePipelineStep applatix approveReceivedEvent approveRequestedEvent aqua archive archiveArtifacts
syn keyword jenkinsfilePipelineStep arestocats artifactResolver artifactoryDistributeBuild artifactoryDownload artifactoryMavenBuild
syn keyword jenkinsfilePipelineStep artifactoryPromoteBuild artifactoryUpload awaitDeployment awaitDeploymentCompletion
syn keyword jenkinsfilePipelineStep awsCodeBuild awsIdentity azureCLI azureDownload azureFunctionAppPublish azureUpload
syn keyword jenkinsfilePipelineStep azureVMSSUpdate azureVMSSUpdateInstances azureWebAppPublish backlogPullRequest bat
syn keyword jenkinsfilePipelineStep bearychatSend benchmark bitbucketStatusNotify blazeMeterTest build buildBamboo buildImage
syn keyword jenkinsfilePipelineStep bzt cache catchError cbt cbtScreenshotsTest cbtSeleniumTest cfInvalidate cfnCreateChangeSet
syn keyword jenkinsfilePipelineStep cfnDelete cfnDeleteStackSet cfnDescribe cfnExecuteChangeSet cfnExports cfnUpdate
syn keyword jenkinsfilePipelineStep cfnUpdateStackSet cfnValidate changeAsmVer checkstyle chefSinatraStep cifsPublisher
syn keyword jenkinsfilePipelineStep cleanWs cleanup cloudshareDockerMachine cm cmake cmakeBuild cobertura codefreshLaunch
syn keyword jenkinsfilePipelineStep codefreshRun codescene codesonar collectEnv conanAddRemote conanAddUser configFileProvider
syn keyword jenkinsfilePipelineStep container containerLog contrastAgent contrastVerification copy copyArtifacts coverityResults
syn keyword jenkinsfilePipelineStep cpack createDeploymentEvent createEnvironment createEvent createMemoryDump createSummary
syn keyword jenkinsfilePipelineStep createThreadDump crxBuild crxDeploy crxDownload crxReplicate crxValidate ctest ctmInitiatePipeline
syn keyword jenkinsfilePipelineStep ctmPostPiData ctmSetPiData cucumber cucumberSlackSend currentNamespace debianPbuilder
syn keyword jenkinsfilePipelineStep deleteDir dependencyCheckAnalyzer dependencyCheckPublisher dependencyCheckUpdateOnly
syn keyword jenkinsfilePipelineStep dependencyTrackPublisher deployAPI deployArtifacts deployLambda dingding dir disk
syn keyword jenkinsfilePipelineStep dockerFingerprintFrom dockerFingerprintRun dockerNode dockerPullStep dockerPushStep
syn keyword jenkinsfilePipelineStep dockerPushWithProxyStep doktor downloadProgetPackage downstreamPublisher dropbox
syn keyword jenkinsfilePipelineStep dry ec2 ec2ShareAmi echo ecrLogin emailext emailextrecipients envVarsForTool error
syn keyword jenkinsfilePipelineStep evaluateGate eventSourceLambda executeCerberusCampaign exportPackages exportProjects
syn keyword jenkinsfilePipelineStep exws exwsAllocate figlet fileExists fileOperations findFiles findbugs fingerprint
syn keyword jenkinsfilePipelineStep flywayrunner ftp ftpPublisher gatlingArchive getArtifactoryServer getContext getLastChangesPublisher
syn keyword jenkinsfilePipelineStep git gitbisect githubNotify gitlabBuilds gitlabCommitStatus googleCloudBuild googleStorageDownload
syn keyword jenkinsfilePipelineStep googleStorageUpload gprbuild greet hipchatSend http httpRequest hub_detect hub_scan
syn keyword jenkinsfilePipelineStep hub_scan_failure hubotApprove hubotSend importPackages importProjects inNamespace
syn keyword jenkinsfilePipelineStep inSession initConanClient input invokeLambda isUnix ispwOperation ispwRegisterWebhook
syn keyword jenkinsfilePipelineStep ispwWaitForWebhook jacoco jdbc jiraAddComment jiraAddWatcher jiraAssignIssue jiraAssignableUserSearch
syn keyword jenkinsfilePipelineStep jiraComment jiraDeleteAttachment jiraDeleteIssueLink jiraDeleteIssueRemoteLink jiraDeleteIssueRemoteLinks
syn keyword jenkinsfilePipelineStep jiraDownloadAttachment jiraEditComment jiraEditComponent jiraEditIssue jiraEditVersion
syn keyword jenkinsfilePipelineStep jiraGetAttachmentInfo jiraGetComment jiraGetComments jiraGetComponent jiraGetComponentIssueCount
syn keyword jenkinsfilePipelineStep jiraGetFields jiraGetIssue jiraGetIssueLink jiraGetIssueLinkTypes jiraGetIssueRemoteLink
syn keyword jenkinsfilePipelineStep jiraGetIssueRemoteLinks jiraGetIssueTransitions jiraGetIssueWatches jiraGetProject
syn keyword jenkinsfilePipelineStep jiraGetProjectComponents jiraGetProjectStatuses jiraGetProjectVersions jiraGetProjects
syn keyword jenkinsfilePipelineStep jiraGetVersion jiraIssueSelector jiraJqlSearch jiraLinkIssues jiraNewComponent jiraNewIssue
syn keyword jenkinsfilePipelineStep jiraNewIssueRemoteLink jiraNewIssues jiraNewVersion jiraNotifyIssue jiraSearch jiraTransitionIssue
syn keyword jenkinsfilePipelineStep jiraUploadAttachment jiraUserSearch jmhReport jobDsl junit klocworkBuildSpecGeneration
syn keyword jenkinsfilePipelineStep klocworkIncremental klocworkIntegrationStep1 klocworkIntegrationStep2 klocworkIssueSync
syn keyword jenkinsfilePipelineStep klocworkQualityGateway klocworkWrapper kubernetesApply kubernetesDeploy lastChanges
syn keyword jenkinsfilePipelineStep library libraryResource liquibaseDbDoc liquibaseRollback liquibaseUpdate listAWSAccounts
syn keyword jenkinsfilePipelineStep livingDocs loadRunnerTest lock logstashSend mail marathon mattermostSend memoryMap
syn keyword jenkinsfilePipelineStep milestone mockLoad newArtifactoryServer newBuildInfo newGradleBuild newMavenBuild
syn keyword jenkinsfilePipelineStep nexusArtifactUploader nexusPolicyEvaluation nexusPublisher node nodejs nodesByLabel
syn keyword jenkinsfilePipelineStep notifyBitbucket notifyDeploymon notifyOTC nunit nvm octoPerfTest office365ConnectorSend
syn keyword jenkinsfilePipelineStep openTasks openshiftBuild openshiftCreateResource openshiftDeleteResourceByJsonYaml
syn keyword jenkinsfilePipelineStep openshiftDeleteResourceByKey openshiftDeleteResourceByLabels openshiftDeploy openshiftExec
syn keyword jenkinsfilePipelineStep openshiftImageStream openshiftScale openshiftTag openshiftVerifyBuild openshiftVerifyDeployment
syn keyword jenkinsfilePipelineStep openshiftVerifyService openstackMachine osfBuilderSuiteForSFCCDeploy p4 p4approve
syn keyword jenkinsfilePipelineStep p4publish p4sync p4tag p4unshelve pagerduty parasoftFindings pcBuild pdrone perfReport
syn keyword jenkinsfilePipelineStep perfSigReports perfpublisher plot pmd podTemplate powershell pragprog pretestedIntegrationPublisher
syn keyword jenkinsfilePipelineStep properties protecodesc publishATX publishBrakeman publishBuildInfo publishBuildRecord
syn keyword jenkinsfilePipelineStep publishConfluence publishDeployRecord publishETLogs publishEventQ publishGenerators
syn keyword jenkinsfilePipelineStep publishHTML publishLambda publishLastChanges publishSQResults publishStoplight publishTMS
syn keyword jenkinsfilePipelineStep publishTRF publishTestResult publishTraceAnalysis publishUNIT publishValgrind pullPerfSigReports
syn keyword jenkinsfilePipelineStep puppetCode puppetHiera puppetJob puppetQuery pushImage pushToCloudFoundry pwd pybat
syn keyword jenkinsfilePipelineStep pysh qc queryModuleBuildRequest questavrm r radargunreporting rancher readFile readJSON
syn keyword jenkinsfilePipelineStep readManifest readMavenPom readProperties readTrusted readXml readYaml realtimeJUnit
syn keyword jenkinsfilePipelineStep registerWebhook release resolveScm retry rocketSend rtp runConanCommand runFromAlmBuilder
syn keyword jenkinsfilePipelineStep runLoadRunnerScript runValgrind s3CopyArtifact s3Delete s3Download s3FindFiles s3Upload
syn keyword jenkinsfilePipelineStep salt sauce saucePublisher sauceconnect script selectRun sendCIMessage sendDeployableMessage
syn keyword jenkinsfilePipelineStep serviceNow_attachFile serviceNow_attachZip serviceNow_createChange serviceNow_getCTask
syn keyword jenkinsfilePipelineStep serviceNow_getChangeState serviceNow_updateChangeItem setAccountAlias setGerritReview
syn keyword jenkinsfilePipelineStep setGitHubPullRequestStatus sh sha1 signAndroidApks silkcentral silkcentralCollectResults
syn keyword jenkinsfilePipelineStep slackSend sleep sloccountPublish snsPublish snykSecurity sonarToGerrit sparkSend
syn keyword jenkinsfilePipelineStep splitTests springBoot sscm sseBuild sseBuildAndPublish sshPublisher sshagent stage
syn keyword jenkinsfilePipelineStep startET startSandbox startSession startTS stash step stepcounter stopET stopSandbox
syn keyword jenkinsfilePipelineStep stopSession stopTS submitJUnitTestResultsToqTest submitModuleBuildRequest svChangeModeStep
syn keyword jenkinsfilePipelineStep svDeployStep svExportStep svUndeployStep svn tagImage task teamconcert tee testFolder
syn keyword jenkinsfilePipelineStep testPackage testProject testiniumExecution themisRefresh themisReport throttle time
syn keyword jenkinsfilePipelineStep timeout timestamps tm tool touch triggerInputStep triggerJob typetalkSend uftScenarioLoad
syn keyword jenkinsfilePipelineStep unarchive unstash unzip updateBotPush updateGitlabCommitStatus updateIdP updateTrustPolicy
syn keyword jenkinsfilePipelineStep upload-pgyer uploadProgetPackage uploadToIncappticConnect vSphere validateDeclarativePipeline
syn keyword jenkinsfilePipelineStep vmanagerLaunch waitForCIMessage waitForJob waitForQualityGate waitForWebhook waitUntil
syn keyword jenkinsfilePipelineStep walk waptProReport warnings whitesource winRMClient withAWS withAnt withContext withCoverityEnv
syn keyword jenkinsfilePipelineStep withCredentials withDockerContainer withDockerRegistry withDockerServer withEnv withKafkaLog
syn keyword jenkinsfilePipelineStep withKubeConfig withMaven withNPM withPod withPythonEnv withSCM withSandbox withSonarQubeEnv
syn keyword jenkinsfilePipelineStep withTypetalk wrap writeFile writeJSON writeMavenPom writeProperties writeXml writeYaml
syn keyword jenkinsfilePipelineStep ws xUnitImporter xUnitUploader xldCreatePackage xldDeploy xldPublishPackage xlrCreateRelease
syn keyword jenkinsfilePipelineStep xrayScanBuild zip
hi link jenkinsfileSection Statement
hi link jenkinsfileDirective jenkinsfileSection
hi link jenkinsfileOption Function
hi link jenkinsfileCoreStep Function
hi link jenkinsfilePluginStep Include
hi link jenkinsfilePipelineStep Include
hi link jenkinsfileBuiltInVariable Identifier
hi link jenkinsFileDockerKeyword jenkinsfilePipelineStep
let b:current_syntax = "Jenkinsfile"

View File

@@ -3,28 +3,23 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
" Vim syntax file
" Language: Ansible YAML/Jinja templates
" Maintainer: Dave Honneffer <pearofducks@gmail.com>
" Last Change: 2015.09.06
if exists("b:current_syntax")
finish
endif
" Last Change: 2018.02.08
if !exists("main_syntax")
let main_syntax = 'yaml'
endif
let b:current_syntax = ''
unlet b:current_syntax
runtime! syntax/yaml.vim
if exists('b:current_syntax')
let s:current_syntax=b:current_syntax
unlet b:current_syntax
endif
let b:current_syntax = ''
unlet b:current_syntax
syntax include @Yaml syntax/yaml.vim
let b:current_syntax = ''
unlet b:current_syntax
syntax include @Jinja syntax/jinja2.vim
if exists('s:current_syntax')
let b:current_syntax=s:current_syntax
endif
" Jinja
" ================================
@@ -39,6 +34,12 @@ highlight link jinjaVarDelim Delimiter
" YAML
" ================================
if exists("g:ansible_yamlKeyName")
let s:yamlKey = g:ansible_yamlKeyName
else
let s:yamlKey = "yamlBlockMappingKey"
endif
" Reset some YAML to plain styling
" the number 80 in Ansible isn't any more important than the word root
highlight link yamlInteger NONE
@@ -46,58 +47,9 @@ highlight link yamlBool NONE
highlight link yamlFlowString NONE
" but it does make sense we visualize quotes easily
highlight link yamlFlowStringDelimiter Delimiter
fun! s:normal_keywords_highlight(name)
if a:name == 'Comment'
highlight link ansible_normal_keywords Comment
elseif a:name == 'Constant'
highlight link ansible_normal_keywords Constant
elseif a:name == 'Identifier'
highlight link ansible_normal_keywords Identifier
elseif a:name == 'Statement'
highlight link ansible_normal_keywords Statement
elseif a:name == 'PreProc'
highlight link ansible_normal_keywords PreProc
elseif a:name == 'Type'
highlight link ansible_normal_keywords Type
elseif a:name == 'Special'
highlight link ansible_normal_keywords Special
elseif a:name == 'Underlined'
highlight link ansible_normal_keywords Underlined
elseif a:name == 'Ignore'
highlight link ansible_normal_keywords Ignore
elseif a:name == 'Error'
highlight link ansible_normal_keywords Error
elseif a:name == 'Todo'
highlight link ansible_normal_keywords Todo
endif
endfun
fun! s:with_keywords_highlight(name)
if a:name == 'Comment'
highlight link ansible_with_keywords Comment
elseif a:name == 'Constant'
highlight link ansible_with_keywords Constant
elseif a:name == 'Identifier'
highlight link ansible_with_keywords Identifier
elseif a:name == 'Statement'
highlight link ansible_with_keywords Statement
elseif a:name == 'PreProc'
highlight link ansible_with_keywords PreProc
elseif a:name == 'Type'
highlight link ansible_with_keywords Type
elseif a:name == 'Special'
highlight link ansible_with_keywords Special
elseif a:name == 'Underlined'
highlight link ansible_with_keywords Underlined
elseif a:name == 'Ignore'
highlight link ansible_with_keywords Ignore
elseif a:name == 'Error'
highlight link ansible_with_keywords Error
elseif a:name == 'Todo'
highlight link ansible_with_keywords Todo
endif
endfun
" This is only found in stephypy/vim-yaml, since it's one line it isn't worth
" making conditional
highlight link yamlConstant NONE
fun! s:attribute_highlight(attributes)
if a:attributes =~ 'a'
@@ -121,7 +73,7 @@ else
endif
if exists("g:ansible_name_highlight")
syn keyword ansible_name name containedin=yamlBlockMappingKey contained
execute 'syn keyword ansible_name name containedin='.s:yamlKey.' contained'
if g:ansible_name_highlight =~ 'd'
highlight link ansible_name Comment
else
@@ -129,24 +81,24 @@ if exists("g:ansible_name_highlight")
endif
endif
syn keyword ansible_debug_keywords debug containedin=yamlBlockMappingKey contained
execute 'syn keyword ansible_debug_keywords debug containedin='.s:yamlKey.' contained'
highlight link ansible_debug_keywords Debug
if exists("g:ansible_extra_keywords_highlight")
syn keyword ansible_extra_special_keywords register always_run changed_when failed_when no_log args vars delegate_to ignore_errors containedin=yamlBlockMappingKey contained
execute 'syn keyword ansible_extra_special_keywords register always_run changed_when failed_when no_log args vars delegate_to ignore_errors containedin='.s:yamlKey.' contained'
highlight link ansible_extra_special_keywords Statement
endif
syn keyword ansible_normal_keywords include include_tasks import_tasks until retries delay when only_if become become_user block rescue always notify containedin=yamlBlockMappingKey contained
execute 'syn keyword ansible_normal_keywords include include_tasks import_tasks until retries delay when only_if become become_user block rescue always notify containedin='.s:yamlKey.' contained'
if exists("g:ansible_normal_keywords_highlight")
call s:normal_keywords_highlight(g:ansible_normal_keywords_highlight)
execute 'highlight link ansible_normal_keywords '.g:ansible_normal_keywords_highlight
else
highlight link ansible_normal_keywords Statement
endif
syn match ansible_with_keywords "\vwith_.+" containedin=yamlBlockMappingKey contained
execute 'syn match ansible_with_keywords "\vwith_.+" containedin='.s:yamlKey.' contained'
if exists("g:ansible_with_keywords_highlight")
call s:with_keywords_highlight(g:ansible_with_keywords_highlight)
execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight
else
highlight link ansible_with_keywords Statement
endif

View File

@@ -1,31 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
" Vim syntax file
" Language: Ansible YAML/Jinja templates
" Maintainer: Dave Honneffer <pearofducks@gmail.com>
" Last Change: 2015.09.06
if exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'jinja2'
endif
let b:current_syntax = ''
unlet b:current_syntax
runtime! syntax/jinja2.vim
if exists("g:ansible_extra_syntaxes")
let s:extra_syntax = split(g:ansible_extra_syntaxes)
for syntax_name in s:extra_syntax
let b:current_syntax = ''
unlet b:current_syntax
execute 'runtime!' "syntax/" . syntax_name
endfor
endif
let b:current_syntax = "ansible_template"
endif

View File

@@ -33,12 +33,12 @@ syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" c
syn keyword bladeKeyword @if @elseif @foreach @forelse @for @while @can @cannot @elsecan @elsecannot @include
\ @includeIf @each @inject @extends @section @stack @push @unless @yield @parent @hasSection @break @continue
\ @unset @lang @choice @component @slot @prepend
\ @unset @lang @choice @component @slot @prepend @json @isset @auth @guest @switch @case @includeFirst @empty
\ nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt
syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @empty @endforelse @endwhile @endcan
syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @endforelse @endwhile @endcan
\ @endcannot @stop @append @endsection @endpush @show @overwrite @verbatim @endverbatim @endcomponent
\ @endslot @endprepend
\ @endslot @endprepend @endisset @endempty @endauth @endguest @endswitch
\ containedin=ALLBUT,@bladeExempt
if exists('g:blade_custom_directives')

View File

@@ -23,33 +23,34 @@ syn keyword carpSyntax defmacro defdynamic quote cons list array
syn keyword carpSyntax expand deftype register system-include register-type
syn keyword carpSyntax defmodule copy use module defalias definterface eval
syn keyword carpSyntax expand instantiate type info help quit env build run
syn keyword carpSyntax cat use project-set! local-include system-include
syn keyword carpSyntax cat project-set! local-include
syn keyword carpSyntax add-cflag add-lib project load reload let-do ignore
syn keyword carpSyntax fmt mac-only linux-only windows-only use-all when
syn keyword carpSyntax unless defn-do comment forever-do case and* or*
syn keyword carpSyntax str* println*
syn keyword carpSyntax str* println* break doc sig hidden private
syn match carpSyntax "\vc(a|d){1,4}r"
syn keyword carpFunc Int Float Double Bool String Char Array Fn Ref Long λ
syn keyword carpFunc Pattern
syn keyword carpFunc not or and + - * / = /= >= <= > < inc dec
syn keyword carpFunc println print get-line from-string mod seed random
syn keyword carpFunc println print get-line from-string mod random
syn keyword carpFunc random-between str mask delete append count duplicate
syn keyword carpFunc cstr chars from-chars to-int from-int sin cos sqrt acos
syn keyword carpFunc atan2 exit time srand for cond floor abs sort-with
syn keyword carpFunc atan2 exit time seed-random for cond floor abs sort-with
syn keyword carpFunc subarray prefix-array suffix-array reverse sum min max
syn keyword carpFunc first last reduce format zero read-file bit-shift-left
syn keyword carpFunc bit-shift-right bit-and bit-or bit-xor bit-not safe-add
syn keyword carpFunc safe-sub safe-mul even? odd? cmp allocate repeat-indexed
syn keyword carpFunc sanitize-addresses memory-balance reset-memory-balance!
syn keyword carpFunc log-memory-balance! memory-logged assert-balanced trace
syn keyword carpFunc pi e swaop! update! char-at tail head split-by words lines
syn keyword carpFunc pi e swap! update! char-at tail head split-by words lines
syn keyword carpFunc pad-left pad-right count-char empty? random-sized substring
syn keyword carpFunc prefix-string suffix-string starts-with? ends-with?
syn keyword carpFunc string-join free sleep-seconds sleep-micros
syn keyword carpFunc atan2 exit time srand for cond floor abs neg to-float
syn keyword carpFunc string-join free sleep-seconds sleep-micros substitute
syn keyword carpFunc neg to-float match matches? find global-match match-str
syn keyword carpFunc from-float tan asin atan cosh sinh tanh exp frexp ldexp
syn keyword carpFunc log log10 modf pow ceil clamp approx refstr foreach
syn keyword carpFunc => ==> repeat nth replicate range raw aset aset! count
syn keyword carpFunc => ==> repeat nth replicate range raw aset aset!
syn keyword carpFunc push-back pop-back sort index-of element-count
@@ -75,8 +76,9 @@ syn region carpStruc matchgroup=Delimiter start="("rs=s+1 matchgroup=Delimiter e
syn region carpStruc matchgroup=Delimiter start="\["rs=s+1 matchgroup=Delimiter end="\]"re=e-1 contains=@carpNormal
syn region carpString start=/\%(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/
syn region carpPattern start=/\%(\\\)\@<!\#"/ skip=/\\[\\"]/ end=/"/
syn cluster carpNormal add=carpError,carpStruc,carpString
syn cluster carpNormal add=carpError,carpStruc,carpString,carpPattern
syn cluster carpQuotedOrNormal add=carpString
syn match carpNumber "\<[-+]\?\(\d\+\|\d\+#*\.\|\d*\.\d\+\)#*\(/\d\+#*\)\?[lf]\?\>" contains=carpContainedNumberError
@@ -116,6 +118,7 @@ if version >= 508 || !exists("carp_syntax_init")
HiLink carpCopy Function
HiLink carpString String
HiLink carpPattern String
HiLink carpChar Character
HiLink carpBoolean Boolean

View File

@@ -34,7 +34,7 @@ hi def link coffeeConditional Conditional
syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display
hi def link coffeeException Exception
syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\|debugger\|import\|export\|default\|await\)\>/
syn match coffeeKeyword /\<\%(new\|in\|of\|from\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\|debugger\|import\|export\|default\|await\)\>/
\ display
" The `own` keyword is only a keyword after `for`.
syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
" Language: Crystal
" Based on Ruby syntax highlight
" which is made by Mirko Nasato and Doug Kearns
" which was made by Mirko Nasato and Doug Kearns
" ---------------------------------------------
if exists('b:current_syntax')
@@ -129,7 +129,7 @@ syn region crystalString matchgroup=crystalStringDelimiter start="\"" end="\"" s
syn region crystalString matchgroup=crystalStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@crystalStringSpecial fold
" Character
syn match crystalCharLiteral "'\%([^\\]\|\\[abefnrstv'\\]\|\\\o\{1,3}\|\\x\x\{1,2}\|\\u\x\{4}\)'" contained display
syn match crystalCharLiteral "'\%([^\\]\|\\[abefnrstv'\\]\|\\\o\{1,3}\|\\x\x\{1,2}\|\\u\x\{4}\)'" contains=crystalStringEscape display
" Generalized Single Quoted String, Symbol and Array of Strings
syn region crystalString matchgroup=crystalStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold

View File

@@ -18,25 +18,15 @@ syn cluster elixirDeclaration contains=elixirFunctionDeclaration,elixirModuleDec
syn match elixirComment '#.*' contains=elixirTodo,@Spell
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' contains=elixirUnusedVariable,elixirKernelFunction
syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' contains=elixirUnusedVariable
syn match elixirKeyword '\(\.\)\@<!\<\(for\|case\|when\|with\|cond\|if\|unless\|try\|receive\|send\)\>'
syn match elixirKeyword '\(\.\)\@<!\<\(exit\|raise\|throw\|after\|rescue\|catch\|else\)\>'
syn match elixirKeyword '\(\.\)\@<!\<\(quote\|unquote\|super\|spawn\|spawn_link\|spawn_monitor\)\>'
" Kernel functions
syn keyword elixirKernelFunction contained is_atom is_binary is_bitstring is_boolean is_float
syn keyword elixirKernelFunction contained is_function is_integer is_list is_map is_nil
syn keyword elixirKernelFunction contained is_number is_pid is_port is_reference is_tuple
syn keyword elixirKernelFunction contained abs binary_part bit_size byte_size div elem hd length
syn keyword elixirKernelFunction contained map_size node rem round tl trunc tuple_size
syn match elixirKeyword '\(\.\)\@<!\<\(for\|case\|when\|with\|cond\|if\|unless\|try\|receive\|send\|exit\|raise\|throw\|after\|rescue\|catch\|else\|quote\|unquote\|super\|spawn\|spawn_link\|spawn_monitor\|is_atom\|is_binary\|is_bitstring\|is_boolean\|is_float\|is_function\|is_integer\|is_list\|is_map\|is_nil\|is_number\|is_pid\|is_port\|is_reference\|is_tuple\|abs\|binary_part\|bit_size\|byte_size\|div\|elem\|hd\|length\|map_size\|node\|rem\|round\|tl\|trunc\|tuple_size\)\>'
syn keyword elixirInclude import require alias use
syn keyword elixirSelf self
" This unfortunately also matches function names in function calls
syn match elixirUnusedVariable contained '\v%(^|[^.])@<=<_\w*>'
syn match elixirUnusedVariable contained '\%(\.\)\@<!\<_\w*\>\%((\)\@!'
syn match elixirOperator '\v\.@<!<%(and|or|in|not)>'
syn match elixirOperator '!==\|!=\|!'
@@ -88,16 +78,16 @@ syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('''\)+ end=+^\s*\z1+ contains=@Spell,@elixirStringContained
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("""\)+ end=+^\s*\z1+ contains=@Spell,@elixirStringContained
syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirKernelFunction,elixirComment,@elixirNotTop
syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop
syn match elixirAtomInterpolated ':\("\)\@=' contains=elixirString
syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|0[0-7]{0,2}[0-7]\@!\>\|[^x0MC]\)\|(\\[MC]-)+\w\|[^\s\\]\)"
syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do\>:\@!" end="\<end\>" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold
syn region elixirElseBlock matchgroup=elixirBlockDefinition start="\<else\>:\@!" end="\<end\>" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold
syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold
syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirElseBlock matchgroup=elixirBlockDefinition start="\<else\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment
syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE
@@ -167,8 +157,8 @@ syn match elixirRecordDeclaration "[^[:space:];#<]\+" contained con
syn match elixirMacroDeclaration "[^[:space:];#<,()\[\]]\+" contained nextgroup=elixirArguments skipwhite skipnl
syn match elixirDelegateDeclaration "[^[:space:];#<,()\[\]]\+" contained contains=elixirFunctionDeclaration skipwhite skipnl
syn region elixirDelegateDeclaration start='\[' end='\]' contained contains=elixirFunctionDeclaration skipwhite skipnl
syn match elixirOverridableDeclaration "[^[:space:];#<]\+" contained contains=elixirAlias skipwhite skipnl
syn match elixirExceptionDeclaration "[^[:space:];#<]\+" contained contains=elixirAlias skipwhite skipnl
syn match elixirOverridableDeclaration "[^[:space:];#<]\+" contained contains=elixirAlias,elixirAtom skipwhite skipnl
syn match elixirExceptionDeclaration "[^[:space:];#<]\+" contained contains=elixirAlias,elixirAtom skipwhite skipnl
syn match elixirCallbackDeclaration "[^[:space:];#<,()\[\]]\+" contained contains=elixirFunctionDeclaration skipwhite skipnl
" ExUnit
@@ -176,7 +166,7 @@ syn match elixirExUnitMacro "\(^\s*\)\@<=\<\(test\|describe\|setup\|setup_all\|
syn match elixirExUnitAssert "\(^\s*\)\@<=\<\(assert\|assert_in_delta\|assert_raise\|assert_receive\|assert_received\|catch_error\)\>"
syn match elixirExUnitAssert "\(^\s*\)\@<=\<\(catch_exit\|catch_throw\|flunk\|refute\|refute_in_delta\|refute_receive\|refute_received\)\>"
hi def link elixirBlockDefinition Keyword
hi def link elixirBlockDefinition Define
hi def link elixirDefine Define
hi def link elixirPrivateDefine Define
hi def link elixirGuard Define
@@ -200,9 +190,8 @@ hi def link elixirMacroDeclaration Macro
hi def link elixirInclude Include
hi def link elixirComment Comment
hi def link elixirTodo Todo
hi def link elixirKeyword Keyword
hi def link elixirKeyword Define
hi def link elixirExUnitAssert Keyword
hi def link elixirKernelFunction Keyword
hi def link elixirOperator Operator
hi def link elixirAtom Constant
hi def link elixirPseudoVariable Constant

View File

@@ -20,11 +20,18 @@ 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 "^#.*"
if get(g:, "gitcommit_cleanup") is# "scissors"
syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl
syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff
else
syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
syn match gitcommitComment "^#.*"
endif
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

View File

@@ -10,18 +10,16 @@ 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 match gitconfigVariable "\%(^\s*\)\@<=\a[a-z0-9-]*\%(\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 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

View File

@@ -11,102 +11,6 @@ if exists("b:current_syntax")
finish
endif
" Set settings to default values.
if !exists("g:go_highlight_array_whitespace_error")
let g:go_highlight_array_whitespace_error = 0
endif
if !exists("g:go_highlight_chan_whitespace_error")
let g:go_highlight_chan_whitespace_error = 0
endif
if !exists("g:go_highlight_extra_types")
let g:go_highlight_extra_types = 0
endif
if !exists("g:go_highlight_space_tab_error")
let g:go_highlight_space_tab_error = 0
endif
if !exists("g:go_highlight_trailing_whitespace_error")
let g:go_highlight_trailing_whitespace_error = 0
endif
if !exists("g:go_highlight_operators")
let g:go_highlight_operators = 0
endif
if !exists("g:go_highlight_functions")
let g:go_highlight_functions = 0
endif
if !exists("g:go_highlight_function_arguments")
let g:go_highlight_function_arguments = 0
endif
if !exists("g:go_highlight_function_calls")
let g:go_highlight_function_calls = 0
endif
if !exists("g:go_highlight_fields")
let g:go_highlight_fields = 0
endif
if !exists("g:go_highlight_types")
let g:go_highlight_types = 0
endif
if !exists("g:go_highlight_build_constraints")
let g:go_highlight_build_constraints = 0
endif
if !exists("g:go_highlight_string_spellcheck")
let g:go_highlight_string_spellcheck = 1
endif
if !exists("g:go_highlight_format_strings")
let g:go_highlight_format_strings = 1
endif
if !exists("g:go_highlight_generate_tags")
let g:go_highlight_generate_tags = 0
endif
if !exists("g:go_highlight_variable_assignments")
let g:go_highlight_variable_assignments = 0
endif
if !exists("g:go_highlight_variable_declarations")
let g:go_highlight_variable_declarations = 0
endif
let s:fold_block = 1
let s:fold_import = 1
let s:fold_varconst = 1
let s:fold_package_comment = 1
let s:fold_comment = 0
if exists("g:go_fold_enable")
" Enabled by default.
if index(g:go_fold_enable, 'block') == -1
let s:fold_block = 0
endif
if index(g:go_fold_enable, 'import') == -1
let s:fold_import = 0
endif
if index(g:go_fold_enable, 'varconst') == -1
let s:fold_varconst = 0
endif
if index(g:go_fold_enable, 'package_comment') == -1
let s:fold_package_comment = 0
endif
" Disabled by default.
if index(g:go_fold_enable, 'comment') > -1
let s:fold_comment = 1
endif
endif
syn case match
syn keyword goPackage package
@@ -144,7 +48,6 @@ hi def link goUnsignedInts Type
hi def link goFloats Type
hi def link goComplexes Type
" Predefined functions and values
syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/
syn match goBuiltins /\<\v(make|new|panic|print|println|real|recover)\ze\(/
@@ -160,7 +63,7 @@ syn keyword goTodo contained TODO FIXME XXX BUG
syn cluster goCommentGroup contains=goTodo
syn region goComment start="//" end="$" contains=goGenerate,@goCommentGroup,@Spell
if s:fold_comment
if go#config#FoldEnable('comment')
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell fold
syn match goComment "\v(^\s*//.*\n)+" contains=goGenerate,@goCommentGroup,@Spell fold
else
@@ -170,7 +73,7 @@ endif
hi def link goComment Comment
hi def link goTodo Todo
if g:go_highlight_generate_tags != 0
if go#config#HighlightGenerateTags()
syn match goGenerateVariables contained /\(\$GOARCH\|\$GOOS\|\$GOFILE\|\$GOLINE\|\$GOPACKAGE\|\$DOLLAR\)\>/
syn region goGenerate start="^\s*//go:generate" end="$" contains=goGenerateVariables
hi def link goGenerate PreProc
@@ -195,7 +98,7 @@ hi def link goEscapeError Error
" Strings and their contents
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
if g:go_highlight_string_spellcheck != 0
if go#config#HighlightStringSpellcheck()
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup,@Spell
syn region goRawString start=+`+ end=+`+ contains=@Spell
else
@@ -203,7 +106,7 @@ else
syn region goRawString start=+`+ end=+`+
endif
if g:go_highlight_format_strings != 0
if go#config#HighlightFormatStrings()
" [n] notation is valid for specifying explicit argument indexes
" 1. Match a literal % not preceded by a %.
" 2. Match any number of -, #, 0, space, or +
@@ -231,21 +134,21 @@ hi def link goCharacter Character
" Regions
syn region goParen start='(' end=')' transparent
if s:fold_block
if go#config#FoldEnable('block')
syn region goBlock start="{" end="}" transparent fold
else
syn region goBlock start="{" end="}" transparent
endif
" import
if s:fold_import
if go#config#FoldEnable('import')
syn region goImport start='import (' end=')' transparent fold contains=goImport,goString,goComment
else
syn region goImport start='import (' end=')' transparent contains=goImport,goString,goComment
endif
" var, const
if s:fold_varconst
if go#config#FoldEnable('varconst')
syn region goVar start='var (' end='^\s*)$' transparent fold
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments
syn region goConst start='const (' end='^\s*)$' transparent fold
@@ -288,12 +191,12 @@ hi def link goImaginary Number
hi def link goImaginaryFloat Float
" Spaces after "[]"
if g:go_highlight_array_whitespace_error != 0
if go#config#HighlightArrayWhitespaceError()
syn match goSpaceError display "\(\[\]\)\@<=\s\+"
endif
" Spacing errors around the 'chan' keyword
if g:go_highlight_chan_whitespace_error != 0
if go#config#HighlightChanWhitespaceError()
" receive-only annotation on chan type
"
" \(\<chan\>\)\@<!<- (only pick arrow when it doesn't come after a chan)
@@ -311,7 +214,7 @@ if g:go_highlight_chan_whitespace_error != 0
endif
" Extra types commonly seen
if g:go_highlight_extra_types != 0
if go#config#HighlightExtraTypes()
syn match goExtraType /\<bytes\.\(Buffer\)\>/
syn match goExtraType /\<io\.\(Reader\|ReadSeeker\|ReadWriter\|ReadCloser\|ReadWriteCloser\|Writer\|WriteCloser\|Seeker\)\>/
syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/
@@ -319,12 +222,12 @@ if g:go_highlight_extra_types != 0
endif
" Space-tab error
if g:go_highlight_space_tab_error != 0
if go#config#HighlightSpaceTabError()
syn match goSpaceError display " \+\t"me=e-1
endif
" Trailing white space error
if g:go_highlight_trailing_whitespace_error != 0
if go#config#HighlightTrailingWhitespaceError()
syn match goSpaceError display excludenl "\s\+$"
endif
@@ -342,7 +245,7 @@ hi def link goTodo Todo
syn match goVarArgs /\.\.\./
" Operators;
if g:go_highlight_operators != 0
if go#config#HighlightOperators()
" match single-char operators: - + % < > ! & | ^ * =
" and corresponding two-char operators: -= += %= <= >= != &= |= ^= *= ==
syn match goOperator /[-+%<>!&|^*=]=\?/
@@ -361,13 +264,13 @@ endif
hi def link goOperator Operator
" Functions;
if g:go_highlight_functions isnot 0 || g:go_highlight_function_arguments isnot 0
if go#config#HighlightFunctions() || go#config#HighlightFunctionArguments()
syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction,goSimpleArguments skipwhite skipnl
syn match goReceiverVar /\w\+\ze\s\+\(\w\|\*\)/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained
syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl
syn match goFunction /\w\+/ nextgroup=goSimpleArguments contained skipwhite skipnl
syn match goReceiverType /\w\+/ contained
if g:go_highlight_function_arguments isnot 0
if go#config#HighlightFunctionArguments()
syn match goSimpleArguments /(\(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goArgumentName nextgroup=goSimpleArguments skipwhite skipnl
syn match goArgumentName /\w\+\(\s*,\s*\w\+\)*\ze\s\+\(\w\|\.\|\*\|\[\)/ contained nextgroup=goArgumentType skipwhite skipnl
syn match goArgumentType /\([^,)]\|\_s\)\+,\?/ contained nextgroup=goArgumentName skipwhite skipnl
@@ -382,19 +285,19 @@ endif
hi def link goFunction Function
" Function calls;
if g:go_highlight_function_calls != 0
if go#config#HighlightFunctionCalls()
syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration
endif
hi def link goFunctionCall Type
" Fields;
if g:go_highlight_fields != 0
if go#config#HighlightFields()
syn match goField /\.\w\+\([.\ \n\r\:\)\[,]\)\@=/hs=s+1
endif
hi def link goField Identifier
" Structs & Interfaces;
if g:go_highlight_types != 0
if go#config#HighlightTypes()
syn match goTypeConstructor /\<\w\+{\@=/
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
@@ -410,19 +313,19 @@ hi def link goTypeDecl Keyword
hi def link goDeclType Keyword
" Variable Assignments
if g:go_highlight_variable_assignments != 0
if go#config#HighlightVariableAssignments()
syn match goVarAssign /\v[_.[:alnum:]]+(,\s*[_.[:alnum:]]+)*\ze(\s*([-^+|^\/%&]|\*|\<\<|\>\>|\&\^)?\=[^=])/
hi def link goVarAssign Special
endif
" Variable Declarations
if g:go_highlight_variable_declarations != 0
if go#config#HighlightVariableDeclarations()
syn match goVarDefs /\v\w+(,\s*\w+)*\ze(\s*:\=)/
hi def link goVarDefs Special
endif
" Build Constraints
if g:go_highlight_build_constraints != 0
if go#config#HighlightBuildConstraints()
syn match goBuildKeyword display contained "+build"
" Highlight the known values of GOOS, GOARCH, and other +build options.
syn keyword goBuildDirectives contained
@@ -444,7 +347,7 @@ if g:go_highlight_build_constraints != 0
hi def link goBuildKeyword PreProc
endif
if g:go_highlight_build_constraints != 0 || s:fold_package_comment
if go#config#HighlightBuildConstraints() || go#config#FoldEnable('package_comment')
" One or more line comments that are followed immediately by a "package"
" declaration are treated like package documentation, so these must be
" matched as comments to avoid looking like working build constraints.
@@ -453,11 +356,11 @@ if g:go_highlight_build_constraints != 0 || s:fold_package_comment
exe 'syn region goPackageComment start=/\v(\/\/.*\n)+\s*package/'
\ . ' end=/\v\n\s*package/he=e-7,me=e-7,re=e-7'
\ . ' contains=@goCommentGroup,@Spell'
\ . (s:fold_package_comment ? ' fold' : '')
\ . (go#config#FoldEnable('package_comment') ? ' fold' : '')
exe 'syn region goPackageComment start=/\v\/\*.*\n(.*\n)*\s*\*\/\npackage/'
\ . ' end=/\v\n\s*package/he=e-7,me=e-7,re=e-7'
\ . ' end=/\v\*\/\n\s*package/he=e-7,me=e-7,re=e-7'
\ . ' contains=@goCommentGroup,@Spell'
\ . (s:fold_package_comment ? ' fold' : '')
\ . (go#config#FoldEnable('package_comment') ? ' fold' : '')
hi def link goPackageComment Comment
endif

17
syntax/godebugoutput.vim Normal file
View File

@@ -0,0 +1,17 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
if exists("b:current_syntax")
finish
endif
syn match godebugOutputErr '^ERR:.*'
syn match godebugOutputOut '^OUT:.*'
let b:current_syntax = "godebugoutput"
hi def link godebugOutputErr Comment
hi def link godebugOutputOut Normal
" vim: sw=2 ts=2 et
endif

View File

@@ -0,0 +1,15 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
if exists("b:current_syntax")
finish
endif
syn match godebugStacktrace '^\S\+'
let b:current_syntax = "godebugoutput"
hi def link godebugStacktrace SpecialKey
" vim: sw=2 ts=2 et
endif

View File

@@ -0,0 +1,27 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
if exists("b:current_syntax")
finish
endif
syn match godebugTitle '^#.*'
syn match godebugVariables '^\s*\S\+\ze:'
syn keyword goType chan map bool string error
syn keyword goSignedInts int int8 int16 int32 int64 rune
syn keyword goUnsignedInts byte uint uint8 uint16 uint32 uint64 uintptr
syn keyword goFloats float32 float64
syn keyword goComplexes complex64 complex128
syn keyword goBoolean true false
let b:current_syntax = "godebugvariables"
hi def link godebugTitle Underlined
hi def link godebugVariables Statement
hi def link goType Type
hi def link goBoolean Boolean
" vim: sw=2 ts=2 et
endif

View File

@@ -12,6 +12,8 @@ runtime! syntax/gotexttmpl.vim
runtime! syntax/html.vim
unlet b:current_syntax
syn cluster htmlPreproc add=gotplAction,goTplComment
let b:current_syntax = "gohtmltmpl"
" vim: sw=2 ts=2 et

360
syntax/haproxy.vim Normal file
View File

@@ -0,0 +1,360 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haproxy') == -1
" Vim syntax file
" Language: HAproxy
" Maintainer: Dan Reif
" Last Change: Mar 2, 2018
" Version: 0.5
" URL: https://github.com/CH-DanReif/haproxy.vim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
if version >= 600
setlocal iskeyword=_,-,a-z,A-Z,48-57
else
set iskeyword=_,-,a-z,A-Z,48-57
endif
" Escaped chars
syn match hapEscape +\\\(\\\| \|n\|r\|t\|#\|x\x\x\)+
" Match whitespace at the end of a line
syn match hapNothingErr /\s\+\ze\(#.*\)\?$/ contained nextgroup=hapGreedyComment
" Match anything other than whitespace; flag as error if found. 'contained'
" because comments are valid where otherwise only hapNothing is.
syn match hapNothingErr /\s*\zs[^# \t][^#]*/ contained nextgroup=hapGreedyComment
" Comments
syn match hapComment /\(^\|\s\)#.*$/ contains=hapTodo
" `acl foo path_reg hi[#]mom` is an error because [ is unclosed. (!!!)
syn match hapGreedyComment /#.*$/ contained containedin=hapAclRemainder contains=hapTodo
syn keyword hapTodo TODO FIXME XXX contained
" `daemon#hi mom` is perfectly valid. :/
syn cluster hapNothing contains=hapNothingErr,hapGreedyComment
" Case-insensitive matching
syn case ignore
" Sections
syn match hapSection /^\s*\(global\|defaults\)/
syn match hapSection /^\s*\(backend\|frontend\|listen\|ruleset\|userlist\)/ skipwhite nextgroup=hapSectLabel
syn match hapSectLabel /\S\+/ skipwhite nextgroup=hapIp1 contained
syn match hapIp1 /\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\?:\d\{1,5}/ nextgroup=hapIp2 contained
syn match hapIp2 /,\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\?:\d\{1,5}/hs=s+1 nextgroup=hapIp2 contained
" Timeouts. We try to hint towards the use of 'ms' and 's' when
" g:haproxy_guess_ms_sec is set. We consider the lack of either 'ms' or 's'
" as an error when haproxy_enforce_ms_sec is set. (HAproxy's default is 'ms',
" but that arguably leads to ambiguity in the config.)
if get(g:, 'haproxy_guess_ms_sec', 1)
" Timeouts and such specified in ms, where seconds are *allowed*, but are
" probably a mistake.
syn match hapNumberMS /\d\+m\?s/ contained transparent
syn match hapError /\d\+\zss\ze/ contained containedin=hapNumberMS
endif
if get(g:, 'haproxy_enforce_ms_sec', 1)
syn match hapNumberMS /\d\+\(m\?s\)\?/ contained transparent
syn match hapError /\d\+\(m\?s\)\@!\(\D\|$\)/ contained containedin=hapNumberMS
syn match hapNumberMS /\d\+m\?s/ contained
else
syn match hapNumberMS /\d\+m\?s/ contained
endif
if get(g:, 'haproxy_guess_ms_sec', 1)
" Timeouts generally specified in whole seconds, where we want to highlight
" errant 'm's.
syn match hapNumberSec /\d\+m\?s/ contained transparent
syn match hapError /\d\+\zsm\zes/ contained containedin=hapNumberSec
endif
if get(g:, 'haproxy_enforce_ms_sec', 1)
syn match hapNumberSec /\d\+\(m\?s\)\?/ contained transparent
syn match hapError /\d\+\(m\?s\)\@!\(\D\|$\)/ contained containedin=hapNumberSec
syn match hapNumberSec /\d\+m\?s/ contained
else
syn match hapNumberSec /\d\+m\?s/ contained
endif
" Other numbers, no 'ms'.
syn match hapNumber /[0-9]\+/ contained
" Timeout types
syn keyword hapTimeoutType connect client server contained skipwhite nextgroup=hapNumberMS
" URIs
syn match hapAbsURI /\/\S*/ contained
syn match hapURI /\S*/ contained
" File paths (always absolute, and never just '/' unless you're insane)
syn match hapFilePath /\/\S\+/ contained
" SSL configuration keywords
syn match hapSSLCiphersAll /\s\+\zs.*/ contained transparent
syn match hapSSLCiphersError /.\+/ contained containedin=hapSSLCiphersAll
syn match hapSSLCiphers /\([-+!]\?[A-Z0-9-]\+[:+]\)*[-+!]\?[A-Z0-9-]\+/ contained containedin=hapSSLCiphersAll
"
" ACLs
"
" This comes first, lest it gobble up everything else.
syn match hapAclName /\S\+/ contained skipwhite nextgroup=hapAclCriterion
syn match hapAclCriterion /FALSE\|HTTP\|HTTP_1\.0\|HTTP_1\.1\|HTTP_CONTENT\|HTTP_URL_ABS\|HTTP_URL_SLASH\|HTTP_URL_STAR\|LOCALHOST\|METH_CONNECT\|METH_GET\|METH_HEAD\|METH_OPTIONS\|METH_POST\|METH_TRACE\|RDP_COOKIE\|REQ_CONTENT\|TRUE\|WAIT_END\|\(req_rdp_cookie\|s\?cook\|s\?hdr\|http_auth_group\|urlp\)\(_\(beg\|dir\|dom\|end\|len\|reg\|sub\|cnt\)\)\?([^)]*)\|\(req_ssl_[a-z]\+\|base\|method\|path\|req_ver\|resp_ver\|url\)\(_\(beg\|dir\|dom\|end\|len\|reg\|sub\|cnt\)\)\?/ contained skipwhite nextgroup=hapAclConverterOrNothing
" This one's a bit tricky. Match zero or more converters, and then *require* the
" space afterwards. Strictly speaking, deviates from the BNF, but only in
" pathological cases ('acl lolwat TRUE,upper').
syn match hapAclConverterOrNothing /\(,\(\(base64\|bool\|cpl\|debug\|even\|hex\|lower\|neg\|not\|odd\|upper\|url_dec\)\|\(add\|and\|bytes\|crc32\|da-csv-conv\|div\|djb2\|field\|http_date\|in_table\|ipmask\|json\|language\|ltime\|map\|mod\|mul\|or\|regsub\|capture-req\|capture-res\|sdbm\|sub\|table_[a-z0-9_]\+\|utime\|word\|wt6\|xor\)([^)]*)\)\)*\s\+/ contained nextgroup=hapAclFlag,hapAclFlagWithParameter,hapAclOperator
syn match hapAclFlag /-[-in]/ contained skipwhite nextgroup=hapAclFlag,hapAclFlagWithParameter,hapAclOperator
syn match hapAclFlagWithParameter /-[fmMu]/ contained skipwhite nextgroup=hapAclFlagParameter
syn match hapAclFlagParameter /\S\+/ contained skipwhite nextgroup=hapAclFlag,hapAclFlagWithParameter,hapAclOperator
syn match hapAclOperator /eq\|ge\|gt\|le\|lt/ contained skipwhite
syn match hapAclRemainder /.*/ contained transparent
" Generic tune.ssl
syn match hapParam /tune\.ssl\.[a-z0-9-]\+/
" tune.ssl where we know what follows
syn match hapParam /tune\.ssl\.default-dh-param/ skipwhite nextgroup=hapNumber
syn keyword hapSSLServerVerify none required contained skipwhite nextgroup=@hapNothing
" Keywords deprecated for at least a decade. Kill 'em.
syn keyword hapError cliexp srvexp
" Parameters
syn keyword hapParam timeout skipwhite nextgroup=hapTimeoutType
syn keyword hapParam chroot pidfile skipwhite nextgroup=hapFilePath
syn keyword hapParam clitimeout skipwhite nextgroup=hapNumberMS
syn keyword hapParam contimeout skipwhite nextgroup=hapNumberMS
syn keyword hapParam daemon debug disabled skipwhite nextgroup=@hapNothing
syn keyword hapParam enabled skipwhite nextgroup=@hapNothing
syn keyword hapParam fullconn maxconn skipwhite nextgroup=hapNumber
syn keyword hapParam gid skipwhite nextgroup=hapNumber
syn keyword hapParam group
syn keyword hapParam grace skipwhite nextgroup=hapNumberMS
syn keyword hapParam monitor-uri skipwhite nextgroup=hapAbsURI
syn keyword hapParam nbproc skipwhite nextgroup=hapNumber
syn keyword hapParam noepoll nopoll skipwhite nextgroup=@hapNothing
syn keyword hapParam quiet skipwhite nextgroup=@hapNothing
syn keyword hapParam redispatch retries skipwhite nextgroup=hapNumber
" 'add' takes exactly one string, not regexes
syn keyword hapParam reqadd reqiadd skipwhite nextgroup=hapOneStringIfUnless
syn keyword hapParam rspadd rspiadd skipwhite nextgroup=hapOneStringIfUnless
" All of these take exactly one regexp
syn match hapParam /reqi\?\(allow\|del\)/ skipwhite nextgroup=hapOneRegexpIfUnless
syn match hapParam /reqi\?\(deny\|pass\)/ skipwhite nextgroup=hapOneRegexpIfUnless
syn match hapParam /reqi\?\(tarpit\)/ skipwhite nextgroup=hapOneRegexpIfUnless
syn match hapParam /rspi\?\(del\|deny\)/ skipwhite nextgroup=hapOneRegexpIfUnless
" 'rep' is unique in taking two regexes (one search, one replace)
syn keyword hapParam reqrep reqirep skipwhite nextgroup=hapRegSearchReplIfUnless
syn keyword hapParam rsprep rspirep skipwhite nextgroup=hapRegSearchReplIfUnless
syn keyword hapParam reqsetbe reqisetbe skipwhite nextgroup=hapRegexpBE
syn keyword hapParam server source
syn keyword hapParam srvtimeout skipwhite nextgroup=hapNumberMS
syn keyword hapParam uid ulimit-n skipwhite nextgroup=hapNumber
syn keyword hapParam user
syn keyword hapParam acl skipwhite nextgroup=hapAclName
syn keyword hapParam errorloc skipwhite nextgroup=hapStatusURI
syn keyword hapParam errorloc302 errorloc303 skipwhite nextgroup=hapStatusURI
syn keyword hapParam default_backend skipwhite nextgroup=hapSectLabel
syn keyword hapParam use_backend skipwhite nextgroup=hapSectLabel
syn keyword hapParam appsession skipwhite nextgroup=hapAppSess
syn keyword hapParam bind skipwhite nextgroup=hapIp1
syn keyword hapParam balance skipwhite nextgroup=hapBalance
syn keyword hapParam cookie skipwhite nextgroup=hapCookieNam
syn keyword hapParam capture skipwhite nextgroup=hapCapture
syn keyword hapParam dispatch skipwhite nextgroup=hapIpPort
syn keyword hapParam source skipwhite nextgroup=hapIpPort
syn keyword hapParam mode skipwhite nextgroup=hapMode
syn keyword hapParam monitor-net skipwhite nextgroup=hapIPv4Mask
syn keyword hapParam option skipwhite nextgroup=hapOption
syn keyword hapParam stats skipwhite nextgroup=hapStats
syn keyword hapParam server skipwhite nextgroup=hapServerN
syn keyword hapParam source skipwhite nextgroup=hapServerEOL
syn keyword hapParam log skipwhite nextgroup=hapGLog,hapLogIp,hapFilePath
syn keyword hapParam ca-base skipwhite nextgroup=hapFilePath
syn keyword hapParam crt-base skipwhite nextgroup=hapFilePath
syn keyword hapParam ssl-default-bind-ciphers skipwhite nextgroup=hapSSLCiphersAll
syn keyword hapParam ssl-default-bind-options skipwhite nextgroup=hapGLog,hapLogIp
syn keyword hapParam ssl-server-verify skipwhite nextgroup=hapSSLServerVerify
syn keyword hapParam errorfile skipwhite nextgroup=hapStatusPath
syn keyword hapParam http-request skipwhite nextgroup=hapHttpRequestVerb
" Transparent is a Vim keyword, so we need a regexp to match it
syn match hapParam /transparent/
" Options and additional parameters
syn keyword hapAppSess len timeout contained
syn keyword hapBalance roundrobin source contained
syn keyword hapLen len contained
syn keyword hapGLog global contained
syn keyword hapMode http tcp health contained
syn keyword hapOption abortonclose allbackups checkcache clitcpka dontlognull contained
syn keyword hapOption forceclose forwardfor http-server-close contained
syn keyword hapOption httpchk httpclose httplog keepalive logasap contained
syn keyword hapOption persist srvtcpka ssl-hello-chk contained
syn keyword hapOption tcplog tcpka tcpsplice contained
syn keyword hapOption except contained skipwhite nextgroup=hapIPv4Mask
" Transparent is a Vim keyword, so we need a regexp to match it
syn match hapOption /transparent/ contained
syn keyword hapStats realm auth scope enable contained
syn keyword hapStats uri contained skipwhite nextgroup=hapAbsURI
syn keyword hapStats socket contained skipwhite nextgroup=hapFilePath
syn keyword hapStats timeout contained skipwhite nextgroup=hapNumberMS
syn keyword hapLogFac kern user mail daemon auth syslog lpr news contained skipwhite nextgroup=hapLogLvl
syn keyword hapLogFac uucp cron auth2 ftp ntp audit alert cron2 contained skipwhite nextgroup=hapLogLvl
syn keyword hapLogFac local0 local1 local2 local3 local4 local5 local6 local7 contained skipwhite nextgroup=hapLogLvl
syn keyword hapLogLvl emerg alert crit err warning notice info debug contained
syn keyword hapCookieKey rewrite insert nocache postonly indirect prefix contained skipwhite nextgroup=hapCookieKey
syn keyword hapCapture cookie contained skipwhite nextgroup=hapNameLen
syn keyword hapCapture request response contained skipwhite nextgroup=hapHeader
syn keyword hapHeader header contained skipwhite nextgroup=hapNameLen
syn keyword hapSrvKey backup cookie check inter rise fall port contained
syn keyword hapSrvKey source minconn maxconn weight usesrc contained
syn match hapStatus /\d\{3}/ contained
syn match hapStatusPath /\d\{3}/ contained skipwhite nextgroup=hapFilePath
syn match hapStatusURI /\d\{3}/ contained skipwhite nextgroup=hapURI
syn match hapIPv4Mask /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\(\/\d\{1,2}\)\?/ contained
syn match hapLogIp /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ contained skipwhite nextgroup=hapLogFac
syn match hapIpPort /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}:\d\{1,5}/ contained
syn match hapServerAd /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\(:[+-]\?\d\{1,5}\)\?/ contained skipwhite nextgroup=hapSrvEOL
syn match hapNameLen /\S\+/ contained skipwhite nextgroup=hapLen
syn match hapCookieNam /\S\+/ contained skipwhite nextgroup=hapCookieKey
syn match hapServerN /\S\+/ contained skipwhite nextgroup=hapServerAd
syn region hapSrvEOL start=/\S/ end=/$/ contains=hapSrvKey contained
" Brutally stolen from https://github.com/vim-perl/vim-perl:
syn match hapPerlSpecialMatch "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend
syn match hapPerlSpecialMatch "\\." extend contained contains=NONE
syn match hapPerlSpecialMatch "\\\\" contained
syn match hapPerlSpecialMatch "\\[1-9]" contained extend
syn match hapPerlSpecialMatch "\\g\%(\d\+\|{\%(-\=\d\+\|\h\w*\)}\)" contained
syn match hapPerlSpecialMatch "\\k\%(<\h\w*>\|'\h\w*'\)" contained
syn match hapPerlSpecialMatch "{\d\+\%(,\%(\d\+\)\=\)\=}" contained
syn match hapPerlSpecialMatch "\[[]-]\=[^\[\]]*[]-]\=\]" contained extend
syn match hapPerlSpecialMatch "[+*()?.]" contained
syn match hapPerlSpecialMatch "(?[#:=!]" contained
syn match hapPerlSpecialMatch "(?[impsx]*\%(-[imsx]\+\)\=)" contained
syn match hapPerlSpecialMatch "(?\%([-+]\=\d\+\|R\))" contained
syn match hapPerlSpecialMatch "(?\%(&\|P[>=]\)\h\w*)" contained
syn region hapOneRegexpIfUnless contained start=/\S/ end=/\(\ze\s\|$\)/ skip=/\\ / contains=hapPerlSpecialMatch nextgroup=hapIfUnless,@hapNothing skipwhite
syn region hapRegSearchReplIfUnless contained start=/\S/ end=/\(\s\|$\)/ skip=/\\ / contains=hapPerlSpecialMatch nextgroup=hapRegReplIfUnless skipwhite
syn region hapRegReplIfUnless contained start=/\S/ end=/$/ contains=hapComment,hapEscape,hapPerlSpecialMatch nextgroup=hapIfUnless skipwhite
syn region hapRegexpBE contained start=/\S/ end=/\(\s\|$\)/ skip=/\\ / contains=hapPerlSpecialMatch nextgroup=hapSectLabel skipwhite
"
" http-request
"
" http-request verbs that don't allow parameters
syn keyword hapHttpRequestVerb allow tarpit silent-drop contained skipwhite nextgroup=hapHttpIfUnless
" http-request verbs with optional parameters
syn keyword hapHttpRequestVerb auth deny contained skipwhite nextgroup=hapHttpIfUnless,hapHttpRequestParam
" http-request verbs with required parameters
syn keyword hapHttpRequestVerb redirect add-header set-header capture contained skipwhite nextgroup=hapHttpRequestParam
syn keyword hapHttpRequestVerb del-header set-nice set-log-level replace-header contained skipwhite nextgroup=hapHttpRequestParam
syn keyword hapHttpRequestVerb replace-value set-method set-path set-query contained skipwhite nextgroup=hapHttpRequestParam
syn keyword hapHttpRequestVerb set-uri set-tos set-mark contained skipwhite nextgroup=hapHttpRequestParam
" http-request verbs with both parenthetical arguments and required parameters
syn match hapHttpRequestVerb /\(add-acl\|del-acl\|del-map\|set-map\)([^)]*)/ contained skipwhite nextgroup=hapHttpRequestParam
syn match hapHttpRequestVerb /\(set-var\|unset-var\)([^)]*)/ contained skipwhite nextgroup=hapHttpRequestParam
syn match hapHttpRequestVerb /\(sc-inc-gpc0\|sc-set-gpt0\)([^)]*)/ contained skipwhite nextgroup=hapHttpRequestParam
" http-request verbs with parenthetical arguments, but without parameters
syn match hapHttpRequestVerb /\(unset-var\|sc-inc-gpc0\)([^)]*)/ contained skipwhite nextgroup=hapHttpIfUnless
" Listed first because we want to match this rather than hapHttpRequestParam,
" which can be just about anything (including these two keywords). 'keyword'
" is actually higher priority inside the highlighter, but we'll play it extra
" safe by doing this ordering trick, too.
syn keyword hapIfUnless if unless contained skipwhite nextgroup=hapIfUnlessCond
" A little bit of fancy footwork here, because we want to match the log-format
" parameters inside of the string separately.
syn match hapHttpRequestParam /|S\+/ contained skipwhite nextgroup=hapIfUnless,hapHttpRequestParam transparent
syn match hapHttpLogFormatStr /%\[[^][]\+\]/ contained containedin=hapHttpRequestParam
syn match hapHttpLogFormatErr /%\(\[[^][]\+\]\)\@!.*/ contained containedin=hapHttpRequestParam
syn match hapHttpRequestParamLiteral /[^%]\+/ contained containedin=hapHttpRequestParam
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version < 508
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink hapError Error
HiLink hapNothingErr hapError
HiLink hapEscape SpecialChar
HiLink hapComment Comment
HiLink hapGreedyComment Comment
HiLink hapTodo Todo
HiLink hapSection Underlined
HiLink hapSectLabel Identifier
HiLink hapParam Keyword
HiLink hapSSLCiphers String
HiLink hapSSLCiphersError Error
HiLink hapTimeoutType hapParam
HiLink hapOneRegexpIfUnless String
HiLink hapTwoRegexpsIfUnless hapRegexp
HiLink hapRegReplIfUnless hapRegexp
HiLink hapRegexpBE hapRegexp
HiLink hapPerlSpecialMatch Special
HiLink hapFilePath String
HiLink hapURI String
HiLink hapAbsURI hapURI
HiLink hapIp1 Number
HiLink hapIp2 hapIp1
HiLink hapLogIp hapIp1
HiLink hapIpPort hapIp1
HiLink hapIPv4Mask hapIp1
HiLink hapServerAd hapIp1
HiLink hapStatus Number
HiLink hapStatusPath hapStatus
HiLink hapStatusURI hapStatus
HiLink hapNumber Number
HiLink hapNumberMS hapNumber
HiLink hapNumberSec hapNumber
HiLink hapAclName Identifier
HiLink hapAclCriterion String
HiLink hapAclConverterOrNothing Special
HiLink hapAclFlag Special
HiLink hapAclFlagWithParameter Special
HiLink hapAclFlagParameter String
HiLink hapAclOperator Operator
HiLink hapAclPattern String
HiLink hapHttpRequestVerb Operator
HiLink hapIfUnless Operator
HiLink hapHttpRequestParamLiteral String
HiLink hapHttpLogFormatStr Special
HiLink hapHttpLogFormatErr Error
HiLink hapOption Operator
HiLink hapAppSess hapOption
HiLink hapBalance hapOption
HiLink hapCapture hapOption
HiLink hapCookieKey hapOption
HiLink hapHeader hapOption
HiLink hapGLog hapOption
HiLink hapLogFac hapOption
HiLink hapLogLvl hapOption
HiLink hapMode hapOption
HiLink hapStats hapOption
HiLink hapLen hapOption
HiLink hapSrvKey hapOption
delcommand HiLink
let b:current_syntax = "haproxy"
" vim: ts=8
endif

View File

@@ -38,7 +38,8 @@ syn match haskellTypeSig
\ haskellParens
syn keyword haskellWhere where
syn keyword haskellLet let
syn keyword haskellDeclKeyword module class instance newtype deriving in
syn match HaskellDerive "\<deriving\>\(\s\+\<\(anyclass\|instance\|newtype\|stock\)\>\)\?"
syn keyword haskellDeclKeyword module class instance newtype in
syn match haskellDecl "\<\(type\|data\)\>\s\+\(\<family\>\)\?"
syn keyword haskellDefault default
syn keyword haskellImportKeywords import qualified safe as hiding contained
@@ -57,6 +58,7 @@ syn match haskellImport "^\s*\<import\>\s\+\(\<safe\>\s\+\)\?\(\<qualified\>\s\+
\ haskellType,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellString,
\ haskellPragma
syn keyword haskellKeyword do case of
if get(g:, 'haskell_enable_static_pointers', 0)
@@ -161,11 +163,13 @@ highlight def link haskellType Type
highlight def link haskellImportKeywords Include
if get(g:, 'haskell_classic_highlighting', 0)
highlight def link haskellDeclKeyword Keyword
highlight def link HaskellDerive Keyword
highlight def link haskellDecl Keyword
highlight def link haskellWhere Keyword
highlight def link haskellLet Keyword
else
highlight def link haskellDeclKeyword Structure
highlight def link HaskellDerive Structure
highlight def link haskellDecl Structure
highlight def link haskellWhere Structure
highlight def link haskellLet Structure

View File

@@ -79,6 +79,7 @@ syn keyword htmlTagName contained uplimit variance vector vectorproduct xor
" Custom Element
syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>"
syn match htmlTagName contained "[.0-9_a-z]\@<=-[-.0-9_a-z]*\>"
" HTML 5 arguments
" Core Attributes

View File

@@ -151,7 +151,7 @@ syntax region jsFinallyBlock contained matchgroup=jsFinallyBraces s
syntax region jsSwitchBlock contained matchgroup=jsSwitchBraces start=/{/ end=/}/ contains=@jsAll,jsBlock,jsSwitchCase extend fold
syntax region jsRepeatBlock contained matchgroup=jsRepeatBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
syntax region jsDestructuringBlock contained matchgroup=jsDestructuringBraces start=/{/ end=/}/ contains=jsDestructuringProperty,jsDestructuringAssignment,jsDestructuringNoise,jsDestructuringPropertyComputed,jsSpreadExpression,jsComment extend fold
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsNoise,jsDestructuringProperty,jsSpreadExpression,jsComment extend fold
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsNoise,jsDestructuringProperty,jsSpreadExpression,jsDestructuringBlock,jsComment extend fold
syntax region jsObject contained matchgroup=jsObjectBraces start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsDecorator,jsAsyncKeyword extend fold
syntax region jsBlock matchgroup=jsBraces start=/{/ end=/}/ contains=@jsAll,jsSpreadExpression extend fold
syntax region jsModuleGroup contained matchgroup=jsModuleBraces start=/{/ end=/}/ contains=jsModuleKeyword,jsModuleComma,jsModuleAs,jsComment,jsFlowTypeKeyword skipwhite skipempty nextgroup=jsFrom fold
@@ -181,12 +181,12 @@ exe 'syntax match jsArrowFunction /_\ze\s*=>/ skipwhite skipempty nextgroup=j
syntax keyword jsClassKeyword contained class
syntax keyword jsExtendsKeyword contained extends skipwhite skipempty nextgroup=@jsExpression
syntax match jsClassNoise contained /\./
syntax match jsClassMethodType contained /\<\%([gs]et\|static\)\ze\s\+\K\k*/ skipwhite skipempty nextgroup=jsAsyncKeyword,jsFuncName,jsClassProperty
syntax match jsClassFuncName contained /\<\K\k*\ze\s*[(<]/ skipwhite skipempty nextgroup=jsFuncArgs,jsFlowClassFunctionGroup
syntax match jsClassMethodType contained /\<\%([gs]et\|static\)\ze\s\+\K\k*/ skipwhite skipempty nextgroup=jsAsyncKeyword,jsClassFuncName,jsClassProperty
syntax region jsClassDefinition start=/\<class\>/ end=/\(\<extends\>\s\+\)\@<!{\@=/ contains=jsClassKeyword,jsExtendsKeyword,jsClassNoise,@jsExpression,jsFlowClassGroup skipwhite skipempty nextgroup=jsCommentClass,jsClassBlock,jsFlowClassGroup
syntax match jsClassProperty contained /\<\K\k*\ze\s*=/ skipwhite skipempty nextgroup=jsClassValue,jsFlowClassDef
syntax region jsClassValue contained start=/=/ end=/\_[;}]\@=/ contains=@jsExpression
syntax region jsClassPropertyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsFuncArgs,jsClassValue extend
syntax match jsClassFuncName contained /\<\K\k*\ze\s*(/ skipwhite skipempty nextgroup=jsFuncArgs
syntax region jsClassStringKey contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial,@Spell extend skipwhite skipempty nextgroup=jsFuncArgs
" Destructuring
@@ -196,7 +196,7 @@ syntax match jsDestructuringAssignment contained /\k\+\ze\s*:/ skipwhit
syntax region jsDestructuringValue contained start=/=/ end=/[,}\]]\@=/ contains=@jsExpression extend
syntax region jsDestructuringValueAssignment contained start=/:/ end=/[,}=]\@=/ contains=jsDestructuringPropertyValue,jsDestructuringBlock,jsNoise,jsDestructuringNoise skipwhite skipempty nextgroup=jsDestructuringValue extend
syntax match jsDestructuringNoise contained /[,[\]]/
syntax region jsDestructuringPropertyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsDestructuringValue,jsDestructuringNoise extend fold
syntax region jsDestructuringPropertyComputed contained matchgroup=jsDestructuringBraces start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsDestructuringValue,jsDestructuringValueAssignment,jsDestructuringNoise extend fold
" Comments
syntax keyword jsCommentTodo contained TODO FIXME XXX TBD

View File

@@ -1,44 +1,17 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
" Vim syntax file
" Language: Jinja template
" Maintainer: Armin Ronacher <armin.ronacher@active-4.com>
" Last Change: 2008 May 9
" Version: 1.1
"
" Known Bugs:
" because of odd limitations dicts and the modulo operator
" appear wrong in the template.
"
" Changes:
"
" 2008 May 9: Added support for Jinja2 changes (new keyword rules)
" Language: Jinja2 - with special modifications for compound-filetype
" compatibility
" Maintainer: Dave Honneffer <pearofducks@gmail.com>
" Last Change: 2018.02.11
" .vimrc variable to disable html highlighting
if !exists('g:jinja_syntax_html')
let g:jinja_syntax_html=1
endif
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'jinja'
let main_syntax = 'jinja2'
endif
" Pull in the HTML syntax.
if g:jinja_syntax_html
if version < 600
so <sfile>:p:h/html.vim
else
runtime! syntax/html.vim
unlet b:current_syntax
endif
endif
let b:current_syntax = ''
unlet b:current_syntax
syntax case match
@@ -95,15 +68,8 @@ syn match jinjaStatement containedin=jinjaTagBlock contained /\<with\(out\)\?\s\
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_jinja_syn_inits")
if version < 508
let did_jinja_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
if !exists("did_jinja_syn_inits")
command -nargs=+ HiLink hi def link <args>
endif
HiLink jinjaPunctuation jinjaOperator
HiLink jinjaAttribute jinjaVariable
@@ -130,10 +96,6 @@ if version >= 508 || !exists("did_jinja_syn_inits")
delcommand HiLink
endif
let b:current_syntax = "jinja"
if main_syntax == 'jinja'
unlet main_syntax
endif
let b:current_syntax = "jinja2"
endif

View File

@@ -112,13 +112,13 @@ else
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=juliaBaseTypeNum0506,juliaBaseTypeRange0506,juliaBaseTypeSet0506
syntax cluster juliaTypesItems0506 contains=juliaBaseTypeNum0506,juliaBaseTypeRange0506,juliaBaseTypeDict0506,juliaBaseTypeSet0506
syntax cluster juliaTypesItems0607 contains=juliaBaseTypeBasic0607,juliaBaseTypeArray0607,juliaBaseTypeSet0607,juliaBaseTypeProcess0607,juliaBaseTypeRange0607,juliaBaseTypeTime0607
syntax cluster juliaTypesItems07 contains=juliaBaseTypeBasic07,juliaBaseTypeNum07,juliaBaseTypeError07,juliaBaseTypeIter07,juliaBaseTypeRange07,juliaBaseTypeArray07,juliaBaseTypeSet07,juliaBaseTypeC07,juliaBaseTypeDisplay07,juliaBaseTypeIO07
syntax cluster juliaTypesItems07 contains=juliaBaseTypeBasic07,juliaBaseTypeNum07,juliaBaseTypeError07,juliaBaseTypeIter07,juliaBaseTypeRange07,juliaBaseTypeArray07,juliaBaseTypeDict07,juliaBaseTypeSet07,juliaBaseTypeC07,juliaBaseTypeDisplay07,juliaBaseTypeIO07
syntax cluster juliaConstItemsAll contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstIO,juliaConstMMap,juliaConstC,juliaConstGeneric
syntax cluster juliaConstItems0506 contains=juliaConstNum0506
syntax cluster juliaConstItems07 contains=juliaConstGeneric07,juliaPossibleEuler
syntax cluster juliaConstItemsAll contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric
syntax cluster juliaConstItems0506 contains=juliaConstNum0506,juliaConstIO0506
syntax cluster juliaConstItems07 contains=juliaConstGeneric07,juliaPossibleEuler,juliaConstEnv07,juliaConstIO07
if b:julia_syntax_version <= 6
syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems0506
else
@@ -223,7 +223,9 @@ syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abs
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 juliaBaseTypeArray07 display "\<\%(BroadcastStyle\|Adjoint\|Transpose\|LinearIndices\)\>"
syntax match juliaBaseTypeDict display "\<\%(WeakKey\|ObjectId\)\?Dict\>"
syntax match juliaBaseTypeDict display "\<\%(WeakKey\)\?Dict\>"
syntax match juliaBaseTypeDict0506 display "\<ObjectIdDict\>"
syntax match juliaBaseTypeDict07 display "\<IdDict\>"
syntax match juliaBaseTypeSet display "\<Set\>"
syntax match juliaBaseTypeSet0506 display "\<IntSet\>"
syntax match juliaBaseTypeSet0607 display "\<AbstractSet\>"
@@ -236,7 +238,7 @@ syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Ordinal\|St
syntax match juliaBaseTypeRange05 display "\<FloatRange\>"
syntax match juliaBaseTypeRange0506 display "\<Range\>"
syntax match juliaBaseTypeRange0607 display "\<\%(ExponentialBackOff\|StepRangeLen\)\>"
syntax match juliaBaseTypeRange07 display "\<AbstractRange\>"
syntax match juliaBaseTypeRange07 display "\<\(Abstract\|Lin\)Range\>"
syntax match juliaBaseTypeRegex display "\<Regex\%(Match\)\?\>"
syntax match juliaBaseTypeFact display "\<Factorization\>"
syntax match juliaBaseTypeSort display "\<\%(Insertion\|\(Partial\)\?Quick\|Merge\)Sort\>"
@@ -259,8 +261,10 @@ syntax match juliaConstNum0506 display "\%(\<\%(eu\?\|eulergamma\|γ\|catalan\
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\)\|DevNull\)\>"
syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|OS_NAME\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|JULIA_HOME\|PROGRAM_FILE\)\>"
syntax match juliaConstEnv07 display "\<DEPOT_PATH\>"
syntax match juliaConstIO0506 display "\<\%(STD\%(OUT\|IN\|ERR\)\|DevNull\)\>"
syntax match juliaConstIO07 display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
syntax match juliaConstC display "\<\%(WORD_SIZE\|C_NULL\)\>"
syntax match juliaConstGeneric display "\<\%(nothing\|Main\)\>"
syntax match juliaConstGeneric07 display "\<missing\>"
@@ -452,11 +456,11 @@ 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 ["Num", "Range", "Set"]
for t in ["Num", "Range", "Dict", "Set"]
let h = b:julia_syntax_version <= 6 ? "Type" : "juliaDeprecated"
exec "hi! def link juliaBaseType" . t . "0506 " . h
endfor
for t in ["Range", "Set", "Basic", "C", "Array", "Iter", "Display", "IO", "Num", "Error"]
for t in ["Range", "Dict", "Set", "Basic", "C", "Array", "Iter", "Display", "IO", "Num", "Error"]
let h = b:julia_syntax_version >= 7 ? "Type" : "NONE"
exec "hi! def link juliaBaseType" . t . "07 " . h
endfor
@@ -472,15 +476,18 @@ 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
let h = b:julia_syntax_version >= 7 ? "Constant" : "NONE"
exec "hi! def link juliaConstGeneric07 " . h
for t in ["Generic", "IO", "Env"]
let h = b:julia_syntax_version >= 7 ? "Constant" : "NONE"
exec "hi! def link juliaConst" . t . "07 " . h
endfor
let h = b:julia_syntax_version < 7 ? "Constant" : "juliaDeprecated"
exec "hi! def link juliaConstIO0506 " . h
hi def link juliaComprehensionFor Keyword
hi def link juliaComprehensionIf Keyword

View File

@@ -84,10 +84,16 @@ syn match nimEscapeError "\\x\x\=\X" display contained
if nim_highlight_numbers == 1
" numbers (including longs and complex)
syn match nimNumber "\v<0x\x+(\'(i|I|f|F|u|U)(8|16|32|64))?>"
syn match nimNumber "\v<[0-9_]+(\'(i|I|f|F|u|U)(8|16|32|64))?>"
syn match nimNumber "\v[0-9]\.[0-9_]+([eE][+-]=[0-9_]+)=>"
syn match nimNumber "\v<[0-9_]+(\.[0-9_]+)?([eE][+-]?[0-9_]+)?(\'(f|F)(32|64))?>"
let s:dec_num = '\d%(_?\d)*'
let s:int_suf = '%(''%(%(i|I|u|U)%(8|16|32|64)|u|U))'
let s:float_suf = '%(''%(%(f|F)%(32|64|128)?|d|D))'
let s:exp = '%([eE][+-]?'.s:dec_num.')'
exe 'syn match nimNumber /\v<0[bB][01]%(_?[01])*%('.s:int_suf.'|'.s:float_suf.')?>/'
exe 'syn match nimNumber /\v<0[ocC]\o%(_?\o)*%('.s:int_suf.'|'.s:float_suf.')?>/'
exe 'syn match nimNumber /\v<0[xX]\x%(_?\x)*%('.s:int_suf.'|'.s:float_suf.')?>/'
exe 'syn match nimNumber /\v<'.s:dec_num.'%('.s:int_suf.'|'.s:exp.'?'.s:float_suf.'?)>/'
exe 'syn match nimNumber /\v<'.s:dec_num.'\.'.s:dec_num.s:exp.'?'.s:float_suf.'?>/'
unlet s:dec_num s:int_suf s:float_suf s:exp
endif
if nim_highlight_builtins == 1

View File

@@ -36,11 +36,12 @@ syn region nixComment start=+/\*+ end=+\*/+ contains=nixTodo,@Spell
syn region nixInterpolation matchgroup=nixInterpolationDelimiter start="\${" end="}" contained contains=@nixExpr,nixInterpolationParam
syn match nixSimpleStringSpecial /\\["nrt\\$]/ contained
syn match nixInterpolationSpecial /''['$]/ contained
syn match nixSimpleStringSpecial /\\./ contained
syn match nixStringSpecial /''['$]/ contained
syn match nixStringSpecial /''\\./ contained
syn region nixSimpleString matchgroup=nixStringDelimiter start=+"+ skip=+\\"+ end=+"+ contains=nixInterpolation,nixSimpleStringSpecial
syn region nixString matchgroup=nixStringDelimiter start=+''+ skip=+''['$]+ end=+''+ contains=nixInterpolation,nixInterpolationSpecial
syn region nixString matchgroup=nixStringDelimiter start=+''+ skip=+''['$\\]+ end=+''+ contains=nixInterpolation,nixStringSpecial
syn match nixFunctionCall "[a-zA-Z_][a-zA-Z0-9_'-]*"
@@ -117,27 +118,34 @@ syn region nixWithExpr matchgroup=nixWithExprKeyword start="\<with\>" matchgroup
syn region nixAssertExpr matchgroup=nixAssertKeyword start="\<assert\>" matchgroup=NONE end=";" contains=@nixExpr
syn cluster nixExpr contains=nixBoolean,nixNull,nixOperator,nixParen,nixInteger,nixRecKeyword,nixConditional,nixBuiltin,nixSimpleBuiltin,nixComment,nixFunctionCall,nixFunctionArgument,nixSimpleFunctionArgument,nixPath,nixHomePath,nixSearchPathRef,nixURI,nixAttributeSet,nixList,nixSimpleString,nixString,nixLetExpr,nixIfExpr,nixWithExpr,nixAssertExpr
syn cluster nixExpr contains=nixBoolean,nixNull,nixOperator,nixParen,nixInteger,nixRecKeyword,nixConditional,nixBuiltin,nixSimpleBuiltin,nixComment,nixFunctionCall,nixFunctionArgument,nixSimpleFunctionArgument,nixPath,nixHomePath,nixSearchPathRef,nixURI,nixAttributeSet,nixList,nixSimpleString,nixString,nixLetExpr,nixIfExpr,nixWithExpr,nixAssertExpr,nixInterpolation
" These definitions override @nixExpr and have to come afterwards:
syn match nixInterpolationParam "[a-zA-Z_][a-zA-Z0-9_'-]*\%(\.[a-zA-Z_][a-zA-Z0-9_'-]*\)*" contained
" Non-namespaced Nix builtins as of version 1.10:
" Non-namespaced Nix builtins as of version 2.0:
syn keyword nixSimpleBuiltin
\ abort baseNameOf derivation dirOf fetchTarball import map removeAttrs
\ throw toString
\ abort baseNameOf derivation derivationStrict dirOf fetchGit
\ fetchMercurial fetchTarball import isNull map placeholder removeAttrs
\ scopedImport throw toString
" Namespaced and non-namespaced Nix builtins as of version 1.10:
" Namespaced and non-namespaced Nix builtins as of version 2.0:
syn keyword nixNamespacedBuiltin contained
\ abort add all any attrNames attrValues baseNameOf compareVersions
\ concatLists currentSystem deepSeq derivation dirOf div elem elemAt
\ fetchTarball fetchurl filter filterSource foldl' fromJSON genList
\ getAttr getEnv hasAttr hashString head import intersectAttrs isAttrs
\ isBool isFunction isInt isList isString length lessThan listToAttrs map
\ mul parseDrvName pathExists readDir readFile removeAttrs replaceStrings
\ seq sort stringLength sub substring tail throw toFile toJSON toPath
\ toString toXML trace typeOf
\ abort add addErrorContext all any attrNames attrValues baseNameOf
\ catAttrs compareVersions concatLists concatStringsSep currentSystem
\ currentTime deepSeq derivation derivationStrict dirOf div elem elemAt
\ fetchGit fetchMercurial fetchTarball fetchurl filter \ filterSource
\ findFile foldl' fromJSON functionArgs genList \ genericClosure getAttr
\ getEnv hasAttr hasContext hashString head import intersectAttrs isAttrs
\ isBool isFloat isFunction isInt isList isNull isString langVersion
\ length lessThan listToAttrs map match mul nixPath nixVersion
\ parseDrvName partition path pathExists placeholder readDir readFile
\ removeAttrs replaceStrings scopedImport seq sort split splitVersion
\ storeDir storePath stringLength sub substring tail throw toFile toJSON
\ toPath toString toXML trace tryEval typeOf unsafeDiscardOutputDependency
\ unsafeDiscardStringContext unsafeGetAttrPos valueSize
syn match nixBuiltin "builtins\.[a-zA-Z']\+"he=s+9 contains=nixComment,nixNamespacedBuiltin
@@ -158,7 +166,6 @@ hi def link nixInteger Integer
hi def link nixInterpolation Macro
hi def link nixInterpolationDelimiter Delimiter
hi def link nixInterpolationParam Macro
hi def link nixInterpolationSpecial Special
hi def link nixLetExprKeyword Keyword
hi def link nixNamespacedBuiltin Special
hi def link nixNull Constant
@@ -173,6 +180,7 @@ hi def link nixSimpleString String
hi def link nixSimpleStringSpecial SpecialChar
hi def link nixString String
hi def link nixStringDelimiter Delimiter
hi def link nixStringSpecial Special
hi def link nixTodo Todo
hi def link nixURI Include
hi def link nixWithExprKeyword Keyword

File diff suppressed because one or more lines are too long

View File

@@ -20,14 +20,8 @@ syn keyword purescriptBoolean true false
" Delimiters
syn match purescriptDelimiter "[,;|.()[\]{}]"
" Constructor
syn match purescriptConstructor "\%(\<class\s\+\)\@15<!\<[A-Z]\w*\>"
syn region purescriptConstructorDecl matchgroup=purescriptConstructor start="\<[A-Z]\w*\>" end="\(|\|$\)"me=e-1,re=e-1 contained
\ containedin=purescriptData,purescriptNewtype
\ contains=purescriptType,purescriptTypeVar,purescriptDelimiter,purescriptOperatorType,purescriptOperatorTypeSig,@purescriptComment
" Type
syn match purescriptType "\%(\<class\s\+\)\@15<!\<[A-Z]\w*\>" contained
syn match purescriptType "\%(\<class\s\+\)\@15<!\<\u\w*\>" contained
\ containedin=purescriptTypeAlias
\ nextgroup=purescriptType,purescriptTypeVar skipwhite
syn match purescriptTypeVar "\<[_a-z]\(\w\|\'\)*\>" contained
@@ -35,6 +29,13 @@ syn match purescriptTypeVar "\<[_a-z]\(\w\|\'\)*\>" contained
syn region purescriptTypeExport matchgroup=purescriptType start="\<[A-Z]\(\S\&[^,.]\)*\>("rs=e-1 matchgroup=purescriptDelimiter end=")" contained extend
\ contains=purescriptConstructor,purescriptDelimiter
" Constructor
syn match purescriptConstructor "\%(\<class\s\+\)\@15<!\<\u\w*\>"
syn region purescriptConstructorDecl matchgroup=purescriptConstructor start="\<[A-Z]\w*\>" end="\(|\|$\)"me=e-1,re=e-1 contained
\ containedin=purescriptData,purescriptNewtype
\ contains=purescriptType,purescriptTypeVar,purescriptDelimiter,purescriptOperatorType,purescriptOperatorTypeSig,@purescriptComment
" Function
syn match purescriptFunction "\%(\<instance\s\+\|\<class\s\+\)\@18<!\<[_a-z]\(\w\|\'\)*\>" contained
" syn match purescriptFunction "\<[_a-z]\(\w\|\'\)*\>" contained
@@ -52,28 +53,42 @@ syn match purescriptClass "\<class\>" containedin=purescriptClassDecl contained
syn match purescriptClassName "\<[A-Z]\w*\>" containedin=purescriptClassDecl contained
" Module
syn match purescriptModuleName "\(\w\+\.\?\)*" contained excludenl
syn match purescriptModuleName "\(\u\w\*\.\?\)*" contained excludenl
syn match purescriptModuleKeyword "\<module\>"
syn match purescriptModule "^module\>\s\+\<\(\w\+\.\?\)*\>"
\ contains=purescriptModuleKeyword,purescriptModuleName
\ nextgroup=purescriptModuleParams skipwhite skipnl skipempty
\ nextgroup=purescriptModuleParams
\ skipwhite
\ skipnl
\ skipempty
syn region purescriptModuleParams start="(" skip="([^)]\{-})" end=")" fold contained keepend
\ contains=purescriptClassDecl,purescriptClass,purescriptClassName,purescriptDelimiter,purescriptType,purescriptTypeExport,purescriptFunction,purescriptStructure,purescriptModuleKeyword,@purescriptComment
\ contains=purescriptClassDecl,purescriptClass,purescriptClassName,purescriptDelimiter,purescriptType,purescriptTypeExport,purescriptStructure,purescriptModuleKeyword,@purescriptComment
\ nextgroup=purescriptImportParams skipwhite
" Import
syn match purescriptImportKeyword "\<\(foreign\|import\|qualified\)\>"
syn keyword purescriptAsKeyword as contained
syn keyword purescriptHidingKeyword hiding contained
syn match purescriptImport "\<import\>\s\+\(qualified\s\+\)\?\<\(\w\+\.\?\)*\>"
syn match purescriptImport "\<import\>\s\+\(qualified\s\+\)\?\<\(\w\+\.\?\)*"
\ contains=purescriptImportKeyword,purescriptModuleName
\ nextgroup=purescriptModuleParams,purescriptImportParams skipwhite
syn match purescriptImportParams "as\s\+\(\w\+\)" contained
\ contains=purescriptModuleName,purescriptAsKeyword
\ nextgroup=purescriptModuleParams,purescriptImportParams skipwhite
syn match purescriptImportParams "hiding" contained
\ nextgroup=purescriptImportParams,purescriptImportAs,purescriptImportHiding
\ skipwhite
syn region purescriptImportParams
\ start="("
\ skip="([^)]\{-})"
\ end=")"
\ contained
\ contains=purescriptClass,purescriptClass,purescriptStructure,purescriptType,purescriptIdentifier
\ nextgroup=purescriptImportAs
\ skipwhite
syn keyword purescriptAsKeyword as contained
syn match purescriptImportAs "\<as\>\_s\+\u\w*"
\ contains=purescriptAsKeyword,purescriptModuleName
\ nextgroup=purescriptModuleName
syn keyword purescriptHidingKeyword hiding contained
syn match purescriptImportHiding "hiding"
\ contained
\ contains=purescriptHidingKeyword
\ nextgroup=purescriptModuleParams,purescriptImportParams skipwhite
\ nextgroup=purescriptImportParams
\ skipwhite
" Function declaration
syn region purescriptFunctionDecl
@@ -97,7 +112,6 @@ syn match purescriptForall "∀"
syn keyword purescriptConditional if then else
syn keyword purescriptStatement do case of in
syn keyword purescriptLet let
" syn keyword purescriptClass class
syn keyword purescriptWhere where
syn match purescriptStructure "\<\(data\|newtype\|type\|kind\)\>"
\ nextgroup=purescriptType skipwhite
@@ -140,19 +154,22 @@ syn match purescriptTypeAliasStart "^type\s\+\([A-Z]\w*\)" contained
" String
syn match purescriptChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
syn region purescriptString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region purescriptMultilineString start=+"""+ end=+"""+ fold
syn region purescriptString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
syn region purescriptMultilineString start=+"""+ end=+"""+ fold contains=@Spell
" Comment
syn match purescriptLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
syn match purescriptLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell
syn region purescriptBlockComment start="{-" end="-}" fold
\ contains=purescriptBlockComment
syn cluster purescriptComment contains=purescriptLineComment,purescriptBlockComment
\ contains=purescriptBlockComment,@Spell
syn cluster purescriptComment contains=purescriptLineComment,purescriptBlockComment,@Spell
syn sync minlines=50
" highlight links
highlight def link purescriptModule Include
highlight def link purescriptImport Include
highlight def link purescriptModuleKeyword purescriptKeyword
highlight def link purescriptImportAs Include
highlight def link purescriptModuleName Include
highlight def link purescriptModuleParams purescriptDelimiter
highlight def link purescriptImportKeyword purescriptKeyword

View File

@@ -280,51 +280,31 @@ else
endif
" Here Document {{{1
syn match rubyStringDelimiter +\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+
syn match rubyStringDelimiter +\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+
syn match rubyStringDelimiter +\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+
syn match rubyStringDelimiter +\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
if s:foldable('<<')
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\).*$\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<"\z([^"]*\)".*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<'\z([^']*\)'.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ keepend fold
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<`\z([^`]*\)`.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\>.*$\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)".*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ keepend fold
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)$+ end=+^\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs"\z([^"]*\)"$+ end=+^\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs'\z([^']*\)'$+ end=+^\z1$+ keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs`\z([^`]*\)`$+ end=+^\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)$+ end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs"\z([^"]*\)"$+ end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs'\z([^']*\)'$+ end=+^\s*\zs\z1$+ keepend fold
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs`\z([^`]*\)`$+ end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend fold
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
else
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\).*$\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<"\z([^"]*\)".*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<'\z([^']*\)'.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<`\z([^`]*\)`.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\>.*$\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)".*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ keepend
syn region rubyString start=+\%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`.*\)\@<=\n+ matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)$+ end=+^\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs"\z([^"]*\)"$+ end=+^\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs'\z([^']*\)'$+ end=+^\z1$+ keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\zs`\z([^`]*\)`$+ end=+^\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)$+ end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs"\z([^"]*\)"$+ end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs'\z([^']*\)'$+ end=+^\s*\zs\z1$+ keepend
syn region rubyString matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\zs`\z([^`]*\)`$+ end=+^\s*\zs\z1$+ contains=@rubyStringSpecial keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart keepend
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
endif
" eRuby Config {{{1

View File

@@ -12,9 +12,9 @@ endif
" basic
" contract, library and event are defined at bottom of file
syn keyword solKeyword abstract anonymous as assembly break case catch constant continue default
syn keyword solKeyword delete do else enum external final for function if import in indexed inline
syn keyword solKeyword delete do else emit enum external final for function if import in indexed inline
syn keyword solKeyword interface internal is let match memory modifier new of payable pragma private public pure
syn keyword solKeyword relocatable return returns static storage struct switch throw try type typeof using
syn keyword solKeyword relocatable require return returns static storage struct throw try type typeof using
syn keyword solKeyword var view while
syn keyword solConstant true false wei szabo finney ether seconds minutes hours days weeks years now
syn keyword solConstant block msg now tx sha3 keccak256 sha256 ripemd160 ecerecover addmod mulmod this super selfdestruct

View File

@@ -54,10 +54,10 @@ delfunction s:CommentKeywordMatch
" Literals
" Strings
syntax region swiftString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=swiftMultilineInterpolatedWrapper oneline
syntax region swiftString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=swiftInterpolatedWrapper oneline
syntax region swiftMultilineString start=/"""/ end=/"""/ contains=swiftMultilineInterpolatedWrapper
syntax region swiftMultilineInterpolatedWrapper start="\v\\\(\s*" end="\v\s*\)" contained containedin=swiftMultilineString contains=swiftInterpolatedString oneline
syntax region swiftInterpolatedWrapper start="\v[^\\]\zs\\\(\s*" end="\v\s*\)" contained containedin=swiftString contains=swiftInterpolatedString,swiftString oneline
syntax region swiftMultilineInterpolatedWrapper start='\v\zs\\\(\s*' end='\v\s*\)' contained containedin=swiftMultilineString contains=swiftInterpolatedString oneline
syntax region swiftInterpolatedWrapper start='\v(^|[^\\])\zs\\\(\s*' end='\v\s*\)' contained containedin=swiftString contains=swiftInterpolatedString,swiftString oneline
syntax match swiftInterpolatedString "\v\w+(\(\))?" contained containedin=swiftInterpolatedWrapper,swiftMultilineInterpolatedWrapper oneline
" Numbers
@@ -140,6 +140,7 @@ syntax keyword swiftKeywords
\ mutating
\ nil
\ nonmutating
\ open
\ operator
\ optional
\ override

View File

@@ -19,9 +19,12 @@ syn keyword terraDataTypeBI
\ alicloud_dns_domains
\ alicloud_dns_groups
\ alicloud_dns_records
\ alicloud_eips
\ alicloud_images
\ alicloud_instance_types
\ alicloud_instances
\ alicloud_key_pairs
\ alicloud_kms_keys
\ alicloud_ram_account_alias
\ alicloud_ram_account_aliases
\ alicloud_ram_groups
@@ -29,7 +32,10 @@ syn keyword terraDataTypeBI
\ alicloud_ram_roles
\ alicloud_ram_users
\ alicloud_regions
\ alicloud_security_group_rules
\ alicloud_security_groups
\ alicloud_vpcs
\ alicloud_vswitches
\ alicloud_zones
\ archive_file
\ atlas_artifact
@@ -39,6 +45,7 @@ syn keyword terraDataTypeBI
\ aws_alb_target_group
\ aws_ami
\ aws_ami_ids
\ aws_api_gateway_rest_api
\ aws_autoscaling_groups
\ aws_availability_zone
\ aws_availability_zones
@@ -47,6 +54,7 @@ syn keyword terraDataTypeBI
\ aws_canonical_user_id
\ aws_cloudformation_stack
\ aws_cloudtrail_service_account
\ aws_cloudwatch_log_group
\ aws_db_instance
\ aws_db_snapshot
\ aws_dynamodb_table
@@ -60,6 +68,7 @@ syn keyword terraDataTypeBI
\ aws_efs_file_system
\ aws_efs_mount_target
\ aws_eip
\ aws_elastic_beanstalk_hosted_zone
\ aws_elastic_beanstalk_solution_stack
\ aws_elasticache_cluster
\ aws_elasticache_replication_group
@@ -69,10 +78,12 @@ syn keyword terraDataTypeBI
\ aws_iam_account_alias
\ aws_iam_group
\ aws_iam_instance_profile
\ aws_iam_policy
\ aws_iam_policy_document
\ aws_iam_role
\ aws_iam_server_certificate
\ aws_iam_user
\ aws_inspector_rules_packages
\ aws_instance
\ aws_instances
\ aws_internet_gateway
@@ -80,6 +91,7 @@ syn keyword terraDataTypeBI
\ aws_kinesis_stream
\ aws_kms_alias
\ aws_kms_ciphertext
\ aws_kms_key
\ aws_kms_secret
\ aws_lb
\ aws_lb_listener
@@ -97,6 +109,7 @@ syn keyword terraDataTypeBI
\ aws_s3_bucket_object
\ aws_security_group
\ aws_sns_topic
\ aws_sqs_queue
\ aws_ssm_parameter
\ aws_subnet
\ aws_subnet_ids
@@ -105,58 +118,88 @@ syn keyword terraDataTypeBI
\ aws_vpc_endpoint_service
\ aws_vpc_peering_connection
\ aws_vpn_gateway
\ azurerm_app_service
\ azurerm_app_service_plan
\ azurerm_application_security_group
\ azurerm_builtin_role_definition
\ azurerm_cdn_profile
\ azurerm_client_config
\ azurerm_dns_zone
\ azurerm_eventhub_namespace
\ azurerm_image
\ azurerm_key_vault_access_policy
\ azurerm_managed_disk
\ azurerm_network_interface
\ azurerm_network_security_group
\ azurerm_platform_image
\ azurerm_public_ip
\ azurerm_public_ips
\ azurerm_resource_group
\ azurerm_role_definition
\ azurerm_scheduler_job_collection
\ azurerm_snapshot
\ azurerm_storage_account
\ azurerm_subnet
\ azurerm_subscription
\ azurerm_subscriptions
\ azurerm_traffic_manager_geographical_location
\ azurerm_virtual_network
\ azurerm_virtual_network_gateway
\ circonus_account
\ circonus_collector
\ cloudflare_ip_ranges
\ cloudstack_template
\ consul_agent_self
\ consul_catalog_nodes
\ consul_catalog_service
\ consul_catalog_services
\ consul_key_prefix
\ consul_keys
\ digitalocean_image
\ dns_a_record_set
\ dns_aaaa_record_set
\ dns_cname_record_set
\ dns_ns_record_set
\ dns_ptr_record_set
\ dns_txt_record_set
\ docker_registry_image
\ external
\ fastly_ip_ranges
\ github_ip_ranges
\ github_team
\ github_user
\ google_active_folder
\ google_billing_account
\ google_client_config
\ google_cloudfunctions_function
\ google_compute_address
\ google_compute_backend_service
\ google_compute_default_service_account
\ google_compute_forwarding_rule
\ google_compute_global_address
\ google_compute_image
\ google_compute_instance_group
\ google_compute_lb_ip_ranges
\ google_compute_network
\ google_compute_region_instance_group
\ google_compute_ssl_policy
\ google_compute_subnetwork
\ google_compute_vpn_gateway
\ google_compute_zones
\ google_container_cluster
\ google_container_engine_versions
\ google_container_registry_image
\ google_container_registry_repository
\ google_dns_managed_zone
\ google_folder
\ google_iam_policy
\ google_kms_secret
\ google_organization
\ google_project
\ google_storage_object_signed_url
\ google_storage_project_service_account
\ heroku_app
\ heroku_space
\ http
\ kubernetes_service
\ kubernetes_storage_class
@@ -164,30 +207,50 @@ syn keyword terraDataTypeBI
\ logicmonitor_collectors
\ logicmonitor_device_group
\ newrelic_application
\ newrelic_key_transaction
\ nomad_regions
\ ns1_datasource
\ nsxt_edge_cluster
\ nsxt_logical_tier0_router
\ nsxt_ns_service
\ nsxt_switching_profile
\ nsxt_transport_zone
\ null_data_source
\ oneandone_instance_size
\ opc_compute_image_list_entry
\ opc_compute_machine_image
\ opc_compute_network_interface
\ opc_compute_storage_volume_snapshot
\ opc_compute_vnic
\ openstack_compute_flavor_v2
\ openstack_dns_zone_v2
\ openstack_identity_project_v3
\ openstack_identity_role_v3
\ openstack_identity_user_v3
\ openstack_images_image_v2
\ openstack_networking_network_v2
\ openstack_networking_secgroup_v2
\ openstack_networking_subnet_v2
\ openstack_networking_subnetpool_v2
\ opentelekomcloud_images_image_v2
\ opentelekomcloud_kms_data_key_v1
\ opentelekomcloud_kms_key_v1
\ opentelekomcloud_networking_network_v2
\ opentelekomcloud_networking_secgroup_v2
\ opentelekomcloud_rds_flavors_v1
\ opentelekomcloud_s3_bucket_object
\ opsgenie_user
\ oraclepaas_database_service_instance
\ ovh_publiccloud_region
\ ovh_publiccloud_regions
\ packet_precreated_ip_block
\ pagerduty_escalation_policy
\ pagerduty_extension_schema
\ pagerduty_schedule
\ pagerduty_team
\ pagerduty_user
\ pagerduty_vendor
\ panos_system_info
\ profitbricks_datacenter
\ profitbricks_image
\ profitbricks_location
@@ -201,13 +264,18 @@ syn keyword terraDataTypeBI
\ template_cloudinit_config
\ template_file
\ terraform_remote_state
\ tls_public_key
\ triton_account
\ triton_datacenter
\ triton_fabric_network
\ triton_fabric_vlan
\ triton_image
\ triton_network
\ triton_package
\ vsphere_custom_attribute
\ vsphere_datacenter
\ vsphere_datastore
\ vsphere_datastore_cluster
\ vsphere_distributed_virtual_switch
\ vsphere_host
\ vsphere_network
@@ -221,7 +289,16 @@ syn keyword terraDataTypeBI
""" resource
syn keyword terraResourceTypeBI
\ alicloud_cdn_domain
\ alicloud_cms_alarm
\ alicloud_container_cluster
\ alicloud_cs_application
\ alicloud_cs_kubernetes
\ alicloud_cs_swarm
\ alicloud_db_account
\ alicloud_db_account_privilege
\ alicloud_db_backup_policy
\ alicloud_db_connection
\ alicloud_db_database
\ alicloud_db_instance
\ alicloud_disk
\ alicloud_disk_attachment
@@ -230,6 +307,7 @@ syn keyword terraResourceTypeBI
\ alicloud_dns_record
\ alicloud_eip
\ alicloud_eip_association
\ alicloud_ess_attachment
\ alicloud_ess_scaling_configuration
\ alicloud_ess_scaling_group
\ alicloud_ess_scaling_rule
@@ -238,6 +316,7 @@ syn keyword terraResourceTypeBI
\ alicloud_instance
\ alicloud_key_pair
\ alicloud_key_pair_attachment
\ alicloud_kms_key
\ alicloud_nat_gateway
\ alicloud_oss_bucket
\ alicloud_oss_bucket_object
@@ -261,14 +340,19 @@ syn keyword terraResourceTypeBI
\ alicloud_slb
\ alicloud_slb_attachment
\ alicloud_slb_listener
\ alicloud_slb_rule
\ alicloud_slb_server_group
\ alicloud_snat_entry
\ alicloud_subnet
\ alicloud_vpc
\ alicloud_vswitch
\ arukas_container
\ atlas_artifact
\ aws_acm_certificate
\ aws_acm_certificate_validation
\ aws_alb
\ aws_alb_listener
\ aws_alb_listener_certificate
\ aws_alb_listener_rule
\ aws_alb_target_group
\ aws_alb_target_group_attachment
@@ -282,6 +366,8 @@ syn keyword terraResourceTypeBI
\ aws_api_gateway_base_path_mapping
\ aws_api_gateway_client_certificate
\ aws_api_gateway_deployment
\ aws_api_gateway_documentation_part
\ aws_api_gateway_documentation_version
\ aws_api_gateway_domain_name
\ aws_api_gateway_gateway_response
\ aws_api_gateway_integration
@@ -296,10 +382,13 @@ syn keyword terraResourceTypeBI
\ aws_api_gateway_stage
\ aws_api_gateway_usage_plan
\ aws_api_gateway_usage_plan_key
\ aws_api_gateway_vpc_link
\ aws_app_cookie_stickiness_policy
\ aws_appautoscaling_policy
\ aws_appautoscaling_scheduled_action
\ aws_appautoscaling_target
\ aws_appsync_datasource
\ aws_appsync_graphql_api
\ aws_athena_database
\ aws_athena_named_query
\ aws_autoscaling_attachment
@@ -311,11 +400,13 @@ syn keyword terraResourceTypeBI
\ aws_batch_compute_environment
\ aws_batch_job_definition
\ aws_batch_job_queue
\ aws_cloud9_environment_ec2
\ aws_cloudformation_stack
\ aws_cloudfront_distribution
\ aws_cloudfront_origin_access_identity
\ aws_cloudtrail
\ aws_cloudwatch_dashboard
\ aws_cloudwatch_event_permission
\ aws_cloudwatch_event_rule
\ aws_cloudwatch_event_target
\ aws_cloudwatch_log_destination
@@ -335,12 +426,16 @@ syn keyword terraResourceTypeBI
\ aws_codepipeline
\ aws_cognito_identity_pool
\ aws_cognito_identity_pool_roles_attachment
\ aws_cognito_user_group
\ aws_cognito_user_pool
\ aws_cognito_user_pool_client
\ aws_cognito_user_pool_domain
\ aws_config_config_rule
\ aws_config_configuration_recorder
\ aws_config_configuration_recorder_status
\ aws_config_delivery_channel
\ aws_customer_gateway
\ aws_dax_cluster
\ aws_db_event_subscription
\ aws_db_instance
\ aws_db_option_group
@@ -355,6 +450,7 @@ syn keyword terraResourceTypeBI
\ aws_default_vpc
\ aws_default_vpc_dhcp_options
\ aws_devicefarm_project
\ aws_directory_service_conditional_forwarder
\ aws_directory_service_directory
\ aws_dms_certificate
\ aws_dms_endpoint
@@ -364,7 +460,9 @@ syn keyword terraResourceTypeBI
\ aws_dx_connection
\ aws_dx_connection_association
\ aws_dx_lag
\ aws_dynamodb_global_table
\ aws_dynamodb_table
\ aws_dynamodb_table_item
\ aws_ebs_snapshot
\ aws_ebs_volume
\ aws_ecr_lifecycle_policy
@@ -397,7 +495,17 @@ syn keyword terraResourceTypeBI
\ aws_emr_instance_group
\ aws_emr_security_configuration
\ aws_flow_log
\ aws_gamelift_alias
\ aws_gamelift_build
\ aws_gamelift_fleet
\ aws_glacier_vault
\ aws_glue_catalog_database
\ aws_glue_connection
\ aws_glue_job
\ aws_guardduty_detector
\ aws_guardduty_ipset
\ aws_guardduty_member
\ aws_guardduty_threatintelset
\ aws_iam_access_key
\ aws_iam_account_alias
\ aws_iam_account_password_policy
@@ -414,6 +522,7 @@ syn keyword terraResourceTypeBI
\ aws_iam_role_policy_attachment
\ aws_iam_saml_provider
\ aws_iam_server_certificate
\ aws_iam_service_linked_role
\ aws_iam_user
\ aws_iam_user_login_profile
\ aws_iam_user_policy
@@ -426,19 +535,25 @@ syn keyword terraResourceTypeBI
\ aws_internet_gateway
\ aws_iot_certificate
\ aws_iot_policy
\ aws_iot_thing
\ aws_iot_thing_type
\ aws_iot_topic_rule
\ aws_key_pair
\ aws_kinesis_firehose_delivery_stream
\ aws_kinesis_stream
\ aws_kms_alias
\ aws_kms_grant
\ aws_kms_key
\ aws_lambda_alias
\ aws_lambda_event_source_mapping
\ aws_lambda_function
\ aws_lambda_permission
\ aws_launch_configuration
\ aws_launch_template
\ aws_lb
\ aws_lb_cookie_stickiness_policy
\ aws_lb_listener
\ aws_lb_listener_certificate
\ aws_lb_listener_rule
\ aws_lb_ssl_negotiation_policy
\ aws_lb_target_group
@@ -477,6 +592,8 @@ syn keyword terraResourceTypeBI
\ aws_opsworks_stack
\ aws_opsworks_static_web_layer
\ aws_opsworks_user_profile
\ aws_organizations_account
\ aws_organizations_organization
\ aws_placement_group
\ aws_proxy_protocol_policy
\ aws_rds_cluster
@@ -489,12 +606,14 @@ syn keyword terraResourceTypeBI
\ aws_route
\ aws_route53_delegation_set
\ aws_route53_health_check
\ aws_route53_query_log
\ aws_route53_record
\ aws_route53_zone
\ aws_route53_zone_association
\ aws_route_table
\ aws_route_table_association
\ aws_s3_bucket
\ aws_s3_bucket_metric
\ aws_s3_bucket_notification
\ aws_s3_bucket_object
\ aws_s3_bucket_policy
@@ -502,12 +621,15 @@ syn keyword terraResourceTypeBI
\ aws_security_group_rule
\ aws_service_discovery_private_dns_namespace
\ aws_service_discovery_public_dns_namespace
\ aws_service_discovery_service
\ aws_servicecatalog_portfolio
\ aws_ses_active_receipt_rule_set
\ aws_ses_configuration_set
\ aws_ses_domain_dkim
\ aws_ses_domain_identity
\ aws_ses_domain_mail_from
\ aws_ses_event_destination
\ aws_ses_identity_notification_topic
\ aws_ses_receipt_filter
\ aws_ses_receipt_rule
\ aws_ses_receipt_rule_set
@@ -516,6 +638,7 @@ syn keyword terraResourceTypeBI
\ aws_sfn_state_machine
\ aws_simpledb_domain
\ aws_snapshot_create_volume_permission
\ aws_sns_platform_application
\ aws_sns_topic
\ aws_sns_topic_policy
\ aws_sns_topic_subscription
@@ -540,7 +663,11 @@ syn keyword terraResourceTypeBI
\ aws_vpc_dhcp_options
\ aws_vpc_dhcp_options_association
\ aws_vpc_endpoint
\ aws_vpc_endpoint_connection_notification
\ aws_vpc_endpoint_route_table_association
\ aws_vpc_endpoint_service
\ aws_vpc_endpoint_service_allowed_principal
\ aws_vpc_endpoint_subnet_association
\ aws_vpc_peering_connection
\ aws_vpc_peering_connection_accepter
\ aws_vpn_connection
@@ -549,15 +676,30 @@ syn keyword terraResourceTypeBI
\ aws_vpn_gateway_attachment
\ aws_vpn_gateway_route_propagation
\ aws_waf_byte_match_set
\ aws_waf_geo_match_set
\ aws_waf_ipset
\ aws_waf_rate_based_rule
\ aws_waf_regex_match_set
\ aws_waf_regex_pattern_set
\ aws_waf_rule
\ aws_waf_rule_group
\ aws_waf_size_constraint_set
\ aws_waf_sql_injection_match_set
\ aws_waf_web_acl
\ aws_waf_xss_match_set
\ aws_wafregional_byte_match_set
\ aws_wafregional_geo_match_set
\ aws_wafregional_ipset
\ aws_wafregional_rate_based_rule
\ aws_wafregional_regex_match_set
\ aws_wafregional_regex_pattern_set
\ aws_wafregional_rule
\ aws_wafregional_rule_group
\ aws_wafregional_size_constraint_set
\ aws_wafregional_sql_injection_match_set
\ aws_wafregional_web_acl
\ aws_wafregional_web_acl_association
\ aws_wafregional_xss_match_set
\ azure_affinity_group
\ azure_data_disk
\ azure_dns_server
@@ -575,9 +717,13 @@ syn keyword terraResourceTypeBI
\ azure_storage_service
\ azure_virtual_network
\ azurerm_app_service
\ azurerm_app_service_active_slot
\ azurerm_app_service_custom_hostname_binding
\ azurerm_app_service_plan
\ azurerm_app_service_slot
\ azurerm_application_gateway
\ azurerm_application_insights
\ azurerm_application_security_group
\ azurerm_automation_account
\ azurerm_automation_credential
\ azurerm_automation_runbook
@@ -604,11 +750,16 @@ syn keyword terraResourceTypeBI
\ azurerm_eventhub_consumer_group
\ azurerm_eventhub_namespace
\ azurerm_express_route_circuit
\ azurerm_express_route_circuit_authorization
\ azurerm_express_route_circuit_peering
\ azurerm_function_app
\ azurerm_image
\ azurerm_iothub
\ azurerm_key_vault
\ azurerm_key_vault_certificate
\ azurerm_key_vault_key
\ azurerm_key_vault_secret
\ azurerm_kubernetes_cluster
\ azurerm_lb
\ azurerm_lb_backend_address_pool
\ azurerm_lb_nat_pool
@@ -616,9 +767,11 @@ syn keyword terraResourceTypeBI
\ azurerm_lb_probe
\ azurerm_lb_rule
\ azurerm_local_network_gateway
\ azurerm_log_analytics_solution
\ azurerm_log_analytics_workspace
\ azurerm_managed_disk
\ azurerm_management_lock
\ azurerm_metric_alertrule
\ azurerm_mysql_configuration
\ azurerm_mysql_database
\ azurerm_mysql_firewall_rule
@@ -627,6 +780,9 @@ syn keyword terraResourceTypeBI
\ azurerm_network_security_group
\ azurerm_network_security_rule
\ azurerm_network_watcher
\ azurerm_packet_capture
\ azurerm_policy_assignment
\ azurerm_policy_definition
\ azurerm_postgresql_configuration
\ azurerm_postgresql_database
\ azurerm_postgresql_firewall_rule
@@ -639,16 +795,20 @@ syn keyword terraResourceTypeBI
\ azurerm_role_definition
\ azurerm_route
\ azurerm_route_table
\ azurerm_scheduler_job_collection
\ azurerm_search_service
\ azurerm_servicebus_namespace
\ azurerm_servicebus_queue
\ azurerm_servicebus_subscription
\ azurerm_servicebus_topic
\ azurerm_servicebus_topic_authorization_rule
\ azurerm_snapshot
\ azurerm_sql_active_directory_administrator
\ azurerm_sql_database
\ azurerm_sql_elasticpool
\ azurerm_sql_firewall_rule
\ azurerm_sql_server
\ azurerm_sql_virtual_network_rule
\ azurerm_storage_account
\ azurerm_storage_blob
\ azurerm_storage_container
@@ -663,6 +823,8 @@ syn keyword terraResourceTypeBI
\ azurerm_virtual_machine_extension
\ azurerm_virtual_machine_scale_set
\ azurerm_virtual_network
\ azurerm_virtual_network_gateway
\ azurerm_virtual_network_gateway_connection
\ azurerm_virtual_network_peering
\ bitbucket_default_reviewers
\ bitbucket_hook
@@ -686,7 +848,13 @@ syn keyword terraResourceTypeBI
\ clc_load_balancer_pool
\ clc_public_ip
\ clc_server
\ cloudflare_load_balancer
\ cloudflare_load_balancer_monitor
\ cloudflare_load_balancer_pool
\ cloudflare_page_rule
\ cloudflare_rate_limit
\ cloudflare_record
\ cloudflare_zone_settings_override
\ cloudscale_floating_ip
\ cloudscale_server
\ cloudstack_affinity_group
@@ -775,6 +943,8 @@ syn keyword terraResourceTypeBI
\ google_bigquery_table
\ google_bigtable_instance
\ google_bigtable_table
\ google_cloudfunctions_function
\ google_cloudiot_registry
\ google_compute_address
\ google_compute_autoscaler
\ google_compute_backend_bucket
@@ -803,10 +973,12 @@ syn keyword terraResourceTypeBI
\ google_compute_router
\ google_compute_router_interface
\ google_compute_router_peer
\ google_compute_security_policy
\ google_compute_shared_vpc_host_project
\ google_compute_shared_vpc_service_project
\ google_compute_snapshot
\ google_compute_ssl_certificate
\ google_compute_ssl_policy
\ google_compute_subnetwork
\ google_compute_target_http_proxy
\ google_compute_target_https_proxy
@@ -818,24 +990,29 @@ syn keyword terraResourceTypeBI
\ google_compute_vpn_tunnel
\ google_container_cluster
\ google_container_node_pool
\ google_dataflow_job
\ google_dataproc_cluster
\ google_dataproc_job
\ google_dns_managed_zone
\ google_dns_record_set
\ google_endpoints_service
\ google_folder
\ google_folder_organization_policy
\ google_kms_crypto_key
\ google_kms_key_ring
\ google_logging_billing_account_sink
\ google_logging_folder_sink
\ google_logging_organization_sink
\ google_logging_project_sink
\ google_organization_iam_custom_role
\ google_organization_policy
\ google_project
\ google_project_iam_custom_role
\ google_project_iam_policy
\ google_project_organization_policy
\ google_project_service
\ google_project_services
\ google_project_usage_export_bucket
\ google_pubsub_subscription
\ google_pubsub_topic
\ google_runtimeconfig_config
@@ -851,6 +1028,8 @@ syn keyword terraResourceTypeBI
\ google_storage_bucket
\ google_storage_bucket_acl
\ google_storage_bucket_object
\ google_storage_default_object_acl
\ google_storage_notification
\ google_storage_object_acl
\ heroku_addon
\ heroku_addon_attachment
@@ -901,6 +1080,7 @@ syn keyword terraResourceTypeBI
\ local_file
\ logentries_log
\ logentries_logset
\ logicmonitor_collector
\ logicmonitor_collector_group
\ logicmonitor_device
\ logicmonitor_device_group
@@ -912,8 +1092,34 @@ syn keyword terraResourceTypeBI
\ newrelic_alert_condition
\ newrelic_alert_policy
\ newrelic_alert_policy_channel
\ newrelic_dashboard
\ newrelic_nrql_alert_condition
\ nomad_acl_policy
\ nomad_acl_token
\ nomad_job
\ nomad_namespace
\ nomad_quota_specification
\ nomad_sentinel_policy
\ nsxt_algorithm_type_ns_service
\ nsxt_dhcp_relay_profile
\ nsxt_dhcp_relay_service
\ nsxt_ether_type_ns_service
\ nsxt_firewall_section
\ nsxt_icmp_type_ns_service
\ nsxt_igmp_type_ns_service
\ nsxt_ip_protocol_ns_service
\ nsxt_ip_set
\ nsxt_l4_port_set_ns_service
\ nsxt_logical_port
\ nsxt_logical_router_downlink_port
\ nsxt_logical_router_link_port_on_tier0
\ nsxt_logical_router_link_port_on_tier1
\ nsxt_logical_switch
\ nsxt_logical_tier1_router
\ nsxt_nat_rule
\ nsxt_ns_group
\ nsxt_static_route
\ nsxt_vm_tags
\ null_resource
\ oneandone_firewall_policy
\ oneandone_loadbalancer
@@ -934,6 +1140,7 @@ syn keyword terraResourceTypeBI
\ opc_compute_ip_network
\ opc_compute_ip_network_exchange
\ opc_compute_ip_reservation
\ opc_compute_machine_image
\ opc_compute_orchestrated_instance
\ opc_compute_route
\ opc_compute_sec_rule
@@ -945,6 +1152,7 @@ syn keyword terraResourceTypeBI
\ opc_compute_security_rule
\ opc_compute_snapshot
\ opc_compute_ssh_key
\ opc_compute_storage_attachment
\ opc_compute_storage_volume
\ opc_compute_storage_volume_snapshot
\ opc_compute_vnic_set
@@ -961,14 +1169,17 @@ syn keyword terraResourceTypeBI
\ openstack_compute_secgroup_v2
\ openstack_compute_servergroup_v2
\ openstack_compute_volume_attach_v2
\ openstack_db_configuration_v1
\ openstack_db_database_v1
\ openstack_db_instance_v1
\ openstack_db_user_v1
\ openstack_dns_recordset_v2
\ openstack_dns_zone_v2
\ openstack_fw_firewall_v1
\ openstack_fw_policy_v1
\ openstack_fw_rule_v1
\ openstack_identity_project_v3
\ openstack_identity_role_v3
\ openstack_identity_user_v3
\ openstack_images_image_v2
\ openstack_lb_listener_v2
@@ -989,6 +1200,7 @@ syn keyword terraResourceTypeBI
\ openstack_networking_secgroup_rule_v2
\ openstack_networking_secgroup_v2
\ openstack_networking_subnet_v2
\ openstack_networking_subnetpool_v2
\ openstack_objectstorage_container_v1
\ openstack_objectstorage_object_v1
\ opentelekomcloud_blockstorage_volume_v2
@@ -1010,6 +1222,7 @@ syn keyword terraResourceTypeBI
\ opentelekomcloud_fw_policy_v2
\ opentelekomcloud_fw_rule_v2
\ opentelekomcloud_images_image_v2
\ opentelekomcloud_kms_key_v1
\ opentelekomcloud_lb_listener_v2
\ opentelekomcloud_lb_loadbalancer_v2
\ opentelekomcloud_lb_member_v2
@@ -1024,13 +1237,19 @@ syn keyword terraResourceTypeBI
\ opentelekomcloud_networking_secgroup_rule_v2
\ opentelekomcloud_networking_secgroup_v2
\ opentelekomcloud_networking_subnet_v2
\ opentelekomcloud_rds_instance_v1
\ opentelekomcloud_s3_bucket
\ opentelekomcloud_s3_bucket_object
\ opentelekomcloud_s3_bucket_policy
\ opentelekomcloud_smn_subscription_v2
\ opentelekomcloud_smn_topic_v2
\ opentelekomcloud_vpc_eip_v1
\ opsgenie_team
\ opsgenie_user
\ oraclepaas_database_access_rule
\ oraclepaas_database_service_instance
\ oraclepaas_java_access_rule
\ oraclepaas_java_service_instance
\ ovh_domain_zone_record
\ ovh_publiccloud_private_network
\ ovh_publiccloud_private_network_subnet
@@ -1045,6 +1264,7 @@ syn keyword terraResourceTypeBI
\ packet_volume_attachment
\ pagerduty_addon
\ pagerduty_escalation_policy
\ pagerduty_extension
\ pagerduty_maintenance_window
\ pagerduty_schedule
\ pagerduty_service
@@ -1052,6 +1272,20 @@ syn keyword terraResourceTypeBI
\ pagerduty_team
\ pagerduty_team_membership
\ pagerduty_user
\ pagerduty_user_contact_method
\ panos_address_group
\ panos_address_object
\ panos_administrative_tag
\ panos_dag_tags
\ panos_ethernet_interface
\ panos_general_settings
\ panos_management_profile
\ panos_nat_policy
\ panos_security_policies
\ panos_service_group
\ panos_service_object
\ panos_virtual_router
\ panos_zone
\ postgresql_database
\ postgresql_extension
\ postgresql_role
@@ -1099,6 +1333,9 @@ syn keyword terraResourceTypeBI
\ scaleway_security_group
\ scaleway_security_group_rule
\ scaleway_server
\ scaleway_ssh_key
\ scaleway_token
\ scaleway_user_data
\ scaleway_volume
\ scaleway_volume_attachment
\ softlayer_ssh_key
@@ -1133,6 +1370,7 @@ syn keyword terraResourceTypeBI
\ vcd_vapp_vm
\ vsphere_custom_attribute
\ vsphere_datacenter
\ vsphere_datastore_cluster
\ vsphere_distributed_port_group
\ vsphere_distributed_virtual_switch
\ vsphere_file
@@ -1141,6 +1379,7 @@ syn keyword terraResourceTypeBI
\ vsphere_host_virtual_switch
\ vsphere_license
\ vsphere_nas_datastore
\ vsphere_storage_drs_vm_override
\ vsphere_tag
\ vsphere_tag_category
\ vsphere_virtual_disk

View File

@@ -67,6 +67,7 @@ syn region typescriptInterpolation matchgroup=typescriptInterpolationDelimiter
\ start=/${/ end=/}/ contained
\ contains=@typescriptExpression
syn match typescriptNumber "-\=\<\d[0-9_]*L\=\>" display
syn match typescriptNumber "-\=\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>" display
syn match typescriptNumber "-\=\<0[bB][01][01_]*\>" display
syn match typescriptNumber "-\=\<0[oO]\o[0-7_]*\>" display

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
" vifm syntax file
" Maintainer: xaizek <xaizek@posteo.net>
" Last Change: September 18, 2017
" Last Change: April 18, 2018
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
if exists('b:current_syntax')
@@ -18,11 +18,12 @@ set cpo-=C
syntax keyword vifmCommand contained alink apropos bmark bmarks bmgo change
\ chmod chown clone compare cope[n] co[py] cq[uit] d[elete] delbmarks
\ delm[arks] di[splay] dirs e[dit] el[se] empty en[dif] exi[t] file fin[d]
\ fini[sh] gr[ep] h[elp] histnext his[tory] histprev jobs locate ls lstrash
\ marks mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd pu[t] pw[d]
\ q[uit] redr[aw] reg[isters] rename restart restore rlink screen sh[ell]
\ siblnext siblprev sor[t] sp[lit] s[ubstitute] touch tr trashes tree sync
\ undol[ist] ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite] wq x[it] y[ank]
\ fini[sh] go[to] gr[ep] h[elp] histnext his[tory] histprev jobs locate ls
\ lstrash marks mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd pu[t]
\ pw[d] qa[ll] q[uit] redr[aw] reg[isters] rename restart restore rlink
\ screen sh[ell] siblnext siblprev sor[t] sp[lit] s[ubstitute] tabc[lose]
\ tabm[ove] tabname tabnew touch tr trashes tree sync undol[ist] ve[rsion]
\ vie[w] vifm vs[plit] winc[md] w[rite] wq wqa[ll] xa[ll] x[it] y[ank]
\ nextgroup=vifmArgs
" commands that might be prepended to a command without changing everything else
@@ -63,7 +64,7 @@ syntax case match
" Builtin functions
syntax match vifmBuiltinFunction
\ '\(chooseopt\|expand\|executable\|filetype\|getpanetype\|has\|layoutis\|paneisat\|system\|term\)\ze('
\ '\(chooseopt\|expand\|executable\|filetype\|fnameescape\|getpanetype\|has\|layoutis\|paneisat\|system\|tabpagenr\|term\)\ze('
" Operators
syntax match vifmOperator "\(==\|!=\|>=\?\|<=\?\|\.\|-\|+\|&&\|||\)" skipwhite
@@ -74,7 +75,7 @@ syntax case ignore
syntax keyword vifmHiGroups contained WildMenu Border Win CmdLine CurrLine
\ OtherLine Directory Link Socket Device Executable Selected BrokenLink
\ TopLine TopLineSel StatusLine JobLine SuggestBox Fifo ErrorMsg CmpMismatch
\ AuxWin
\ AuxWin TabLine TabLineSel
syntax keyword vifmHiStyles contained bold underline reverse inverse standout
\ none
syntax keyword vifmHiColors contained black red green yellow blue magenta cyan
@@ -124,31 +125,32 @@ syntax case match
syntax keyword vifmOption contained aproposprg autochpos caseoptions cdpath cd
\ chaselinks classify columns co confirm cf cpoptions cpo cvoptions
\ deleteprg dotdirs dotfiles dirsize fastrun fillchars fcs findprg
\ followlinks fusehome gdefault grepprg history hi hlsearch hls iec
\ ignorecase ic iooptions incsearch is laststatus lines locateprg ls
\ followlinks fusehome gdefault grepprg histcursor history hi hlsearch hls
\ iec ignorecase ic iooptions incsearch is laststatus lines locateprg ls
\ lsoptions lsview milleroptions millerview mintimeoutlen number nu
\ numberwidth nuw previewprg relativenumber rnu rulerformat ruf runexec
\ scrollbind scb scrolloff so sort sortgroups sortorder sortnumbers shell sh
\ shortmess shm sizefmt slowfs smartcase scs statusline stl suggestoptions
\ syscalls tabstop timefmt timeoutlen title tm trash trashdir ts tuioptions
\ to undolevels ul vicmd viewcolumns vifminfo vimhelp vixcmd wildmenu wmnu
\ wildstyle wordchars wrap wrapscan ws
\ numberwidth nuw previewprg quickview relativenumber rnu rulerformat ruf
\ runexec scrollbind scb scrolloff so sort sortgroups sortorder sortnumbers
\ shell sh shortmess shm showtabline stal sizefmt slowfs smartcase scs
\ statusline stl suggestoptions syncregs syscalls tabscope tabstop timefmt
\ timeoutlen title tm trash trashdir ts tuioptions to undolevels ul vicmd
\ viewcolumns vifminfo vimhelp vixcmd wildmenu wmnu wildstyle wordchars wrap
\ wrapscan ws
" Disabled boolean options
syntax keyword vifmOption contained noautochpos nocf nochaselinks nodotfiles
\ nofastrun nofollowlinks nohlsearch nohls noiec noignorecase noic
\ noincsearch nois nolaststatus nols nolsview nomillerview nonumber nonu
\ norelativenumber nornu noscrollbind noscb norunexec nosmartcase noscs
\ nosortnumbers nosyscalls notitle notrash novimhelp nowildmenu nowmnu
\ nowrap nowrapscan nows
\ noquickview norelativenumber nornu noscrollbind noscb norunexec
\ nosmartcase noscs nosortnumbers nosyscalls notitle notrash novimhelp
\ nowildmenu nowmnu nowrap nowrapscan nows
" Inverted boolean options
syntax keyword vifmOption contained invautochpos invcf invchaselinks invdotfiles
\ invfastrun invfollowlinks invhlsearch invhls inviec invignorecase invic
\ invincsearch invis invlaststatus invls invlsview invmillerview invnumber
\ invnu invrelativenumber invrnu invscrollbind invscb invrunexec invsmartcase
\ invscs invsortnumbers invsyscalls invtitle invtrash invvimhelp invwildmenu
\ invwmnu invwrap invwrapscan invws
\ invnu invquickview invrelativenumber invrnu invscrollbind invscb
\ invrunexec invsmartcase invscs invsortnumbers invsyscalls invtitle
\ invtrash invvimhelp invwildmenu invwmnu invwrap invwrapscan invws
" Expressions
syntax region vifmStatement start='^\(\s\|:\)*'
@@ -372,7 +374,7 @@ syntax match vifmNumber contained /\d\+/
" Ange-bracket notation
syntax case ignore
syntax match vifmNotation '<\(esc\|cr\|space\|del\|nop\|\(s-\)\?tab\|home\|end\|left\|right\|up\|down\|bs\|delete\|pageup\|pagedown\|\([acms]-\)\?f\d\{1,2\}\|c-s-[a-z[\]^_]\|s-c-[a-z[\]^_]\|c-[a-z[\]^_]\|[am]-c-[a-z]\|c-[am]-[a-z]\|[am]-[a-z]\)>'
syntax match vifmNotation '<\(esc\|cr\|space\|del\|nop\|\(s-\)\?tab\|home\|end\|left\|right\|up\|down\|bs\|delete\|insert\|pageup\|pagedown\|\([acms]-\)\?f\d\{1,2\}\|c-s-[a-z[\]^_]\|s-c-[a-z[\]^_]\|c-[a-z[\]^_]\|[am]-c-[a-z]\|c-[am]-[a-z]\|[am]-[a-z]\)>'
syntax case match
" Whole line comment

View File

@@ -9,6 +9,8 @@ if exists("b:current_syntax")
endif
runtime! syntax/html.vim
syntax clear htmlTagName
syntax match htmlTagName contained "\<[a-zA-Z0-9:-]*\>"
unlet! b:current_syntax
""
@@ -43,6 +45,7 @@ function! s:register_language(language, tag, ...)
endfunction
if !exists("g:vue_disable_pre_processors") || !g:vue_disable_pre_processors
call s:register_language('less', 'style')
call s:register_language('pug', 'template', s:attr('lang', '\%(pug\|jade\)'))
call s:register_language('slm', 'template')
call s:register_language('handlebars', 'template')
@@ -52,7 +55,6 @@ if !exists("g:vue_disable_pre_processors") || !g:vue_disable_pre_processors
call s:register_language('stylus', 'style')
call s:register_language('sass', 'style')
call s:register_language('scss', 'style')
call s:register_language('less', 'style')
endif
syn region vueSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent