This commit is contained in:
Adam Stankiewicz 2016-07-19 10:09:54 +02:00
parent 1422f7a75c
commit 11f34624aa
No known key found for this signature in database
GPG Key ID: A62480DCEAC884DF
22 changed files with 265 additions and 144 deletions

View File

@ -624,6 +624,7 @@ syntax keyword cppSTLtype const_mem_fun_ref_t
syntax keyword cppSTLtype const_mem_fun_t syntax keyword cppSTLtype const_mem_fun_t
syntax keyword cppSTLtype const_pointer syntax keyword cppSTLtype const_pointer
syntax keyword cppSTLtype const_reference syntax keyword cppSTLtype const_reference
syntax keyword cppSTLtype container_type
syntax keyword cppSTLtype deque syntax keyword cppSTLtype deque
syntax keyword cppSTLtype difference_type syntax keyword cppSTLtype difference_type
syntax keyword cppSTLtype div_t syntax keyword cppSTLtype div_t

File diff suppressed because one or more lines are too long

View File

@ -163,9 +163,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') =
" Language: ember-script " Language: ember-script
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
" URL: http://github.com/yalesov/vim-ember-script " URL: http://github.com/yalesov/vim-ember-script
" Version: 1.0.3 " Version: 1.0.4
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
if !exists('g:vim_ember_script') if !exists('g:vim_ember_script')
let g:vim_ember_script = 1 let g:vim_ember_script = 1
@ -182,9 +182,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
" Language: emblem " Language: emblem
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
" URL: http://github.com/yalesov/vim-emblem " URL: http://github.com/yalesov/vim-emblem
" Version: 2.0.0 " Version: 2.0.1
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
if !exists('g:vim_emblem') if !exists('g:vim_emblem')
let g:vim_emblem = 1 let g:vim_emblem = 1

View File

@ -14,5 +14,23 @@ let b:did_ftplugin = 1
setlocal suffixesadd=.blade.php,.php setlocal suffixesadd=.blade.php,.php
setlocal includeexpr=substitute(v:fname,'\\.','/','g') setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal path+=resources/views; setlocal path+=resources/views;
setlocal include=\\w\\@<!@\\%(include\\\|extends\\)
setlocal define=\\w\\@<!@\\%(yield\\\|stack\\)
setlocal commentstring={{--%s--}}
setlocal comments+=s:{{--,m:\ \ \ \ ,e:--}}
if exists('loaded_matchit') && exists('b:match_words')
" Append to html matchit words
let b:match_words .= ',' .
\ '@\%(section\|if\|unless\|foreach\|forelse\|for\|while\|push\|can\|cannot\|hasSection\|php\|verbatim\)\>' .
\ ':' .
\ '@\%(else\|elseif\|empty\|break\|continue\|elsecan\|elsecannot\)\>' .
\ ':' .
\ '@\%(end\w\+\|stop\|show\|append\|overwrite\)' .
\ ',{:},\[:\],(:)'
let b:match_skip = 'synIDattr(synID(line("."), col("."), 0), "name") !=# "bladeKeyword"'
let b:match_ignorecase = 0
endif
endif endif

View File

@ -1,13 +1,13 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1
" Vim filetype plugin file " Vim filetype plugin file
" Language: Clojure " Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de> " Author: Meikel Brandmeyer <mb@kotka.de>
" "
" Maintainer: Sung Pae <self@sungpae.com> " Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static " URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim " License: Same as Vim
" Last Change: %%RELEASE_DATE%% " Last Change: %%RELEASE_DATE%%
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@ -84,9 +84,9 @@ endif
" Win32 can filter files in the browse dialog " Win32 can filter files in the browse dialog
if has("gui_win32") && !exists("b:browsefilter") if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" . let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" . \ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
\ "Java Source Files (*.java)\t*.java\n" . \ "Java Source Files (*.java)\t*.java\n" .
\ "All Files (*.*)\t*.*\n" \ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin .= ' | unlet! b:browsefilter' let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif endif

View File

