Update
This commit is contained in:
parent
a5857b81c2
commit
bf188c4a51
@ -99,12 +99,22 @@ au BufNewFile,BufRead *.elm set filetype=elm
|
|||||||
endif
|
endif
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
||||||
|
|
||||||
|
if !exists('g:vim_ember_script')
|
||||||
|
let g:vim_ember_script = 1
|
||||||
|
endif
|
||||||
autocmd BufNewFile,BufRead *.em set filetype=ember-script
|
autocmd BufNewFile,BufRead *.em set filetype=ember-script
|
||||||
autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab
|
autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab
|
||||||
endif
|
endif
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
||||||
|
|
||||||
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
|
if !exists('g:vim_emblem')
|
||||||
|
let g:vim_emblem = 1
|
||||||
|
endif
|
||||||
|
if exists('g:vim_ember_script')
|
||||||
|
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
|
||||||
|
else
|
||||||
|
autocmd BufNewFile,BufRead *.em,*.emblem set filetype=emblem
|
||||||
|
endif
|
||||||
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
|
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
|
||||||
endif
|
endif
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'erlang') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'erlang') == -1
|
||||||
|
@ -11,6 +11,8 @@ endif
|
|||||||
runtime! ftplugin/html.vim
|
runtime! ftplugin/html.vim
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
setlocal iskeyword+=@-@
|
setlocal suffixesadd=.blade.php,.php
|
||||||
|
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
|
||||||
|
setlocal path+=resources/views;
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -15,7 +15,7 @@ call coffee#CoffeeSetUpVariables()
|
|||||||
setlocal formatoptions-=t formatoptions+=croql
|
setlocal formatoptions-=t formatoptions+=croql
|
||||||
setlocal comments=:# commentstring=#\ %s
|
setlocal comments=:# commentstring=#\ %s
|
||||||
setlocal omnifunc=javascriptcomplete#CompleteJS
|
setlocal omnifunc=javascriptcomplete#CompleteJS
|
||||||
setlocal suffixesadd+=coffee
|
setlocal suffixesadd+=.coffee
|
||||||
|
|
||||||
" Create custom augroups.
|
" Create custom augroups.
|
||||||
augroup CoffeeBufUpdate | augroup END
|
augroup CoffeeBufUpdate | augroup END
|
||||||
|
@ -56,6 +56,6 @@ let &l:path =
|
|||||||
setlocal includeexpr=GetElixirFilename(v:fname)
|
setlocal includeexpr=GetElixirFilename(v:fname)
|
||||||
setlocal suffixesadd=.ex,.exs,.eex,.erl,.yrl,.hrl
|
setlocal suffixesadd=.ex,.exs,.eex,.erl,.yrl,.hrl
|
||||||
|
|
||||||
setlocal formatoptions-=t formatoptions+=croqlj
|
silent! setlocal formatoptions-=t formatoptions+=croqlj
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
||||||
|
|
||||||
" Language: ember-script
|
" Language: ember-script
|
||||||
" Maintainer: heartsentwined <heartsentwined@cogito-lab.com>
|
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
|
||||||
" URL: http://github.com/heartsentwined/vim-ember-script
|
" URL: http://github.com/yalesov/vim-ember-script
|
||||||
" Version: 1.0.1
|
" Version: 1.0.3
|
||||||
" Last Change: 2013 Apr 17
|
" Last Change: 2016 Jul 5
|
||||||
" License: GPL-3.0
|
" License: GPL-3.0
|
||||||
|
|
||||||
setlocal tabstop=2
|
setlocal tabstop=2
|
||||||
@ -14,7 +14,11 @@ setlocal smarttab
|
|||||||
setlocal expandtab
|
setlocal expandtab
|
||||||
setlocal smartindent
|
setlocal smartindent
|
||||||
|
|
||||||
setlocal formatoptions-=t formatoptions+=croqlj
|
if v:version < 703
|
||||||
|
setlocal formatoptions-=t formatoptions+=croql
|
||||||
|
else
|
||||||
|
setlocal formatoptions-=t formatoptions+=croqlj
|
||||||
|
endif
|
||||||
setlocal comments=:#
|
setlocal comments=:#
|
||||||
setlocal commentstring=#\ %s
|
setlocal commentstring=#\ %s
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
||||||
|
|
||||||
" Language: emblem
|
" Language: emblem
|
||||||
" Maintainer: heartsentwined <heartsentwined@cogito-lab.com>
|
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
|
||||||
" URL: http://github.com/heartsentwined/vim-emblem
|
" URL: http://github.com/yalesov/vim-emblem
|
||||||
" Version: 1.2.0
|
" Version: 2.0.0
|
||||||
" Last Change: 2013 Apr 22
|
" Last Change: 2016 Jul 5
|
||||||
" License: GPL-3.0
|
" License: GPL-3.0
|
||||||
|
|
||||||
setlocal tabstop=2
|
setlocal tabstop=2
|
||||||
|
@ -77,20 +77,20 @@ function! s:query_path(root) abort
|
|||||||
let prefix = ''
|
let prefix = ''
|
||||||
endif
|
endif
|
||||||
if &shellxquote == "'"
|
if &shellxquote == "'"
|
||||||
let path_check = prefix.'ruby -e "' . code . '"'
|
let path_check = prefix.'ruby -e --disable-gems"' . code . '"'
|
||||||
else
|
else
|
||||||
let path_check = prefix."ruby -e '" . code . "'"
|
let path_check = prefix."ruby -e --disable-gems'" . code . "'"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let cd = haslocaldir() ? 'lcd' : 'cd'
|
let cd = haslocaldir() ? 'lcd' : 'cd'
|
||||||
let cwd = getcwd()
|
let cwd = fnameescape(getcwd())
|
||||||
try
|
try
|
||||||
exe cd fnameescape(a:root)
|
exe cd fnameescape(a:root)
|
||||||
let path = split(system(path_check),',')
|
let path = split(system(path_check),',')
|
||||||
exe cd fnameescape(cwd)
|
exe cd cwd
|
||||||
return path
|
return path
|
||||||
finally
|
finally
|
||||||
exe cd fnameescape(cwd)
|
exe cd cwd
|
||||||
endtry
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -36,10 +36,11 @@ function! GetBladeIndent()
|
|||||||
let line = substitute(substitute(getline(lnum), '\s\+$', '', ''), '^\s\+', '', '')
|
let line = substitute(substitute(getline(lnum), '\s\+$', '', ''), '^\s\+', '', '')
|
||||||
let cline = substitute(substitute(getline(v:lnum), '\s\+$', '', ''), '^\s\+', '', '')
|
let cline = substitute(substitute(getline(v:lnum), '\s\+$', '', ''), '^\s\+', '', '')
|
||||||
let indent = indent(lnum)
|
let indent = indent(lnum)
|
||||||
let cindent = indent(v:lnum)
|
|
||||||
if cline =~# '@\%(else\|elseif\|empty\|end\|show\|stop\)' ||
|
if cline =~# '@\%(else\|elseif\|empty\|end\|show\|stop\)' ||
|
||||||
\ cline =~# '\%(<?.*\)\@<!?>\|\%({{.*\)\@<!}}\|\%({!!.*\)\@<!!!}'
|
\ cline =~# '\%(<?.*\)\@<!?>\|\%({{.*\)\@<!}}\|\%({!!.*\)\@<!!!}'
|
||||||
let indent = indent - &sw
|
let indent = indent - &sw
|
||||||
|
elseif line =~# '<?\%(.*?>\)\@!'
|
||||||
|
let indent = indent + &sw
|
||||||
else
|
else
|
||||||
if exists("*GetBladeIndentCustom")
|
if exists("*GetBladeIndentCustom")
|
||||||
let hindent = GetBladeIndentCustom()
|
let hindent = GetBladeIndentCustom()
|
||||||
@ -56,17 +57,12 @@ function! GetBladeIndent()
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
let increase = indent + &sw
|
let increase = indent + &sw
|
||||||
if indent = indent(lnum)
|
|
||||||
let indent = cindent <= indent ? -1 : increase
|
|
||||||
endif
|
|
||||||
|
|
||||||
if line =~# '@\%(section\)\%(.*@end\)\@!' && line !~# '@\%(section\)\s*([^,]*)'
|
if line =~# '@\%(section\)\%(.*@end\)\@!' && line !~# '@\%(section\)\s*([^,]*)'
|
||||||
return indent
|
return indent
|
||||||
elseif line =~# '@\%(if\|elseif\|else\|unless\|foreach\|forelse\|for\|while\|empty\|push\|section\|can\|hasSection\)\%(.*@end\|.*@stop\)\@!' ||
|
elseif line =~# '@\%(if\|elseif\|else\|unless\|foreach\|forelse\|for\|while\|empty\|push\|section\|can\|hasSection\)\%(.*@end\|.*@stop\)\@!' ||
|
||||||
\ line =~# '{{\%(.*}}\)\@!' || line =~# '{!!\%(.*!!}\)\@!'
|
\ line =~# '{{\%(.*}}\)\@!' || line =~# '{!!\%(.*!!}\)\@!'
|
||||||
return increase
|
return increase
|
||||||
elseif line =~# '<?\%(.*?>\)\@!'
|
|
||||||
return indent(lnum-1) == -1 ? increase : indent(lnum) + increase
|
|
||||||
else
|
else
|
||||||
return indent
|
return indent
|
||||||
endif
|
endif
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
||||||
|
|
||||||
" Language: ember-script
|
" Language: ember-script
|
||||||
" Maintainer: heartsentwined <heartsentwined@cogito-lab.com>
|
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
|
||||||
" URL: http://github.com/heartsentwined/vim-ember-script
|
" URL: http://github.com/yalesov/vim-ember-script
|
||||||
" Version: 1.0.1
|
" Version: 1.0.3
|
||||||
" Last Change: 2013 Apr 17
|
" Last Change: 2016 Jul 5
|
||||||
" License: GPL-3.0
|
" License: GPL-3.0
|
||||||
|
|
||||||
if exists('b:did_indent')
|
if exists('b:did_indent')
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
||||||
|
|
||||||
" Language: emblem
|
" Language: emblem
|
||||||
" Maintainer: heartsentwined <heartsentwined@cogito-lab.com>
|
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
|
||||||
" URL: http://github.com/heartsentwined/vim-emblem
|
" URL: http://github.com/yalesov/vim-emblem
|
||||||
" Version: 1.2.0
|
" Version: 2.0.0
|
||||||
" Last Change: 2013 Apr 22
|
" Last Change: 2016 Jul 5
|
||||||
" License: GPL-3.0
|
" License: GPL-3.0
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -21,6 +21,12 @@ unlet! b:current_syntax
|
|||||||
syn case match
|
syn case match
|
||||||
syn clear htmlError
|
syn clear htmlError
|
||||||
|
|
||||||
|
if has('patch-7.4.1142')
|
||||||
|
syn iskeyword @,48-57,_,192-255,@-@
|
||||||
|
else
|
||||||
|
setlocal iskeyword+=@-@
|
||||||
|
endif
|
||||||
|
|
||||||
syn region bladeEcho matchgroup=bladeDelimiter start="@\@<!{{" end="}}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend
|
syn region bladeEcho matchgroup=bladeDelimiter start="@\@<!{{" end="}}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend
|
||||||
syn region bladeEcho matchgroup=bladeDelimiter start="{!!" end="!!}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend
|
syn region bladeEcho matchgroup=bladeDelimiter start="{!!" end="!!}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend
|
||||||
syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" contains=bladeTodo containedin=ALLBUT,@bladeExempt keepend
|
syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" contains=bladeTodo containedin=ALLBUT,@bladeExempt keepend
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
|
||||||
|
|
||||||
" Language: ember-script
|
" Language: ember-script
|
||||||
" Maintainer: heartsentwined <heartsentwined@cogito-lab.com>
|
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
|
||||||
" URL: http://github.com/heartsentwined/vim-ember-script
|
" URL: http://github.com/yalesov/vim-ember-script
|
||||||
" Version: 1.0.1
|
" Version: 1.0.3
|
||||||
" Last Change: 2013 Apr 17
|
" Last Change: 2016 Jul 5
|
||||||
" License: GPL-3.0
|
" License: GPL-3.0
|
||||||
|
|
||||||
if exists('b:current_syntax') && b:current_syntax == 'ember-script'
|
if exists('b:current_syntax') && b:current_syntax == 'ember-script'
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
|
||||||
|
|
||||||
" Language: emblem
|
" Language: emblem
|
||||||
" Maintainer: heartsentwined <heartsentwined@cogito-lab.com>
|
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
|
||||||
" URL: http://github.com/heartsentwined/vim-emblem
|
" URL: http://github.com/yalesov/vim-emblem
|
||||||
" Version: 1.2.0
|
" Version: 2.0.0
|
||||||
" Last Change: 2013 Apr 22
|
" Last Change: 2016 Jul 5
|
||||||
" License: GPL-3.0
|
" License: GPL-3.0
|
||||||
|
|
||||||
" Quit when a syntax file is already loaded.
|
" Quit when a syntax file is already loaded.
|
||||||
@ -31,7 +31,7 @@ syn match eblClass '\v(\w|-)+' nextgroup=@eblComponent contained display
|
|||||||
hi def link eblIdOp eblId
|
hi def link eblIdOp eblId
|
||||||
hi def link eblClassOp eblClass
|
hi def link eblClassOp eblClass
|
||||||
|
|
||||||
syn region eblHbsAttrRegion matchgroup=eblHbsAttrRegionOp start='{' end='}' contains=@eblHbsHelpers nextgroup=@eblComponent keepend contained display
|
syn region eblHbsAttrRegion matchgroup=eblHbsAttrRegionOp start='{\|(\|\[' end='}\|)\|\]' contains=@eblHbsHelpers nextgroup=@eblComponent keepend contained display
|
||||||
hi def link eblHbsAttrRegionOp eblOperator
|
hi def link eblHbsAttrRegionOp eblOperator
|
||||||
|
|
||||||
syn match eblInlineText '\v\s+[^:]+.*$' contains=eblItpl contained display
|
syn match eblInlineText '\v\s+[^:]+.*$' contains=eblItpl contained display
|
||||||
@ -40,7 +40,7 @@ hi def link eblInlineText eblRaw
|
|||||||
syn cluster eblHbsComponent contains=eblHbsArg,eblHbsAttr,eblHbsTextOp,eblLineOp
|
syn cluster eblHbsComponent contains=eblHbsArg,eblHbsAttr,eblHbsTextOp,eblLineOp
|
||||||
|
|
||||||
syn match eblHbsOp '\v\s*\=+' nextgroup=@eblHbsHelpers skipwhite contained display
|
syn match eblHbsOp '\v\s*\=+' nextgroup=@eblHbsHelpers skipwhite contained display
|
||||||
syn match eblHbsHelper '\v\w(\w|-|\.)*' nextgroup=@eblHbsComponent skipwhite contained display
|
syn match eblHbsHelper '\v\w(\w|-|\.|\/)*' nextgroup=@eblHbsComponent skipwhite contained display
|
||||||
syn match eblHbsTextOp '|' nextgroup=eblHbsText contained display
|
syn match eblHbsTextOp '|' nextgroup=eblHbsText contained display
|
||||||
syn match eblHbsText '.*' contained display
|
syn match eblHbsText '.*' contained display
|
||||||
hi def link eblHbsOp eblOperator
|
hi def link eblHbsOp eblOperator
|
||||||
@ -48,24 +48,38 @@ hi def link eblHbsHelper eblFunction
|
|||||||
hi def link eblHbsTextOp eblOperator
|
hi def link eblHbsTextOp eblOperator
|
||||||
hi def link eblHbsText eblRaw
|
hi def link eblHbsText eblRaw
|
||||||
|
|
||||||
syn cluster eblHbsHelpers contains=eblHbsHelper,eblHbsCtrlFlowHelper,eblHbsEachHelper
|
syn cluster eblHbsHelpers contains=eblHbsHelper,eblHbsCtrlFlowHelper,eblHbsEachHelper,eblHbsWithHelper
|
||||||
|
|
||||||
syn match eblHbsCtrlFlowHelper '\v<(if|unless|else|with)>' nextgroup=@eblHbsComponent skipwhite contained display
|
syn match eblHbsCtrlFlowHelper '\v<(else if|if|unless|else)>' nextgroup=@eblHbsComponent skipwhite contained display
|
||||||
syn match eblHbsEachHelper '\v<each>' nextgroup=eblHbsEachArg skipwhite contained display
|
syn match eblHbsEachHelper '\v<each>' nextgroup=eblHbsEachArg skipwhite contained display
|
||||||
syn match eblHbsEachArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsIn,eblLineOp skipwhite contained display
|
syn match eblHbsEachArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsIn,eblLineOp skipwhite contained display
|
||||||
syn match eblHbsIn '\v<in>' nextgroup=eblHbsInArg skipwhite contained display
|
syn match eblHbsIn '\v<in>' nextgroup=eblHbsInArg skipwhite contained display
|
||||||
syn match eblHbsInArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblLineOp skipwhite contained display
|
syn match eblHbsInArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblLineOp skipwhite contained display
|
||||||
hi def link eblHbsCtrlFlowHelper eblKeyword
|
syn match eblHbsWithHelper '\v<with>' nextgroup=eblHbsWithArg skipwhite contained display
|
||||||
hi def link eblHbsEachHelper eblKeyword
|
syn match eblHbsWithArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsAs skipwhite contained display
|
||||||
hi def link eblHbsEachArg eblLiteral
|
syn match eblHbsAs '\v<as>' nextgroup=eblHbsAsBlockStartArg skipwhite contained display
|
||||||
hi def link eblHbsIn eblKeyword
|
syn match eblHbsAsBlockStartArg /\v\|/ nextgroup=eblHbsAsBlockFirstArg skipwhite contained display
|
||||||
hi def link eblHbsInArg eblLiteral
|
syn match eblHbsAsBlockFirstArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsAsBlockSecondArg,eblHbsAsBlockEndArg skipwhite contained display
|
||||||
|
syn match eblHbsAsBlockSecondArg /\v((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=eblHbsAsBlockEndArg skipwhite contained display
|
||||||
|
syn match eblHbsAsBlockEndArg /\v\|/ nextgroup=eblLineOp skipwhite contained display
|
||||||
|
hi def link eblHbsCtrlFlowHelper eblKeyword
|
||||||
|
hi def link eblHbsEachHelper eblKeyword
|
||||||
|
hi def link eblHbsEachArg eblLiteral
|
||||||
|
hi def link eblHbsIn eblKeyword
|
||||||
|
hi def link eblHbsInArg eblLiteral
|
||||||
|
hi def link eblHbsWithHelper eblKeyword
|
||||||
|
hi def link eblHbsWithArg eblLiteral
|
||||||
|
hi def link eblHbsAs eblKeyword
|
||||||
|
hi def link eblHbsAsBlockStartArg eblOperator
|
||||||
|
hi def link eblHbsAsBlockFirstArg eblLiteral
|
||||||
|
hi def link eblHbsAsBlockSecondArg eblLiteral
|
||||||
|
hi def link eblHbsAsBlockEndArg eblOperator
|
||||||
|
|
||||||
syn match eblHbsArg /\v\s*((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=@eblHbsComponent skipwhite contained display
|
syn match eblHbsArg /\v\s*((["'])[^\2]{-}\2|(\w|\.|-|\>)+)/ nextgroup=@eblHbsComponent skipwhite contained display
|
||||||
syn match eblHbsAttr '\v\s*(\w|-)+\=@=' contains=eblHbsAttrBind nextgroup=eblHbsAttrOp contained display
|
syn match eblHbsAttr '\v\s*(\w|-)+\=@=' contains=eblHbsAttrBind nextgroup=eblHbsAttrOp contained display
|
||||||
syn match eblHbsAttrBind /\v<(\w|-)+Bind>/ contained display
|
syn match eblHbsAttrBind /\v<(\w|-)+Bind>/ contained display
|
||||||
syn match eblHbsAttrOp '=' nextgroup=eblHbsAttrLit contained display
|
syn match eblHbsAttrOp '=' nextgroup=eblHbsAttrLit contained display
|
||||||
syn match eblHbsAttrLit /\v(["'])[^\1]{-}\1|[^: ]+/ contains=eblItpl nextgroup=@eblHbsComponent skipwhite contained display
|
syn match eblHbsAttrLit /\v(["'])[^\1]{-}\1|[^\.: ]+/ contains=eblItpl nextgroup=@eblHbsComponent skipwhite contained display
|
||||||
hi def link eblHbsArg eblLiteral
|
hi def link eblHbsArg eblLiteral
|
||||||
hi def link eblHbsAttr eblAttr
|
hi def link eblHbsAttr eblAttr
|
||||||
hi def link eblhbsAttrBind eblBind
|
hi def link eblhbsAttrBind eblBind
|
||||||
@ -106,6 +120,7 @@ hi def link eblKnownEvent eblEvent
|
|||||||
|
|
||||||
syn region eblItpl matchgroup=eblItplOp start='#{' end='}' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display
|
syn region eblItpl matchgroup=eblItplOp start='#{' end='}' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display
|
||||||
syn region eblItpl matchgroup=eblItplOp start='{{' end='}}' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display
|
syn region eblItpl matchgroup=eblItplOp start='{{' end='}}' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display
|
||||||
|
syn region eblItpl matchgroup=eblItplOp start='(' end=')' contains=@eblHbsHelpers,eblHbsPartialOp keepend contained display
|
||||||
hi def link eblItplOp eblOperator
|
hi def link eblItplOp eblOperator
|
||||||
|
|
||||||
syn match eblHbsPartialOp '\s*>' nextgroup=@eblHbsHelpers skipwhite contained display
|
syn match eblHbsPartialOp '\s*>' nextgroup=@eblHbsHelpers skipwhite contained display
|
||||||
|
@ -73,12 +73,8 @@ if !exists("g:go_highlight_fields")
|
|||||||
let g:go_highlight_fields = 0
|
let g:go_highlight_fields = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("g:go_highlight_structs")
|
if !exists("g:go_highlight_types")
|
||||||
let g:go_highlight_structs = 0
|
let g:go_highlight_types = 0
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists("g:go_highlight_interfaces")
|
|
||||||
let g:go_highlight_interfaces = 0
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("g:go_highlight_build_constraints")
|
if !exists("g:go_highlight_build_constraints")
|
||||||
@ -100,12 +96,10 @@ endif
|
|||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
syn keyword goDirective package import
|
syn keyword goDirective package import
|
||||||
syn keyword goDeclaration var const type
|
syn keyword goDeclaration var const
|
||||||
syn keyword goDeclType struct interface
|
|
||||||
|
|
||||||
hi def link goDirective Statement
|
hi def link goDirective Statement
|
||||||
hi def link goDeclaration Keyword
|
hi def link goDeclaration Keyword
|
||||||
hi def link goDeclType Keyword
|
|
||||||
|
|
||||||
" Keywords within functions
|
" Keywords within functions
|
||||||
syn keyword goStatement defer go goto return break continue fallthrough
|
syn keyword goStatement defer go goto return break continue fallthrough
|
||||||
@ -131,10 +125,6 @@ hi def link goUnsignedInts Type
|
|||||||
hi def link goFloats Type
|
hi def link goFloats Type
|
||||||
hi def link goComplexes Type
|
hi def link goComplexes Type
|
||||||
|
|
||||||
" Treat func specially: it's a declaration at the start of a line, but a type
|
|
||||||
" elsewhere. Order matters here.
|
|
||||||
syn match goDeclaration /\<func\>/
|
|
||||||
|
|
||||||
|
|
||||||
" Predefined functions and values
|
" Predefined functions and values
|
||||||
syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/
|
syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/
|
||||||
@ -303,38 +293,43 @@ hi def link goOperator Operator
|
|||||||
|
|
||||||
" Functions;
|
" Functions;
|
||||||
if g:go_highlight_functions != 0
|
if g:go_highlight_functions != 0
|
||||||
syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/
|
syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction skipwhite skipnl
|
||||||
syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/
|
syn match goReceiver /([^),]\+)/ contained nextgroup=goFunction contains=goReceiverType skipwhite skipnl
|
||||||
|
syn match goReceiverType /\(\s\|*\)\w\+)/hs=s+1,he=e-1 contained
|
||||||
|
syn match goFunction /\w\+/ contained
|
||||||
|
else
|
||||||
|
syn keyword goDeclaration func
|
||||||
endif
|
endif
|
||||||
|
hi def link goReceiverType Type
|
||||||
hi def link goFunction Function
|
hi def link goFunction Function
|
||||||
|
|
||||||
" Methods;
|
" Methods;
|
||||||
if g:go_highlight_methods != 0
|
if g:go_highlight_methods != 0
|
||||||
syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/
|
syn match goMethod /\.\w\+(/hs=s+1,he=e-1
|
||||||
endif
|
endif
|
||||||
hi def link goMethod Type
|
hi def link goMethod Type
|
||||||
|
|
||||||
" Fields;
|
" Fields;
|
||||||
if g:go_highlight_fields != 0
|
if g:go_highlight_fields != 0
|
||||||
syn match goField /\(\.\)\@<=\a\+\([\ \n\r\:\)]\)\@=/
|
syn match goVarArgs /\.\.\.\w\+\>/
|
||||||
|
syn match goField /\.\a\+\([\ \n\r\:\)\[]\)\@=/hs=s+1
|
||||||
endif
|
endif
|
||||||
hi def link goField Type
|
hi def link goField Identifier
|
||||||
|
|
||||||
" Structs;
|
" Structs & Interfaces;
|
||||||
if g:go_highlight_structs != 0
|
if g:go_highlight_types != 0
|
||||||
syn match goStruct /\(.\)\@<=\w\+\({\)\@=/
|
syn match goTypeConstructor /\<\w\+{/he=e-1
|
||||||
syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/
|
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
|
||||||
|
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
|
||||||
|
syn match goDeclType /\<interface\|struct\>/ contained skipwhite skipnl
|
||||||
|
else
|
||||||
|
syn keyword goDeclType struct interface
|
||||||
|
syn keyword goDeclaration type
|
||||||
endif
|
endif
|
||||||
hi def link goStruct Function
|
hi def link goTypeConstructor Type
|
||||||
hi def link goStructDef Function
|
hi def link goTypeName Type
|
||||||
|
hi def link goTypeDecl Keyword
|
||||||
" Interfaces;
|
hi def link goDeclType Keyword
|
||||||
if g:go_highlight_interfaces != 0
|
|
||||||
syn match goInterface /\(.\)\@<=\w\+\({\)\@=/
|
|
||||||
syn match goInterfaceDef /\(type\s\+\)\@<=\w\+\(\s\+interface\s\+{\)\@=/
|
|
||||||
endif
|
|
||||||
hi def link goInterface Function
|
|
||||||
hi def link goInterfaceDef Function
|
|
||||||
|
|
||||||
" Build Constraints
|
" Build Constraints
|
||||||
if g:go_highlight_build_constraints != 0
|
if g:go_highlight_build_constraints != 0
|
||||||
|
@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Kotlin
|
" Language: Kotlin
|
||||||
" Maintainer: Alexander Udalov
|
" Maintainer: Alexander Udalov
|
||||||
" Latest Revision: 24 February 2016
|
" Latest Revision: 4 July 2016
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@ -22,14 +22,14 @@ syn keyword ktInclude import package
|
|||||||
|
|
||||||
syn keyword ktType Any Boolean Byte Char Double Float Int Long Nothing Short Unit
|
syn keyword ktType Any Boolean Byte Char Double Float Int Long Nothing Short Unit
|
||||||
syn keyword ktModifier annotation companion enum inner internal private protected public abstract final open override sealed vararg dynamic
|
syn keyword ktModifier annotation companion enum inner internal private protected public abstract final open override sealed vararg dynamic
|
||||||
syn keyword ktStructure class object interface fun val var constructor init
|
syn keyword ktStructure class object interface typealias fun val var constructor init
|
||||||
|
|
||||||
syn keyword ktReservedKeyword async typealias typeof yield
|
syn keyword ktReservedKeyword typeof
|
||||||
|
|
||||||
syn keyword ktBoolean true false
|
syn keyword ktBoolean true false
|
||||||
syn keyword ktConstant null
|
syn keyword ktConstant null
|
||||||
|
|
||||||
syn keyword ktModifier data tailrec lateinit reified external inline noinline crossinline const operator infix
|
syn keyword ktModifier data tailrec lateinit reified external inline noinline crossinline const operator infix coroutine suspend
|
||||||
|
|
||||||
syn keyword ktTodo TODO FIXME XXX contained
|
syn keyword ktTodo TODO FIXME XXX contained
|
||||||
syn match ktShebang "\v^#!.*$"
|
syn match ktShebang "\v^#!.*$"
|
||||||
|
@ -127,6 +127,7 @@ syn match pgsqlKeyword "\<for\_s\+\(search\|order\_s\+by\)\>"
|
|||||||
syn match pgsqlKeyword "\<\(no\_s\+\)\?inherit\>"
|
syn match pgsqlKeyword "\<\(no\_s\+\)\?inherit\>"
|
||||||
syn match pgsqlKeyword "\<\(not\_s\+\)\?of\>"
|
syn match pgsqlKeyword "\<\(not\_s\+\)\?of\>"
|
||||||
syn match pgsqlKeyword "\<primary\_s\+key\>"
|
syn match pgsqlKeyword "\<primary\_s\+key\>"
|
||||||
|
syn match pgsqlKeyword "\<foreign\_s\+key\>"
|
||||||
syn match pgsqlKeyword "\<replica\_s\+identity\>"
|
syn match pgsqlKeyword "\<replica\_s\+identity\>"
|
||||||
syn match pgsqlKeyword "\<using\(\_s\+index\(\_s\+tablespace\)\?\)\?\>"
|
syn match pgsqlKeyword "\<using\(\_s\+index\(\_s\+tablespace\)\?\)\?\>"
|
||||||
syn match pgsqlKeyword "\<with\(out\)\?\_s\+function\>"
|
syn match pgsqlKeyword "\<with\(out\)\?\_s\+function\>"
|
||||||
|
@ -34,8 +34,8 @@ syn cluster pugTop contains=pugBegin,pugComment,pugHtmlComment,pugJavascript
|
|||||||
syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText
|
syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText
|
||||||
syn match pugTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@pugComponent
|
syn match pugTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@pugComponent
|
||||||
syn cluster pugComponent contains=pugAttributes,pugIdChar,pugBlockExpansionChar,pugClassChar,pugPlainChar,pugJavascript,pugTagBlockChar,pugTagInlineText
|
syn cluster pugComponent contains=pugAttributes,pugIdChar,pugBlockExpansionChar,pugClassChar,pugPlainChar,pugJavascript,pugTagBlockChar,pugTagInlineText
|
||||||
syn match pugComment '\s*\/\/.*$'
|
syn match pugComment '\(\s\+\|^\)\/\/.*$'
|
||||||
syn region pugCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
|
syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
|
||||||
syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
|
syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
|
||||||
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
|
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
|
||||||
syn match pugClassChar "\." contained nextgroup=pugClass
|
syn match pugClassChar "\." contained nextgroup=pugClass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user