This commit is contained in:
Adam Stankiewicz 2015-10-10 16:56:22 +02:00
parent 67fcbd2a86
commit 0de043adbc
24 changed files with 91 additions and 700 deletions

View File

@ -43,7 +43,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
- [go](https://github.com/fatih/vim-go) (syntax, indent, ftdetect)
- [haml](https://github.com/tpope/vim-haml) (syntax, indent, compiler, ftplugin, ftdetect)
- [handlebars](https://github.com/mustache/vim-mustache-handlebars) (syntax, ftplugin, ftdetect)
- [haskell](https://github.com/raichoo/haskell-vim) (syntax, indent, ftplugin, ftdetect)
- [haskell](https://github.com/raichoo/haskell-vim) ()
- [haxe](https://github.com/yaymukund/vim-haxe) (syntax, ftdetect)
- [html5](https://github.com/othree/html5.vim) (syntax, indent, autoload, ftplugin)
- [jade](https://github.com/digitaltoad/vim-jade) (syntax, indent, ftplugin, ftdetect)

View File

@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
setlocal comments=s1fl:{-,mb:-,ex:-},:--
setlocal formatoptions-=cro formatoptions+=j
setlocal iskeyword+=-,.,*
setlocal commentstring=--\ %s
endif

View File

@ -1,7 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
setlocal comments=s1fl:{-,mb:-,ex:-},:--
setlocal formatoptions-=cro formatoptions+=j
setlocal iskeyword+='
endif

View File

@ -66,7 +66,7 @@ autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
autocmd BufNewFile,BufRead *.git/{,modules/**/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
autocmd BufNewFile,BufRead *.git/{,modules/**/,worktrees/*/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
autocmd BufNewFile,BufRead *.git/config,.gitconfig,gitconfig,.gitmodules set ft=gitconfig
autocmd BufNewFile,BufRead */.config/git/config set ft=gitconfig
autocmd BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig
@ -99,7 +99,7 @@ function! s:gofiletype_post()
let &g:fileformats = s:current_fileformats
let &g:fileencodings = s:current_fileencodings
endfunction
au BufNewFile *.go setlocal filetype=go fileencoding=utf-8 fileformat=unix
au BufNewFile *.go setfiletype go | setlocal fileencoding=utf-8 fileformat=unix
au BufRead *.go call s:gofiletype_pre()
au BufReadPost *.go call s:gofiletype_post()
au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl
@ -110,10 +110,6 @@ autocmd BufNewFile,BufRead *.haml,*.hamlbars,*.hamlc setf haml
autocmd BufNewFile,BufRead *.sass setf sass
autocmd BufNewFile,BufRead *.scss setf scss
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
au BufRead,BufNewFile *.hsc set filetype=haskell
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haxe') == -1
autocmd BufNewFile,BufRead *.hx setf haxe
@ -273,6 +269,8 @@ au BufNewFile,BufRead Puppetfile call s:setf('ruby')
au BufNewFile,BufRead [Bb]uildfile call s:setf('ruby')
au BufNewFile,BufRead Appraisals call s:setf('ruby')
au BufNewFile,BufRead Podfile,*.podspec call s:setf('ruby')
au BufNewFile,BufRead [rR]outefile call s:setf('ruby')
au BufNewFile,BufRead .simplecov set filetype=ruby
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
@ -346,7 +344,7 @@ autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
autocmd BufNewFile,BufRead *.ts,*.tsx setlocal filetype=typescript
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1

View File

@ -1,69 +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
function! s:makeSection(content)
return "\n" . join(a:content, "\n")
endfunction
function! s:exeTmpl(name, src)
let l:exetmpl = [ 'executable ' . a:name,
\ '-- ghc-options:',
\ 'main-is: ' . a:src,
\ '-- other-modules:',
\ '-- other-extensions:',
\ 'build-depends: base',
\ '-- hs-source-dirs:',
\ 'default-language: Haskell2010'
\ ]
return s:makeSection(l:exetmpl)
endfunction
function! s:libTmpl()
let l:libtmpl = [ 'library',
\ '-- ghc-options:',
\ '-- other-modules:',
\ '-- other-extensions:',
\ 'build-depends: base',
\ '-- hs-source-dirs:',
\ 'default-language: Haskell2010'
\ ]
return s:makeSection(l:libtmpl)
endfunction
function! s:flagTmpl(name)
let l:flagtmpl = [ 'flag ' . a:name,
\ 'description:',
\ 'default: False',
\ 'manual: True',
\ ]
return s:makeSection(l:flagtmpl)
endfunction
function! cabal#addExecutable()
let l:name = input("Enter executable name: ")
let l:src = input("Enter source file: ")
exe "normal Go" . s:exeTmpl(l:name, l:src)
endfunction
function! cabal#addLibrary()
exe "normal Go" . s:libTmpl()
endfunction
function! cabal#addFlag()
let l:name = input("Enter flag name: ")
exe "normal Go" . s:flagTmpl(l:name)
endfunction
command! -buffer CabalAddExecutable call cabal#addExecutable()
command! -buffer CabalAddLibrary call cabal#addLibrary()
command! -buffer CabalAddFlag call cabal#addFlag()
endif

View File

@ -1,25 +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#makeModuleCommentBlock()
let l:commenttmpl = [ '{-|',
\ 'Module : ',
\ 'Description : ',
\ 'Copyright : ',
\ 'License : ',
\ 'Maintainer : ',
\ 'Stability : ',
\ 'Portability : ',
\ '-}']
exe "normal ggO" . join(l:commenttmpl, "\n")
endfunction
command! -buffer -nargs=0 HaskellAddModuleComment call haskell#makeModuleCommentBlock()
endif

View File

@ -21,7 +21,7 @@ setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','')
setlocal omnifunc=csscomplete#CompleteCSS
setlocal suffixesadd=.less
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,://
setlocal fo=jcroql
setlocal fo=croql
let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='

View File

@ -45,7 +45,7 @@ setlocal define=[^A-Za-z_]
" after/ftplugin/perl6.vim file that contains
" set isfname-=:
set isfname+=:
setlocal iskeyword=@,48-57,_,192-255,:,-,'
setlocal iskeyword=@,48-57,_,192-255,-
" Set this once, globally.
if !exists("perlpath")

View File

@ -104,7 +104,7 @@ endfunction
if !exists('b:ruby_version') && !exists('g:ruby_path') && isdirectory(expand('%:p:h'))
let s:version_file = findfile('.ruby-version', '.;')
if !empty(s:version_file)
if !empty(s:version_file) && filereadable(s:version_file)
let b:ruby_version = get(readfile(s:version_file, '', 1), '')
if !has_key(g:ruby_version_paths, b:ruby_version)
let g:ruby_version_paths[b:ruby_version] = s:query_path(fnamemodify(s:version_file, ':p:h'))
@ -209,16 +209,16 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
call s:map('c', '', '<C-R><C-W> <Plug><cword>')
call s:map('c', '', '<C-R><C-F> <Plug><cfile>')
nmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? 'zv' : ''
call s:map('n', '<silent>', '<C-]> <SID>c:tag <Plug><cword><CR><SID>tagzv')
call s:map('n', '<silent>', 'g<C-]> <SID>:tjump <Plug><cword><CR><SID>tagzv')
call s:map('n', '<silent>', 'g] <SID>:tselect <Plug><cword><CR><SID>tagzv')
call s:map('n', '<silent>', '<C-W>] <SID>c:stag <Plug><cword><CR><SID>tagzv')
call s:map('n', '<silent>', '<C-W><C-]> <SID>c:stag <Plug><cword><CR><SID>tagzv')
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:stjump <Plug><cword><CR><SID>tagzv')
call s:map('n', '<silent>', '<C-W>g] <SID>:stselect <Plug><cword><CR><SID>tagzv')
call s:map('n', '<silent>', '<C-W>} <SID>c:ptag <Plug><cword><CR>')
call s:map('n', '<silent>', '<C-W>g} <SID>:ptjump <Plug><cword><CR>')
cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : ''
call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><cword>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><cword>"<CR>')
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><cword>"<CR>')
call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>')
call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>')

View File

@ -1,35 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
" indentation for cabal
"
" author: raichoo (raichoo@googlemail.com)
"
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
if !exists('g:cabal_indent_section')
"executable name
">>main-is: Main.hs
">>hs-source-dirs: src
let g:cabal_indent_section = 2
elseif exists('g:cabal_indent_section') && g:cabal_indent_section > 4
let g:cabal_indent_section = 4
endif
setlocal indentexpr=GetCabalIndent()
setlocal indentkeys=!^F,o,O,<CR>
function! GetCabalIndent()
let l:prevline = getline(v:lnum - 1)
if l:prevline =~ '\C^\(executable\|library\|flag\|source-repository\|test-suite\|benchmark\)'
return g:cabal_indent_section
else
return match(l:prevline, '\S')
endif
endfunction
endif

View File

@ -1,180 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
" indentation for haskell
"
" Based on idris indentation
"
" author: raichoo (raichoo@googlemail.com)
"
" Modify g:haskell_indent_if and g:haskell_indent_case to
" change indentation for `if'(default 3) and `case'(default 5).
" Example (in .vimrc):
" > let g:haskell_indent_if = 2
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
if !exists('g:haskell_indent_if')
" if bool
" >>>then ...
" >>>else ...
let g:haskell_indent_if = 3
endif
if !exists('g:haskell_indent_case')
" case xs of
" >>[] -> ...
" >>(y:ys) -> ...
let g:haskell_indent_case = 2
endif
if !exists('g:haskell_indent_let')
" let x = 0 in
" >>>>x
let g:haskell_indent_let = 4
endif
if !exists('g:haskell_indent_where')
" where f :: Int -> Int
" >>>>>>f x = x
let g:haskell_indent_where = 6
endif
if !exists('g:haskell_indent_do')
" do x <- a
" >>>y <- b
let g:haskell_indent_do = 3
endif
if !exists('g:haskell_indent_in')
" let x = 1
" >in x
let g:haskell_indent_in = 1
endif
setlocal indentexpr=GetHaskellIndent()
setlocal indentkeys=!^F,o,O,0\|,0=where,0=in,0=let,0=deriving,0=->,0=\=>,<CR>,0}
function! GetHaskellIndent()
let l:prevline = getline(v:lnum - 1)
if l:prevline =~ '^\s*--'
return match(l:prevline, '\S')
endif
if l:prevline =~ '^\s*$'
return 0
endif
let l:line = getline(v:lnum)
if l:line =~ '\C^\s*\<where\>'
let l:s = match(l:prevline, '\S')
return l:s + &shiftwidth
endif
if l:line =~ '\C^\s*\<deriving\>'
let l:s = match(l:prevline, '\C\<\(newtype\|data\)\>')
if l:s >= 0
return l:s + &shiftwidth
endif
endif
if l:line =~ '\C^\s*\<let\>'
let l:s = match(l:prevline, '\C\<let\>')
if l:s != 0
return l:s
endif
endif
if l:line =~ '\C^\s*\<in\>'
let l:s = match(l:prevline, '\C\<let\>')
if l:s >= 0
return l:s + g:haskell_indent_in
elseif match(l:prevline, '=') > 0
let l:s = match(l:prevline, '\S')
return l:s - (4 - g:haskell_indent_in)
endif
endif
if l:line =~ '^\s*|'
if match(l:prevline, '^\s*data') < 0
if match(l:prevline, '^\s*|\s') >= 0
return match(l:prevline, '|')
else
return &shiftwidth
endif
endif
endif
if l:line =~ '^\s*[=-]>'
let l:s = match(l:prevline, ' :: ')
if l:s >= 0
return l:s + 1
endif
endif
if l:prevline =~ '\s\+[!#$%&*+./<>?@\\^|~-]\+\s*$'
let l:s = match(l:prevline, '\S')
if l:s > 0
return l:s + &shiftwidth
endif
endif
if l:prevline =~ '[{([][^})\]]\+$'
return match(l:prevline, '[{([]')
endif
if l:prevline =~ '\C\<let\>\s\+[^=]\+=\s*$'
return match(l:prevline, '\C\<let\>') + g:haskell_indent_let + &shiftwidth
endif
if l:prevline =~ '\C\<let\>\s\+.\+\(\<in\>\)\?\s*$'
return match(l:prevline, '\C\<let\>') + g:haskell_indent_let
endif
if l:prevline !~ '\C\<else\>'
let l:s = match(l:prevline, '\C\<if\>.*\&.*\zs\<then\>')
if l:s > 0
return l:s
endif
let l:s = match(l:prevline, '\C\<if\>')
if l:s > 0
return l:s + g:haskell_indent_if
endif
endif
if l:prevline =~ '\C\(\<where\>\|\<do\>\|=\|[{([]\)\s*$'
return match(l:prevline, '\S') + &shiftwidth
endif
if l:prevline =~ '\C\<where\>\s\+\S\+.*$'
return match(l:prevline, '\C\<where\>') + g:haskell_indent_where
endif
if l:prevline =~ '\C\<do\>\s\+\S\+.*$'
return match(l:prevline, '\C\<do\>') + g:haskell_indent_do
endif
if l:prevline =~ '\C^\s*\<data\>\s\+[^=]\+\s\+=\s\+\S\+.*$'
if l:line =~ '^\s*|'
return match(l:prevline, '=')
endif
endif
if l:prevline =~ '\C\<case\>\s\+.\+\<of\>\s*$'
return match(l:prevline, '\C\<case\>') + g:haskell_indent_case
endif
if l:prevline =~ '\C^\s*\<\data\>\s\+\S\+\s*$'
return match(l:prevline, '\C\<data\>') + &shiftwidth
endif
return match(l:prevline, '\S')
endfunction
endif

View File

@ -60,9 +60,21 @@ function GetTypescriptIndent()
return indent(prev)
endif
" If a variable was declared and the semicolon omitted, do not indent
" the next line
if getline(prev) =~ '^\s*var\s\+\w\+'
" If the previous line starts with '@', we should have the same indent as
" the previous one
if getline(prev) =~ '^\s*@\S\+\s*$'
return indent(prev)
endif
" If a var, let, or const was declared and the semicolon omitted, do not
" indent the next line
if getline(prev) =~ '^\s*\(var\|let\|const\)\s\+\w\+'
return indent(prev)
endif
" If the line ended with a ',', we should have the same indent as
" the previous one
if getline(prev) =~ ',\s*$'
return indent(prev)
endif

View File

@ -1,55 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
" syntax highlighting for cabal
"
" author: raichoo (raichoo@googlemail.com)
if version < 600
syn clear
elseif exists("b:current_syntax")
finish
endif
syn match cabalLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell
syn match cabalIdentifier "[A-Za-z\-]*" contained
syn match cabalOperator "[<=>&|!]"
syn match cabalColon ":" contained
syn match cabalNumber "\<[0-9][0-9\.*]*\>"
syn match cabalDelimiter "[,()]"
syn keyword cabalBool True False
syn keyword cabalConditional if else
syn match cabalCompilerFlag "\s\+-[^ -][^ ]*"
syn match cabalDocBulletPoint "^\s\+\*"
syn match cabalDocHeadline "^\s\+=.*$"
syn match cabalDocCode "^\s\+>.*$"
syn match cabalDocNewline "^\s\+\.\s*$"
syn match cabalSection "^\c\(executable\|library\|flag\|source-repository\|test-suite\|benchmark\)"
syn match cabalEntry "^\s*[A-Za-z][a-zA-Z\-]*:" contains=cabalIdentifier,cabalColon
syn region cabalDescription start="^\s*[dD]escription:" end="^\<" keepend
\ contains=
\ cabalEntry,
\ cabalLineComment,
\ cabalDocBulletPoint,
\ cabalDocHeadline,
\ cabalDocNewline,
\ cabalDocCode
highlight def link cabalIdentifier Identifier
highlight def link cabalLineComment Comment
highlight def link cabalOperator Operator
highlight def link cabalColon Operator
highlight def link cabalNumber Number
highlight def link cabalSection Structure
highlight def link cabalDelimiter Delimiter
highlight def link cabalBool Boolean
highlight def link cabalCompilerFlag Macro
highlight def link cabalConditional Conditional
highlight def link cabalDocBulletPoint Structure
highlight def link cabalDocHeadline Include
highlight def link cabalDocNewline Operator
highlight def link cabalDocCode Macro
let b:current_syntax = "cabal"
endif

View File

@ -73,7 +73,7 @@ syntax match clojureKeyword "\v<:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\
syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained
syntax region clojureString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=clojureStringEscape,@Spell
syntax region clojureString matchgroup=clojureStringDelimiter start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=clojureStringEscape,@Spell
syntax match clojureCharacter "\\."
syntax match clojureCharacter "\\o\%([0-3]\o\{2\}\|\o\{1,2\}\)"
@ -156,9 +156,9 @@ syntax match clojureComment "#!.*$"
" Generated from https://github.com/guns/vim-clojure-static/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj
syntax cluster clojureTop contains=@Spell,clojureAnonArg,clojureBoolean,clojureCharacter,clojureComment,clojureCond,clojureConstant,clojureDefine,clojureDeref,clojureDispatch,clojureError,clojureException,clojureFunc,clojureKeyword,clojureMacro,clojureMap,clojureMeta,clojureNumber,clojureQuote,clojureRegexp,clojureRepeat,clojureSexp,clojureSpecial,clojureString,clojureSymbol,clojureUnquote,clojureVarArg,clojureVariable,clojureVector
syntax region clojureSexp matchgroup=clojureParen start="(" matchgroup=clojureParen end=")" contains=@clojureTop fold
syntax region clojureVector matchgroup=clojureParen start="\[" matchgroup=clojureParen end="]" contains=@clojureTop fold
syntax region clojureMap matchgroup=clojureParen start="{" matchgroup=clojureParen end="}" contains=@clojureTop fold
syntax region clojureSexp matchgroup=clojureParen start="(" end=")" contains=@clojureTop fold
syntax region clojureVector matchgroup=clojureParen start="\[" end="]" contains=@clojureTop fold
syntax region clojureMap matchgroup=clojureParen start="{" end="}" contains=@clojureTop fold
" Highlight superfluous closing parens, brackets and braces.
syntax match clojureError "]\|}\|)"
@ -171,6 +171,7 @@ highlight default link clojureCharacter Character
highlight default link clojureKeyword Keyword
highlight default link clojureNumber Number
highlight default link clojureString String
highlight default link clojureStringDelimiter String
highlight default link clojureStringEscape Character
highlight default link clojureRegexp Constant

View File

@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2015 Mar 1
" Last Change: 2015 Sep 23
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@ -51,6 +51,11 @@ if !exists("cpp_no_cpp11")
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
endif
" C++ 14 extensions
if !exists("cpp_no_cpp14")
syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>"
endif
" The minimum and maximum operators in GNU C++
syn match cppMinMax "[<>]?"
@ -74,6 +79,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppConstant Constant
HiLink cppRawStringDelimiter Delimiter
HiLink cppRawString String
HiLink cppNumber Number
delcommand HiLink
endif

View File

@ -8,7 +8,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css') == -1
" Nikolai Weibull (Add CSS2 support)
" Maintainer: Jules Wang <w.jq0722@gmail.com>
" URL: https://github.com/JulesWang/css.vim
" Last Change: 2015 Apr.17
" Last Change: 2015 Aug.25
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@ -166,8 +166,8 @@ syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajow
syn keyword cssColor contained oldlace olivedrab orange orangered orchid
syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/
syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue
syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown
syn keyword cssColor contained seagreen seashell sienna skyblue slateblue
syn keyword cssColor contained rosybrown royalblue rebeccapurple saddlebrown salmon
syn keyword cssColor contained sandybrown seagreen seashell sienna skyblue slateblue
syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan
syn keyword cssColor contained thistle tomato turquoise violet wheat
syn keyword cssColor contained whitesmoke yellowgreen

View File

@ -12,7 +12,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
" let OPTION_NAME = 0
" in your ~/.vimrc file to disable particular options. You can also write:
" let OPTION_NAME = 1
" to enable particular options.
" to enable particular options.
" At present, all options default to on, except highlight of:
" functions, methods and structs.
"
@ -27,6 +27,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
" Highlights instances of tabs following spaces.
" - go_highlight_trailing_whitespace_error
" Highlights trailing white space.
" - go_highlight_string_spellcheck
" Specifies that strings should be spell checked
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@ -73,6 +75,10 @@ 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
syn case match
syn keyword goDirective package import
@ -147,8 +153,13 @@ hi def link goEscapeError Error
" Strings and their contents
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString start=+`+ end=+`+
if g:go_highlight_string_spellcheck != 0
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup,@Spell
syn region goRawString start=+`+ end=+`+ contains=@Spell
else
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString start=+`+ end=+`+
endif
syn match goFormatSpecifier /%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
hi def link goString String
@ -236,7 +247,7 @@ syn keyword goTodo contained NOTE
hi def link goTodo Todo
" Operators;
" Operators;
if g:go_highlight_operators != 0
" match single-char operators: - + % < > ! & | ^ * =
" and corresponding two-char operators: -= += %= <= >= != &= |= ^= *= ==
@ -253,20 +264,20 @@ if g:go_highlight_operators != 0
endif
hi def link goOperator Operator
" Functions;
" Functions;
if g:go_highlight_functions != 0
syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/
syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/
endif
hi def link goFunction Function
" Methods;
" Methods;
if g:go_highlight_methods != 0
syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/
endif
hi def link goMethod Type
" Structs;
" Structs;
if g:go_highlight_structs != 0
syn match goStruct /\(.\)\@<=\w\+\({\)\@=/
syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/
@ -276,7 +287,7 @@ hi def link goStructDef Function
" Build Constraints
if g:go_highlight_build_constraints != 0
syn keyword goBuildOs contained ignore cgo android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows
syn keyword goBuildOs contained ignore cgo android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows
syn keyword goBuildArch contained 386 amd64 amd64p32 arm
syn match goBuildDirective display contained "+build"
syn region goBuildComment start="//\s*+build" end="$" contains=goBuildDirective,goBuildOs,goBuildArch

View File

@ -68,7 +68,7 @@ syn cluster gotplLiteral contains=goString,goRawString,goCharacter,@goIn
syn keyword gotplControl contained if else end range with template
syn keyword gotplFunctions contained and html index js len not or print printf println urlquery eq ne lt le gt ge
syn match gotplVariable contained /\$[^ ]*\>/
syn match goTplIdentifier contained /\.[^ ]*\>/
syn match goTplIdentifier contained /\.[^\s}]*\>/
hi def link gotplControl Keyword
hi def link gotplFunctions Function

View File

@ -1,260 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
" syntax highlighting for haskell
"
" Heavily modified version of the haskell syntax
" highlighter to support haskell.
"
" author: raichoo (raichoo@googlemail.com)
if version < 600
syn clear
elseif exists("b:current_syntax")
finish
endif
if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1
syn region haskellRecordBlock matchgroup=haskellDelimiter start="{" end="}"
\ contains=
\ haskellType,
\ haskellSeparator,
\ haskellParens,
\ haskellBrackets,
\ haskellRecordField,
\ haskellOperators,
\ haskellDot,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellPragma,
\ haskellForall
else
syn region haskellRecordBlock matchgroup=haskellDelimiter start="{" end="}"
\ contains=
\ haskellType,
\ haskellSeparator,
\ haskellParens,
\ haskellBrackets,
\ haskellRecordField,
\ haskellOperators,
\ haskellDot,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellPragma
endif
if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1
syn region haskellImportList matchgroup=haskellDelimiter start="(" end=")"
\ contains=
\ haskellSeparator,
\ haskellType,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellDot,
\ haskellParens,
\ haskellPatternKeyword
else
syn region haskellImportList matchgroup=haskellDelimiter start="(" end=")"
\ contains=
\ haskellSeparator,
\ haskellType,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellDot,
\ haskellParens
end
syn match haskellRecordField "[_a-z][a-zA-Z0-9_']*\s*::" contained
\ contains=
\ haskellIdentifier,
\ haskellOperators
syn match haskellTopLevelDecl
\ "^\s*\(where\s\+\|let\s\+\|default\s\+\)\?[_a-z][a-zA-Z0-9_']*\(,\s*[_a-z][a-zA-Z0-9_']*\)*\(\s*::\|\n\s\+::\)"
\ contains=
\ haskellIdentifier,
\ haskellOperators,
\ haskellSeparator,
\ haskellParens,
\ haskellBrackets,
\ haskellWhere,
\ haskellLet,
\ haskellDefault
syn region haskellModuleBlock matchgroup=haskellBlockKeywords start="\<module\>" end="\<where\>"
\ contains=haskellType,haskellDot,haskellImportList
syn region haskellClassBlock
\ matchgroup=haskellBlockKeywords
\ start="^\<\(class\|instance\)\>"
\ end="\<where\>\|^\<"
\ contains=
\ haskellType,
\ haskellSeparator,
\ haskellParens,
\ haskellDot,
\ haskellOperators,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellPragma
syn keyword haskellDeclKeyword newtype data type family instance where contained
syn region haskellDeclBlock keepend
\ start="^\<\(newtype\|data\|type\)\>\s\+\(\<\(family\|instance\)\>\)\?"
\ end="\<where\>\|=\|^\<"
\ contains=
\ haskellDeclKeyword,
\ haskellType,
\ haskellQuoted,
\ haskellParens,
\ haskellBrackets,
\ haskellDot,
\ haskellOperators,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellPragma
syn match haskellAssocType "\s\+\<\(data\|type\|newtype\)\>"
syn match haskellDeriving "\(deriving\s\+instance\|deriving\)"
syn keyword haskellDefault default
syn keyword haskellImportKeywords import qualified safe as hiding contained
syn keyword haskellForeignKeywords foreign export import ccall safe unsafe interruptible capi prim contained
syn region haskellForeignImport start="\<foreign\>" end="::" keepend
\ contains=
\ haskellString,
\ haskellOperators,
\ haskellForeignKeywords,
\ haskellIdentifier
syn region haskellImport
\ start="^import"
\ end="^\<"
\ contains=
\ haskellImportKeywords,
\ haskellImportList,
\ haskellType,
\ haskellLineComment,
\ haskellBlockComment,
\ haskellDot
syn keyword haskellStatement do case of in
syn keyword haskellWhere where
syn keyword haskellLet let
if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1
syn keyword haskellStatic static
endif
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 haskellFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
syn match haskellSeparator "[,;]"
syn region haskellParens matchgroup=haskellDelimiter start="(" end=")" contains=TOP
syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contains=TOP
syn region haskellBlock matchgroup=haskellDelimiter start="{" end="}" contains=TOP
syn keyword haskellInfix infix infixl infixr
syn keyword haskellBottom undefined error
syn match haskellOperators "[-!#$%&\*\+/<=>\?@\\^|~:]\+\|\<_\>"
syn match haskellQuote "\<'\+" contained
syn match haskellQuotedType "[A-Z][a-zA-Z0-9_']*\>" contained
syn region haskellQuoted start="\<'\+" end="\>"
\ contains=
\ haskellType,
\ haskellQuote,
\ haskellQuotedType,
\ haskellSeparator,
\ haskellParens,
\ haskellOperators,
\ haskellIdentifier
syn match haskellDot "\."
syn match haskellLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
\ contains=
\ haskellTodo,
\ @Spell
syn match haskellBacktick "`[A-Za-z_][A-Za-z0-9_\.']*`"
syn region haskellString start=+"+ skip=+\\\\\|\\"+ end=+"+
\ contains=@Spell
syn match haskellIdentifier "[_a-z][a-zA-z0-9_']*" contained
syn match haskellChar "\<'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'\>"
syn match haskellType "\<[A-Z][a-zA-Z0-9_']*\>\n\?\s*"
\ nextgroup=haskellBlockComment,haskellRecordBlock
syn region haskellBlockComment start="{-" end="-}"
\ contains=
\ haskellBlockComment,
\ haskellTodo,
\ @Spell
syn region haskellPragma start="{-#" end="#-}"
syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-z][a-zA-z0-9_']*|" end="|\]"
syn region haskellTHBlock matchgroup=haskellTH start="\[\(d\|t\|p\)\?|" end="|]" contains=TOP
syn region haskellTHDoubleBlock matchgroup=haskellTH start="\[||" end="||]" contains=TOP
syn match haskellPreProc "^#.*$"
syn keyword haskellTodo TODO FIXME contained
if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1
syn keyword haskellTypeRoles phantom representational nominal contained
syn region haskellTypeRoleBlock matchgroup=haskellTypeRoles start="type\s\+role" end="^\<" keepend
\ contains=
\ haskellType,
\ haskellTypeRoles
endif
if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1
syn keyword haskellForall forall
endif
if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1
syn keyword haskellRecursiveDo mdo rec
endif
if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1
syn keyword haskellArrowSyntax proc
endif
if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1
syn region haskellPatternSynonym start="^\<pattern\>" end="=\|<-" keepend
\ contains=
\ haskellPatternKeyword,
\ haskellType,
\ haskellOperators
syn keyword haskellPatternKeyword pattern contained
endif
highlight def link haskellBottom Macro
highlight def link haskellTH Boolean
highlight def link haskellBlockKeywords Structure
highlight def link haskellIdentifier Identifier
highlight def link haskellForeignKeywords Structure
highlight def link haskellDeriving Structure
highlight def link haskellStatement Statement
highlight def link haskellWhere Statement
highlight def link haskellLet Statement
highlight def link haskellDefault Statement
highlight def link haskellConditional Conditional
highlight def link haskellNumber Number
highlight def link haskellFloat Float
highlight def link haskellSeparator Delimiter
highlight def link haskellDelimiter Delimiter
highlight def link haskellInfix PreProc
highlight def link haskellOperators Operator
highlight def link haskellQuote Operator
highlight def link haskellQuotedType Include
highlight def link haskellDot Operator
highlight def link haskellType Include
highlight def link haskellLineComment Comment
highlight def link haskellBlockComment Comment
highlight def link haskellPragma SpecialComment
highlight def link haskellString String
highlight def link haskellChar String
highlight def link haskellBacktick Operator
highlight def link haskellPreProc Macro
highlight def link haskellTodo Todo
highlight def link haskellAssocType Structure
highlight def link haskellImportBlock Delimiter
highlight def link haskellImportKeywords Structure
highlight def link haskellDeclKeyword Structure
if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1
highlight def link haskellForall Operator
endif
if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1
highlight def link haskellRecursiveDo Operator
endif
if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1
highlight def link haskellArrowSyntax Operator
endif
if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1
highlight def link haskellPatternKeyword Structure
endif
if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1
highlight def link haskellTypeRoles Structure
endif
if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1
highlight def link haskellStatic Statement
endif
let b:current_syntax = "haskell"
endif

View File

@ -87,14 +87,14 @@ exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start=
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart
syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend
syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*\z(\z(`\)\{3,}\|\z(\~\)\{3,}\)[^`]*$" end="^\s*\z1\%(\z2\z3\)*\ze\s*$" keepend
syn match markdownFootnote "\[^[^\]]\+\]"
syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:"
if main_syntax ==# 'markdown'
for s:type in g:markdown_fenced_languages
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(\z(`\)\{3,}\|\z(\~\)\{3,}\)\s*'.matchstr(s:type,'[^=]*').'\>[^`]*$" end="^\s*\z1\%(\z2\z3\)*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
endfor
unlet! s:type
endif

View File

@ -102,7 +102,7 @@ let s:keywords = {
\ ],
\ "p6Operator": [
\ "div xx x mod also leg cmp before after eq ne le lt not",
\ "gt ge eqv ff fff and andthen or xor orelse extra lcm gcd",
\ "gt ge eqv ff fff and andthen or xor orelse extra lcm gcd o",
\ ],
\ "p6Type": [
\ "int int1 int2 int4 int8 int16 int32 int64",
@ -176,7 +176,7 @@ syn match p6Type display "\%(::\)\@2<!\%(Order\%(::Same\|::More\|::Less\)\?\|Boo
" Don't put a "\+" at the end of the character class. That makes it so
" greedy that the "%" " in "+%foo" won't be allowed to match as a sigil,
" among other things
syn match p6Operator display "[-+/*~?|=^!%&,<>».;\\∈∉∋∌∩∪≼≽⊂⊃⊄⊅⊆⊇⊈⊉⊍⊎⊖∅]"
syn match p6Operator display "[-+/*~?|=^!%&,<>».;\\∈∉∋∌∩∪≼≽⊂⊃⊄⊅⊆⊇⊈⊉⊍⊎⊖∅]"
syn match p6Operator display "\%(:\@1<!::\@2!\|::=\|\.::\)"
" these require whitespace on the left side
syn match p6Operator display "\%(\s\|^\)\@1<=\%(xx=\|p5=>\)"
@ -249,9 +249,10 @@ syn cluster p6Interp_qq
\ add=@p6Interp_function
\ add=@p6Interp_closure
\ add=@p6Interp_backslash
\ add=p6MatchVarSigil
syn region p6InterpScalar
\ start="\ze\z(\$\%(\%(\%(\d\+\|!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\)\%(\.\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ start="\ze\z(\$\%(\%(\%(\d\+\|!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\)\%(\.\^\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ start="\ze\z(\$\%(\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\)\|\%(\d\+\|!\|/\|¢\)\)\)"
\ end="\z1\zs"
\ contained keepend
@ -266,7 +267,7 @@ syn region p6InterpScalar
\ contains=TOP
syn region p6InterpArray
\ start="\ze\z(@\$*\%(\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\)\%(\.\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ start="\ze\z(@\$*\%(\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\)\%(\.\^\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ end="\z1\zs"
\ contained keepend
\ contains=TOP
@ -280,7 +281,7 @@ syn region p6InterpArray
\ contains=TOP
syn region p6InterpHash
\ start="\ze\z(%\$*\%(\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\)\%(\.\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ start="\ze\z(%\$*\%(\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\)\%(\.\^\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ end="\z1\zs"
\ contained keepend
\ contains=TOP
@ -294,7 +295,7 @@ syn region p6InterpHash
\ contains=TOP
syn region p6InterpFunction
\ start="\ze\z(&\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\%(\.\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ start="\ze\z(&\%(\%(!\|/\|¢\)\|\%(\%(\%([.^*?=!~]\|:\@1<!::\@!\)[A-Za-z_\xC0-\xFF]\@=\)\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\%(\.\^\?\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[-'][A-Za-z_\xC0-\xFF]\@=\)*\)\|\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)*\)\.\?\%(([^)]*)\|\[[^\]]*]\|<[^>]*>\|«[^»]*»\|{[^}]*}\)\)\)"
\ end="\z1\zs"
\ contained keepend
\ contains=TOP

File diff suppressed because one or more lines are too long

View File

@ -173,10 +173,10 @@ syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i(" end=")" sk
" Array of interpolated Symbols
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold
" Here Document
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
@ -244,7 +244,7 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
" statements without 'do'
syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold
syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(\\\n\s*\)\@<!\%(if\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold
syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression
syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression

View File

@ -27,10 +27,11 @@ syn region tomlString oneline start=/'/ end=/'/
syn region tomlString start=/'''/ end=/'''/
hi def link tomlString String
syn match tomlInteger /\<-\?\d\+\>/ display
syn match tomlInteger /\<[+-]\=[0-9]\(_\=\d\)*\>/ display
hi def link tomlInteger Number
syn match tomlFloat /\<-\?\d\+\.\d\+\>/ display
syn match tomlFloat /\<[+-]\=[0-9]\(_\=\d\)*\.\d\+\>/ display
syn match tomlFloat /\<[+-]\=[0-9]\(_\=\d\)*\(\.[0-9]\(_\=\d\)*\)\=[eE][+-]\=[0-9]\(_\=\d\)*\>/ display
hi def link tomlFloat Float
syn match tomlBoolean /\<\%(true\|false\)\>/ display