@ -3,9 +3,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') =
" Language: ember-script " Language: ember-script
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
" URL: http://github.com/yalesov/vim-ember-script " URL: http://github.com/yalesov/vim-ember-script
" Version: 1.0.3 " Version: 1.0.4
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
setlocal tabstop=2 setlocal tabstop=2
setlocal softtabstop=2 setlocal softtabstop=2

View File

@ -3,9 +3,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
" Language: emblem " Language: emblem
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
" URL: http://github.com/yalesov/vim-emblem " URL: http://github.com/yalesov/vim-emblem
" Version: 2.0.0 " Version: 2.0.1
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
setlocal tabstop=2 setlocal tabstop=2
setlocal softtabstop=2 setlocal softtabstop=2

View File

@ -18,9 +18,18 @@ unlet! b:did_indent
let b:did_indent = 1 let b:did_indent = 1
" Doesn't include 'foreach' and 'forelse' because these already get matched by 'for'.
let s:directives_start = 'if\|else\|unless\|for\|while\|empty\|push\|section\|can\|hasSection\|verbatim'
let s:directives_end = 'else\|end\|empty\|show\|stop\|append\|overwrite'
if exists('g:blade_custom_directives_pairs')
let s:directives_start .= '\|' . join(keys(g:blade_custom_directives_pairs), '\|')
let s:directives_end .= '\|' . join(values(g:blade_custom_directives_pairs), '\|')
endif
setlocal autoindent setlocal autoindent
setlocal indentexpr=GetBladeIndent() setlocal indentexpr=GetBladeIndent()
setlocal indentkeys=o,O,*<Return>,<>>,!^F,=@else,=@end,=@empty,=@show,=@stop exe "setlocal indentkeys=o,O,<>>,!^F,0=}},0=!!},=@" . substitute(s:directives_end, '\\|', ',=@', 'g')
" Only define the function once. " Only define the function once.
if exists("*GetBladeIndent") if exists("*GetBladeIndent")
@ -36,18 +45,21 @@ 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)
if cline =~# '@\%(else\|elseif\|empty\|end\|show\|stop\)' || if cline =~# '@\%(' . s:directives_end . '\)' ||
\ cline =~# '\%(<?.*\)\@<!?>\|\%({{.*\)\@<!}}\|\%({!!.*\)\@<!!!}' \ cline =~# '\%(<?.*\)\@<!?>\|\%({{.*\)\@<!}}\|\%({!!.*\)\@<!!!}'
let indent = indent - &sw let indent = indent - &sw
elseif line =~# '<?\%(.*?>\)\@!' elseif line =~# '<?\%(.*?>\)\@!\|@php\%(\s*(\)\@!'
let indent = indent + &sw let indent = indent + &sw
else else
if exists("*GetBladeIndentCustom") if exists("*GetBladeIndentCustom")
let hindent = GetBladeIndentCustom() let hindent = GetBladeIndentCustom()
elseif searchpair('@include\s*(', '', ')', 'bWr') || " Don't use PHP indentation if line is a comment
elseif line !~# '^\s*\%(#\|//\)\|\*/\s*$' && (
\ searchpair('@include\%(If\)\?\s*(', '', ')', 'bWr') ||
\ searchpair('{!!', '', '!!}', 'bWr') || \ searchpair('{!!', '', '!!}', 'bWr') ||
\ searchpair('{{', '', '}}', 'bWr') || \ searchpair('{{', '', '}}', 'bWr') ||
\ searchpair('<?', '', '?>', 'bWr') \ searchpair('<?', '', '?>', 'bWr') ||
\ searchpair('@php\%(\s*(\)\@!', '', '@endphp', 'bWr') )
execute 'let hindent = ' . s:phpindent execute 'let hindent = ' . s:phpindent
else else
execute 'let hindent = ' . s:htmlindent execute 'let hindent = ' . s:htmlindent
@ -60,7 +72,7 @@ function! GetBladeIndent()
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 =~# '@\%(' . s:directives_start . '\)\%(.*@end\|.*@stop\)\@!' ||
\ line =~# '{{\%(.*}}\)\@!' || line =~# '{!!\%(.*!!}\)\@!' \ line =~# '{{\%(.*}}\)\@!' || line =~# '{!!\%(.*!!}\)\@!'
return increase return increase
else else

