Compare commits

...

6 Commits

Author SHA1 Message Date
Adam Stankiewicz
829ab22723 Add cql support, closes #98 2015-12-28 14:58:35 +01:00
Adam Stankiewicz
a8d08c8a49 Update 2015-12-28 14:48:04 +01:00
Adam Stankiewicz
7679a92627 Add ansible support, closes #96 2015-12-17 10:49:17 +01:00
Adam Stankiewicz
ad44c4f7a3 Add nix support, closes #97 2015-12-17 10:49:17 +01:00
Adam Stankiewicz
3c56c1c7cd Update 2015-12-17 10:49:17 +01:00
Adam Stankiewicz
d4e83d706f Mention about updating 2015-12-06 15:35:27 +01:00
26 changed files with 815 additions and 35 deletions

View File

@@ -8,7 +8,7 @@ A collection of language packs for Vim.
> One to rule them all, one to find them, one to bring them all and in the darkness bind them. > One to rule them all, one to find them, one to bring them all and in the darkness bind them.
- It **won't affect your startup time**, as scripts are loaded only on demand\*. - It **won't affect your startup time**, as scripts are loaded only on demand\*.
- It **installs 70+ times faster** than 70+ packages it consist of. - It **installs and updates 70+ times faster** than 70+ packages it consist of.
- Solid syntax and indentation support. Only the best language packs. - Solid syntax and indentation support. Only the best language packs.
- All unnecessary files are ignored (like enormous documentation from php support). - All unnecessary files are ignored (like enormous documentation from php support).
- No support for esoteric languages, only most popular ones (modern too, like `slim`). - No support for esoteric languages, only most popular ones (modern too, like `slim`).
@@ -25,6 +25,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
## Language packs ## Language packs
- [ansible](https://github.com/pearofducks/ansible-vim) (syntax, indent, ftplugin, ftdetect)
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent, ftdetect) - [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent, ftdetect)
- [blade](https://github.com/jwalton512/vim-blade) (syntax, indent, ftdetect) - [blade](https://github.com/jwalton512/vim-blade) (syntax, indent, ftdetect)
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax) - [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
@@ -32,9 +33,10 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
- [cjsx](https://github.com/mtscout6/vim-cjsx) (ftdetect, syntax, ftplugin) - [cjsx](https://github.com/mtscout6/vim-cjsx) (ftdetect, syntax, ftplugin)
- [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin, ftdetect) - [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin, ftdetect)
- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin, ftdetect) - [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
- [cql](https://github.com/elubow/cql-vim) (syntax, ftdetect)
- [css](https://github.com/JulesWang/css.vim) (syntax) - [css](https://github.com/JulesWang/css.vim) (syntax)
- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin, ftdetect) - [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin, ftdetect)
- [dart](https://github.com/dart-lang/dart-vim-plugin) (syntax, indent, ftplugin, ftdetect) - [dart](https://github.com/dart-lang/dart-vim-plugin) (syntax, indent, autoload, ftplugin, ftdetect)
- [dockerfile](https://github.com/honza/dockerfile.vim) (syntax, ftdetect) - [dockerfile](https://github.com/honza/dockerfile.vim) (syntax, ftdetect)
- [elm](https://github.com/lambdatoast/elm.vim) (syntax, indent, autoload, ftplugin, ftdetect) - [elm](https://github.com/lambdatoast/elm.vim) (syntax, indent, autoload, ftplugin, ftdetect)
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect) - [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
@@ -64,6 +66,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
- [liquid](https://github.com/tpope/vim-liquid) (syntax, indent, ftplugin, ftdetect) - [liquid](https://github.com/tpope/vim-liquid) (syntax, indent, ftplugin, ftdetect)
- [markdown](https://github.com/tpope/vim-markdown) (syntax, ftplugin, ftdetect) - [markdown](https://github.com/tpope/vim-markdown) (syntax, ftplugin, ftdetect)
- [nginx](https://github.com/nginx/nginx) (syntax, indent, ftdetect) - [nginx](https://github.com/nginx/nginx) (syntax, indent, ftdetect)
- [nix](https://github.com/spwhitt/vim-nix) (syntax, ftplugin, ftdetect)
- [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent) - [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent)
- [ocaml](https://github.com/jrk/vim-ocaml) (syntax, indent, ftplugin) - [ocaml](https://github.com/jrk/vim-ocaml) (syntax, indent, ftplugin)
- [octave](https://github.com/vim-scripts/octave.vim--) (syntax) - [octave](https://github.com/vim-scripts/octave.vim--) (syntax)

View File

@@ -65,7 +65,7 @@ syn cluster cppSTLgroup contains=cppSTLfunction,cppSTLfunctional,cppSTLconst
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
" Standard library types and functions. " Standard library types and functions.
" "
" Mainly based on the excellent STL Syntax vim script by " Mainly based on the excellent STL Syntax vim script by
" Mizuchi <ytj000@gmail.com> " Mizuchi <ytj000@gmail.com>
" http://www.vim.org/scripts/script.php?script_id=4293 " http://www.vim.org/scripts/script.php?script_id=4293
" which in turn is based on the scripts " which in turn is based on the scripts
@@ -1324,6 +1324,31 @@ if !exists("cpp_no_cpp14")
"dynarray "dynarray
syntax keyword cppSTLtype dynarray syntax keyword cppSTLtype dynarray
"helper type traits types
syntax keyword cppSTLtype remove_cv_t
syntax keyword cppSTLtype remove_const_t
syntax keyword cppSTLtype remove_volatile_t
syntax keyword cppSTLtype add_cv_t
syntax keyword cppSTLtype add_const_t
syntax keyword cppSTLtype add_volatile_t
syntax keyword cppSTLtype remove_reference_t
syntax keyword cppSTLtype add_lvalue_reference_t
syntax keyword cppSTLtype add_rvalue_reference_t
syntax keyword cppSTLtype remove_pointer_t
syntax keyword cppSTLtype add_pointer_t
syntax keyword cppSTLtype remove_extent_t
syntax keyword cppSTLtype remove_all_extents_t
syntax keyword cppSTLtype make_signed_t
syntax keyword cppSTLtype make_unsigned_t
syntax keyword cppSTLtype aligned_storage_t
syntax keyword cppSTLtype aligned_union_t
syntax keyword cppSTLtype decay_t
syntax keyword cppSTLtype enable_if_t
syntax keyword cppSTLtype conditional_t
syntax keyword cppSTLtype common_type_t
syntax keyword cppSTLtype underlying_type_t
syntax keyword cppSTLtype result_of_t
"thread "thread
syntax keyword cppSTLtype shared_mutex syntax keyword cppSTLtype shared_mutex
syntax keyword cppSTLtype shared_lock syntax keyword cppSTLtype shared_lock
@@ -1362,7 +1387,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppSTLenum Typedef HiLink cppSTLenum Typedef
HiLink cppSTLios Function HiLink cppSTLios Function
HiLink cppSTLcast Statement " be consistent with official syntax HiLink cppSTLcast Statement " be consistent with official syntax
HiLink cppRawString String HiLink cppRawString String
HiLink cppRawDelimiter Delimiter HiLink cppRawDelimiter Delimiter
delcommand HiLink delcommand HiLink
endif endif

70
autoload/dart.vim Normal file
View File

@@ -0,0 +1,70 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1
function! s:error(text) abort
echohl Error
echomsg printf('[dart-vim-plugin] %s', a:text)
echohl None
endfunction
function! s:cexpr(errorformat, joined_lines) abort
let temp_errorfomat = &errorformat
try
let &errorformat = a:errorformat
cexpr a:joined_lines
copen
finally
let &errorformat = temp_errorfomat
endtry
endfunction
function! dart#fmt(q_args) abort
if executable('dartfmt')
let path = expand('%:p:gs:\:/:')
if filereadable(path)
let joined_lines = system(printf('dartfmt %s %s', a:q_args, shellescape(path)))
if 0 == v:shell_error
silent % delete _
silent put=joined_lines
silent 1 delete _
else
call s:cexpr('line %l\, column %c of %f: %m', joined_lines)
endif
else
call s:error(printf('cannot read a file: "%s"', path))
endif
else
call s:error('cannot execute binary file: dartfmt')
endif
endfunction
function! dart#analyzer(q_args) abort
if executable('dartanalyzer')
let path = expand('%:p:gs:\:/:')
if filereadable(path)
let joined_lines = system(printf('dartanalyzer %s %s', a:q_args, shellescape(path)))
call s:cexpr('%m (%f\, line %l\, col %c)', joined_lines)
else
call s:error(printf('cannot read a file: "%s"', path))
endif
else
call s:error('cannot execute binary file: dartanalyzer')
endif
endfunction
function! dart#tojs(q_args) abort
if executable('dart2js')
let path = expand('%:p:gs:\:/:')
if filereadable(path)
let joined_lines = system(printf('dart2js %s %s', a:q_args, shellescape(path)))
call s:cexpr('%m (%f\, line %l\, col %c)', joined_lines)
else
call s:error(printf('cannot read a file: "%s"', path))
endif
else
call s:error('cannot execute binary file: dartanalyzer')
endif
endfunction
endif

3
build
View File

@@ -96,6 +96,7 @@ EOF
} }
PACKS=" PACKS="
ansible:pearofducks/ansible-vim
arduino:sudar/vim-arduino-syntax arduino:sudar/vim-arduino-syntax
blade:jwalton512/vim-blade blade:jwalton512/vim-blade
c++11:octol/vim-cpp-enhanced-highlight c++11:octol/vim-cpp-enhanced-highlight
@@ -103,6 +104,7 @@ PACKS="
cjsx:mtscout6/vim-cjsx cjsx:mtscout6/vim-cjsx
clojure:guns/vim-clojure-static clojure:guns/vim-clojure-static
coffee-script:kchmck/vim-coffee-script coffee-script:kchmck/vim-coffee-script
cql:elubow/cql-vim
css:JulesWang/css.vim css:JulesWang/css.vim
cucumber:tpope/vim-cucumber cucumber:tpope/vim-cucumber
dart:dart-lang/dart-vim-plugin dart:dart-lang/dart-vim-plugin
@@ -135,6 +137,7 @@ PACKS="
liquid:tpope/vim-liquid liquid:tpope/vim-liquid
markdown:tpope/vim-markdown markdown:tpope/vim-markdown
nginx:nginx/nginx::/contrib/vim/ nginx:nginx/nginx::/contrib/vim/
nix:spwhitt/vim-nix
objc:b4winckler/vim-objc objc:b4winckler/vim-objc
ocaml:jrk/vim-ocaml ocaml:jrk/vim-ocaml
octave:vim-scripts/octave.vim-- octave:vim-scripts/octave.vim--

View File

@@ -16,9 +16,15 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo-=C set cpo-=C
CompilerSet makeprg=mix\ test CompilerSet makeprg=mix\ test
CompilerSet errorformat=%A\ \ %.)\ %m(%.%#),%C\ \ \ \ \ **%m,%C\ \ \ \ \ \ \ %m,%Z\ \ \ \ \ at\ %f:%l,%-G%.%# CompilerSet errorformat=
\%E\ \ %n)\ %m,
\%+G\ \ \ \ \ **\ %m,
\%+G\ \ \ \ \ stacktrace:,
\%C\ \ \ \ \ %f:%l,
\%+G\ \ \ \ \ \ \ (%\\w%\\+)\ %f:%l:\ %m,
\%+G\ \ \ \ \ \ \ %f:%l:\ %.%#,
\**\ (%\\w%\\+)\ %f:%l:\ %m
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save

View File

@@ -27,6 +27,7 @@ CompilerSet errorformat=
\%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#, \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#,
\%E\ \ %\\d%\\+)%.%#, \%E\ \ %\\d%\\+)%.%#,
\%C\ \ \ \ \ %m, \%C\ \ \ \ \ %m,
\%C%\\s%#,
\%-G%.%# \%-G%.%#
let &cpo = s:cpo_save let &cpo = s:cpo_save

View File

@@ -1,3 +1,18 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
function! DetectAnsible()
let filepath = expand("%:p")
let filename = expand("%:t")
if filepath =~ '\v/(tasks|roles)/.*\.ya?ml$' || filepath =~ '\v/(group|host)_vars/' || filename =~ '\v(playbook|site)\.ya?ml$'
set ft=ansible
endif
unlet filepath
unlet filename
endfunction
:au BufNewFile,BufRead *.yml,*yaml,*/{group,host}_vars/* call DetectAnsible()
:au BufNewFile,BufRead *.j2 set ft=ansible_template
:au BufNewFile,BufRead hosts set ft=ansible_hosts
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arduino') == -1 if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arduino') == -1
au BufRead,BufNewFile *.ino,*.pde set filetype=arduino au BufRead,BufNewFile *.ino,*.pde set filetype=arduino
@@ -30,6 +45,12 @@ function! s:DetectCoffee()
endfunction endfunction
autocmd BufNewFile,BufRead * call s:DetectCoffee() autocmd BufNewFile,BufRead * call s:DetectCoffee()
endif endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cql') == -1
if has("autocmd")
au BufNewFile,BufRead *.cql set filetype=cql
endif
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1
autocmd BufNewFile,BufReadPost *.feature,*.story set filetype=cucumber autocmd BufNewFile,BufReadPost *.feature,*.story set filetype=cucumber
@@ -254,6 +275,10 @@ au BufRead,BufNewFile */etc/nginx/* set ft=nginx
au BufRead,BufNewFile */usr/local/nginx/conf/* set ft=nginx au BufRead,BufNewFile */usr/local/nginx/conf/* set ft=nginx
au BufRead,BufNewFile nginx.conf set ft=nginx au BufRead,BufNewFile nginx.conf set ft=nginx
endif endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1
autocmd BufNewFile,BufRead *.nix setfiletype nix
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opencl') == -1 if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opencl') == -1
au! BufRead,BufNewFile *.cl set filetype=opencl au! BufRead,BufNewFile *.cl set filetype=opencl

8
ftplugin/ansible.vim Normal file
View File

@@ -0,0 +1,8 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
" Slow yaml highlighting workaround
if exists('+regexpengine') && ('&regexpengine' == 0)
setlocal regexpengine=1
endif
endif

View File

@@ -3,6 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
" Vim filetype plugin " Vim filetype plugin
" Language: generic git output " Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2013 May 30
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
" Vim filetype plugin " Vim filetype plugin
" Language: git commit file " Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2012 April 7 " Last Change: 2013 May 30
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))

17
ftplugin/nix.vim Normal file
View File

@@ -0,0 +1,17 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin=1
setlocal comments=
setlocal commentstring=#\ %s
" Nixpkgs indent settings
setlocal tabstop=2
setlocal softtabstop=2
setlocal shiftwidth=2
setlocal expandtab
endif

58
indent/ansible.vim Normal file
View File

@@ -0,0 +1,58 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
let s:save_cpo = &cpo
set cpo&vim
setlocal indentexpr=GetAnsibleIndent(v:lnum)
setlocal indentkeys=!^F,o,O,0#,0},0],<:>,-,*<Return>
setlocal nosmartindent
setlocal expandtab
setlocal softtabstop=2
setlocal shiftwidth=2
setlocal commentstring=#%s
setlocal formatoptions=cl
" c -> wrap long comments, including #
" l -> do not wrap long lines
let s:comment = '\v^\s*#' " # comment
let s:array_entry = '\v^\s*-\s' " - foo
let s:named_module_entry = '\v^\s*-\s*(name|hosts):\s*\S' " - name: 'do stuff'
let s:dictionary_entry = '\v^\s*[^:-]+:\s*$' " with_items:
let s:key_value = '\v^\s*[^:-]+:\s*\S' " apt: name=package
let s:scalar_value = '\v:\s*[>|\|]\s*$' " shell: >
if exists('*GetAnsibleIndent')
finish
endif
function GetAnsibleIndent(lnum)
if a:lnum == 1 || !prevnonblank(a:lnum-1)
return 0
endif
let prevlnum = prevnonblank(a:lnum - 1)
let maintain = indent(prevlnum)
let increase = maintain + &sw
let line = getline(prevlnum)
if line =~ s:array_entry
if line =~ s:named_module_entry
return increase
else
return maintain
endif
elseif line =~ s:dictionary_entry
return increase
elseif line =~ s:key_value
if line =~ s:scalar_value
return increase
else
return maintain
endif
else
return maintain
endif
endfunction
let &cpo = s:save_cpo
endif

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
" Vim indent file " Vim indent file
" Language: git config file " Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2012 April 7 " Last Change: 2013 May 30
if exists("b:did_indent") if exists("b:did_indent")
finish finish

90
syntax/ansible.vim Normal file
View File

@@ -0,0 +1,90 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
" Vim syntax file
" Language: Ansible YAML/Jinja templates
" Maintainer: Dave Honneffer <pearofducks@gmail.com>
" Last Change: 2015.09.06
if exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'yaml'
endif
let b:current_syntax = ''
unlet b:current_syntax
runtime! syntax/yaml.vim
let b:current_syntax = ''
unlet b:current_syntax
syntax include @Yaml syntax/yaml.vim
let b:current_syntax = ''
unlet b:current_syntax
syntax include @Jinja syntax/jinja2.vim
" Jinja
" ================================
syn cluster jinjaSLSBlocks add=jinjaTagBlock,jinjaVarBlock,jinjaComment
" https://github.com/mitsuhiko/jinja2/blob/6b7c0c23/ext/Vim/jinja.vim
syn region jinjaTagBlock matchgroup=jinjaTagDelim start=/{%-\?/ end=/-\?%}/ containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment,@jinjaSLSBlocks
syn region jinjaVarBlock matchgroup=jinjaVarDelim start=/{{-\?/ end=/-\?}}/ containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment,@jinjaSLSBlocks
syn region jinjaComment matchgroup=jinjaCommentDelim start="{#" end="#}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString,@jinjaSLSBlocks
highlight link jinjaVariable Constant
highlight link jinjaVarDelim Delimiter
" YAML
" ================================
" Reset some YAML to plain styling
" the number 80 in Ansible isn't any more important than the word root
highlight link yamlInteger NONE
highlight link yamlBool NONE
highlight link yamlFlowString NONE
" but it does make sense we visualize quotes easily
highlight link yamlFlowStringDelimiter Delimiter
fun! s:attribute_highlight(attributes)
if a:attributes =~ 'a'
syn match ansible_attributes "\v\w+\=" containedin=yamlPlainScalar
else
syn match ansible_attributes "\v^\s*\w+\=" containedin=yamlPlainScalar
endif
if a:attributes =~ 'n'
highlight link ansible_attributes NONE
elseif a:attributes =~ 'd'
highlight link ansible_attributes Comment
else
highlight link ansible_attributes Structure
endif
endfun
if exists("g:ansible_attribute_highlight")
call s:attribute_highlight(g:ansible_attribute_highlight)
else
call s:attribute_highlight('ad')
endif
if exists("g:ansible_name_highlight")
syn keyword ansible_name name containedin=yamlBlockMappingKey contained
if g:ansible_name_highlight =~ 'd'
highlight link ansible_name Comment
else
highlight link ansible_name Underlined
endif
endif
syn keyword ansible_debug_keywords debug containedin=yamlBlockMappingKey contained
highlight link ansible_debug_keywords Debug
syn match ansible_with_keywords "\vwith_.+" containedin=yamlBlockMappingKey contained
syn keyword ansible_special_keywords include until retries delay when only_if become become_user block rescue always notify containedin=yamlBlockMappingKey contained
highlight link ansible_with_keywords Statement
highlight link ansible_special_keywords Statement
let b:current_syntax = "ansible"
endif

35
syntax/ansible_hosts.vim Normal file
View File

@@ -0,0 +1,35 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
" Vim syntax file
" Language: Ansible hosts files
" Maintainer: Dave Honneffer <pearofducks@gmail.com>
" Last Change: 2015.09.23
if exists("b:current_syntax")
finish
endif
syn case ignore
syn match hostsFirstWord "\v^\S+"
syn match hostsAttributes "\v\S*\="
syn region hostsHeader start="\v^\s*\[" end="\v\]"
syn keyword hostsHeaderSpecials children vars containedin=hostsHeader contained
syn match hostsComment "\v^[#;].*$"
highlight link hostsFirstWord Label
highlight link hostsHeader Define
highlight link hostsComment Comment
highlight link hostsHeaderSpecials Identifier
highlight link hostsAttributes Structure
if exists("g:ansible_attribute_highlight")
if g:ansible_attribute_highlight =~ 'n'
highlight link hostsAttributes NONE
elseif g:ansible_attribute_highlight =~ 'd'
highlight link hostsAttributes Comment
endif
endif
let b:current_syntax = "ansible_hosts"
endif

View File

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

134
syntax/cql.vim Normal file
View File

@@ -0,0 +1,134 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cql') == -1
" Vim syntax file
" Language: cql
" Maintainer: Eric Lubow <eric@lubow.org
" Filenames: *.cql
" URL: https://github.com/elubow/cql-vim
" Note:
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Always ignore case
syn case ignore
" General keywords which don't fall into other categories
syn keyword cqlKeyword apply and batch
syn keyword cqlKeyword column columnfamily create delete drop
syn keyword cqlKeyword family first from
syn keyword cqlKeyword in index insert into
syn keyword cqlKeyword limit key keyspace
syn keyword cqlKeyword on or primary reversed
syn keyword cqlKeyword select set truncate
syn keyword cqlKeyword where with update use using values
" CQL 3 additions
syn keyword cqlKeyword table order by type if exists not frozen
" Column family/table options
syn keyword cqlKeyword comparator key_cache_size row_cache_size read_repair_chance
syn keyword cqlKeyword gc_grace_seconds default_validation min_compaction_threshold
syn keyword cqlKeyword max_compaction_threshold row_cache_save_period_in_seconds
syn keyword cqlKeyword key_cache_save_period_in_seconds memtable_flush_after_mins
syn keyword cqlKeyword memtable_throughput_in_mb memtable_operations_in_millions replication_on_write
syn keyword cqlKeyword replication_on_write default_validation_class key_validation_class
syn keyword cqlKeyword rows_cached row_cache_save_period row_cache_keys_to_save keys_cached
syn keyword cqlKeyword column_type key_cache_save_period gc_grace replicate_on_write
syn keyword cqlKeyword row_cache_provider compaction_strategy column_metadata
syn keyword cqlKeyword column_name validation_class subcomparator replication
syn keyword cqlKeyword index_name index_type caching dclocal_read_repair_chance
syn keyword cqlKeyword bloom_filter_fp_chance populate_io_cache_on_flush compaction
syn keyword cqlKeyword compression class sstable_compression
" CQL 3 additions
syn keyword cqlKeyword clustering
" Keyspace options
syn keyword cqlKeyword placement_strategy strategy_options durable_writes replication_factor
syn keyword cqlKeyword strategy_class
" Hadoop keywords
syn keyword cqlKeyword currentJobTracker
" TODO Fix to use regions properly
syn keyword cqlColType standard super
syn region cqlColumnType start="column_type\W" end="\"'" contains=cqlColType
" TODO Fix to use regions properly
syn keyword cqlPStrategy simplestrategy localstrategy networktopologystrategy
syn region cqlPlacementStrategy start="placement_strategy\W" end="\"'" contains=cqlPlaceStrategy
" Comments highlight the word as a keyword and comment as blue
syn region cqlKeyword start=/comment\s*=\s*'/ end=/'/ contains=cqlComment
syn region cqlKeyword start=/comment\s*=\s*"/ end=/"/ contains=cqlComment
syn region cqlComment start="/\*" end="\*/" contains=cqlComment
syn match cqlComment /'\zs\%(\\.\|[^\\']\)*\ze'/ contained
syn match cqlComment /"\zs\%(\\.\|[^\\"]\)*\ze"/ contained
syn match cqlComment "--.*$" contains=cqlComment
syn match cqlComment "//.*$" contains=cqlComment
syn match cqlComment "/\*\*/"
" Special values
syn keyword cqlSpecial false null true
" TODO Add ability to include entire Java class name for compaction strategies
syn keyword cqlType SizeTieredCompactionStrategy LeveledCompactionStrategy
" Variable Types
syn keyword cqlType bytea ascii text varchar uuid varint int bigint
syn keyword cqlType bytestype utf8type timeuuidtype timeuuid timestamp
syn keyword cqlType blob boolean counter decimal double float
syn keyword cqlType serializingcacheprovider
syn keyword cqlType set list map tuple
" Consistency Levels
syn region cqlType start="consistency" end="zero"
syn region cqlType start="consistency" end="one"
syn region cqlType start="consistency" end="quorum"
syn region cqlType start="consistency" end="all"
syn region cqlType start="consistency" end="local_quorum"
syn region cqlType start="consistency" end="each_quorum"
" Numbers and hexidecimal values
syn match cqlNumber "-\=\<[0-9]*\>"
syn match cqlNumber "-\=\<[0-9]*\.[0-9]*\>"
syn match cqlNumber "-\=\<[0-9][0-9]*e[+-]\=[0-9]*\>"
syn match cqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>"
syn match cqlNumber "\<0x[abcdefABCDEF0-9]*\>"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_cql_syn_inits")
if version < 508
let did_cql_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink cqlKeyword Statement
HiLink cqlSpecial Special
HiLink cqlString String
HiLink cqlNumber Number
HiLink cqlVariable Identifier
HiLink cqlComment Comment
HiLink cqlType Type
HiLink cqlOperator Statement
HiLink cqlConsistency Statement
HiLink cqlColType Type
HiLink cqlPStrategy Type
delcommand HiLink
endif
let b:current_syntax = "cql"
endif

View File

@@ -46,7 +46,7 @@ syntax keyword dartTodo contained TODO FIXME XXX
syntax region dartComment start="/\*" end="\*/" contains=dartTodo,dartDocLink,@Spell syntax region dartComment start="/\*" end="\*/" contains=dartTodo,dartDocLink,@Spell
syntax match dartLineComment "//.*" contains=dartTodo,@Spell syntax match dartLineComment "//.*" contains=dartTodo,@Spell
syntax match dartLineDocComment "///.*" contains=dartTodo,dartDocLink,@Spell syntax match dartLineDocComment "///.*" contains=dartTodo,dartDocLink,@Spell
syntax region dartDocLink contained start=+\[+ end=+\]+ syntax region dartDocLink oneline contained start=+\[+ end=+\]+
" Strings " Strings
syntax region dartString start=+\z(["']\)+ end=+\z1+ contains=@Spell,dartInterpolation,dartSpecialChar syntax region dartString start=+\z(["']\)+ end=+\z1+ contains=@Spell,dartInterpolation,dartSpecialChar

View File

@@ -14,12 +14,12 @@ syn sync minlines=2000
syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments
syn match elixirComment '#.*' contains=elixirTodo syn match elixirComment '#.*' contains=elixirTodo,@Spell
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
syn keyword elixirKeyword case when cond for if unless try receive spawn send syn keyword elixirKeyword case when cond for if unless try receive send
syn keyword elixirKeyword exit raise throw after rescue catch else do end syn keyword elixirKeyword exit raise throw after rescue catch else do end
syn keyword elixirKeyword quote unquote super syn keyword elixirKeyword quote unquote super spawn spawn_link spawn_monitor
" Functions used on guards " Functions used on guards
syn keyword elixirKeyword contained is_atom is_binary is_bitstring is_boolean syn keyword elixirKeyword contained is_atom is_binary is_bitstring is_boolean
@@ -87,8 +87,8 @@ syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{
syn region elixirDocStringStart matchgroup=elixirDocString start=+"""+ end=+$+ oneline contains=ALLBUT,@elixirNotTop syn region elixirDocStringStart matchgroup=elixirDocString start=+"""+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
syn region elixirDocStringStart matchgroup=elixirDocString start=+'''+ end=+$+ oneline contains=ALLBUT,@elixirNotTop syn region elixirDocStringStart matchgroup=elixirDocString start=+'''+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
syn region elixirDocString start=+\z("""\)+ end=+^\s*\zs\z1+ contains=elixirDocStringStart,elixirTodo,elixirInterpolation fold keepend syn region elixirDocString start=+\z("""\)+ end=+^\s*\zs\z1+ contains=elixirDocStringStart,elixirTodo,elixirInterpolation,@Spell fold keepend
syn region elixirDocString start=+\z('''\)+ end=+^\s*\zs\z1+ contains=elixirDocStringStart,elixirTodo,elixirInterpolation fold keepend syn region elixirDocString start=+\z('''\)+ end=+^\s*\zs\z1+ contains=elixirDocStringStart,elixirTodo,elixirInterpolation,@Spell fold keepend
syn match elixirAtomInterpolated ':\("\)\@=' contains=elixirString syn match elixirAtomInterpolated ':\("\)\@=' contains=elixirString
syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|0[0-7]{0,2}[0-7]\@!\>\|[^x0MC]\)\|(\\[MC]-)+\w\|[^\s\\]\)" syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|0[0-7]{0,2}[0-7]\@!\>\|[^x0MC]\)\|(\\[MC]-)+\w\|[^\s\\]\)"

View File

@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
" Language: git commit file " Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.git/COMMIT_EDITMSG " Filenames: *.git/COMMIT_EDITMSG
" Last Change: 2012 April 7 " Last Change: 2013 May 30
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish

View File

@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
" Language: git rebase --interactive " Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: git-rebase-todo " Filenames: git-rebase-todo
" Last Change: 2015 November 21 " Last Change: 2013 May 30
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
@@ -34,6 +34,7 @@ hi def link gitrebaseEdit PreProc
hi def link gitrebaseSquash Type hi def link gitrebaseSquash Type
hi def link gitrebaseFixup Special hi def link gitrebaseFixup Special
hi def link gitrebaseExec Function hi def link gitrebaseExec Function
hi def link gitrebaseDrop Comment
hi def link gitrebaseSummary String hi def link gitrebaseSummary String
hi def link gitrebaseComment Comment hi def link gitrebaseComment Comment
hi def link gitrebaseSquashError Error hi def link gitrebaseSquashError Error

139
syntax/jinja2.vim Normal file
View File

@@ -0,0 +1,139 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
" Vim syntax file
" Language: Jinja template
" Maintainer: Armin Ronacher <armin.ronacher@active-4.com>
" Last Change: 2008 May 9
" Version: 1.1
"
" Known Bugs:
" because of odd limitations dicts and the modulo operator
" appear wrong in the template.
"
" Changes:
"
" 2008 May 9: Added support for Jinja2 changes (new keyword rules)
" .vimrc variable to disable html highlighting
if !exists('g:jinja_syntax_html')
let g:jinja_syntax_html=1
endif
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'jinja'
endif
" Pull in the HTML syntax.
if g:jinja_syntax_html
if version < 600
so <sfile>:p:h/html.vim
else
runtime! syntax/html.vim
unlet b:current_syntax
endif
endif
syntax case match
" Jinja template built-in tags and parameters (without filter, macro, is and raw, they
" have special threatment)
syn keyword jinjaStatement containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained and if else in not or recursive as import
syn keyword jinjaStatement containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained is filter skipwhite nextgroup=jinjaFilter
syn keyword jinjaStatement containedin=jinjaTagBlock contained macro skipwhite nextgroup=jinjaFunction
syn keyword jinjaStatement containedin=jinjaTagBlock contained block skipwhite nextgroup=jinjaBlockName
" Variable Names
syn match jinjaVariable containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[a-zA-Z_][a-zA-Z0-9_]*/
syn keyword jinjaSpecial containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained false true none False True None loop super caller varargs kwargs
" Filters
syn match jinjaOperator "|" containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained skipwhite nextgroup=jinjaFilter
syn match jinjaFilter contained /[a-zA-Z_][a-zA-Z0-9_]*/
syn match jinjaFunction contained /[a-zA-Z_][a-zA-Z0-9_]*/
syn match jinjaBlockName contained /[a-zA-Z_][a-zA-Z0-9_]*/
" Jinja template constants
syn region jinjaString containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained start=/"/ skip=/\(\\\)\@<!\(\(\\\\\)\@>\)*\\"/ end=/"/
syn region jinjaString containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained start=/'/ skip=/\(\\\)\@<!\(\(\\\\\)\@>\)*\\'/ end=/'/
syn match jinjaNumber containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[0-9]\+\(\.[0-9]\+\)\?/
" Operators
syn match jinjaOperator containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[+\-*\/<>=!,:]/
syn match jinjaPunctuation containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[()\[\]]/
syn match jinjaOperator containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /\./ nextgroup=jinjaAttribute
syn match jinjaAttribute contained /[a-zA-Z_][a-zA-Z0-9_]*/
" Jinja template tag and variable blocks
syn region jinjaNested matchgroup=jinjaOperator start="(" end=")" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained
syn region jinjaNested matchgroup=jinjaOperator start="\[" end="\]" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained
syn region jinjaNested matchgroup=jinjaOperator start="{" end="}" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained
syn region jinjaTagBlock matchgroup=jinjaTagDelim start=/{%-\?/ end=/-\?%}/ containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment
syn region jinjaVarBlock matchgroup=jinjaVarDelim start=/{{-\?/ end=/-\?}}/ containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment
" Jinja template 'raw' tag
syn region jinjaRaw matchgroup=jinjaRawDelim start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString,jinjaComment
" Jinja comments
syn region jinjaComment matchgroup=jinjaCommentDelim start="{#" end="#}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString
" Block start keywords. A bit tricker. We only highlight at the start of a
" tag block and only if the name is not followed by a comma or equals sign
" which usually means that we have to deal with an assignment.
syn match jinjaStatement containedin=jinjaTagBlock contained /\({%-\?\s*\)\@<=\<[a-zA-Z_][a-zA-Z0-9_]*\>\(\s*[,=]\)\@!/
" and context modifiers
syn match jinjaStatement containedin=jinjaTagBlock contained /\<with\(out\)\?\s\+context\>/
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_jinja_syn_inits")
if version < 508
let did_jinja_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink jinjaPunctuation jinjaOperator
HiLink jinjaAttribute jinjaVariable
HiLink jinjaFunction jinjaFilter
HiLink jinjaTagDelim jinjaTagBlock
HiLink jinjaVarDelim jinjaVarBlock
HiLink jinjaCommentDelim jinjaComment
HiLink jinjaRawDelim jinja
HiLink jinjaSpecial Special
HiLink jinjaOperator Normal
HiLink jinjaRaw Normal
HiLink jinjaTagBlock PreProc
HiLink jinjaVarBlock PreProc
HiLink jinjaStatement Statement
HiLink jinjaFilter Function
HiLink jinjaBlockName Function
HiLink jinjaVariable Identifier
HiLink jinjaString Constant
HiLink jinjaNumber Constant
HiLink jinjaComment Comment
delcommand HiLink
endif
let b:current_syntax = "jinja"
if main_syntax == 'jinja'
unlet main_syntax
endif
endif

View File

@@ -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: 1 October 2015 " Latest Revision: 23 December 2015
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
@@ -15,7 +15,7 @@ syn keyword ktStatement break continue return
syn keyword ktConditional if else when syn keyword ktConditional if else when
syn keyword ktRepeat do for while syn keyword ktRepeat do for while
syn keyword ktOperator as in is by syn keyword ktOperator as in is by
syn keyword ktKeyword get set out super this This where syn keyword ktKeyword get set out super this where
syn keyword ktException try catch finally throw syn keyword ktException try catch finally throw
syn keyword ktInclude import package syn keyword ktInclude import package
@@ -23,7 +23,8 @@ 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 fun val var constructor init
syn keyword ktTypedef typealias
syn keyword ktReservedKeyword async typealias typeof yield
syn keyword ktBoolean true false syn keyword ktBoolean true false
syn keyword ktConstant null syn keyword ktConstant null
@@ -67,6 +68,7 @@ hi link ktRepeat Repeat
hi link ktOperator Operator hi link ktOperator Operator
hi link ktKeyword Keyword hi link ktKeyword Keyword
hi link ktException Exception hi link ktException Exception
hi link ktReservedKeyword Error
hi link ktInclude Include hi link ktInclude Include

131
syntax/nix.vim Normal file
View File

@@ -0,0 +1,131 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1
"
" Syntax file for Nix
"
" TODO:
" Emphasize :
" Deemphasize ;
" Consistent ()
" rec (red?)
if exists("b:current_syntax")
finish
endif
" Operators
syn match nixOperator "\V++"
syn match nixOperator "\V+"
syn match nixOperator "\V!"
syn match nixOperator "\V=="
syn match nixOperator "\V!="
syn match nixOperator "\V&&"
syn match nixOperator "\V||"
syn match nixOperator "\V->"
syn match nixOperator "\V-"
syn match nixOperator "\V*"
syn match nixOperator "\V/"
syn match nixOperator "\V>"
syn match nixOperator "\V<"
" Keywords
syn keyword nixKeyword let in or assert inherit null with rec
syn keyword nixConditional if else then
syn keyword nixBoolean true false
" Builtins
syn keyword nixBuiltin builtins abort add attrNames attrValues
\ baseNameOf compareVersions concatLists currentSystem deepSeq
\ derivation dirOf div elem elemAt filter filterSource fromJSON
\ getAttr getEnv hasAttr hashString head import intersectAttrs
\ isAttrs isList isFunction isString isInt isBool isNull length
\ lessThan listToAttrs map mul parseDrvNames pathExists readDir
\ readFile removeAttrs seq stringLength sub substring tail throw
\ toFile toJSON toPath toString toXML trace typeOf tryEval
syn match nixpkgs "<nixpkgs>"
syn match nixSpecialOper "\V@\|;\|,\|?\|..."
" Attribute Lists
"syn match nixBrace "\v[(){}\[\]]|rec\s*\{"
syn region nixSet matchgroup=nixBraces start="{" end="}" contains=ALL
syn region nixRecSet matchgroup=nixBraces start="rec\s*{" end="}" contains=ALL
syn region nixList matchgroup=nixBraces start="\[" end="\]" contains=ALLBUT,nixAttr
syn match nixAttr "\v[0-9A-Za-z\-\_]+\ze\s*\=" contained
syn match nixInteger "\v<\d+>"
" Functions
syn match nixFuncArg "\v\zs\w+\ze\s*:"
" TODO: Exclude ; and other illegal characters
syn match nixPath "\v\S*/\S+|\S+/\S*"
" This operator is placed after nixPath to override nixPath's highlighting
syn match nixOperator "\V//"
" Strings
syn match nixStringIndentedEscapes +'''\|''\${\|''\\n\|''\\r\|''\\t+
syn match nixStringEscapes +\\"\|\\\${\|\\n\|\\r\|\\t\|\\\\+
syn region nixStringIndented
\ start=+''+
\ skip=+'''+
\ end=+''+
\ contains=nixAntiquotation,nixStringIndentedEscapes
syn region nixString
\ start=+"+
\ skip=+\\"+
\ end=+"+
\ contains=nixAntiquotation,nixStringEscapes
" If this contains nixBrace, it ignores its own closing brace and syntax gets
" thrown way off contains=ALLBUT,nixBrace
syn region nixAntiquotation start=+\${+ end=+}+ contains=nixAntiQuotation
" Comments
syn region nixMultiLineComment start=+/\*+ skip=+\\"+ end=+\*/+ contains=nixTodos
syn match nixEndOfLineComment "#.*$" contains=nixTodos
syntax keyword nixTodos TODO XXX FIXME NOTE TODOS contained
" Special (Delimiter
hi def link nixBraces Delimiter
hi def link nixpkgs Special
hi def link nixSpecialOper Special
hi def link nixStringIndentedEscapes SpecialChar
hi def link nixStringEscapes SpecialChar
hi def link nixBuiltin Special
hi def link nixOperator Operator
" Constants
hi def link nixBoolean Boolean
hi def link nixInteger Number
hi def link nixString String
hi def link nixStringIndented String
" Comments
hi def link nixMultiLineComment Comment
hi def link nixEndOfLineComment Comment
" Identifiers
hi def link nixConditional Conditional
hi def link nixKeyword Keyword
hi def link nixOperator Operator
hi def link nixException Exception
hi def link nixAttr Identifier
hi def link nixFuncArg Identifier
" PreProc
hi def link nixAntiquotation Macro
" Underlined (html links)
hi def link nixPath Underlined
" Error
syn sync maxlines=20000
syn sync minlines=50000
let b:current_syntax = 'nix'
endif

View File

@@ -244,18 +244,18 @@ syn region perlAnglesDQ start=+<+ end=+>+ extend contained contains=perlAnglesD
" Simple version of searches and matches " Simple version of searches and matches
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgc]*+ contains=@perlInterpMatch keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgcn]*+ contains=@perlInterpMatch keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[msixpodualgc]*+ contains=@perlInterpMatch keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[msixpodualgcn]*+ contains=@perlInterpMatch keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[msixpodualgc]*+ contains=@perlInterpSQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[msixpodualgcn]*+ contains=@perlInterpSQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[msixpodualgcn]*+ contains=@perlInterpSlash keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[msixpodualgc]*+ contains=@perlInterpMatch,perlParensDQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[msixpodualgcn]*+ contains=@perlInterpMatch,perlParensDQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[msixpodualgc]*+ contains=@perlInterpMatch,perlBracesDQ extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[msixpodualgcn]*+ contains=@perlInterpMatch,perlBracesDQ extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[msixpodualgc]*+ contains=@perlInterpMatch,perlAnglesDQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[msixpodualgcn]*+ contains=@perlInterpMatch,perlAnglesDQ keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][msixpodualgc]*+ contains=@perlInterpMatch,perlBracketsDQ keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][msixpodualgcn]*+ contains=@perlInterpMatch,perlBracketsDQ keepend extend
" Below some hacks to recognise the // variant. This is virtually impossible to catch in all " Below some hacks to recognise the // variant. This is virtually impossible to catch in all
" cases as the / is used in so many other ways, but these should be the most obvious ones. " cases as the / is used in so many other ways, but these should be the most obvious ones.
syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash extend syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[msixpodualgcn]*+ contains=@perlInterpSlash extend
" Substitutions " Substitutions
@@ -268,12 +268,12 @@ syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*<+ end=+>+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*<+ end=+>+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*\[+ end=+\]+ contains=@perlInterpMatch,perlBracketsDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*\[+ end=+\]+ contains=@perlInterpMatch,perlBracketsDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[msixpodualgcer]*+ keepend contained contains=@perlInterpDQ extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[msixpodualgcern]*+ keepend contained contains=@perlInterpDQ extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlParensDQ keepend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[msixpodualgcern]*+ contained contains=@perlInterpDQ,perlParensDQ keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][msixpodualgcern]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend extend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[msixpodualgcern]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend extend extend
syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend extend syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[msixpodualgcern]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend extend
syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcer]*+ contained contains=@perlInterpSQ keepend extend syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcern]*+ contained contains=@perlInterpSQ keepend extend
" Translations " Translations
" perlMatch is the first part, perlTranslation* is the second, translator part. " perlMatch is the first part, perlTranslation* is the second, translator part.

View File

@@ -179,7 +179,7 @@ hi link scalaTypeOperator Keyword
hi link scalaTypeAnnotationParameter Function hi link scalaTypeAnnotationParameter Function
syn match scalaShebang "\%^#!.*" display syn match scalaShebang "\%^#!.*" display
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@scalaHtml,@Spell keepend syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@scalaHtml,@Spell keepend fold
syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
syn match scalaParameterAnnotation "@param" nextgroup=scalaParamAnnotationValue skipwhite contained syn match scalaParameterAnnotation "@param" nextgroup=scalaParamAnnotationValue skipwhite contained
syn match scalaParamAnnotationValue /[`_A-Za-z0-9$]\+/ contained syn match scalaParamAnnotationValue /[`_A-Za-z0-9$]\+/ contained