View File

@ -1,14 +1,14 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1
" Vim indent file " Vim indent file
" Language: Clojure " Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de> " Author: Meikel Brandmeyer <mb@kotka.de>
" URL: http://kotka.de/projects/clojure/vimclojure.html " URL: http://kotka.de/projects/clojure/vimclojure.html
" "
" Maintainer: Sung Pae <self@sungpae.com> " Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static " URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim " License: Same as Vim
" Last Change: %%RELEASE_DATE%% " Last Change: %%RELEASE_DATE%%
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -79,8 +79,8 @@ if exists("*searchpairpos")
" patterns. " patterns.
function! s:match_one(patterns, string) function! s:match_one(patterns, string)
let list = type(a:patterns) == type([]) let list = type(a:patterns) == type([])
\ ? a:patterns \ ? a:patterns
\ : map(split(a:patterns, ','), '"^" . v:val . "$"') \ : map(split(a:patterns, ','), '"^" . v:val . "$"')
for pat in list for pat in list
if a:string =~# pat | return 1 | endif if a:string =~# pat | return 1 | endif
endfor endfor
@ -189,6 +189,16 @@ if exists("*searchpairpos")
return val return val
endfunction endfunction
" Check if form is a reader conditional, that is, it is prefixed by #?
" or @#?
function! s:is_reader_conditional_special_case(position)
if getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
return 1
endif
return 0
endfunction
" Returns 1 for opening brackets, -1 for _anything else_. " Returns 1 for opening brackets, -1 for _anything else_.
function! s:bracket_type(char) function! s:bracket_type(char)
return stridx('([{', a:char) > -1 ? 1 : -1 return stridx('([{', a:char) > -1 ? 1 : -1
@ -256,6 +266,10 @@ if exists("*searchpairpos")
return [paren[0], paren[1] + &shiftwidth - 1] return [paren[0], paren[1] + &shiftwidth - 1]
endif endif
if s:is_reader_conditional_special_case(paren)
return paren
endif
" In case we are at the last character, we use the paren position. " In case we are at the last character, we use the paren position.
if col("$") - 1 == paren[1] if col("$") - 1 == paren[1]
return paren return paren

View File

@ -3,9 +3,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') =
" Language: ember-script " Language: ember-script
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
" URL: http://github.com/yalesov/vim-ember-script " URL: http://github.com/yalesov/vim-ember-script
" Version: 1.0.3 " Version: 1.0.4
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
if exists('b:did_indent') if exists('b:did_indent')
finish finish

View File

@ -3,8 +3,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
" Language: emblem " Language: emblem
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
" URL: http://github.com/yalesov/vim-emblem " URL: http://github.com/yalesov/vim-emblem
" Version: 2.0.0 " Version: 2.0.1
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
endif endif

View File

@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
" Vim indent file " Vim indent file
" Language: Rust " Language: Rust
" Author: Chris Morgan <me@chrismorgan.info> " Author: Chris Morgan <me@chrismorgan.info>
" Last Change: 2014 Sep 13 " Last Change: 2016 Jul 15
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -134,6 +134,7 @@ function GetRustIndent(lnum)
\ && s:get_line_trimmed(a:lnum) !~ '^\s*[\[\]{}]' \ && s:get_line_trimmed(a:lnum) !~ '^\s*[\[\]{}]'
\ && prevline !~ '^\s*fn\s' \ && prevline !~ '^\s*fn\s'
\ && prevline !~ '([^()]\+,$' \ && prevline !~ '([^()]\+,$'
\ && s:get_line_trimmed(a:lnum) !~ '^\s*\S\+\s*=>'
" Oh ho! The previous line ended in a comma! I bet cindent will try to " Oh ho! The previous line ended in a comma! I bet cindent will try to
" take this too far... For now, let's normally use the previous line's " take this too far... For now, let's normally use the previous line's
" indent. " indent.
@ -158,6 +159,8 @@ function GetRustIndent(lnum)
" if baz && (foo || " if baz && (foo ||
" bar) { " bar) {
" "
" Another case is when the current line is a new match arm.
"
" There are probably other cases where we don't want to do this as " There are probably other cases where we don't want to do this as
" well. Add them as needed. " well. Add them as needed.
return indent(prevlinenum) return indent(prevlinenum)

View File

@ -22,7 +22,7 @@ syn case match
syn clear htmlError syn clear htmlError
if has('patch-7.4.1142') if has('patch-7.4.1142')
syn iskeyword @,48-57,_,192-255,@-@ syn iskeyword @,48-57,_,192-255,@-@,:
else else
setlocal iskeyword+=@-@ setlocal iskeyword+=@-@
endif endif
@ -31,17 +31,29 @@ syn region bladeEcho matchgroup=bladeDelimiter start="@\@<!{{" end="}}"
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
syn keyword bladeKeyword @if @elseif @foreach @forelse @for @while @can @include @each @inject @extends @section @stack @push @unless @yield @parent @hasSection nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt 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 nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt
syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @empty @endforelse @endwhile @endcan @stop @append @endsection @endpush @show containedin=ALLBUT,@bladeExempt syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @empty @endforelse @endwhile @endcan @endcannot @stop @append @endsection @endpush @show @overwrite @verbatim @endverbatim containedin=ALLBUT,@bladeExempt
if exists('g:blade_custom_directives')
exe "syn keyword bladeKeyword @" . join(g:blade_custom_directives, ' @') . " nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt"
endif
if exists('g:blade_custom_directives_pairs')
exe "syn keyword bladeKeyword @" . join(keys(g:blade_custom_directives_pairs), ' @') . " nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt"
exe "syn keyword bladeKeyword @" . join(values(g:blade_custom_directives_pairs), ' @') . " containedin=ALLBUT,@bladeExempt"
endif
syn region bladePhpRegion matchgroup=bladeKeyword start="\<@php\>\%(\s*(\)\@!" end="\<@endphp\>" contains=@bladePhp containedin=ALLBUT,@bladeExempt keepend
syn match bladeKeyword "@php\ze\s*(" nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt
syn region bladePhpParenBlock matchgroup=bladeDelimiter start="\s*(" end=")" contains=@bladePhp,bladePhpParenBlock skipwhite contained syn region bladePhpParenBlock matchgroup=bladeDelimiter start="\s*(" end=")" contains=@bladePhp,bladePhpParenBlock skipwhite contained
syn cluster bladePhp contains=@phpClTop syn cluster bladePhp contains=@phpClTop
syn cluster bladeExempt contains=bladeComment,@htmlTop syn cluster bladeExempt contains=bladeComment,bladePhpRegion,bladePhpParenBlock,@htmlTop
syn cluster htmlPreproc add=bladeEcho,bladeComment syn cluster htmlPreproc add=bladeEcho,bladeComment,bladePhpRegion
syn keyword bladeTodo todo fixme xxx contained syn case ignore
syn keyword bladeTodo todo fixme xxx note contained
hi def link bladeDelimiter PreProc hi def link bladeDelimiter PreProc
hi def link bladeComment Comment hi def link bladeComment Comment

View File

@ -184,6 +184,11 @@ syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumbe
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
"hex number "hex number
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
if s:ft ==# 'cpp' && !exists("cpp_no_cpp14")
syn match cNumber display contained "\d\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
syn match cNumber display contained "0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
syn match cNumber display contained "0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
endif
" Flag the first zero of an octal number as something special " Flag the first zero of an octal number as something special
syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
syn match cOctalZero display contained "\<0" syn match cOctalZero display contained "\<0"
@ -297,7 +302,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
if !exists("c_no_c99") if !exists("c_no_c99")
syn keyword cConstant __func__ syn keyword cConstant __func__ __VA_ARGS__
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@ syn keyword cppConstant __cplusplus
" C++ 11 extensions " C++ 11 extensions
if !exists("cpp_no_cpp11") if !exists("cpp_no_cpp11")
syn keyword cppModifier override final syn keyword cppModifier override final auto
syn keyword cppType nullptr_t syn keyword cppType nullptr_t
syn keyword cppExceptions noexcept syn keyword cppExceptions noexcept
syn keyword cppStorageClass constexpr decltype thread_local syn keyword cppStorageClass constexpr decltype thread_local

View File

@ -3,9 +3,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') =
" Language: ember-script " Language: ember-script
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
" URL: http://github.com/yalesov/vim-ember-script " URL: http://github.com/yalesov/vim-ember-script
" Version: 1.0.3 " Version: 1.0.4
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
if exists('b:current_syntax') && b:current_syntax == 'ember-script' if exists('b:current_syntax') && b:current_syntax == 'ember-script'
finish finish

View File

@ -3,9 +3,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
" Language: emblem " Language: emblem
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
" URL: http://github.com/yalesov/vim-emblem " URL: http://github.com/yalesov/vim-emblem
" Version: 2.0.0 " Version: 2.0.1
" Last Change: 2016 Jul 5 " Last Change: 2016 Jul 6
" License: GPL-3.0 " License: ISC
" Quit when a syntax file is already loaded. " Quit when a syntax file is already loaded.
if exists('b:current_syntax') && b:current_syntax == 'emblem' if exists('b:current_syntax') && b:current_syntax == 'emblem'

View File

@ -288,19 +288,22 @@ if g:go_highlight_operators != 0
syn match goOperator /:=\|||\|<-\|++\|--/ syn match goOperator /:=\|||\|<-\|++\|--/
" match ... " match ...
syn match goOperator /\.\.\./ syn match goOperator /\.\.\./
hi def link goPointerOperator Operator
endif endif
hi def link goOperator Operator hi def link goOperator Operator
" Functions; " Functions;
if g:go_highlight_functions != 0 if g:go_highlight_functions != 0
syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction skipwhite skipnl syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction skipwhite skipnl
syn match goReceiver /([^),]\+)/ contained nextgroup=goFunction contains=goReceiverType skipwhite skipnl syn match goReceiver /(\(\w\|[ *]\)\+)/ contained nextgroup=goFunction contains=goReceiverVar skipwhite skipnl
syn match goReceiverType /\(\s\|*\)\w\+)/hs=s+1,he=e-1 contained syn match goReceiverVar /\w\+/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained
syn match goFunction /\w\+/ contained syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl
syn match goReceiverType /\w\+/ contained
syn match goFunction /\w\+/ contained
else else
syn keyword goDeclaration func syn keyword goDeclaration func
endif endif
hi def link goReceiverType Type
hi def link goFunction Function hi def link goFunction Function
" Methods; " Methods;
@ -322,6 +325,7 @@ if g:go_highlight_types != 0
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
syn match goDeclType /\<interface\|struct\>/ contained skipwhite skipnl syn match goDeclType /\<interface\|struct\>/ contained skipwhite skipnl
hi def link goReceiverType Type
else else
syn keyword goDeclType struct interface syn keyword goDeclType struct interface
syn keyword goDeclaration type syn keyword goDeclaration type
@ -364,6 +368,7 @@ if g:go_highlight_build_constraints != 0
hi def link goPackageComment Comment hi def link goPackageComment Comment
endif endif
hi def goSameId term=bold cterm=bold ctermbg=white ctermfg=black
" Search backwards for a global declaration to start processing the syntax. " Search backwards for a global declaration to start processing the syntax.
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/ "syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/

View File

@ -13,6 +13,7 @@ elseif exists("b:current_syntax")
finish finish
endif endif
syn spell notoplevel
syn match haskellRecordField contained containedin=haskellBlock syn match haskellRecordField contained containedin=haskellBlock
\ "[_a-z][a-zA-Z0-9_']*\(,\s*[_a-z][a-zA-Z0-9_']*\)*\(\s*::\|\n\s\+::\)" \ "[_a-z][a-zA-Z0-9_']*\(,\s*[_a-z][a-zA-Z0-9_']*\)*\(\s*::\|\n\s\+::\)"
\ contains= \ contains=
@ -60,9 +61,9 @@ syn keyword haskellConditional if then else
syn match haskellNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>\|\<0[bB][10]\+\>" syn match haskellNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>\|\<0[bB][10]\+\>"
syn match haskellFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" syn match haskellFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
syn match haskellSeparator "[,;]" syn match haskellSeparator "[,;]"
syn region haskellParens matchgroup=haskellDelimiter start="(" end=")" contains=TOP,haskellTypeSig syn region haskellParens matchgroup=haskellDelimiter start="(" end=")" contains=TOP,haskellTypeSig,@Spell
syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contains=TOP,haskellTypeSig syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contains=TOP,haskellTypeSig,@Spell
syn region haskellBlock matchgroup=haskellDelimiter start="{" end="}" contains=TOP syn region haskellBlock matchgroup=haskellDelimiter start="{" end="}" contains=TOP,@Spell
syn keyword haskellInfix infix infixl infixr syn keyword haskellInfix infix infixl infixr
syn keyword haskellBottom undefined error syn keyword haskellBottom undefined error
syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.]\+\|\<_\>" syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:.]\+\|\<_\>"

View File

@ -12,27 +12,72 @@ syntax case match
" keywords " keywords
syntax keyword jasmineSuite describe it beforeEach afterEach syntax keyword jasmineSuite describe it beforeEach afterEach
syntax keyword jasmine jasmine
" special
syntax match jasmineSpecial /\.Ajax/
syntax match jasmineSpecial /\.addMatcher/
syntax match jasmineSpecial /\.getEnv/
syntax match jasmineSpecial /\.loadConfigFile/
syntax match jasmineSpecial /\.onComplete/
syntax match jasmineSpecial /\.QueryString/
syntax match jasmineSpecial /\.HtmlSpecFilter/
syntax match jasmineSpecial /\.addCustomEqualityTester/
syntax match jasmineSpecial /\.configureDefaultReporter/
syntax match jasmineSpecial /\.execute/
" clock
syntax match jasmineClock /\.Timer/
syntax match jasmineClock /\.clock/
syntax match jasmineClock /\.tick/
syntax match jasmineClock /\.mockDate/
" disabled
syntax keyword jasmineDisabled xdescribe xit syntax keyword jasmineDisabled xdescribe xit
" expectation
syntax keyword jasmineExpectation expect syntax keyword jasmineExpectation expect
" not
syntax region jasmineNot start=/not/ end=/\.to/me=s-1 syntax region jasmineNot start=/not/ end=/\.to/me=s-1
" matchers
syntax match jasmineMatcher /\.to\h\+/ syntax match jasmineMatcher /\.to\h\+/
syntax match jasmineMatcher /\.objectContaining/
syntax match jasmineMatcher /\.arrayContaining/
syntax match jasmineMatcher /\.anything/
syntax match jasmineMatcher /\.any/
syntax keyword jasmineSpy spyOn syntax keyword jasmineSpy spyOn
syntax match jasmineSpy /\.createSpy/
syntax match jasmineSpyMatcher /and\h\+/ syntax match jasmineSpyMatcher /and\h\+/
" jasmine is a subset of the javascript language, thus we need to activate " jasmine is a subset of the javascript language, thus we need to activate
" javascript syntax highlighting and add new jasmin group names to the " javascript syntax highlighting and add new jasmin group names to the
" JavaScriptAll cluster which is defined there " JavaScriptAll cluster which is defined there
runtime! syntax/javascript.vim runtime! syntax/javascript.vim
syntax cluster JavaScriptAll add=jasmineSuite,jasmineDisabled,jasmineExpectation,jasmineNot,jasmineMatcher,jasmineSpy,jasmineSpyMatcher syntax cluster JavaScriptAll add=
\ jasmine,
\ jasmineClock,
\ jasmineDisabled,
\ jasmineExpectation,
\ jasmineMatcher,
\ jasmineNot,
\ jasmineSpecial,
\ jasmineSpy,
\ jasmineSpyMatcher,
\ jasmineSuite
let b:current_syntax = "jasmine" let b:current_syntax = "jasmine"
hi def link jasmineSuite Statement hi def link jasmine Special
hi def link jasmineClock Special
hi def link jasmineDisabled Error hi def link jasmineDisabled Error
hi def link jasmineExpectation Statement hi def link jasmineExpectation Statement
hi def link jasmineNot Special
hi def link jasmineMatcher Statement hi def link jasmineMatcher Statement
hi def link jasmineNot Special
hi def link jasmineSpecial Special
hi def link jasmineSpy Special hi def link jasmineSpy Special
hi def link jasmineSpyMatcher Statement hi def link jasmineSpyMatcher Statement
hi def link jasmineSuite Statement
endif endif

View File

@ -61,7 +61,11 @@ syntax case match
syn match typescriptSpecial "\\\d\d\d\|\\." syn match typescriptSpecial "\\\d\d\d\|\\."
syn region typescriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=typescriptSpecial,@htmlPreproc extend syn region typescriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=typescriptSpecial,@htmlPreproc extend
syn region typescriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=typescriptSpecial,@htmlPreproc extend syn region typescriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=typescriptSpecial,@htmlPreproc extend
syn region typescriptStringB start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=typescriptSpecial,@htmlPreproc extend syn region typescriptStringB start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=typescriptInterpolation,typescriptSpecial,@htmlPreproc extend
syn region typescriptInterpolation matchgroup=typescriptInterpolationDelimiter
\ start=/${/ end=/}/ contained
\ contains=@typescriptExpression
syn match typescriptSpecialCharacter "'\\.'" syn match typescriptSpecialCharacter "'\\.'"
syn match typescriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" syn match typescriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
@ -114,7 +118,7 @@ syntax keyword typescriptDeprecated escape unescape all applets alinkColor bgCol
syntax keyword typescriptConditional if else switch syntax keyword typescriptConditional if else switch
syntax keyword typescriptRepeat do while for in of syntax keyword typescriptRepeat do while for in of
syntax keyword typescriptBranch break continue yield await syntax keyword typescriptBranch break continue yield await
syntax keyword typescriptLabel case default async syntax keyword typescriptLabel case default async readonly
syntax keyword typescriptStatement return with syntax keyword typescriptStatement return with
syntax keyword typescriptGlobalObjects Array Boolean Date Function Infinity Math Number NaN Object Packages RegExp String Symbol netscape syntax keyword typescriptGlobalObjects Array Boolean Date Function Infinity Math Number NaN Object Packages RegExp String Symbol netscape
@ -131,7 +135,7 @@ syntax keyword typescriptReserved constructor declare as interface module abstra
syn match typescriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite syn match typescriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite
"}}} "}}}
" DOM2 Objects"{{{ " DOM2 Objects"{{{
syntax keyword typescriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number symbol syntax keyword typescriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number symbol never
syntax keyword typescriptExceptions DOMException syntax keyword typescriptExceptions DOMException
"}}} "}}}
" DOM2 CONSTANT"{{{ " DOM2 CONSTANT"{{{
@ -249,6 +253,7 @@ if version >= 508 || !exists("did_typescript_syn_inits")
HiLink typescriptStringS String HiLink typescriptStringS String
HiLink typescriptStringD String HiLink typescriptStringD String
HiLink typescriptStringB String HiLink typescriptStringB String
HiLink typescriptInterpolationDelimiter Delimiter
HiLink typescriptRegexpString String HiLink typescriptRegexpString String
HiLink typescriptGlobal Constant HiLink typescriptGlobal Constant
HiLink typescriptCharacter Character HiLink typescriptCharacter Character