mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fd5c11a20 | ||
|
|
679ccf0303 | ||
|
|
eacf785f5a | ||
|
|
83bd298476 | ||
|
|
415261dd1f | ||
|
|
4d18a5e5dd |
14
README.md
14
README.md
@@ -10,7 +10,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.
|
||||
|
||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->132<!--/Package Count--> packages it consists of.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->134<!--/Package Count--> packages it consists of.
|
||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
||||
@@ -107,13 +107,12 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [latex](https://github.com/LaTeX-Box-Team/LaTeX-Box) (syntax, indent, ftplugin)
|
||||
- [less](https://github.com/groenewege/vim-less) (syntax, indent, ftplugin)
|
||||
- [lilypond](https://github.com/anowlcalledjosh/vim-lilypond) (syntax, indent, compiler, ftplugin)
|
||||
- [liquid](https://github.com/tpope/vim-liquid) (syntax, indent, ftplugin)
|
||||
- [livescript](https://github.com/gkz/vim-ls) (syntax, indent, compiler, ftplugin)
|
||||
- [llvm](https://github.com/rhysd/vim-llvm) (syntax, indent, ftplugin)
|
||||
- [lua](https://github.com/tbastos/vim-lua) (syntax, indent)
|
||||
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin)
|
||||
- [markdown](https://github.com/plasticboy/vim-markdown) (syntax, indent)
|
||||
- [mathematica](https://github.com/rsmenon/vim-mathematica) (syntax, ftplugin)
|
||||
- [mathematica](https://github.com/voldikss/vim-mma) (syntax, autoload, ftplugin)
|
||||
- [mdx](https://github.com/jxnblk/vim-mdx-js) (syntax)
|
||||
- [meson](https://github.com/mesonbuild/meson) (syntax, indent, ftplugin)
|
||||
- [moonscript](https://github.com/leafo/moonscript-vim) (syntax, indent, ftplugin)
|
||||
@@ -125,7 +124,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [octave](https://github.com/vim-scripts/octave.vim--) (syntax)
|
||||
- [opencl](https://github.com/petRUShka/vim-opencl) (syntax, indent, ftplugin)
|
||||
- [perl](https://github.com/vim-perl/vim-perl) (syntax, indent, ftplugin)
|
||||
- [pgsql](https://github.com/exu/pgsql.vim) (syntax)
|
||||
- [pgsql](https://github.com/lifepillar/pgsql.vim) (syntax, indent)
|
||||
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
|
||||
- [plantuml](https://github.com/aklt/plantuml-syntax) (syntax, indent, ftplugin)
|
||||
- [pony](https://github.com/jakwings/vim-pony) (syntax, indent, autoload, ftplugin)
|
||||
@@ -140,7 +139,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [qmake](https://github.com/artoj/qmake-syntax-vim) (syntax)
|
||||
- [qml](https://github.com/peterhoeg/vim-qml) (syntax, indent, ftplugin)
|
||||
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)
|
||||
- [racket](https://github.com/wlangstroth/vim-racket) (syntax, indent, autoload, ftplugin)
|
||||
- [racket](https://github.com/wlangstroth/vim-racket) (syntax, indent, ftplugin)
|
||||
- [ragel](https://github.com/jneen/ragel.vim) (syntax)
|
||||
- [raml](https://github.com/IN3D/vim-raml) (syntax, ftplugin)
|
||||
- [reason](https://github.com/reasonml-editor/vim-reason-plus) (syntax, indent)
|
||||
@@ -150,12 +149,14 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [rust](https://github.com/rust-lang/rust.vim) (syntax, indent, compiler, autoload, ftplugin)
|
||||
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax)
|
||||
- [scala](https://github.com/derekwyatt/vim-scala) (syntax, indent, compiler, ftplugin)
|
||||
- [scss](https://github.com/cakebaker/scss-syntax.vim) (syntax, autoload, ftplugin)
|
||||
- [scss](https://github.com/cakebaker/scss-syntax.vim) (syntax, indent, ftplugin)
|
||||
- [slim](https://github.com/slim-template/vim-slim) (syntax, indent, ftplugin)
|
||||
- [slime](https://github.com/slime-lang/vim-slime-syntax) (syntax, indent)
|
||||
- [smt2](https://github.com/bohlender/vim-smt2) (syntax, autoload, ftplugin)
|
||||
- [solidity](https://github.com/tomlion/vim-solidity) (syntax, indent, ftplugin)
|
||||
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin)
|
||||
- [svg-indent](https://github.com/jasonshell/vim-svg-indent) (indent)
|
||||
- [svg](https://github.com/vim-scripts/svg.vim) (syntax)
|
||||
- [swift](https://github.com/keith/swift.vim) (syntax, indent, ftplugin)
|
||||
- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (syntax)
|
||||
- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (syntax)
|
||||
@@ -173,6 +174,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [vifm](https://github.com/vifm/vifm.vim) (syntax, autoload, ftplugin)
|
||||
- [vm](https://github.com/lepture/vim-velocity) (syntax, indent)
|
||||
- [vue](https://github.com/posva/vim-vue) (syntax, indent, ftplugin)
|
||||
- [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) (syntax)
|
||||
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
|
||||
- [xml](https://github.com/amadeus/vim-xml) (syntax)
|
||||
- [yaml](https://github.com/stephpy/vim-yaml) (syntax, ftplugin)
|
||||
|
||||
1469
after/syntax/mma.vim
1469
after/syntax/mma.vim
File diff suppressed because it is too large
Load Diff
7437
autoload/coc/source/mma.vim
Normal file
7437
autoload/coc/source/mma.vim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -136,7 +136,13 @@ function! elm#util#GoToModule(name)
|
||||
endfunction
|
||||
|
||||
function! s:findLocalModule(rel_path, root)
|
||||
let l:package_json = a:root . '/elm-package.json'
|
||||
let l:old_match = findfile('elm-package.json', a:root . ';')
|
||||
let l:new_match = findfile('elm.json', a:root . ';')
|
||||
if !empty(l:new_match)
|
||||
let l:package_json = l:new_match
|
||||
elseif !empty(l:old_match)
|
||||
let l:package_json = l:old_match
|
||||
endif
|
||||
if exists('*json_decode')
|
||||
let l:package = json_decode(readfile(l:package_json))
|
||||
let l:source_roots = l:package['source-directories']
|
||||
|
||||
@@ -52,7 +52,7 @@ function! go#config#TermMode() abort
|
||||
endfunction
|
||||
|
||||
function! go#config#TermEnabled() abort
|
||||
return get(g:, 'go_term_enabled', 0)
|
||||
return has('nvim') && get(g:, 'go_term_enabled', 0)
|
||||
endfunction
|
||||
|
||||
function! go#config#SetTermEnabled(value) abort
|
||||
@@ -214,6 +214,10 @@ function! go#config#DebugCommands() abort
|
||||
return g:go_debug_commands
|
||||
endfunction
|
||||
|
||||
function! go#config#DebugLogOutput() abort
|
||||
return get(g:, 'go_debug_log_output', 'debugger, rpc')
|
||||
endfunction
|
||||
|
||||
function! go#config#LspLog() abort
|
||||
" make sure g:go_lsp_log is set so that it can be added to easily.
|
||||
let g:go_lsp_log = get(g:, 'go_lsp_log', [])
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'racket') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("g:raco_command")
|
||||
let g:raco_command = system("which raco")
|
||||
endif
|
||||
@@ -149,6 +149,7 @@ function! s:RunRustfmt(command, tmpname, fail_silently)
|
||||
|
||||
call delete(l:stderr_tmpname)
|
||||
|
||||
let l:open_lwindow = 0
|
||||
if v:shell_error == 0
|
||||
" remove undo point caused via BufWritePre
|
||||
try | silent undojoin | catch | endtry
|
||||
@@ -169,7 +170,7 @@ function! s:RunRustfmt(command, tmpname, fail_silently)
|
||||
if s:got_fmt_error
|
||||
let s:got_fmt_error = 0
|
||||
call setloclist(0, [])
|
||||
lwindow
|
||||
let l:open_lwindow = 1
|
||||
endif
|
||||
elseif g:rustfmt_fail_silently == 0 && a:fail_silently == 0
|
||||
" otherwise get the errors and put them in the location list
|
||||
@@ -201,7 +202,7 @@ function! s:RunRustfmt(command, tmpname, fail_silently)
|
||||
endif
|
||||
|
||||
let s:got_fmt_error = 1
|
||||
lwindow
|
||||
let l:open_lwindow = 1
|
||||
endif
|
||||
|
||||
" Restore the current directory if needed
|
||||
@@ -213,6 +214,11 @@ function! s:RunRustfmt(command, tmpname, fail_silently)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Open lwindow after we have changed back to the previous directory
|
||||
if l:open_lwindow == 1
|
||||
lwindow
|
||||
endif
|
||||
|
||||
silent! loadview
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'scss') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" usage:
|
||||
" set indentexpr=scss_indent#GetIndent(v:lnum)
|
||||
fun! scss_indent#GetIndent(lnum)
|
||||
" { -> increase indent
|
||||
" } -> decrease indent
|
||||
if a:lnum == 1
|
||||
" start at 0 indentation
|
||||
return 0
|
||||
endif
|
||||
|
||||
" try to find last line ending with { or }
|
||||
" ignoring // comments
|
||||
let regex = '\([{}]\)\%(\/\/.*\)\?$'
|
||||
let nr = search(regex, 'bnW')
|
||||
if nr > 0
|
||||
let last = indent(nr)
|
||||
let m = matchlist(getline(nr), regex)
|
||||
let m_curr = matchlist(getline(a:lnum), regex)
|
||||
echoe string(m).string(m_curr)
|
||||
if !empty(m_curr) && m_curr[1] == '}' && m[1] == '{'
|
||||
" last was open, current is close, use same indent
|
||||
return last
|
||||
elseif !empty(m_curr) && m_curr[1] == '}' && m[1] == '}'
|
||||
" } line and last line was }: decrease
|
||||
return last - &sw
|
||||
endif
|
||||
if m[1] == '{'
|
||||
" line after {: increase indent
|
||||
return last + &sw
|
||||
else
|
||||
" line after } or { - same indent
|
||||
return last
|
||||
endif
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfun
|
||||
8
build
8
build
@@ -214,14 +214,13 @@ PACKS="
|
||||
kotlin:udalov/kotlin-vim
|
||||
latex:LaTeX-Box-Team/LaTeX-Box
|
||||
less:groenewege/vim-less:_NOAFTER
|
||||
liquid:tpope/vim-liquid
|
||||
lilypond:anowlcalledjosh/vim-lilypond
|
||||
livescript:gkz/vim-ls
|
||||
llvm:rhysd/vim-llvm
|
||||
lua:tbastos/vim-lua
|
||||
mako:sophacles/vim-bundle-mako
|
||||
markdown:plasticboy/vim-markdown:_SYNTAX
|
||||
mathematica:rsmenon/vim-mathematica
|
||||
mathematica:voldikss/vim-mma
|
||||
mdx:jxnblk/vim-mdx-js
|
||||
meson:mesonbuild/meson:_ALL:/data/syntax-highlighting/vim/
|
||||
moonscript:leafo/moonscript-vim
|
||||
@@ -233,7 +232,7 @@ PACKS="
|
||||
octave:vim-scripts/octave.vim--
|
||||
opencl:petRUShka/vim-opencl
|
||||
perl:vim-perl/vim-perl
|
||||
pgsql:exu/pgsql.vim
|
||||
pgsql:lifepillar/pgsql.vim
|
||||
php:StanAngeloff/php.vim
|
||||
plantuml:aklt/plantuml-syntax
|
||||
pony:jakwings/vim-pony
|
||||
@@ -264,6 +263,8 @@ PACKS="
|
||||
smt2:bohlender/vim-smt2
|
||||
solidity:tomlion/vim-solidity
|
||||
stylus:wavded/vim-stylus
|
||||
svg-indent:jasonshell/vim-svg-indent
|
||||
svg:vim-scripts/svg.vim
|
||||
swift:keith/swift.vim
|
||||
sxhkd:baskerville/vim-sxhkdrc
|
||||
systemd:wgwoods/vim-systemd-syntax
|
||||
@@ -281,6 +282,7 @@ PACKS="
|
||||
vifm:vifm/vifm.vim
|
||||
vm:lepture/vim-velocity
|
||||
vue:posva/vim-vue
|
||||
xdc:amal-khailtash/vim-xdc-syntax
|
||||
xml:amadeus/vim-xml
|
||||
xls:vim-scripts/XSLT-syntax
|
||||
yaml:stephpy/vim-yaml
|
||||
|
||||
@@ -661,28 +661,6 @@ autocmd BufNewFile,BufRead *.less setf less
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'liquid') == -1
|
||||
augroup filetypedetect
|
||||
" liquid, from liquid.vim in tpope/vim-liquid
|
||||
" Liquid
|
||||
au BufNewFile,BufRead *.liquid set ft=liquid
|
||||
|
||||
au BufNewFile,BufRead */_layouts/*.html,*/_includes/*.html set ft=liquid
|
||||
au BufNewFile,BufRead *.html,*.xml,*.textile
|
||||
\ if getline(1) == '---' | set ft=liquid | endif
|
||||
au BufNewFile,BufRead *.markdown,*.mkd,*.mkdn,*.md
|
||||
\ if getline(1) == '---' |
|
||||
\ let b:liquid_subtype = 'markdown' |
|
||||
\ set ft=liquid |
|
||||
\ endif
|
||||
|
||||
" Set subtype for Shopify alternate templates
|
||||
au BufNewFile,BufRead */templates/**.liquid,*/layout/**.liquid,*/snippets/**.liquid
|
||||
\ let b:liquid_subtype = 'html' |
|
||||
\ set ft=liquid |
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1
|
||||
augroup filetypedetect
|
||||
" lilypond, from lilypond.vim in anowlcalledjosh/vim-lilypond
|
||||
@@ -758,6 +736,14 @@ au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,i
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1
|
||||
augroup filetypedetect
|
||||
" mathematica, from mma.vim in voldikss/vim-mma
|
||||
autocmd BufNewFile,BufRead *.wl set filetype=mma
|
||||
autocmd BufNewFile,BufRead *.wls set filetype=mma
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mdx') == -1
|
||||
augroup filetypedetect
|
||||
" mdx, from mdx.vim in jxnblk/vim-mdx-js
|
||||
@@ -940,9 +926,8 @@ endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pgsql') == -1
|
||||
augroup filetypedetect
|
||||
" pgsql, from pgsql.vim in exu/pgsql.vim
|
||||
" postgreSQL
|
||||
au BufNewFile,BufRead *.pgsql setf pgsql
|
||||
" pgsql, from pgsql.vim in lifepillar/pgsql.vim
|
||||
au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | setfiletype sql
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1069,7 +1054,7 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1
|
||||
augroup filetypedetect
|
||||
" racket, from racket.vim in wlangstroth/vim-racket
|
||||
au BufRead,BufNewFile *.rkt,*.rktl set filetype=racket
|
||||
au BufRead,BufNewFile *.rkt,*.rktl setf racket
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1417,3 +1402,11 @@ au BufNewFile,BufRead *.vue,*.wpy setf vue
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xdc') == -1
|
||||
augroup filetypedetect
|
||||
" xdc, from xdc.vim in amal-khailtash/vim-xdc-syntax
|
||||
" xdc
|
||||
autocmd BufNewFile,BufRead *.xdc setfiletype xdc
|
||||
augroup end
|
||||
endif
|
||||
|
||||
|
||||
@@ -24,7 +24,10 @@ if !exists("b:eelixir_subtype")
|
||||
let b:eelixir_subtype = matchstr(&filetype,'^eex\.\zs\w\+')
|
||||
endif
|
||||
if b:eelixir_subtype == ''
|
||||
let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
|
||||
let b:eelixir_subtype = matchstr(&filetype,'^leex\.\zs\w\+')
|
||||
endif
|
||||
if b:eelixir_subtype == ''
|
||||
let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
|
||||
endif
|
||||
if b:eelixir_subtype == 'ex'
|
||||
let b:eelixir_subtype = 'elixir'
|
||||
|
||||
@@ -32,7 +32,7 @@ let &l:path =
|
||||
\ &g:path
|
||||
\ ], ',')
|
||||
setlocal includeexpr=elixir#util#get_filename(v:fname)
|
||||
setlocal suffixesadd=.ex,.exs,.eex,.erl,.xrl,.yrl,.hrl
|
||||
setlocal suffixesadd=.ex,.exs,.eex,.leex,.erl,.xrl,.yrl,.hrl
|
||||
|
||||
let &l:define = 'def\(macro\|guard\|delegate\)\=p\='
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'liquid') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin
|
||||
" Language: Liquid
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 May 21
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('g:liquid_default_subtype')
|
||||
let g:liquid_default_subtype = 'html'
|
||||
endif
|
||||
|
||||
if !exists('b:liquid_subtype')
|
||||
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
|
||||
let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+')
|
||||
if b:liquid_subtype == ''
|
||||
let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+')
|
||||
endif
|
||||
if b:liquid_subtype == ''
|
||||
let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$')
|
||||
endif
|
||||
if b:liquid_subtype == ''
|
||||
let b:liquid_subtype = g:liquid_default_subtype
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('b:liquid_subtype') && b:liquid_subtype != ''
|
||||
exe 'runtime! ftplugin/'.b:liquid_subtype.'.vim ftplugin/'.b:liquid_subtype.'_*.vim ftplugin/'.b:liquid_subtype.'/*.vim'
|
||||
else
|
||||
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= '|'
|
||||
else
|
||||
let b:undo_ftplugin = ''
|
||||
endif
|
||||
if exists('b:browsefilter')
|
||||
let b:browsefilter = "\n".b:browsefilter
|
||||
else
|
||||
let b:browsefilter = ''
|
||||
endif
|
||||
if exists('b:match_words')
|
||||
let b:match_words .= ','
|
||||
elseif exists('loaded_matchit')
|
||||
let b:match_words = ''
|
||||
endif
|
||||
|
||||
if has('gui_win32')
|
||||
let b:browsefilter="Liquid Files (*.liquid)\t*.liquid" . b:browsefilter
|
||||
endif
|
||||
|
||||
if exists('loaded_matchit')
|
||||
let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,<\(capture\|comment\|highlight\)\>:\<end\1\>'
|
||||
endif
|
||||
|
||||
setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %}
|
||||
|
||||
let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words'
|
||||
@@ -1,67 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'liquid') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language: Liquid
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 May 21
|
||||
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
|
||||
set indentexpr=
|
||||
if exists('b:liquid_subtype')
|
||||
exe 'runtime! indent/'.b:liquid_subtype.'.vim'
|
||||
else
|
||||
runtime! indent/html.vim
|
||||
endif
|
||||
unlet! b:did_indent
|
||||
|
||||
if &l:indentexpr == ''
|
||||
if &l:cindent
|
||||
let &l:indentexpr = 'cindent(v:lnum)'
|
||||
else
|
||||
let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))'
|
||||
endif
|
||||
endif
|
||||
let b:liquid_subtype_indentexpr = &l:indentexpr
|
||||
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetLiquidIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=endif,=endunless,=endifchanged,=endcase,=endfor,=endtablerow,=endcapture,=else,=elsif,=when,=empty
|
||||
|
||||
" Only define the function once.
|
||||
if exists('*GetLiquidIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
function! s:count(string,pattern)
|
||||
let string = substitute(a:string,'\C'.a:pattern,"\n",'g')
|
||||
return strlen(substitute(string,"[^\n]",'','g'))
|
||||
endfunction
|
||||
|
||||
function! GetLiquidIndent(...)
|
||||
if a:0 && a:1 == '.'
|
||||
let v:lnum = line('.')
|
||||
elseif a:0 && a:1 =~ '^\d'
|
||||
let v:lnum = a:1
|
||||
endif
|
||||
let vcol = col('.')
|
||||
call cursor(v:lnum,1)
|
||||
exe "let ind = ".b:liquid_subtype_indentexpr
|
||||
let lnum = prevnonblank(v:lnum-1)
|
||||
let line = getline(lnum)
|
||||
let cline = getline(v:lnum)
|
||||
let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
|
||||
let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+')
|
||||
let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
|
||||
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
|
||||
let ind += sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>')
|
||||
let ind -= sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>')
|
||||
let ind -= sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>')
|
||||
let ind -= sw * s:count(cline,'{%\s*end\w*$')
|
||||
return ind
|
||||
endfunction
|
||||
397
indent/pgsql.vim
Normal file
397
indent/pgsql.vim
Normal file
@@ -0,0 +1,397 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'pgsql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language: SQL
|
||||
" Author: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Maintainer: Lifepillar <lifepillar at lifepillar dot me>
|
||||
|
||||
" Notes:
|
||||
" Adapted from Vim's default indentation for SQL.
|
||||
"
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
let b:current_indent = "pgsql"
|
||||
|
||||
setlocal indentkeys-=0{
|
||||
setlocal indentkeys-=0}
|
||||
setlocal indentkeys-=:
|
||||
setlocal indentkeys-=0#
|
||||
setlocal indentkeys-=e
|
||||
|
||||
if has('patch-7.3.694') || (v:version == 703 && has('patch694'))
|
||||
fun! s:shiftwidth()
|
||||
return shiftwidth()
|
||||
endf
|
||||
|
||||
else
|
||||
fun! s:shiftwidth()
|
||||
return &sw
|
||||
endf
|
||||
endif
|
||||
|
||||
" This indicates formatting should take place when one of these
|
||||
" expressions is used. These expressions would normally be something
|
||||
" you would type at the BEGINNING of a line
|
||||
" SQL is generally case insensitive, so this files assumes that
|
||||
" These keywords are something that would trigger an indent LEFT, not
|
||||
" an indent right, since the SQLBlockStart is used for those keywords
|
||||
setlocal indentkeys+==~end,=~else,=~elseif,=~elsif,0=~when,0=)
|
||||
|
||||
" GetSQLIndent is executed whenever one of the expressions
|
||||
" in the indentkeys is typed
|
||||
setlocal indentexpr=GetSQLIndent()
|
||||
|
||||
" Only define the functions once.
|
||||
if exists("*GetSQLIndent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" List of all the statements that start a new block.
|
||||
" These are typically words that start a line.
|
||||
" IS is excluded, since it is difficult to determine when the
|
||||
" ending block is (especially for procedures/functions).
|
||||
let s:SQLBlockStart = '^\s*\%('.
|
||||
\ 'if\>.*\<then\|'.
|
||||
\ 'then\|'.
|
||||
\ 'else\|'.
|
||||
\ 'elseif\>.*\<then\|'.
|
||||
\ 'elsif\>.*\<then\|'.
|
||||
\ 'while\>.*\<loop\|'.
|
||||
\ 'for\>.*\<loop\|'.
|
||||
\ 'foreach\>.*\<loop\|'.
|
||||
\ 'loop\|'.
|
||||
\ 'do\|'.
|
||||
\ 'declare\|'.
|
||||
\ 'begin\|'.
|
||||
\ 'case\|'.
|
||||
\ 'when\|'.
|
||||
\ 'merge\|'.
|
||||
\ 'exception'.
|
||||
\ '\)\>'
|
||||
let s:SQLBlockEnd = '^\s*\(end\)\>'
|
||||
|
||||
" The indent level is also based on unmatched parentheses
|
||||
" If a line has an extra "(" increase the indent
|
||||
" If a line has an extra ")" decrease the indent
|
||||
function! s:CountUnbalancedParen( line, paren_to_check )
|
||||
let l = a:line
|
||||
let lp = substitute(l, '[^(]', '', 'g')
|
||||
let l = a:line
|
||||
let rp = substitute(l, '[^)]', '', 'g')
|
||||
|
||||
if a:paren_to_check =~ ')'
|
||||
" echom 'CountUnbalancedParen ) returning: ' .
|
||||
" \ (strlen(rp) - strlen(lp))
|
||||
return (strlen(rp) - strlen(lp))
|
||||
elseif a:paren_to_check =~ '('
|
||||
" echom 'CountUnbalancedParen ( returning: ' .
|
||||
" \ (strlen(lp) - strlen(rp))
|
||||
return (strlen(lp) - strlen(rp))
|
||||
else
|
||||
" echom 'CountUnbalancedParen unknown paren to check: ' .
|
||||
" \ a:paren_to_check
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Unindent commands based on previous indent level
|
||||
function! s:CheckToIgnoreRightParen( prev_lnum, num_levels )
|
||||
let lnum = a:prev_lnum
|
||||
let line = getline(lnum)
|
||||
let ends = 0
|
||||
let num_right_paren = a:num_levels
|
||||
let ignore_paren = 0
|
||||
let vircol = 1
|
||||
|
||||
while num_right_paren > 0
|
||||
silent! exec 'norm! '.lnum."G\<bar>".vircol."\<bar>"
|
||||
let right_paren = search( ')', 'W' )
|
||||
if right_paren != lnum
|
||||
" This should not happen since there should be at least
|
||||
" num_right_paren matches for this line
|
||||
break
|
||||
endif
|
||||
let vircol = virtcol(".")
|
||||
|
||||
" if getline(".") =~ '^)'
|
||||
let matching_paren = searchpair('(', '', ')', 'bW',
|
||||
\ 's:IsColComment(line("."), col("."))')
|
||||
|
||||
if matching_paren < 1
|
||||
" No match found
|
||||
" echom 'CTIRP - no match found, ignoring'
|
||||
break
|
||||
endif
|
||||
|
||||
if matching_paren == lnum
|
||||
" This was not an unmatched parenthesis, start the search again
|
||||
" again after this column
|
||||
" echom 'CTIRP - same line match, ignoring'
|
||||
continue
|
||||
endif
|
||||
|
||||
" echom 'CTIRP - match: ' . line(".") . ' ' . getline(".")
|
||||
|
||||
if getline(matching_paren) =~? '\(if\|while\)\>'
|
||||
" echom 'CTIRP - if/while ignored: ' . line(".") . ' ' . getline(".")
|
||||
let ignore_paren = ignore_paren + 1
|
||||
endif
|
||||
|
||||
" One match found, decrease and check for further matches
|
||||
let num_right_paren = num_right_paren - 1
|
||||
|
||||
endwhile
|
||||
|
||||
" Fallback - just move back one
|
||||
" return a:prev_indent - s:shiftwidth()
|
||||
return ignore_paren
|
||||
endfunction
|
||||
|
||||
" Based on the keyword provided, loop through previous non empty
|
||||
" non comment lines to find the statement that initiated the keyword.
|
||||
" Return its indent level
|
||||
" CASE ..
|
||||
" WHEN ...
|
||||
" Should return indent level of CASE
|
||||
" EXCEPTION ..
|
||||
" WHEN ...
|
||||
" something;
|
||||
" WHEN ...
|
||||
" Should return indent level of exception.
|
||||
function! s:GetStmtStarterIndent( keyword, curr_lnum )
|
||||
let lnum = a:curr_lnum
|
||||
|
||||
" Default - reduce indent by 1
|
||||
let ind = indent(a:curr_lnum) - s:shiftwidth()
|
||||
|
||||
if a:keyword =~? 'end'
|
||||
exec 'normal! ^'
|
||||
let stmts = '^\s*\%('.
|
||||
\ '\<begin\>\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<loop\>\)\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<case\>\)\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<for\>\)\|' .
|
||||
\ '\%(\%(\<end\s\+\)\@<!\<if\>\)'.
|
||||
\ '\)'
|
||||
let matching_lnum = searchpair(stmts, '', '\<end\>\zs', 'bW',
|
||||
\ 's:IsColComment(line("."), col(".")) == 1')
|
||||
exec 'normal! $'
|
||||
if matching_lnum > 0 && matching_lnum < a:curr_lnum
|
||||
let ind = indent(matching_lnum)
|
||||
endif
|
||||
elseif a:keyword =~? 'when'
|
||||
exec 'normal! ^'
|
||||
let matching_lnum = searchpair(
|
||||
\ '\%(\<end\s\+\)\@<!\<case\>\|\<exception\>\|\<merge\>',
|
||||
\ '',
|
||||
\ '\%(\%(\<when\s\+others\>\)\|\%(\<end\s\+case\>\)\)',
|
||||
\ 'bW',
|
||||
\ 's:IsColComment(line("."), col(".")) == 1')
|
||||
exec 'normal! $'
|
||||
if matching_lnum > 0 && matching_lnum < a:curr_lnum
|
||||
let ind = indent(matching_lnum)
|
||||
else
|
||||
let ind = indent(a:curr_lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
|
||||
" Check if the line is a comment
|
||||
function! s:IsLineComment(lnum)
|
||||
let rc = synIDattr(
|
||||
\ synID(a:lnum,
|
||||
\ match(getline(a:lnum), '\S')+1, 0)
|
||||
\ , "name")
|
||||
\ =~? "comment"
|
||||
|
||||
return rc
|
||||
endfunction
|
||||
|
||||
|
||||
" Check if the column is a comment
|
||||
function! s:IsColComment(lnum, cnum)
|
||||
let rc = synIDattr(synID(a:lnum, a:cnum, 0), "name")
|
||||
\ =~? "comment"
|
||||
|
||||
return rc
|
||||
endfunction
|
||||
|
||||
|
||||
" Instead of returning a column position, return
|
||||
" an appropriate value as a factor of shiftwidth.
|
||||
function! s:ModuloIndent(ind)
|
||||
let ind = a:ind
|
||||
|
||||
if ind > 0
|
||||
let modulo = ind % s:shiftwidth()
|
||||
|
||||
if modulo > 0
|
||||
let ind = ind - modulo
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
|
||||
" Find correct indent of a new line based upon the previous line
|
||||
function! GetSQLIndent()
|
||||
let lnum = v:lnum
|
||||
let ind = indent(lnum)
|
||||
|
||||
" If the current line is a comment, leave the indent as is
|
||||
" Comment out this additional check since it affects the
|
||||
" indenting of =, and will not reindent comments as it should
|
||||
" if s:IsLineComment(lnum) == 1
|
||||
" return ind
|
||||
" endif
|
||||
|
||||
" Get previous non-blank line
|
||||
let prevlnum = prevnonblank(lnum - 1)
|
||||
if prevlnum <= 0
|
||||
return ind
|
||||
endif
|
||||
|
||||
if s:IsLineComment(prevlnum) == 1
|
||||
if getline(v:lnum) =~ '^\s*\*'
|
||||
let ind = s:ModuloIndent(indent(prevlnum))
|
||||
return ind + 1
|
||||
endif
|
||||
" If the previous line is a comment, then return -1
|
||||
" to tell Vim to use the formatoptions setting to determine
|
||||
" the indent to use
|
||||
" But only if the next line is blank. This would be true if
|
||||
" the user is typing, but it would not be true if the user
|
||||
" is reindenting the file
|
||||
if getline(v:lnum) =~ '^\s*$'
|
||||
return -1
|
||||
endif
|
||||
endif
|
||||
|
||||
" echom 'PREVIOUS INDENT: ' . indent(prevlnum) . ' LINE: ' . getline(prevlnum)
|
||||
|
||||
" This is the line you just hit return on, it is not the current line
|
||||
" which is new and empty
|
||||
" Based on this line, we can determine how much to indent the new
|
||||
" line
|
||||
|
||||
" Get default indent (from prev. line)
|
||||
let ind = indent(prevlnum)
|
||||
let prevline = getline(prevlnum)
|
||||
|
||||
" Now check what's on the previous line to determine if the indent
|
||||
" should be changed, for example IF, BEGIN, should increase the indent
|
||||
" where END IF, END, should decrease the indent.
|
||||
if prevline =~? s:SQLBlockStart
|
||||
" Move indent in
|
||||
let ind = ind + s:shiftwidth()
|
||||
" echom 'prevl - SQLBlockStart - indent ' . ind . ' line: ' . prevline
|
||||
elseif prevline =~ '[()]'
|
||||
if prevline =~ '('
|
||||
let num_unmatched_left = s:CountUnbalancedParen( prevline, '(' )
|
||||
else
|
||||
let num_unmatched_left = 0
|
||||
endif
|
||||
if prevline =~ ')'
|
||||
let num_unmatched_right = s:CountUnbalancedParen( prevline, ')' )
|
||||
else
|
||||
let num_unmatched_right = 0
|
||||
" let num_unmatched_right = s:CountUnbalancedParen( prevline, ')' )
|
||||
endif
|
||||
if num_unmatched_left > 0
|
||||
" There is a open left parenthesis
|
||||
" increase indent
|
||||
let ind = ind + ( s:shiftwidth() * num_unmatched_left )
|
||||
elseif num_unmatched_right > 0
|
||||
" if it is an unbalanced parenthesis only unindent if
|
||||
" it was part of a command (ie create table(..) )
|
||||
" instead of part of an if (ie if (....) then) which should
|
||||
" maintain the indent level
|
||||
let ignore = s:CheckToIgnoreRightParen( prevlnum, num_unmatched_right )
|
||||
" echom 'prevl - ) unbalanced - CTIRP - ignore: ' . ignore
|
||||
|
||||
if prevline =~ '^\s*)'
|
||||
let ignore = ignore + 1
|
||||
" echom 'prevl - begins ) unbalanced ignore: ' . ignore
|
||||
endif
|
||||
|
||||
if (num_unmatched_right - ignore) > 0
|
||||
let ind = ind - ( s:shiftwidth() * (num_unmatched_right - ignore) )
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
" echom 'CURRENT INDENT: ' . ind . ' LINE: ' . getline(v:lnum)
|
||||
|
||||
" This is a new blank line since we just typed a carriage return
|
||||
" Check current line; search for simplistic matching start-of-block
|
||||
let line = getline(v:lnum)
|
||||
|
||||
if line =~? '^\s*els'
|
||||
" Any line when you type else will automatically back up one
|
||||
" ident level (ie else, elseif, elsif)
|
||||
let ind = ind - s:shiftwidth()
|
||||
" echom 'curr - else - indent ' . ind
|
||||
elseif line =~? '^\s*end\>'
|
||||
let ind = s:GetStmtStarterIndent('end', v:lnum)
|
||||
" General case for end
|
||||
" let ind = ind - s:shiftwidth()
|
||||
" echom 'curr - end - indent ' . ind
|
||||
elseif line =~? '^\s*when\>'
|
||||
let ind = s:GetStmtStarterIndent('when', v:lnum)
|
||||
" If the WHEN clause is used with a MERGE or EXCEPTION
|
||||
" clause, do not change the indent level, since these
|
||||
" statements do not have a corresponding END statement.
|
||||
" if stmt_starter =~? 'case'
|
||||
" let ind = ind - s:shiftwidth()
|
||||
" endif
|
||||
" elseif line =~ '^\s*)\s*;\?\s*$'
|
||||
" elseif line =~ '^\s*)'
|
||||
elseif line =~ '^\s*)'
|
||||
let num_unmatched_right = s:CountUnbalancedParen( line, ')' )
|
||||
let ignore = s:CheckToIgnoreRightParen( v:lnum, num_unmatched_right )
|
||||
" If the line ends in a ), then reduce the indent
|
||||
" This catches items like:
|
||||
" CREATE TABLE T1(
|
||||
" c1 int,
|
||||
" c2 int
|
||||
" );
|
||||
" But we do not want to unindent a line like:
|
||||
" IF ( c1 = 1
|
||||
" AND c2 = 3 ) THEN
|
||||
" let num_unmatched_right = s:CountUnbalancedParen( line, ')' )
|
||||
" if num_unmatched_right > 0
|
||||
" elseif strpart( line, strlen(line)-1, 1 ) =~ ')'
|
||||
" let ind = ind - s:shiftwidth()
|
||||
if line =~ '^\s*)'
|
||||
" let ignore = ignore + 1
|
||||
" echom 'curr - begins ) unbalanced ignore: ' . ignore
|
||||
endif
|
||||
|
||||
if (num_unmatched_right - ignore) > 0
|
||||
let ind = ind - ( s:shiftwidth() * (num_unmatched_right - ignore) )
|
||||
endif
|
||||
" endif
|
||||
endif
|
||||
|
||||
" echom 'final - indent ' . ind
|
||||
return s:ModuloIndent(ind)
|
||||
endfunction
|
||||
|
||||
" Restore:
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" vim: ts=4 fdm=marker sw=4
|
||||
93
indent/scss.vim
Normal file
93
indent/scss.vim
Normal file
@@ -0,0 +1,93 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'scss') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language : SCSS (Sassy CSS)
|
||||
" Maintainer : Daniel Hofstetter (daniel.hofstetter@42dh.com)
|
||||
" URL : https://github.com/cakebaker/scss-syntax.vim
|
||||
" Last Change : 2019-08-04
|
||||
" Based on : css.vim by Nikolai Weibull, Oleg Zubchenko
|
||||
" Modified by : ObserverOfTime
|
||||
|
||||
if exists('b:did_indent') | finish | endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetSCSSIndent()
|
||||
setlocal indentkeys=0{,0},0(,0),!^F,o,O
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = 'setl smartindent< indentkeys< indentexpr<'
|
||||
|
||||
if exists('*GetSCSSIndent') | finish | endif
|
||||
let s:keepcpo= &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
function s:prevnonblanknoncomment(lnum)
|
||||
let l:lnum = a:lnum
|
||||
while l:lnum > 1
|
||||
let l:lnum = prevnonblank(l:lnum)
|
||||
let l:line = getline(l:lnum)
|
||||
if l:line =~? '\*/'
|
||||
while l:lnum > 1 && l:line !~? '/\*'
|
||||
let l:lnum -= 1
|
||||
endwhile
|
||||
if l:line =~? '^\s*/\*'
|
||||
let l:lnum -= 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
return l:lnum
|
||||
endfunction
|
||||
|
||||
function s:count_chars(lnum, count_open, chars)
|
||||
let l:n_open = 0
|
||||
let l:n_close = 0
|
||||
let l:line = getline(a:lnum)
|
||||
let l:pattern = '['. a:chars .']'
|
||||
let l:i = match(l:line, l:pattern)
|
||||
let l:noi = 'scss\%(Comment\|StringQ\{1,2}\)'
|
||||
while l:i != -1
|
||||
if synIDattr(synID(a:lnum, l:i + 1, 0), 'name') !~? l:noi
|
||||
if l:line[l:i] ==# a:chars[0]
|
||||
let l:n_open += 1
|
||||
elseif l:line[l:i] ==# a:chars[1]
|
||||
if l:n_open > 0
|
||||
let l:n_open -= 1
|
||||
else
|
||||
let l:n_close += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let l:i = match(l:line, l:pattern, l:i + 1)
|
||||
endwhile
|
||||
return a:count_open ? l:n_open : l:n_close
|
||||
endfunction
|
||||
|
||||
function GetSCSSIndent()
|
||||
let l:line = getline(v:lnum)
|
||||
if l:line =~? '^\s*\*'
|
||||
return cindent(v:lnum)
|
||||
endif
|
||||
|
||||
let l:pnum = s:prevnonblanknoncomment(v:lnum - 1)
|
||||
if l:pnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
return indent(l:pnum)
|
||||
\ + s:count_chars(l:pnum, 1, '{}') * shiftwidth()
|
||||
\ - s:count_chars(v:lnum, 0, '{}') * shiftwidth()
|
||||
\ + s:count_chars(l:pnum, 1, '()') * shiftwidth()
|
||||
\ - s:count_chars(v:lnum, 0, '()') * shiftwidth()
|
||||
endfunction
|
||||
|
||||
let &cpoptions = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:set et ts=2 sw=2:
|
||||
|
||||
109
indent/svg.vim
Normal file
109
indent/svg.vim
Normal file
@@ -0,0 +1,109 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'svg-indent') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
"
|
||||
" Language: svg
|
||||
" Maintainer: Jason Shell <jason.shell.mail@gmail.com>
|
||||
" Last Change: 2015 Sep 23
|
||||
" Notes: 1) will be confused by unbalanced tags in comments
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" [-- local settings (must come before aborting the script) --]
|
||||
setlocal indentexpr=SvgIndentGet(v:lnum,1)
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,}
|
||||
|
||||
if !exists('b:svg_indent_open')
|
||||
let b:svg_indent_open = '.\{-}<\a'
|
||||
" pre tag, e.g. <address>
|
||||
" let b:svg_indent_open = '.\{-}<[/]\@!\(address\)\@!'
|
||||
endif
|
||||
|
||||
if !exists('b:svg_indent_close')
|
||||
let b:svg_indent_close = '.\{-}</'
|
||||
" end pre tag, e.g. </address>
|
||||
" let b:svg_indent_close = '.\{-}</\(address\)\@!'
|
||||
endif
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" [-- finish, if the function already exists --]
|
||||
if exists('*SvgIndentGet')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
fun! <SID>SvgIndentWithPattern(line, pat)
|
||||
let s = substitute('x'.a:line, a:pat, "\1", 'g')
|
||||
return strlen(substitute(s, "[^\1].*$", '', ''))
|
||||
endfun
|
||||
|
||||
" [-- check if it's svg --]
|
||||
fun! <SID>SvgIndentSynCheck(lnum)
|
||||
if '' != &syntax
|
||||
let syn1 = synIDattr(synID(a:lnum, 1, 1), 'name')
|
||||
let syn2 = synIDattr(synID(a:lnum, strlen(getline(a:lnum)) - 1, 1), 'name')
|
||||
if '' != syn1 && syn1 !~ 'svg' && '' != syn2 && syn2 !~ 'svg'
|
||||
" don't indent pure non-xml code
|
||||
return 0
|
||||
|
||||
" elseif syn1 =~ '^xmlComment' && syn2 =~ '^xmlComment'
|
||||
elseif syn1 =~ '^svgComment' && syn2 =~ '^svgComment'
|
||||
" indent comments specially
|
||||
return -1
|
||||
endif
|
||||
endif
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" [-- return the sum of indents of a:lnum --]
|
||||
fun! <SID>SvgIndentSum(lnum, style, add)
|
||||
let line = getline(a:lnum)
|
||||
if a:style == match(line, '^\s*</')
|
||||
return (&sw *
|
||||
\ (<SID>SvgIndentWithPattern(line, b:svg_indent_open)
|
||||
\ - <SID>SvgIndentWithPattern(line, b:svg_indent_close)
|
||||
\ - <SID>SvgIndentWithPattern(line, '.\{-}/>'))) + a:add
|
||||
else
|
||||
return a:add
|
||||
endif
|
||||
endfun
|
||||
|
||||
fun! SvgIndentGet(lnum, use_syntax_check)
|
||||
" Find a non-empty line above the current line.
|
||||
let lnum = prevnonblank(a:lnum - 1)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
if a:use_syntax_check
|
||||
let check_lnum = <SID>SvgIndentSynCheck(lnum)
|
||||
let check_alnum = <SID>SvgIndentSynCheck(a:lnum)
|
||||
if 0 == check_lnum || 0 == check_alnum
|
||||
return indent(a:lnum)
|
||||
elseif -1 == check_lnum || -1 == check_alnum
|
||||
return -1
|
||||
endif
|
||||
endif
|
||||
|
||||
let ind = <SID>SvgIndentSum(lnum, -1, indent(lnum))
|
||||
let ind = <SID>SvgIndentSum(a:lnum, 0, ind)
|
||||
|
||||
return ind
|
||||
endfun
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
@@ -21,7 +21,7 @@ else
|
||||
endif
|
||||
|
||||
syn keyword carpSyntax def defn let do if while ref address set! the
|
||||
syn keyword carpSyntax defmacro defdynamic quote cons list array fn
|
||||
syn keyword carpSyntax defmacro defdynamic defndynamic quote cons list array fn
|
||||
syn keyword carpSyntax expand deftype register system-include register-type
|
||||
syn keyword carpSyntax defmodule copy use module defalias definterface eval
|
||||
syn keyword carpSyntax expand instantiate type info help quit env build run
|
||||
|
||||
114
syntax/cmake.vim
114
syntax/cmake.vim
@@ -4,14 +4,14 @@ endif
|
||||
|
||||
" Vim syntax file
|
||||
" Program: CMake - Cross-Platform Makefile Generator
|
||||
" Version: cmake version 3.13.20181220-g0495c
|
||||
" Version: cmake version 3.14.20190402-g56ae2
|
||||
" Language: CMake
|
||||
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>,
|
||||
" Nicholas Hutchinson <nshutchinson@gmail.com>,
|
||||
" Patrick Boettcher <patrick.boettcher@posteo.de>
|
||||
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
|
||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
||||
" Last Change: 2018 Dec 20
|
||||
" Last Change: 2019 Apr 15
|
||||
"
|
||||
" Licence: The CMake license applies to this file. See
|
||||
" https://cmake.org/licensing
|
||||
@@ -35,7 +35,7 @@ syn region cmakeGeneratorExpression start="$<" end=">" contained oneline contain
|
||||
|
||||
syn region cmakeString start='"' end='"' contained contains=cmakeTodo,cmakeVariableValue,cmakeEscaped
|
||||
|
||||
syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmakeVariable,cmakeTodo
|
||||
syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmakeVariable,cmakeTodo,cmakeVariableValue
|
||||
|
||||
syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo
|
||||
|
||||
@@ -79,14 +79,17 @@ syn keyword cmakeProperty contained
|
||||
\ AUTOMOC
|
||||
\ AUTOMOC_COMPILER_PREDEFINES
|
||||
\ AUTOMOC_DEPEND_FILTERS
|
||||
\ AUTOMOC_EXECUTABLE
|
||||
\ AUTOMOC_MACRO_NAMES
|
||||
\ AUTOMOC_MOC_OPTIONS
|
||||
\ AUTOMOC_SOURCE_GROUP
|
||||
\ AUTOMOC_TARGETS_FOLDER
|
||||
\ AUTORCC
|
||||
\ AUTORCC_EXECUTABLE
|
||||
\ AUTORCC_OPTIONS
|
||||
\ AUTORCC_SOURCE_GROUP
|
||||
\ AUTOUIC
|
||||
\ AUTOUIC_EXECUTABLE
|
||||
\ AUTOUIC_OPTIONS
|
||||
\ AUTOUIC_SEARCH_PATHS
|
||||
\ BINARY_DIR
|
||||
@@ -102,6 +105,7 @@ syn keyword cmakeProperty contained
|
||||
\ CMAKE_CONFIGURE_DEPENDS
|
||||
\ CMAKE_CXX_KNOWN_FEATURES
|
||||
\ CMAKE_C_KNOWN_FEATURES
|
||||
\ CMAKE_ROLE
|
||||
\ COMMON_LANGUAGE_RUNTIME
|
||||
\ COMPATIBLE_INTERFACE_BOOL
|
||||
\ COMPATIBLE_INTERFACE_NUMBER_MAX
|
||||
@@ -171,6 +175,8 @@ syn keyword cmakeProperty contained
|
||||
\ GENERATED
|
||||
\ GENERATOR_FILE_NAME
|
||||
\ GENERATOR_IS_MULTI_CONFIG
|
||||
\ GHS_INTEGRITY_APP
|
||||
\ GHS_NO_SOURCE_GROUP_FILE
|
||||
\ GLOBAL_DEPENDS_DEBUG_MODE
|
||||
\ GLOBAL_DEPENDS_NO_CYCLES
|
||||
\ GNUtoMS
|
||||
@@ -328,6 +334,7 @@ syn keyword cmakeProperty contained
|
||||
\ VS_IOT_STARTUP_TASK
|
||||
\ VS_KEYWORD
|
||||
\ VS_MOBILE_EXTENSIONS_VERSION
|
||||
\ VS_NO_SOLUTION_DEPLOY
|
||||
\ VS_RESOURCE_GENERATOR
|
||||
\ VS_SCC_AUXPATH
|
||||
\ VS_SCC_LOCALPATH
|
||||
@@ -359,11 +366,13 @@ syn keyword cmakeProperty contained
|
||||
\ XCODE_EMIT_EFFECTIVE_PLATFORM_NAME
|
||||
\ XCODE_EXPLICIT_FILE_TYPE
|
||||
\ XCODE_FILE_ATTRIBUTES
|
||||
\ XCODE_GENERATE_SCHEME
|
||||
\ XCODE_LAST_KNOWN_FILE_TYPE
|
||||
\ XCODE_PRODUCT_TYPE
|
||||
\ XCODE_SCHEME_ADDRESS_SANITIZER
|
||||
\ XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
|
||||
\ XCODE_SCHEME_ARGUMENTS
|
||||
\ XCODE_SCHEME_DEBUG_AS_ROOT
|
||||
\ XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
|
||||
\ XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
|
||||
\ XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
|
||||
@@ -455,10 +464,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_ASM_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_ASM_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_ASM_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_ASM_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_ASM_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_ASM_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_ASM_IGNORE_EXTENSIONS
|
||||
\ CMAKE_ASM_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_ASM_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -509,10 +514,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_ASM_MASM_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_ASM_MASM_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_ASM_MASM_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_ASM_MASM_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_ASM_MASM_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_ASM_MASM_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_ASM_MASM_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_ASM_MASM_IGNORE_EXTENSIONS
|
||||
\ CMAKE_ASM_MASM_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_ASM_MASM_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -572,10 +573,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_ASM_NASM_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_ASM_NASM_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_ASM_NASM_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_ASM_NASM_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_ASM_NASM_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_ASM_NASM_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_ASM_NASM_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_ASM_NASM_IGNORE_EXTENSIONS
|
||||
\ CMAKE_ASM_NASM_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_ASM_NASM_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -687,10 +684,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_CSharp_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_CSharp_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_CSharp_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_CSharp_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_CSharp_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_CSharp_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_CSharp_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_CSharp_IGNORE_EXTENSIONS
|
||||
\ CMAKE_CSharp_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_CSharp_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -752,10 +745,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_CUDA_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_CUDA_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_CUDA_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_CUDA_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_CUDA_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_CUDA_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_CUDA_HOST_COMPILER
|
||||
\ CMAKE_CUDA_IGNORE_EXTENSIONS
|
||||
\ CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
@@ -827,10 +816,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_CXX_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_CXX_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_CXX_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_CXX_IGNORE_EXTENSIONS
|
||||
\ CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -893,10 +878,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_C_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_C_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_C_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_C_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_C_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_C_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_C_IGNORE_EXTENSIONS
|
||||
\ CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_C_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -940,6 +921,7 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_EXE_LINKER_FLAGS_INIT
|
||||
\ CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
\ CMAKE_EXPORT_NO_PACKAGE_REGISTRY
|
||||
\ CMAKE_EXPORT_PACKAGE_REGISTRY
|
||||
\ CMAKE_EXTRA_GENERATOR
|
||||
\ CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
|
||||
\ CMAKE_FIND_APPBUNDLE
|
||||
@@ -951,6 +933,7 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_FIND_PACKAGE_NAME
|
||||
\ CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
|
||||
\ CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
|
||||
\ CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
|
||||
\ CMAKE_FIND_PACKAGE_SORT_DIRECTION
|
||||
\ CMAKE_FIND_PACKAGE_SORT_ORDER
|
||||
\ CMAKE_FIND_PACKAGE_WARN_NO_MODULE
|
||||
@@ -999,10 +982,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_Fortran_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_Fortran_FORMAT
|
||||
\ CMAKE_Fortran_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_Fortran_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_Fortran_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_Fortran_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_Fortran_IGNORE_EXTENSIONS
|
||||
\ CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -1033,6 +1012,7 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_GENERATOR_INSTANCE
|
||||
\ CMAKE_GENERATOR_PLATFORM
|
||||
\ CMAKE_GENERATOR_TOOLSET
|
||||
\ CMAKE_GHS_NO_SOURCE_GROUP_FILE
|
||||
\ CMAKE_GLOBAL_AUTOGEN_TARGET
|
||||
\ CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
|
||||
\ CMAKE_GLOBAL_AUTORCC_TARGET
|
||||
@@ -1106,10 +1086,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_Java_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_Java_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_Java_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_Java_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_Java_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_Java_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_Java_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_Java_IGNORE_EXTENSIONS
|
||||
\ CMAKE_Java_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_Java_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -1152,6 +1128,7 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_MAJOR_VERSION
|
||||
\ CMAKE_MAKE_PROGRAM
|
||||
\ CMAKE_MATCH_COUNT
|
||||
\ CMAKE_MAXIMUM_RECURSION_DEPTH
|
||||
\ CMAKE_MFC_FLAG
|
||||
\ CMAKE_MINIMUM_REQUIRED_VERSION
|
||||
\ CMAKE_MINOR_VERSION
|
||||
@@ -1177,6 +1154,7 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_PROGRAM_PATH
|
||||
\ CMAKE_PROJECT_DESCRIPTION
|
||||
\ CMAKE_PROJECT_HOMEPAGE_URL
|
||||
\ CMAKE_PROJECT_INCLUDE
|
||||
\ CMAKE_PROJECT_NAME
|
||||
\ CMAKE_PROJECT_VERSION
|
||||
\ CMAKE_PROJECT_VERSION_MAJOR
|
||||
@@ -1221,10 +1199,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_RC_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_RC_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_RC_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_RC_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_RC_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_RC_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_RC_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_RC_IGNORE_EXTENSIONS
|
||||
\ CMAKE_RC_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_RC_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -1323,10 +1297,6 @@ syn keyword cmakeVariable contained
|
||||
\ CMAKE_Swift_FLAGS_RELEASE_INIT
|
||||
\ CMAKE_Swift_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT
|
||||
\ CMAKE_Swift_GHS_KERNEL_FLAGS_DEBUG
|
||||
\ CMAKE_Swift_GHS_KERNEL_FLAGS_MINSIZEREL
|
||||
\ CMAKE_Swift_GHS_KERNEL_FLAGS_RELEASE
|
||||
\ CMAKE_Swift_GHS_KERNEL_FLAGS_RELWITHDEBINFO
|
||||
\ CMAKE_Swift_IGNORE_EXTENSIONS
|
||||
\ CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
\ CMAKE_Swift_IMPLICIT_LINK_DIRECTORIES
|
||||
@@ -1449,7 +1419,7 @@ syn keyword cmakeVariable contained
|
||||
\ CTEST_CUSTOM_POST_TEST
|
||||
\ CTEST_CUSTOM_PRE_MEMCHECK
|
||||
\ CTEST_CUSTOM_PRE_TEST
|
||||
\ CTEST_CUSTOM_TEST_IGNORE
|
||||
\ CTEST_CUSTOM_TESTS_IGNORE
|
||||
\ CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
\ CTEST_CUSTOM_WARNING_MATCH
|
||||
\ CTEST_CVS_CHECKOUT
|
||||
@@ -1483,6 +1453,7 @@ syn keyword cmakeVariable contained
|
||||
\ CTEST_SCP_COMMAND
|
||||
\ CTEST_SITE
|
||||
\ CTEST_SOURCE_DIRECTORY
|
||||
\ CTEST_SUBMIT_URL
|
||||
\ CTEST_SVN_COMMAND
|
||||
\ CTEST_SVN_OPTIONS
|
||||
\ CTEST_SVN_UPDATE_OPTIONS
|
||||
@@ -1497,6 +1468,7 @@ syn keyword cmakeVariable contained
|
||||
\ ENV
|
||||
\ EXECUTABLE_OUTPUT_PATH
|
||||
\ GHS-MULTI
|
||||
\ IOS
|
||||
\ LIBRARY_OUTPUT_PATH
|
||||
\ MINGW
|
||||
\ MSVC
|
||||
@@ -1512,6 +1484,7 @@ syn keyword cmakeVariable contained
|
||||
\ MSVC_IDE
|
||||
\ MSVC_TOOLSET_VERSION
|
||||
\ MSVC_VERSION
|
||||
\ MSYS
|
||||
\ PROJECT_BINARY_DIR
|
||||
\ PROJECT_DESCRIPTION
|
||||
\ PROJECT_HOMEPAGE_URL
|
||||
@@ -1592,6 +1565,7 @@ syn keyword cmakeKWExternalProject contained
|
||||
\ LOG_DOWNLOAD
|
||||
\ LOG_INSTALL
|
||||
\ LOG_MERGED_STDOUTERR
|
||||
\ LOG_OUTPUT_ON_FAILURE
|
||||
\ LOG_PATCH
|
||||
\ LOG_TEST
|
||||
\ LOG_UPDATE
|
||||
@@ -1645,6 +1619,7 @@ syn keyword cmakeKWadd_compile_options contained
|
||||
\ COMPILE_OPTIONS
|
||||
\ SHELL
|
||||
\ UNIX_COMMAND
|
||||
\ WX
|
||||
|
||||
syn keyword cmakeKWadd_custom_command contained
|
||||
\ APPEND
|
||||
@@ -1767,6 +1742,7 @@ syn keyword cmakeKWadd_test contained
|
||||
\ CONFIGURATIONS
|
||||
\ FAIL_REGULAR_EXPRESSION
|
||||
\ NAME
|
||||
\ OFF
|
||||
\ PASS_REGULAR_EXPRESSION
|
||||
\ TARGET_FILE
|
||||
\ WILL_FAIL
|
||||
@@ -1818,6 +1794,7 @@ syn keyword cmakeKWcmake_parse_arguments contained
|
||||
\ MY_INSTALL_CONFIGURATIONS
|
||||
\ MY_INSTALL_DESTINATION
|
||||
\ MY_INSTALL_FAST
|
||||
\ MY_INSTALL_KEYWORDS_MISSING_VALUES
|
||||
\ MY_INSTALL_OPTIONAL
|
||||
\ MY_INSTALL_RENAME
|
||||
\ MY_INSTALL_TARGETS
|
||||
@@ -1828,6 +1805,7 @@ syn keyword cmakeKWcmake_parse_arguments contained
|
||||
\ TARGETS
|
||||
\ TRUE
|
||||
\ UNDEFINED
|
||||
\ _KEYWORDS_MISSING_VALUES
|
||||
\ _UNPARSED_ARGUMENTS
|
||||
|
||||
syn keyword cmakeKWcmake_policy contained
|
||||
@@ -1926,6 +1904,7 @@ syn keyword cmakeKWctest_start contained
|
||||
|
||||
syn keyword cmakeKWctest_submit contained
|
||||
\ API
|
||||
\ BUILD_ID
|
||||
\ CAPTURE_CMAKE_ERROR
|
||||
\ CDASH_UPLOAD
|
||||
\ CDASH_UPLOAD_TYPE
|
||||
@@ -1938,6 +1917,7 @@ syn keyword cmakeKWctest_submit contained
|
||||
\ RETRY_COUNT
|
||||
\ RETRY_DELAY
|
||||
\ RETURN_VALUE
|
||||
\ SUBMIT_URL
|
||||
|
||||
syn keyword cmakeKWctest_test contained
|
||||
\ APPEND
|
||||
@@ -1993,6 +1973,9 @@ syn keyword cmakeKWenable_language contained
|
||||
\ CUDA
|
||||
\ OPTIONAL
|
||||
|
||||
syn keyword cmakeKWenable_testing contained
|
||||
\ BUILD_TESTING
|
||||
|
||||
syn keyword cmakeKWexec_program contained
|
||||
\ ARGS
|
||||
\ OUTPUT_VARIABLE
|
||||
@@ -2055,6 +2038,8 @@ syn keyword cmakeKWfile contained
|
||||
\ CONFIGURE_DEPENDS
|
||||
\ CONTENT
|
||||
\ COPY
|
||||
\ COPY_ON_ERROR
|
||||
\ CREATE_LINK
|
||||
\ DESTINATION
|
||||
\ DIRECTORY_PERMISSIONS
|
||||
\ DOWNLOAD
|
||||
@@ -2108,12 +2093,14 @@ syn keyword cmakeKWfile contained
|
||||
\ REMOVE_RECURSE
|
||||
\ RENAME
|
||||
\ REQUIRED
|
||||
\ RESULT
|
||||
\ RESULT_VARIABLE
|
||||
\ SHOW_PROGRESS
|
||||
\ SIZE
|
||||
\ SSL
|
||||
\ STATUS
|
||||
\ STRINGS
|
||||
\ SYMBOLIC
|
||||
\ TIMESTAMP
|
||||
\ TLS_CAINFO
|
||||
\ TLS_VERIFY
|
||||
@@ -2295,8 +2282,10 @@ syn keyword cmakeKWget_filename_component contained
|
||||
\ BASE_DIR
|
||||
\ DIRECTORY
|
||||
\ EXT
|
||||
\ LAST_EXT
|
||||
\ NAME
|
||||
\ NAME_WE
|
||||
\ NAME_WLE
|
||||
\ PATH
|
||||
\ PROGRAM
|
||||
\ PROGRAM_ARGS
|
||||
@@ -2432,6 +2421,7 @@ syn keyword cmakeKWinstall contained
|
||||
\ EXPORT
|
||||
\ EXPORT_ANDROID_MK
|
||||
\ EXPORT_LINK_INTERFACE_LIBRARIES
|
||||
\ EXPORT_NAME
|
||||
\ FILES
|
||||
\ FILES_MATCHING
|
||||
\ FILE_PERMISSIONS
|
||||
@@ -2466,6 +2456,7 @@ syn keyword cmakeKWinstall contained
|
||||
\ PRE_INSTALL_SCRIPT
|
||||
\ PRIVATE_HEADER
|
||||
\ PROGRAMS
|
||||
\ PROPERTIES
|
||||
\ PUBLIC_HEADER
|
||||
\ REGEX
|
||||
\ RENAME
|
||||
@@ -2479,6 +2470,7 @@ syn keyword cmakeKWinstall contained
|
||||
\ SETUID
|
||||
\ SHAREDSTATE
|
||||
\ SOVERSION
|
||||
\ STATIC
|
||||
\ SYSCONF
|
||||
\ TARGETS
|
||||
\ TRUE
|
||||
@@ -2533,6 +2525,8 @@ syn keyword cmakeKWlist contained
|
||||
\ ORDER
|
||||
\ OUTPUT_VARIABLE
|
||||
\ PARENT_SCOPE
|
||||
\ POP_BACK
|
||||
\ POP_FRONT
|
||||
\ PREPEND
|
||||
\ REGEX
|
||||
\ REMOVE_AT
|
||||
@@ -2613,6 +2607,12 @@ syn keyword cmakeKWproject contained
|
||||
\ _VERSION_PATCH
|
||||
\ _VERSION_TWEAK
|
||||
|
||||
syn keyword cmakeKWqt_wrap_cpp contained
|
||||
\ AUTOMOC
|
||||
|
||||
syn keyword cmakeKWqt_wrap_ui contained
|
||||
\ AUTOUIC
|
||||
|
||||
syn keyword cmakeKWremove contained
|
||||
\ VALUE
|
||||
\ VAR
|
||||
@@ -2635,6 +2635,7 @@ syn keyword cmakeKWset contained
|
||||
\ STRINGS
|
||||
|
||||
syn keyword cmakeKWset_directory_properties contained
|
||||
\ DIRECTORY
|
||||
\ PROPERTIES
|
||||
|
||||
syn keyword cmakeKWset_property contained
|
||||
@@ -2652,6 +2653,7 @@ syn keyword cmakeKWset_property contained
|
||||
|
||||
syn keyword cmakeKWset_source_files_properties contained
|
||||
\ PROPERTIES
|
||||
\ SOURCE
|
||||
|
||||
syn keyword cmakeKWset_target_properties contained
|
||||
\ PROPERTIES
|
||||
@@ -2659,6 +2661,7 @@ syn keyword cmakeKWset_target_properties contained
|
||||
|
||||
syn keyword cmakeKWset_tests_properties contained
|
||||
\ PROPERTIES
|
||||
\ TEST
|
||||
|
||||
syn keyword cmakeKWsource_group contained
|
||||
\ FILES
|
||||
@@ -2845,17 +2848,20 @@ syn keyword cmakeKWtry_compile contained
|
||||
\ DEFINED
|
||||
\ DLINK_LIBRARIES
|
||||
\ DVAR
|
||||
\ EXECUTABLE
|
||||
\ FALSE
|
||||
\ GHS
|
||||
\ INCLUDE_DIRECTORIES
|
||||
\ LANG
|
||||
\ LINK_DIRECTORIES
|
||||
\ LINK_LIBRARIES
|
||||
\ LINK_OPTIONS
|
||||
\ MULTI
|
||||
\ NOT
|
||||
\ OUTPUT_VARIABLE
|
||||
\ PRIVATE
|
||||
\ RESULT_VAR
|
||||
\ SOURCES
|
||||
\ STATIC_LIBRARY
|
||||
\ STATIC_LIBRARY_OPTIONS
|
||||
\ TRUE
|
||||
\ TYPE
|
||||
@@ -2869,7 +2875,6 @@ syn keyword cmakeKWtry_run contained
|
||||
\ CMAKE_FLAGS
|
||||
\ COMPILE_DEFINITIONS
|
||||
\ COMPILE_OUTPUT_VARIABLE
|
||||
\ COMPILE_RESULT_VAR
|
||||
\ DLINK_LIBRARIES
|
||||
\ DVAR
|
||||
\ FAILED_TO_RUN
|
||||
@@ -2879,7 +2884,6 @@ syn keyword cmakeKWtry_run contained
|
||||
\ LINK_LIBRARIES
|
||||
\ LINK_OPTIONS
|
||||
\ RUN_OUTPUT_VARIABLE
|
||||
\ RUN_RESULT_VAR
|
||||
\ TRUE
|
||||
\ TYPE
|
||||
\ VALUE
|
||||
@@ -2924,7 +2928,8 @@ syn keyword cmakeGeneratorExpressions contained
|
||||
\ COMPILING_CXX
|
||||
\ CONFIG
|
||||
\ CONFIGURATION
|
||||
\ CUDA
|
||||
\ CUDA_COMPILER_ID
|
||||
\ CUDA_COMPILER_VERSION
|
||||
\ CUSTOM_KEYS
|
||||
\ CXX_COMPILER_ID
|
||||
\ CXX_COMPILER_VERSION
|
||||
@@ -2953,7 +2958,6 @@ syn keyword cmakeGeneratorExpressions contained
|
||||
\ LOWER_CASE
|
||||
\ MAKE_C_IDENTIFIER
|
||||
\ MAP_IMPORTED_CONFIG_
|
||||
\ MSYS
|
||||
\ NO
|
||||
\ NOT
|
||||
\ OBJECT_LIBRARY
|
||||
@@ -2964,6 +2968,7 @@ syn keyword cmakeGeneratorExpressions contained
|
||||
\ PDB_OUTPUT_DIRECTORY
|
||||
\ PDB_OUTPUT_DIRECTORY_
|
||||
\ PLATFORM_ID
|
||||
\ POSIX
|
||||
\ PRIVATE
|
||||
\ PUBLIC
|
||||
\ SDK
|
||||
@@ -3189,6 +3194,7 @@ hi def link cmakeKWctest_update ModeMsg
|
||||
hi def link cmakeKWctest_upload ModeMsg
|
||||
hi def link cmakeKWdefine_property ModeMsg
|
||||
hi def link cmakeKWenable_language ModeMsg
|
||||
hi def link cmakeKWenable_testing ModeMsg
|
||||
hi def link cmakeKWexec_program ModeMsg
|
||||
hi def link cmakeKWexecute_process ModeMsg
|
||||
hi def link cmakeKWexport ModeMsg
|
||||
@@ -3228,6 +3234,8 @@ hi def link cmakeKWmath ModeMsg
|
||||
hi def link cmakeKWmessage ModeMsg
|
||||
hi def link cmakeKWoption ModeMsg
|
||||
hi def link cmakeKWproject ModeMsg
|
||||
hi def link cmakeKWqt_wrap_cpp ModeMsg
|
||||
hi def link cmakeKWqt_wrap_ui ModeMsg
|
||||
hi def link cmakeKWremove ModeMsg
|
||||
hi def link cmakeKWseparate_arguments ModeMsg
|
||||
hi def link cmakeKWset ModeMsg
|
||||
|
||||
@@ -24,7 +24,10 @@ if !exists("b:eelixir_subtype")
|
||||
let b:eelixir_subtype = matchstr(&filetype,'^eex\.\zs\w\+')
|
||||
endif
|
||||
if b:eelixir_subtype == ''
|
||||
let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
|
||||
let b:eelixir_subtype = matchstr(&filetype,'^leex\.\zs\w\+')
|
||||
endif
|
||||
if b:eelixir_subtype == ''
|
||||
let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
|
||||
endif
|
||||
if b:eelixir_subtype == 'ex'
|
||||
let b:eelixir_subtype = 'elixir'
|
||||
|
||||
@@ -109,6 +109,12 @@ syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\/"
|
||||
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z("""\)+ end=+^\s*\z1+ skip=+\\"+ fold
|
||||
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end=+^\s*\z1+ skip=+\\'+ fold
|
||||
|
||||
|
||||
" LiveView Sigils surrounded with ~L"""
|
||||
syntax include @HTML syntax/html.vim
|
||||
syntax region elixirLiveViewSigil matchgroup=elixirSigilDelimiter keepend start=+\~L\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
|
||||
|
||||
|
||||
" Documentation
|
||||
if exists('g:elixir_use_markdown_for_docs') && g:elixir_use_markdown_for_docs
|
||||
syn include @markdown syntax/markdown.vim
|
||||
@@ -122,14 +128,14 @@ else
|
||||
endif
|
||||
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]{" end="}" skip="\\\\\|\\}" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]<" end=">" skip="\\\\\|\\>" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]\[" end="\]" skip="\\\\\|\\\]" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss](" end=")" skip="\\\\\|\\)" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocStringDelimiter start=+\%(@\w*doc\s\+\)\@<=\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@elixirDocStringContained keepend
|
||||
syn region elixirDocString matchgroup=elixirDocStringDelimiter start=+\%(@\w*doc\s\+\)\@<=\z("""\)+ end=+\z1+ contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start=+\%(@\w*doc\s\+\)\@<=\~[Ss]\z('''\)+ end=+\z1+ skip=+\\'+ contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start=+\%(@\w*doc\s\+\)\@<=\~[Ss]\z("""\)+ end=+\z1+ skip=+\\"+ contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]{" end="}" skip="\\\\\|\\}" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]<" end=">" skip="\\\\\|\\>" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss]\[" end="\]" skip="\\\\\|\\\]" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start="\%(@\w*doc\s\+\)\@<=\~[Ss](" end=")" skip="\\\\\|\\)" contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocStringDelimiter start=+\%(@\w*doc\s\+\)\@<=\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@elixirDocStringContained keepend
|
||||
syn region elixirDocString matchgroup=elixirDocStringDelimiter start=+\%(@\w*doc\s\+\)\@<=\z("""\)+ end=+^\s*\z1+ contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start=+\%(@\w*doc\s\+\)\@<=\~[Ss]\z('''\)+ end=+^\s*\z1+ contains=@elixirDocStringContained fold keepend
|
||||
syn region elixirDocString matchgroup=elixirDocSigilDelimiter start=+\%(@\w*doc\s\+\)\@<=\~[Ss]\z("""\)+ end=+^\s*\z1+ contains=@elixirDocStringContained fold keepend
|
||||
|
||||
" Defines
|
||||
syn match elixirDefine '\<def\>\(:\)\@!' nextgroup=elixirFunctionDeclaration skipwhite skipnl
|
||||
|
||||
@@ -46,6 +46,7 @@ syn match elmFloat "\(\<\d\+\.\d\+\>\)"
|
||||
|
||||
" Identifiers
|
||||
syn match elmTopLevelDecl "^\s*[a-zA-Z][a-zA-z0-9_]*\('\)*\s\+:\(\r\n\|\r\|\n\|\s\)\+" contains=elmOperator
|
||||
syn match elmFuncName /^\l\w*/
|
||||
|
||||
" Folding
|
||||
syn region elmTopLevelTypedef start="type" end="\n\(\n\n\)\@=" contains=ALL fold
|
||||
@@ -54,6 +55,7 @@ syn region elmCaseBlock matchgroup=elmCaseBlockDefinition start="^\z\(\s\+\)\<ca
|
||||
syn region elmCaseItemBlock start="^\z\(\s\+\).\+->$" end="^\z1\@!\W\@=" end="\(\n\n\z1\@!\)\@=" end="\(\n\z1\S\)\@=" contains=ALL fold
|
||||
syn region elmLetBlock matchgroup=elmLetBlockDefinition start="\<let\>" end="\<in\>" contains=ALL fold
|
||||
|
||||
hi def link elmFuncName Function
|
||||
hi def link elmCaseBlockDefinition Conditional
|
||||
hi def link elmCaseBlockItemDefinition Conditional
|
||||
hi def link elmLetBlockDefinition TypeDef
|
||||
|
||||
@@ -58,7 +58,7 @@ syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3Config
|
||||
|
||||
" Gaps
|
||||
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle contained
|
||||
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,number,i3ConfigVariable
|
||||
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,number,i3ConfigVariable
|
||||
syn keyword i3ConfigSmartGapKeyword on inverse_outer contained
|
||||
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=i3ConfigSmartGapKeyword
|
||||
syn keyword i3ConfigSmartBorderKeyword on no_gaps contained
|
||||
|
||||
@@ -153,14 +153,16 @@ syntax region jsFinallyBlock contained matchgroup=jsFinallyBraces s
|
||||
syntax region jsSwitchBlock contained matchgroup=jsSwitchBraces start=/{/ end=/}/ contains=@jsAll,jsBlock,jsSwitchCase extend fold
|
||||
syntax region jsRepeatBlock contained matchgroup=jsRepeatBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
|
||||
syntax region jsDestructuringBlock contained matchgroup=jsDestructuringBraces start=/{/ end=/}/ contains=jsDestructuringProperty,jsDestructuringAssignment,jsDestructuringNoise,jsDestructuringPropertyComputed,jsSpreadExpression,jsComment nextgroup=jsFlowDefinition extend fold
|
||||
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsNoise,jsDestructuringProperty,jsSpreadExpression,jsDestructuringBlock,jsDestructuringArray,jsComment nextgroup=jsFlowDefinition extend fold
|
||||
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsDestructuringNoise,jsDestructuringProperty,jsSpreadExpression,jsDestructuringBlock,jsDestructuringArray,jsComment nextgroup=jsFlowDefinition extend fold
|
||||
syntax region jsObject contained matchgroup=jsObjectBraces start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectShorthandProp,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsDecorator,jsAsyncKeyword extend fold
|
||||
syntax region jsBlock matchgroup=jsBraces start=/{/ end=/}/ contains=@jsAll,jsSpreadExpression extend fold
|
||||
syntax region jsModuleGroup contained matchgroup=jsModuleBraces start=/{/ end=/}/ contains=jsModuleKeyword,jsModuleComma,jsModuleAs,jsComment,jsFlowTypeKeyword skipwhite skipempty nextgroup=jsFrom fold
|
||||
syntax region jsSpreadExpression contained matchgroup=jsSpreadOperator start=/\.\.\./ end=/[,}\]]\@=/ contains=@jsExpression
|
||||
syntax region jsRestExpression contained matchgroup=jsRestOperator start=/\.\.\./ end=/[,)]\@=/
|
||||
syntax region jsTernaryIf matchgroup=jsTernaryIfOperator start=/?:\@!/ end=/\%(:\|}\@=\)/ contains=@jsExpression extend skipwhite skipempty nextgroup=@jsExpression
|
||||
syntax match jsOperator /?\.\ze\_D/
|
||||
" These must occur here or they will be override by jsTernaryIf
|
||||
syntax match jsOperator /?\.\ze\_D/
|
||||
syntax match jsOperator /??/ skipwhite skipempty nextgroup=@jsExpression
|
||||
|
||||
syntax match jsGenerator contained /\*/ skipwhite skipempty nextgroup=jsFuncName,jsFuncArgs,jsFlowFunctionGroup
|
||||
syntax match jsFuncName contained /\<\K\k*/ skipwhite skipempty nextgroup=jsFuncArgs,jsFlowFunctionGroup
|
||||
|
||||
@@ -2,48 +2,64 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'json5') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Syntax setup {{{1
|
||||
" Modified from the original taken from https://github.com/gutenye/json5.vim
|
||||
|
||||
" Syntax setup
|
||||
if exists('b:current_syntax') && b:current_syntax == 'json5'
|
||||
finish
|
||||
endif
|
||||
|
||||
" Syntax: Strings {{{1
|
||||
syn region json5String start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=json5Escape
|
||||
syn region json5String start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=json5Escape
|
||||
" Numbers
|
||||
syn match json5Number "[-+]\=\%(0\|[1-9]\d*\)\%(\.\d*\)\=\%([eE][-+]\=\d\+\)\="
|
||||
syn match json5Number "[-+]\=\%(\.\d\+\)\%([eE][-+]\=\d\+\)\="
|
||||
syn match json5Number "[-+]\=0[xX]\x*"
|
||||
syn match json5Number "[-+]\=Infinity\|NaN"
|
||||
|
||||
" Syntax: Escape sequences
|
||||
syn match json5Escape "\\["\\/bfnrt]" contained
|
||||
" An integer part of 0 followed by other digits is not allowed
|
||||
syn match json5NumError "[-+]\=0\d\(\d\|\.\)*"
|
||||
|
||||
" A hexadecimal number cannot have a fractional part
|
||||
syn match json5NumError "[-+]\=0x\x*\.\x*"
|
||||
|
||||
" Strings
|
||||
syn region json5String start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=json5Escape,@Spell
|
||||
syn region json5String start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=json5Escape,@Spell
|
||||
|
||||
" Escape sequences
|
||||
syn match json5Escape "\\['\"\\bfnrtv]" contained
|
||||
syn match json5Escape "\\u\x\{4}" contained
|
||||
|
||||
" Syntax: Numbers {{{1
|
||||
syn match json5Number "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"
|
||||
syn keyword json5Number Infinity -Infinity
|
||||
|
||||
" Syntax: An integer part of 0 followed by other digits is not allowed.
|
||||
syn match json5NumError "-\=\<0\d\.\d*\>"
|
||||
|
||||
" Syntax: Boolean {{{1
|
||||
" Boolean
|
||||
syn keyword json5Boolean true false
|
||||
|
||||
" Syntax: Null {{{1
|
||||
" Null
|
||||
syn keyword json5Null null
|
||||
|
||||
" Syntax: Braces {{{1
|
||||
" Delimiters and Operators
|
||||
syn match json5Delimiter ","
|
||||
syn match json5Operator ":"
|
||||
|
||||
" Braces
|
||||
syn match json5Braces "[{}\[\]]"
|
||||
syn match json5ObjAssign /@\?\%(\I\|\$\)\%(\i\|\$\)*\s*\ze::\@!/
|
||||
|
||||
" Syntax: Comment {{{1
|
||||
syn region json5LineComment start=+\/\/+ end=+$+ keepend
|
||||
syn region json5LineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ keepend fold
|
||||
syn region json5Comment start="/\*" end="\*/" fold
|
||||
" Keys
|
||||
syn match json5Key /@\?\%(\I\|\$\)\%(\i\|\$\)*\s*\ze::\@!/ contains=@Spell
|
||||
syn match json5Key /"\([^"]\|\\"\)\{-}"\ze\s*:/ contains=json5Escape,@Spell
|
||||
|
||||
" Define the default highlighting. {{{1
|
||||
" Comment
|
||||
syn region json5LineComment start=+\/\/+ end=+$+ keepend contains=@Spell
|
||||
syn region json5LineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ keepend fold contains=@Spell
|
||||
syn region json5Comment start="/\*" end="\*/" fold contains=@Spell
|
||||
|
||||
" Define the default highlighting
|
||||
hi def link json5String String
|
||||
hi def link json5ObjAssign Identifier
|
||||
hi def link json5Key Identifier
|
||||
hi def link json5Escape Special
|
||||
hi def link json5Number Number
|
||||
hi def link json5Braces Operator
|
||||
hi def link json5Null Function
|
||||
hi def link json5Delimiter Delimiter
|
||||
hi def link json5Operator Operator
|
||||
hi def link json5Braces Delimiter
|
||||
hi def link json5Null Keyword
|
||||
hi def link json5Boolean Boolean
|
||||
hi def link json5LineComment Comment
|
||||
hi def link json5Comment Comment
|
||||
@@ -53,4 +69,3 @@ if !exists('b:current_syntax')
|
||||
let b:current_syntax = 'json5'
|
||||
endif
|
||||
|
||||
" vim: fdm=marker
|
||||
|
||||
@@ -66,16 +66,16 @@ let s:nonidS_chars = "[:space:])\\U5D}" . s:nonid_chars
|
||||
" the following excludes '!' since it can be used as an identifier,
|
||||
" and '$' since it can be used in interpolations
|
||||
" note that \U2D is '-'
|
||||
let s:uniop_chars = "+\\U2D~¬√∛∜"
|
||||
let s:uniop_chars = "+\\U2D~¬√∛∜⋆"
|
||||
|
||||
let s:binop_chars = "=+\\U2D*/\\%÷^&|⊻<>≤≥≡≠≢∈∉⋅×∪∩⊆⊈⊂⊄⊊←→∋∌⊕⊖⊞⊟∘∧⊗⊘↑↓∨⊠±"
|
||||
let s:binop_chars = "=+\\U2D*/\\%÷^&|⊻<>≤≥≡≠≢∈∉⋅×∪∩⊆⊈⊂⊄⊊←→∋∌⊕⊖⊞⊟∘∧⊗⊘↑↓∨⊠±⟂⋆"
|
||||
|
||||
" the following is a list of all remainig valid operator chars,
|
||||
" but it's more efficient when expressed with ranges (see below)
|
||||
" let s:binop_chars_extra = "↔↚↛↠↣↦↮⇎⇏⇒⇔⇴⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿⟵⟶⟷⟷⟹⟺⟻⟼⟽⟾⟿⤀⤁⤂⤃⤄⤅⤆⤇⤌⤍⤎⤏⤐⤑⤔⤕⤖⤗⤘⤝⤞⤟⤠⥄⥅⥆⥇⥈⥊⥋⥎⥐⥒⥓⥖⥗⥚⥛⥞⥟⥢⥤⥦⥧⥨⥩⥪⥫⥬⥭⥰⧴⬱⬰⬲⬳⬴⬵⬶⬷⬸⬹⬺⬻⬼⬽⬾⬿⭀⭁⭂⭃⭄⭇⭈⭉⭊⭋⭌←→" .
|
||||
" \ "∝∊∍∥∦∷∺∻∽∾≁≃≄≅≆≇≈≉≊≋≌≍≎≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≣≦≧≨≩≪≫≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊃⊅⊇⊉⊋⊏⊐⊑⊒⊜⊩⊬⊮⊰⊱⊲⊳⊴⊵⊶⊷⋍⋐⋑⋕⋖⋗⋘⋙⋚⋛⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿⟈⟉⟒⦷⧀⧁⧡⧣⧤⧥⩦⩧⩪⩫⩬⩭⩮⩯⩰⩱⩲⩳⩴⩵⩶⩷⩸⩹⩺⩻⩼⩽⩾⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚⪛⪜⪝⪞⪟⪠⪡⪢⪣⪤⪥⪦⪧⪨⪩⪪⪫⪬⪭⪮⪯⪰⪱⪲⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅⫆⫇⫈⫉⫊⫋⫌⫍⫎⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫷⫸⫹⫺⊢⊣" .
|
||||
" \ "⊔∓∔∸≂≏⊎⊽⋎⋓⧺⧻⨈⨢⨣⨤⨥⨦⨧⨨⨩⨪⨫⨬⨭⨮⨹⨺⩁⩂⩅⩊⩌⩏⩐⩒⩔⩖⩗⩛⩝⩡⩢⩣" .
|
||||
" \ "⊙⊚⊛⊡⊓∗∙∤⅋≀⊼⋄⋆⋇⋉⋊⋋⋌⋏⋒⟑⦸⦼⦾⦿⧶⧷⨇⨰⨱⨲⨳⨴⨵⨶⨷⨸⨻⨼⨽⩀⩃⩄⩋⩍⩎⩑⩓⩕⩘⩚⩜⩞⩟⩠⫛⊍▷⨝⟕⟖⟗" .
|
||||
" \ "⊙⊚⊛⊡⊓∗∙∤⅋≀⊼⋄⋇⋉⋊⋋⋌⋏⋒⟑⦸⦼⦾⦿⧶⧷⨇⨰⨱⨲⨳⨴⨵⨶⨷⨸⨻⨼⨽⩀⩃⩄⩋⩍⩎⩑⩓⩕⩘⩚⩜⩞⩟⩠⫛⊍▷⨝⟕⟖⟗" .
|
||||
" \ "⇵⟰⟱⤈⤉⤊⤋⤒⤓⥉⥌⥍⥏⥑⥔⥕⥘⥙⥜⥝⥠⥡⥣⥥⥮⥯↑↓"
|
||||
|
||||
" same as above, but with character ranges, for performance
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'liquid') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Liquid
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.liquid
|
||||
" Last Change: 2010 May 21
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('main_syntax')
|
||||
let main_syntax = 'liquid'
|
||||
endif
|
||||
|
||||
if !exists('g:liquid_default_subtype')
|
||||
let g:liquid_default_subtype = 'html'
|
||||
endif
|
||||
|
||||
if !exists('b:liquid_subtype') && main_syntax == 'liquid'
|
||||
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
|
||||
let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+')
|
||||
if b:liquid_subtype == ''
|
||||
let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+')
|
||||
endif
|
||||
if b:liquid_subtype == ''
|
||||
let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$')
|
||||
endif
|
||||
if b:liquid_subtype == ''
|
||||
let b:liquid_subtype = g:liquid_default_subtype
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('b:liquid_subtype') && b:liquid_subtype != ''
|
||||
exe 'runtime! syntax/'.b:liquid_subtype.'.vim'
|
||||
unlet! b:current_syntax
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
if exists('b:liquid_subtype') && b:liquid_subtype != 'yaml'
|
||||
" YAML Front Matter
|
||||
syn include @liquidYamlTop syntax/yaml.vim
|
||||
unlet! b:current_syntax
|
||||
syn region liquidYamlHead start="\%^---$" end="^---\s*$" keepend contains=@liquidYamlTop,@Spell
|
||||
endif
|
||||
|
||||
if !exists('g:liquid_highlight_types')
|
||||
let g:liquid_highlight_types = []
|
||||
endif
|
||||
|
||||
if !exists('s:subtype')
|
||||
let s:subtype = exists('b:liquid_subtype') ? b:liquid_subtype : ''
|
||||
|
||||
for s:type in map(copy(g:liquid_highlight_types),'matchstr(v:val,"[^=]*$")')
|
||||
if s:type =~ '\.'
|
||||
let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
|
||||
endif
|
||||
exe 'syn include @liquidHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
|
||||
unlet! b:current_syntax
|
||||
endfor
|
||||
unlet! s:type
|
||||
|
||||
if s:subtype == ''
|
||||
unlet! b:liquid_subtype
|
||||
else
|
||||
let b:liquid_subtype = s:subtype
|
||||
endif
|
||||
unlet s:subtype
|
||||
endif
|
||||
|
||||
syn region liquidStatement matchgroup=liquidDelimiter start="{%" end="%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidExpression matchgroup=liquidDelimiter start="{{" end="}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidComment matchgroup=liquidDelimiter start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidRaw matchgroup=liquidDelimiter start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend
|
||||
|
||||
syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead
|
||||
syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression
|
||||
syn cluster liquidExpression contains=liquidOperator,liquidString,liquidNumber,liquidFloat,liquidBoolean,liquidNull,liquidEmpty,liquidPipe,liquidForloop
|
||||
|
||||
syn keyword liquidKeyword highlight nextgroup=liquidTypeHighlight skipwhite contained
|
||||
syn keyword liquidKeyword endhighlight contained
|
||||
syn region liquidHighlight start="{%\s*highlight\s\+\w\+\s*%}" end="{% endhighlight %}" keepend
|
||||
|
||||
for s:type in g:liquid_highlight_types
|
||||
exe 'syn match liquidTypeHighlight "\<'.matchstr(s:type,'[^=]*').'\>" contained'
|
||||
exe 'syn region liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' start="{%\s*highlight\s\+'.matchstr(s:type,'[^=]*').'\s*%}" end="{% endhighlight %}" keepend contains=@liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
|
||||
endfor
|
||||
unlet! s:type
|
||||
|
||||
syn region liquidString matchgroup=liquidQuote start=+"+ end=+"+ contained
|
||||
syn region liquidString matchgroup=liquidQuote start=+'+ end=+'+ contained
|
||||
syn match liquidNumber "-\=\<\d\+\>" contained
|
||||
syn match liquidFloat "-\=\<\d\+\>\.\.\@!\%(\d\+\>\)\=" contained
|
||||
syn keyword liquidBoolean true false contained
|
||||
syn keyword liquidNull null nil contained
|
||||
syn match liquidEmpty "\<empty\>" contained
|
||||
|
||||
syn keyword liquidOperator and or not contained
|
||||
syn match liquidPipe '|' contained skipwhite nextgroup=liquidFilter
|
||||
|
||||
syn keyword liquidFilter date capitalize downcase upcase first last join sort size strip_html strip_newlines newline_to_br replace replace_first remove remove_first truncate truncatewords prepend append minus plus times divided_by contained
|
||||
|
||||
syn keyword liquidConditional if elsif else endif unless endunless case when endcase ifchanged endifchanged contained
|
||||
syn keyword liquidRepeat for endfor tablerow endtablerow in contained
|
||||
syn match liquidRepeat "\%({%\s*\)\@<=empty\>" contained
|
||||
syn keyword liquidKeyword assign cycle include with contained
|
||||
|
||||
syn keyword liquidForloop forloop nextgroup=liquidForloopDot contained
|
||||
syn match liquidForloopDot "\." nextgroup=liquidForloopAttribute contained
|
||||
syn keyword liquidForloopAttribute length index index0 rindex rindex0 first last contained
|
||||
|
||||
syn keyword liquidTablerowloop tablerowloop nextgroup=liquidTablerowloopDot contained
|
||||
syn match liquidTablerowloopDot "\." nextgroup=liquidTableForloopAttribute contained
|
||||
syn keyword liquidTablerowloopAttribute length index index0 col col0 index0 rindex rindex0 first last col_first col_last contained
|
||||
|
||||
hi def link liquidDelimiter PreProc
|
||||
hi def link liquidComment Comment
|
||||
hi def link liquidTypeHighlight Type
|
||||
hi def link liquidConditional Conditional
|
||||
hi def link liquidRepeat Repeat
|
||||
hi def link liquidKeyword Keyword
|
||||
hi def link liquidOperator Operator
|
||||
hi def link liquidString String
|
||||
hi def link liquidQuote Delimiter
|
||||
hi def link liquidNumber Number
|
||||
hi def link liquidFloat Float
|
||||
hi def link liquidEmpty liquidNull
|
||||
hi def link liquidNull liquidBoolean
|
||||
hi def link liquidBoolean Boolean
|
||||
hi def link liquidFilter Function
|
||||
hi def link liquidForloop Identifier
|
||||
hi def link liquidForloopAttribute Identifier
|
||||
|
||||
let b:current_syntax = 'liquid'
|
||||
|
||||
if exists('main_syntax') && main_syntax == 'liquid'
|
||||
unlet main_syntax
|
||||
endif
|
||||
@@ -103,7 +103,7 @@ syn match htmlH2 /^.\+\n-\+$/ contains=mkdLink,mkdInlineURL,@Spell
|
||||
syn match mkdLineBreak / \+$/
|
||||
syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLink,mkdInlineURL,mkdLineBreak,@Spell
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!`/ end=/`/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!``/ skip=/[^`]`[^`]/ end=/\(\([^\\]\|^\)\\\)\@<!``/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!``/ skip=/[^`]`[^`]/ end=/``/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(`\{3,}\)[^`]*$/ end=/^\s*\z1`*\s*$/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!\~\~/ end=/\(\([^\\]\|^\)\\\)\@<!\~\~/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/ end=/^\s*\z1\~*\s*$/' . s:concealcode
|
||||
|
||||
1473
syntax/mma.vim
1473
syntax/mma.vim
File diff suppressed because it is too large
Load Diff
4200
syntax/pgsql.vim
4200
syntax/pgsql.vim
File diff suppressed because it is too large
Load Diff
202
syntax/ruby.vim
202
syntax/ruby.vim
@@ -69,7 +69,7 @@ endfunction
|
||||
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
|
||||
|
||||
" Not-Top Cluster {{{1
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses
|
||||
|
||||
" Whitespace Errors {{{1
|
||||
if exists("ruby_space_errors")
|
||||
@@ -82,20 +82,39 @@ if exists("ruby_space_errors")
|
||||
endif
|
||||
|
||||
" Operators {{{1
|
||||
if exists("ruby_operators")
|
||||
syn match rubyDotOperator "\.\|&\."
|
||||
syn match rubyTernaryOperator "\%(\w\|[^\x00-\x7F]\)\@1<!?\|:"
|
||||
syn match rubyArithmeticOperator "\*\*\|[*/%+]\|->\@!"
|
||||
syn match rubyComparisonOperator "<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<<\@!\|>=\|[-=]\@1<!>"
|
||||
syn match rubyBitwiseOperator "[~^|]\|&\.\@!\|\%(class\s*\)\@<!<<\|>>"
|
||||
syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||"
|
||||
syn match rubyRangeOperator "\.\.\.\="
|
||||
syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^="
|
||||
syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~"
|
||||
syn match rubyScopeOperator "::"
|
||||
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
syn cluster rubyOperator contains=ruby.*Operator
|
||||
syn match rubyEnglishBooleanOperator "\<\%(and\|or\|not\)\>"
|
||||
|
||||
if exists("ruby_operators") || exists("ruby_pseudo_operators")
|
||||
syn match rubyDotOperator "\.\|&\."
|
||||
|
||||
syn match rubyTernaryOperator "\%(\w\|[^\x00-\x7F]\)\@1<!?\|:"
|
||||
syn match rubyArithmeticOperator "\*\*\|[*/%+]\|->\@!"
|
||||
syn match rubyComparisonOperator "<=>\|<=\|<\|>=\|[-=]\@1<!>"
|
||||
syn match rubyBitwiseOperator "[~^|]\|&\.\@!\|<<\|>>"
|
||||
syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||"
|
||||
syn match rubyRangeOperator "\.\.\.\="
|
||||
syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^="
|
||||
syn match rubyAssignmentOperator "=>\@!" containedin=rubyBlockParameterList " TODO: this is inelegant
|
||||
syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~"
|
||||
|
||||
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
syn match rubyScopeOperator "::"
|
||||
syn match rubySuperClassOperator "<" contained
|
||||
syn match rubyEigenClassOperator "<<" contained
|
||||
syn match rubyLambdaOperator "->"
|
||||
syn match rubySplatOperator "\%([[{(|,=]\_s*\)\@<=\*"
|
||||
syn match rubySplatOperator "\%(^\|\s\)\@1<=\*\%(\h\|[^\x00-\x7F]\|[:$@[]\)\@="
|
||||
syn match rubyDoubleSplatOperator "\%([{(|,]\_s*\)\@<=\*\*"
|
||||
syn match rubyDoubleSplatOperator "\s\@1<=\*\*\%(\h\|[^\x00-\x7F]\|[:$@{]\)\@="
|
||||
syn match rubyProcOperator "\%([[(|,]\_s*\)\@<=&"
|
||||
syn match rubyProcOperator "\s\@1<=&\%(\h\|[^\x00-\x7F]\|[:$@]\|->\)\@="
|
||||
|
||||
syn cluster rubyProperOperator contains=rubyTernaryOperator,rubyArithmeticOperator,rubyComparisonOperator,rubyBitwiseOperator,rubyBooleanOperator,rubyRangeOperator,rubyAssignmentOperator,rubyEqualityOperator,rubyDefinedOperator,rubyEnglishBooleanOperator
|
||||
syn cluster rubyClassOperator contains=rubyEigenClassOperator,rubySuperClassOperator
|
||||
syn cluster rubyPseudoOperator contains=rubyDotOperator,rubyScopeOperator,rubyEigenClassOperator,rubySuperClassOperator,rubyLambdaOperator,rubySplatOperator,rubyDoubleSplatOperator,rubyProcOperator
|
||||
syn cluster rubyOperator contains=ruby.*Operator
|
||||
endif
|
||||
|
||||
" String Interpolation and Backslash Notation {{{1
|
||||
@@ -113,8 +132,8 @@ syn match rubyBackslashEscape "\\\\" contained display
|
||||
syn match rubyQuoteEscape "\\'" contained display
|
||||
syn match rubySpaceEscape "\\ " contained display
|
||||
|
||||
syn match rubyParenthesisEscape "\\[()]" contained display
|
||||
syn match rubyCurlyBraceEscape "\\[{}]" contained display
|
||||
syn match rubyParenthesisEscape "\\[()]" contained display
|
||||
syn match rubyCurlyBraceEscape "\\[{}]" contained display
|
||||
syn match rubyAngleBracketEscape "\\[<>]" contained display
|
||||
syn match rubySquareBracketEscape "\\[[\]]" contained display
|
||||
|
||||
@@ -160,9 +179,6 @@ syn match rubyFloat "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-
|
||||
syn match rubyFloat "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)i\=\>" display
|
||||
|
||||
" Identifiers {{{1
|
||||
syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!]\=" contains=NONE display transparent
|
||||
syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
|
||||
|
||||
syn match rubyClassName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyModuleName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!"
|
||||
@@ -180,8 +196,8 @@ SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"':
|
||||
|
||||
syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@="
|
||||
|
||||
syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained
|
||||
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" oneline display contains=rubyBlockParameter
|
||||
syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop containedin=rubyBlockParameterList
|
||||
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" contains=ALLBUT,@rubyNotTop,@rubyProperOperator
|
||||
|
||||
if exists('ruby_global_variable_error')
|
||||
syn match rubyGlobalVariableError "$[^A-Za-z_]" display
|
||||
@@ -283,9 +299,9 @@ SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
|
||||
" Generalized Double Quoted Strings, Array of Strings, Array of Symbols and Shell Command Output {{{1
|
||||
" Note: %= is not matched here as the beginning of a double quoted string
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="\%(\%(\w\|[^\x00-\x7F]\|]\)\s*\)\@<!%=" end="=" skip="\\\\\|\\=" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets
|
||||
@@ -300,6 +316,7 @@ SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%
|
||||
|
||||
" Here Documents {{{1
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
@@ -318,38 +335,37 @@ SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([
|
||||
syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable nextgroup=rubyAliasDeclaration2 skipwhite
|
||||
syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable
|
||||
syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable
|
||||
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyOperator
|
||||
syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyOperator
|
||||
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite skipnl
|
||||
syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyScopeOperator
|
||||
|
||||
syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration
|
||||
syn match rubyMethodName "\%(\s\|^\)\@1<=\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
|
||||
syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration
|
||||
syn match rubyMethodName "\%(\s\|^\)\@1<=\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
|
||||
syn match rubyMethodName "\%([[:space:].]\|^\)\@1<=\%(\[\]=\=\|\*\*\|[-+!~]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
|
||||
|
||||
syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyMethodName,rubyBlockParameter
|
||||
syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyMethodName
|
||||
|
||||
" Keywords {{{1
|
||||
" Note: the following keywords have already been defined:
|
||||
" begin case class def do end for if module unless until while
|
||||
syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|retry\|return\)\>"
|
||||
syn match rubyKeyword "\<\%(super\|yield\)\>"
|
||||
syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\<\(self\|nil\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\<__\%(ENCODING\|dir\|FILE\|LINE\|callee\|method\)__\>"
|
||||
syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>"
|
||||
" TODO: reorganise
|
||||
syn match rubyControl "\%#=1\<\%(break\|in\|next\|redo\|retry\|return\)\>"
|
||||
syn match rubyKeyword "\%#=1\<\%(super\|yield\)\>"
|
||||
syn match rubyBoolean "\%#=1\<\%(true\|false\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\%#=1\<\(self\|nil\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\%#=1\<__\%(ENCODING\|dir\|FILE\|LINE\|callee\|method\)__\>"
|
||||
syn match rubyBeginEnd "\%#=1\<\%(BEGIN\|END\)\>"
|
||||
|
||||
" Expensive Mode {{{1
|
||||
" Match 'end' with the appropriate opening keyword for syntax based folding
|
||||
" and special highlighting of module/class/method definitions
|
||||
if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
|
||||
syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl
|
||||
syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyDefine "\<undef\>" nextgroup=rubyMethodName skipwhite skipnl
|
||||
syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
|
||||
syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl
|
||||
syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyDefine "\<undef\>" nextgroup=rubyMethodName skipwhite skipnl
|
||||
syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration,rubyEigenClassOperator skipwhite skipnl
|
||||
syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
|
||||
SynFold 'def' syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'class' syn region rubyClassBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'module' syn region rubyModuleBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'def' syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine skip="\<end:\|\%(\<def\_s\+\)\@<=end\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'class' syn region rubyClassBlock start="\<class\>" matchgroup=rubyClass skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'module' syn region rubyModuleBlock start="\<module\>" matchgroup=rubyModule skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
" modifiers
|
||||
syn match rubyLineContinuation "\\$" nextgroup=@rubyModifier skipwhite skipnl
|
||||
@@ -359,29 +375,29 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
|
||||
|
||||
syn cluster rubyModifier contains=rubyConditionalModifier,rubyRepeatModifier,rubyRescueModifier
|
||||
|
||||
SynFold 'do' syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'do' syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
" curly bracket block or hash literal
|
||||
SynFold '{' syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop
|
||||
SynFold '[' syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<!\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
" statements without 'do'
|
||||
SynFold 'begin' syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'case' syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'begin' syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'case' syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
SynFold 'if' syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\<then\s\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'if' syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\<then\s\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
syn match rubyConditional "\<\%(then\|else\|when\)\>" contained containedin=rubyCaseExpression
|
||||
syn match rubyConditional "\<\%(then\|else\|elsif\)\>" contained containedin=rubyConditionalExpression
|
||||
|
||||
syn match rubyExceptionHandler "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyBlockExpression,rubyDoBlock
|
||||
syn match rubyExceptionHandler1 "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyModuleBlock,rubyClassBlock,rubyMethodBlock
|
||||
syn cluster rubyExceptionHandler contains=rubyExceptionHandler,rubyExceptionHandler1
|
||||
syn match rubyExceptionHandler2 "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyModuleBlock,rubyClassBlock,rubyMethodBlock
|
||||
syn cluster rubyExceptionHandler contains=rubyExceptionHandler,rubyExceptionHandler2
|
||||
|
||||
" statements with optional 'do'
|
||||
syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\<do\>" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop
|
||||
|
||||
SynFold 'for' syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine
|
||||
SynFold 'for' syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine
|
||||
|
||||
if !exists("ruby_minlines")
|
||||
let ruby_minlines = 500
|
||||
@@ -398,19 +414,20 @@ endif
|
||||
|
||||
" Special Methods {{{1
|
||||
if !exists("ruby_no_special_methods")
|
||||
syn match rubyAccess "\<\%(public\|protected\|private\)\>"
|
||||
syn match rubyAccess "\<\%(public_class_method\|private_class_method\)\>"
|
||||
syn match rubyAccess "\<\%(public_constant\|private_constant\)\>"
|
||||
syn match rubyAccess "\<module_function\>"
|
||||
syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" " attr is a common variable name
|
||||
syn match rubyAttribute "\<\%(attr_accessor\|attr_reader\|attr_writer\)\>"
|
||||
syn match rubyControl "\<\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>"
|
||||
syn match rubyEval "\<\%(eval\|class_eval\|instance_eval\|module_eval\)\>"
|
||||
syn match rubyException "\<\%(raise\|fail\|catch\|throw\)\>"
|
||||
syn match rubyInclude "\<\%(autoload\|gem\|load\|require\|require_relative\)\>"
|
||||
syn match rubyKeyword "\<\%(callcc\|caller\|lambda\|proc\)\>"
|
||||
syn match rubyMacro "\<\%(extend\|include\|prepend\|refine\|using\)\>"
|
||||
syn match rubyMacro "\<\%(alias_method\|define_method\|define_singleton_method\|remove_method\|undef_method\)\>"
|
||||
syn match rubyAccess "\<\%(public\|protected\|private\)\>" " use re=2
|
||||
syn match rubyAccess "\%#=1\<\%(public\|private\)_class_method\>"
|
||||
syn match rubyAccess "\%#=1\<\%(public\|private\)_constant\>"
|
||||
syn match rubyAccess "\%#=1\<module_function\>"
|
||||
syn match rubyAttribute "\%#=1\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" " attr is a common variable name
|
||||
syn match rubyAttribute "\%#=1\<attr_\%(accessor\|reader\|writer\)\>"
|
||||
syn match rubyControl "\%#=1\<\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>"
|
||||
syn match rubyEval "\%#=1\<eval\>"
|
||||
syn match rubyEval "\%#=1\<\%(class\|instance\|module\)_eval\>"
|
||||
syn match rubyException "\%#=1\<\%(raise\|fail\|catch\|throw\)\>"
|
||||
syn match rubyInclude "\%#=1\<\%(autoload\|gem\|load\|require\%(_relative\)\=\)\>"
|
||||
syn match rubyKeyword "\%#=1\<\%(callcc\|caller\|lambda\|proc\)\>"
|
||||
syn match rubyMacro "\%#=1\<\%(extend\|include\|prepend\|refine\|using\)\>"
|
||||
syn match rubyMacro "\%#=1\<\%(alias\|define\|define_singleton\|remove\|undef\)_method\>"
|
||||
endif
|
||||
|
||||
" Comments and Documentation {{{1
|
||||
@@ -436,21 +453,20 @@ syn match rubyUselessLineContinuation "\%([.:,;{([<>~\*%&^|+=-]\|%(\%(\w\|[^\x00
|
||||
syn match rubyUselessLineContinuation "\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty contained
|
||||
|
||||
" Keyword Nobbling {{{1
|
||||
" prevent methods with keyword names (and possible ?! suffixes) being highlighted as keywords when called
|
||||
" prevent methods with keyword names being highlighted as keywords when called
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|&\.\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\%(BEGIN\|END\)\>\)" transparent contains=rubyDotOperator,rubyScopeOperator
|
||||
syn match rubyKeywordAsMethod "\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE
|
||||
|
||||
" Bang/Predicate Special Methods and Operators {{{1
|
||||
" Bang and Predicate Methods and Operators {{{1
|
||||
syn match rubyBangPredicateMethod "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]"
|
||||
|
||||
if !exists("ruby_no_special_methods")
|
||||
syn match rubyControl "\<exit!" display
|
||||
syn match rubyControl "\%#=1\<exit!" display
|
||||
endif
|
||||
syn match rubyOperator "\<defined?" display
|
||||
syn match rubyDefinedOperator "\%#=1\<defined?" display
|
||||
|
||||
" More Symbols {{{1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!=]\=::\@!"he=e-1
|
||||
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="he=e-1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!=]\=::\@!"hs=s+1,he=e-1
|
||||
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="hs=s+1,he=e-1
|
||||
" 1.9-style Hash Keys and Keyword Parameters {{{1
|
||||
syn match rubySymbol "\%([{(|,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1
|
||||
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1
|
||||
|
||||
" __END__ Directive {{{1
|
||||
SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$"
|
||||
@@ -458,7 +474,7 @@ SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END
|
||||
" Default Highlighting {{{1
|
||||
hi def link rubyClass rubyDefine
|
||||
hi def link rubyModule rubyDefine
|
||||
hi def link rubyExceptionHandler1 rubyDefine
|
||||
hi def link rubyExceptionHandler2 rubyDefine
|
||||
hi def link rubyDefine Define
|
||||
hi def link rubyAccess rubyMacro
|
||||
hi def link rubyAttribute rubyMacro
|
||||
@@ -497,21 +513,35 @@ hi def link rubySymbol Constant
|
||||
hi def link rubyKeyword Keyword
|
||||
|
||||
hi def link rubyOperator Operator
|
||||
hi def link rubyDotOperator Operator
|
||||
hi def link rubyTernaryOperator Operator
|
||||
hi def link rubyArithmeticOperator Operator
|
||||
hi def link rubyComparisonOperator Operator
|
||||
hi def link rubyBitwiseOperator Operator
|
||||
hi def link rubyBooleanOperator Operator
|
||||
hi def link rubyRangeOperator Operator
|
||||
hi def link rubyAssignmentOperator Operator
|
||||
hi def link rubyEqualityOperator Operator
|
||||
hi def link rubyScopeOperator Operator
|
||||
hi def link rubyDefinedOperator rubyOperator
|
||||
hi def link rubyEnglishBooleanOperator rubyOperator
|
||||
if exists("ruby_operators")
|
||||
hi def link rubyTernaryOperator rubyOperator
|
||||
hi def link rubyArithmeticOperator rubyOperator
|
||||
hi def link rubyComparisonOperator rubyOperator
|
||||
hi def link rubyBitwiseOperator rubyOperator
|
||||
hi def link rubyBooleanOperator rubyOperator
|
||||
hi def link rubyRangeOperator rubyOperator
|
||||
hi def link rubyAssignmentOperator rubyOperator
|
||||
hi def link rubyEqualityOperator rubyOperator
|
||||
endif
|
||||
|
||||
if exists("ruby_pseudo_operators")
|
||||
hi def link rubyPseudoOperator Special
|
||||
hi def link rubyDotOperator rubyPseudoOperator
|
||||
hi def link rubyScopeOperator rubyPseudoOperator
|
||||
hi def link rubySuperClassOperator rubyPseudoOperator
|
||||
hi def link rubyEigenClassOperator rubyPseudoOperator
|
||||
hi def link rubyLambdaOperator rubyPseudoOperator
|
||||
hi def link rubyDoubleSplatOperator rubyPseudoOperator
|
||||
hi def link rubySplatOperator rubyPseudoOperator
|
||||
hi def link rubyProcOperator rubyPseudoOperator
|
||||
endif
|
||||
|
||||
hi def link rubyBeginEnd Statement
|
||||
hi def link rubyEval Statement
|
||||
hi def link rubyPseudoVariable Constant
|
||||
hi def link rubyCapitalizedMethod rubyLocalVariableOrMethod
|
||||
hi def link rubyCapitalizedMethod NONE
|
||||
|
||||
hi def link rubyComment Comment
|
||||
hi def link rubyEncoding Constant
|
||||
|
||||
149
syntax/svg.vim
Normal file
149
syntax/svg.vim
Normal file
@@ -0,0 +1,149 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'svg') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: SVG
|
||||
" Filenames: *.svg
|
||||
" Maintainer: Michal Gorny <michal-gorny@wp.pl>
|
||||
" Last_change: 2006-03-23
|
||||
|
||||
if !exists("main_syntax")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = 'svg'
|
||||
endif
|
||||
|
||||
if main_syntax == 'svg'
|
||||
runtime! syntax/xml.vim
|
||||
syn cluster xmlTagHook add=svgElement
|
||||
syn cluster xmlAttribHook add=svgAttr
|
||||
syn match xmlDecl /\<\(<?\)\@<=xml\(-stylesheet\)\?\>/ containedin=xmlProcessing contained
|
||||
syn keyword xmlDeclAttr version encoding standalone containedin=xmlProcessing contained
|
||||
syn keyword xmlDeclAttr alternate charset media href title type containedin=xmlProcessing contained
|
||||
else
|
||||
syn cluster xhtmlTagHook add=svgElement
|
||||
syn cluster xhtmlAttribHook add=svgAttr
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
" SVG elements
|
||||
syn match svgElement contained /\<svg\>[^:]/me=e-1
|
||||
syn keyword svgElement contained altGlyph altGlyphDef altGlyphItem animate
|
||||
syn keyword svgElement contained animateColor animateMotion animateTransform
|
||||
syn keyword svgElement contained circle clipPath cursor defs desc ellipse
|
||||
syn keyword svgElement contained feBlend feColorMatrix feComponentTransfer
|
||||
syn keyword svgElement contained feComposite feConvolveMatrix feDiffuseLighting
|
||||
syn keyword svgElement contained feDisplacementMap feDistantLight feFlood
|
||||
syn keyword svgElement contained feFuncA feFuncB feFuncG feFuncR feGaussianBlur
|
||||
syn keyword svgElement contained feImage feMerge feMergeNode feMorphology
|
||||
syn keyword svgElement contained feOffset fePointLight feSpecularLighting
|
||||
syn keyword svgElement contained feSpotLight feTile feTurbulence filter
|
||||
syn keyword svgElement contained foreignObject glyph glyphRef hkern image line
|
||||
syn keyword svgElement contained linearGradient marker mask metadata mpath path
|
||||
syn keyword svgElement contained pattern polygon polyline radialGradient rect
|
||||
syn keyword svgElement contained script set stop style switch symbol text
|
||||
syn keyword svgElement contained textPath title tref tspan use view vkern
|
||||
syn match svgElement contained /\<\(font\|font-face\)\>[^-]/me=e-1
|
||||
syn match svgElement contained /\<font-face-\(format\|name\|src\|uri\)\>/
|
||||
syn match svgElement contained /\<\(color-profile\|definition-src\)\>/
|
||||
syn match svgElement contained /\<missing-glyph\>/
|
||||
syn match svgElement contained /\<\(a\|g\)\>[^:]/me=e-1
|
||||
|
||||
" SVG 1.0 attributes
|
||||
syn keyword svgAttr contained accumulate additive alphabetic amplitude ascent attributeName attributeType azimuth baseFrequency bbox begin bias by
|
||||
syn keyword svgAttr contained calcMode class clipPathUnits contentScriptType contentStyleType cursor cx cy d descent diffuseConstant direction display
|
||||
syn keyword svgAttr contained divisor dur dx dy edgeMode elevation end exponent externalResourcesRequired filter filterRes filterUnits format from fx fy
|
||||
syn keyword svgAttr contained g1 g2 glyphRef gradientTransform gradientUnits hanging height id ideographic in in2 intercept k k1 k2 k3 k4 kernelMatrix
|
||||
syn keyword svgAttr contained kernelUnitLength kerning keyPoints keySplines keyTimes lang lengthAdjust limitingConeAngle local markerHeight markerUnits
|
||||
syn keyword svgAttr contained markerWidth mask maskContentUnits maskUnits mathematical max media method min mode name numOctaves offset opacity operator
|
||||
syn keyword svgAttr contained order orient orientation origin overflow path pathLength patternContentUnits patternTransform patternUnits points pointsAtX
|
||||
syn keyword svgAttr contained pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY repeatCount repeatDur
|
||||
syn keyword svgAttr contained requiredExtensions requiredFeatures restart result rotate rx ry scale seed slope spacing specularConstant specularExponent
|
||||
syn keyword svgAttr contained spreadMethod startOffset stdDeviation stemh stemv stitchTiles string style surfaceScale systemLanguage tableValues target
|
||||
syn keyword svgAttr contained targetX targetY textLength title to transform type u1 u2 values version viewBox viewTarget visibility width widths x x1 x2
|
||||
syn keyword svgAttr contained xChannelSelector y y1 y2 yChannelSelector z zoomAndPan
|
||||
syn match svgAttr contained /\<xmlns\>[^:]/me=e-1
|
||||
syn match svgAttr contained /\<\(clip\|color\|fill\)\>[^-]/me=e-1
|
||||
syn match svgAttr contained /\<\(stroke\|unicode\)\>[^-]/me=e-1
|
||||
syn match svgAttr contained /\<\(color-interpolation\|font-size\)\>[^-]/me=e-1
|
||||
syn match svgAttr contained /\<\(\accent-height\|alignment-baseline\|arabic-form\|baseline-shift\|cap-height\|clip-\(path\|rule\)\|dominant-baseline\)\>/
|
||||
syn match svgAttr contained /\<\(color-\(interpolation-filters\|profile\|rendering\)\|enable-background\|fill-\(opacity\|rule\)\)\>/
|
||||
syn match svgAttr contained /\<\(flood-\(color\|opacity\)\|font-\(family\|size-adjust\|stretch\|style\|variant\|weight\)\|image-rendering\)\>/
|
||||
syn match svgAttr contained /\<\(glyph-\(name\|orientation-\(horizontal\|vertical\)\)\|horiz-\(adv-x\|origin-\(x\|y\)\)\)\>/
|
||||
syn match svgAttr contained /\<\(letter-spacing\|lighting-color\|marker-\(end\|mid\|start\)\|overline-\(position\|thickness\)\|panose-1\)\>/
|
||||
syn match svgAttr contained /\<\(pointer-events\|rendering-intent\|shape-rendering\|stop-\(color\|opacity\)\|strikethrough-\(position\|thickness\)\)\>/
|
||||
syn match svgAttr contained /\<\(text-\(anchor\|decoration\|rendering\)\|stroke-\(dasharray\|dashoffset\|linecap\|linejoin\|miterlimit\|opacity\|width\)\)\>/
|
||||
syn match svgAttr contained /\<\(underline-\(position\|thickness\)\|unicode-\(bidi\|range\)\|units-per-em\|writing-mode\|x-height\)\>/
|
||||
syn match svgAttr contained /\(vert-\(adv-y\|origin-\(x\|y\)\)\|v-\(alphabetic\|hanging\|ideographic\|mathematical\)\|word-spacing\)\>/
|
||||
syn match svgAttr contained /\<\(xlink:\)\@<=\(actuate\|arcrole\|href\)\>/
|
||||
syn match svgAttr contained /\<\(xlink:\)\@<=\(role\|show\|title\|type\)\>/
|
||||
syn match svgAttr contained /\<\(xml:\)\@<=\(base\|lang\|space\)\>/
|
||||
syn match svgAttr contained /\<\(xmlns:\)\@<=xlink\>/
|
||||
" Events attributes
|
||||
if exists("svg_no_events_rendering")
|
||||
syn match svgEventAttr contained /\<on\(abort\|activate\|begin\|click\|end\|error\|focus\(in\|out\)\|\(un\)\?load\|mouse\(down\|move\|out\|over\|up\)\|repeat\|resize\|scroll\|zoom\)\>/
|
||||
if main_syntax == 'svg'
|
||||
syn cluster xmlAttribHook add=svgEventAttr
|
||||
else
|
||||
syn cluster xhtmlAttribHook add=svgEventAttr
|
||||
endif
|
||||
endif
|
||||
|
||||
" Attribute new in SVG 1.1
|
||||
syn keyword svgAttr contained baseProfile
|
||||
|
||||
" Embedded ECMAScript (JavaScript)
|
||||
if main_syntax == 'svg'
|
||||
syn include @svgJavaScript syntax/javascript.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script[^>]*[^/]>+ keepend end=+</script>+me=s-1 contains=@svgJavaScript,svgScriptTag
|
||||
syn region svgScriptTag contained start=+<script+ end=+>+ contains=xmlTagName,xmlString,xmlAttrib
|
||||
endif
|
||||
|
||||
" Events attributes rendering
|
||||
if !exists("svg_no_events_rendering")
|
||||
syn region svgEvent contained start=+\<on\(abort\|activate\|begin\|click\|end\|error\|focus\(in\|out\)\|\(un\)\?load\|mouse\(down\|move\|out\|over\|up\)\|repeat\|resize\|scroll\|zoom\)\s*=\s*'+ keepend end=+'+ contains=svgEventSQ
|
||||
syn region svgEvent contained start=+\<on\(abort\|activate\|begin\|click\|end\|error\|focus\(in\|out\)\|\(un\)\?load\|mouse\(down\|move\|out\|over\|up\)\|repeat\|resize\|scroll\|zoom\)\s*=\s*"+ keepend end=+"+ contains=svgEventDQ
|
||||
if main_syntax == 'svg'
|
||||
syn cluster xmlAttribHook add=svgEvent
|
||||
else
|
||||
syn cluster xhtmlAttribHook add=svgEvent
|
||||
endif
|
||||
syn region svgEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@svgJavaScript,@xhtmlJavaScript
|
||||
syn region svgEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@svgJavaScript,@xhtmlJavaScript
|
||||
hi def link svgEventSQ svgEvent
|
||||
hi def link svgEventDQ svgEvent
|
||||
endif
|
||||
|
||||
" Rendering
|
||||
if !exists("svg_no_rendering")
|
||||
syn region svgTitle start="<title\>" end="</title>"me=e-8 contains=xmlTag,xmlEndTag,xmlEntity,xmlComment
|
||||
syn region svgDesc start="<desc\>" end="</desc>"me=e-8 contains=xmlTag,xmlEndTag,xmlEntity,xmlComment
|
||||
endif
|
||||
|
||||
" Highlighting
|
||||
hi link xmlAttrib Function
|
||||
hi def link xmlDecl Statement
|
||||
hi def link xmlDeclAttr Type
|
||||
hi link xmlEntity Special
|
||||
hi link xmlEntityPunct Special
|
||||
hi def link svgElement Statement
|
||||
hi def link svgAttr Type
|
||||
hi def link javaScript Special
|
||||
hi def link svgEvent javaScript
|
||||
hi def link svgEventAttr Type
|
||||
if !exists("svg_no_rendering")
|
||||
hi def link svgTitle Title
|
||||
hi def link svgDesc Title
|
||||
endif
|
||||
|
||||
let b:current_syntax = "svg"
|
||||
|
||||
if main_syntax == 'svg'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
" vim: ts=8
|
||||
@@ -21,15 +21,21 @@ syn keyword terraValueBool true false on off yes no
|
||||
""" data
|
||||
syn keyword terraDataTypeBI
|
||||
\ alicloud_account
|
||||
\ alicloud_actiontrails
|
||||
\ alicloud_api_gateway_apis
|
||||
\ alicloud_api_gateway_apps
|
||||
\ alicloud_api_gateway_groups
|
||||
\ alicloud_cas_certificates
|
||||
\ alicloud_cen_bandwidth_limits
|
||||
\ alicloud_cen_bandwidth_packages
|
||||
\ alicloud_cen_instances
|
||||
\ alicloud_cen_region_route_entries
|
||||
\ alicloud_cen_route_entries
|
||||
\ alicloud_common_bandwidth_packages
|
||||
\ alicloud_cr_namespaces
|
||||
\ alicloud_cr_repos
|
||||
\ alicloud_cs_kubernetes_clusters
|
||||
\ alicloud_cs_managed_kubernetes_clusters
|
||||
\ alicloud_db_instances
|
||||
\ alicloud_disks
|
||||
\ alicloud_dns_domain_groups
|
||||
@@ -37,11 +43,13 @@ syn keyword terraDataTypeBI
|
||||
\ alicloud_dns_domains
|
||||
\ alicloud_dns_groups
|
||||
\ alicloud_dns_records
|
||||
\ alicloud_drds_instances
|
||||
\ alicloud_eips
|
||||
\ alicloud_elasticsearch_instances
|
||||
\ alicloud_fc_functions
|
||||
\ alicloud_fc_services
|
||||
\ alicloud_fc_triggers
|
||||
\ alicloud_forward_entries
|
||||
\ alicloud_images
|
||||
\ alicloud_instance_types
|
||||
\ alicloud_instances
|
||||
@@ -52,6 +60,11 @@ syn keyword terraDataTypeBI
|
||||
\ alicloud_mns_topic_subscriptions
|
||||
\ alicloud_mns_topics
|
||||
\ alicloud_mongo_instances
|
||||
\ alicloud_nas_access_groups
|
||||
\ alicloud_nas_access_rules
|
||||
\ alicloud_nas_file_systems
|
||||
\ alicloud_nas_mount_targets
|
||||
\ alicloud_nat_gateways
|
||||
\ alicloud_network_interfaces
|
||||
\ alicloud_oss_bucket_objects
|
||||
\ alicloud_oss_buckets
|
||||
@@ -64,6 +77,8 @@ syn keyword terraDataTypeBI
|
||||
\ alicloud_ram_roles
|
||||
\ alicloud_ram_users
|
||||
\ alicloud_regions
|
||||
\ alicloud_route_entries
|
||||
\ alicloud_route_tables
|
||||
\ alicloud_router_interfaces
|
||||
\ alicloud_security_group_rules
|
||||
\ alicloud_security_groups
|
||||
@@ -75,6 +90,7 @@ syn keyword terraDataTypeBI
|
||||
\ alicloud_slb_server_certificates
|
||||
\ alicloud_slb_server_groups
|
||||
\ alicloud_slbs
|
||||
\ alicloud_snat_entries
|
||||
\ alicloud_vpcs
|
||||
\ alicloud_vpn_connections
|
||||
\ alicloud_vpn_customer_gateways
|
||||
@@ -125,6 +141,7 @@ syn keyword terraDataTypeBI
|
||||
\ aws_ec2_transit_gateway
|
||||
\ aws_ec2_transit_gateway_route_table
|
||||
\ aws_ec2_transit_gateway_vpc_attachment
|
||||
\ aws_ec2_transit_gateway_vpn_attachment
|
||||
\ aws_ecr_repository
|
||||
\ aws_ecs_cluster
|
||||
\ aws_ecs_container_definition
|
||||
@@ -201,6 +218,7 @@ syn keyword terraDataTypeBI
|
||||
\ aws_storagegateway_local_disk
|
||||
\ aws_subnet
|
||||
\ aws_subnet_ids
|
||||
\ aws_transfer_server
|
||||
\ aws_vpc
|
||||
\ aws_vpc_dhcp_options
|
||||
\ aws_vpc_endpoint
|
||||
@@ -211,6 +229,7 @@ syn keyword terraDataTypeBI
|
||||
\ aws_workspaces_bundle
|
||||
\ azuread_user
|
||||
\ azurerm_api_management
|
||||
\ azurerm_api_management_api
|
||||
\ azurerm_api_management_group
|
||||
\ azurerm_api_management_product
|
||||
\ azurerm_api_management_user
|
||||
@@ -393,6 +412,7 @@ syn keyword terraDataTypeBI
|
||||
\ google_container_registry_repository
|
||||
\ google_dns_managed_zone
|
||||
\ google_folder
|
||||
\ google_folder_organization_policy
|
||||
\ google_iam_policy
|
||||
\ google_iam_role
|
||||
\ google_kms_crypto_key
|
||||
@@ -401,6 +421,7 @@ syn keyword terraDataTypeBI
|
||||
\ google_netblock_ip_ranges
|
||||
\ google_organization
|
||||
\ google_project
|
||||
\ google_project_organization_policy
|
||||
\ google_project_services
|
||||
\ google_projects
|
||||
\ google_service_account
|
||||
@@ -409,6 +430,7 @@ syn keyword terraDataTypeBI
|
||||
\ google_storage_object_signed_url
|
||||
\ google_storage_project_service_account
|
||||
\ google_storage_transfer_project_service_account
|
||||
\ google_tpu_tensorflow_versions
|
||||
\ grafana_data_source
|
||||
\ hcloud_datacenter
|
||||
\ hcloud_datacenters
|
||||
@@ -423,6 +445,7 @@ syn keyword terraDataTypeBI
|
||||
\ heroku_app
|
||||
\ heroku_space
|
||||
\ heroku_space_peering_info
|
||||
\ heroku_team
|
||||
\ http
|
||||
\ huaweicloud_antiddos_v1
|
||||
\ huaweicloud_cce_cluster_v3
|
||||
@@ -622,6 +645,8 @@ syn keyword terraDataTypeBI
|
||||
\ oci_database_autonomous_database_wallet
|
||||
\ oci_database_autonomous_databases
|
||||
\ oci_database_backups
|
||||
\ oci_database_data_guard_association
|
||||
\ oci_database_data_guard_associations
|
||||
\ oci_database_database
|
||||
\ oci_database_databases
|
||||
\ oci_database_db_home
|
||||
@@ -730,6 +755,11 @@ syn keyword terraDataTypeBI
|
||||
\ oci_ons_subscriptions
|
||||
\ oci_streaming_stream
|
||||
\ oci_streaming_streams
|
||||
\ oci_waas_certificate
|
||||
\ oci_waas_certificates
|
||||
\ oci_waas_edge_subnets
|
||||
\ oci_waas_waas_policies
|
||||
\ oci_waas_waas_policy
|
||||
\ oneandone_instance_size
|
||||
\ opc_compute_image_list_entry
|
||||
\ opc_compute_ip_address_reservation
|
||||
@@ -764,6 +794,7 @@ syn keyword terraDataTypeBI
|
||||
\ openstack_networking_secgroup_v2
|
||||
\ openstack_networking_subnet_v2
|
||||
\ openstack_networking_subnetpool_v2
|
||||
\ openstack_networking_trunk_v2
|
||||
\ openstack_sharedfilesystem_availability_zones_v2
|
||||
\ openstack_sharedfilesystem_share_v2
|
||||
\ openstack_sharedfilesystem_sharenetwork_v2
|
||||
@@ -913,9 +944,14 @@ syn keyword terraDataTypeBI
|
||||
\ triton_image
|
||||
\ triton_network
|
||||
\ triton_package
|
||||
\ ucloud_disks
|
||||
\ ucloud_eips
|
||||
\ ucloud_images
|
||||
\ ucloud_instances
|
||||
\ ucloud_lb_attachments
|
||||
\ ucloud_lb_listeners
|
||||
\ ucloud_lb_rules
|
||||
\ ucloud_lbs
|
||||
\ ucloud_projects
|
||||
\ ucloud_zones
|
||||
\ vault_approle_auth_backend_role_id
|
||||
@@ -957,11 +993,13 @@ syn keyword terraDataTypeBI
|
||||
syn keyword terraResourceTypeBI
|
||||
\ acme_certificate
|
||||
\ acme_registration
|
||||
\ alicloud_actiontrail
|
||||
\ alicloud_api_gateway_api
|
||||
\ alicloud_api_gateway_app
|
||||
\ alicloud_api_gateway_app_attachment
|
||||
\ alicloud_api_gateway_group
|
||||
\ alicloud_api_gateway_vpc_access
|
||||
\ alicloud_cas_certificate
|
||||
\ alicloud_cdn_domain
|
||||
\ alicloud_cdn_domain_config
|
||||
\ alicloud_cdn_domain_new
|
||||
@@ -970,12 +1008,14 @@ syn keyword terraResourceTypeBI
|
||||
\ alicloud_cen_bandwidth_package_attachment
|
||||
\ alicloud_cen_instance
|
||||
\ alicloud_cen_instance_attachment
|
||||
\ alicloud_cen_instance_grant
|
||||
\ alicloud_cen_route_entry
|
||||
\ alicloud_cms_alarm
|
||||
\ alicloud_common_bandwidth_package
|
||||
\ alicloud_common_bandwidth_package_attachment
|
||||
\ alicloud_container_cluster
|
||||
\ alicloud_cr_namespace
|
||||
\ alicloud_cr_repo
|
||||
\ alicloud_cs_application
|
||||
\ alicloud_cs_kubernetes
|
||||
\ alicloud_cs_managed_kubernetes
|
||||
@@ -991,6 +1031,7 @@ syn keyword terraResourceTypeBI
|
||||
\ alicloud_db_instance
|
||||
\ alicloud_db_read_write_splitting_connection
|
||||
\ alicloud_db_readonly_instance
|
||||
\ alicloud_ddoscoo_instance
|
||||
\ alicloud_disk
|
||||
\ alicloud_disk_attachment
|
||||
\ alicloud_dns
|
||||
@@ -1028,6 +1069,7 @@ syn keyword terraResourceTypeBI
|
||||
\ alicloud_mns_queue
|
||||
\ alicloud_mns_topic
|
||||
\ alicloud_mns_topic_subscription
|
||||
\ alicloud_mongodb_instance
|
||||
\ alicloud_nas_access_group
|
||||
\ alicloud_nas_access_rule
|
||||
\ alicloud_nas_file_system
|
||||
@@ -1126,9 +1168,11 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_appmesh_route
|
||||
\ aws_appmesh_virtual_node
|
||||
\ aws_appmesh_virtual_router
|
||||
\ aws_appmesh_virtual_service
|
||||
\ aws_appsync_api_key
|
||||
\ aws_appsync_datasource
|
||||
\ aws_appsync_graphql_api
|
||||
\ aws_appsync_resolver
|
||||
\ aws_athena_database
|
||||
\ aws_athena_named_query
|
||||
\ aws_autoscaling_attachment
|
||||
@@ -1137,6 +1181,7 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_autoscaling_notification
|
||||
\ aws_autoscaling_policy
|
||||
\ aws_autoscaling_schedule
|
||||
\ aws_backup_plan
|
||||
\ aws_backup_vault
|
||||
\ aws_batch_compute_environment
|
||||
\ aws_batch_job_definition
|
||||
@@ -1144,6 +1189,8 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_budgets_budget
|
||||
\ aws_cloud9_environment_ec2
|
||||
\ aws_cloudformation_stack
|
||||
\ aws_cloudformation_stack_set
|
||||
\ aws_cloudformation_stack_set_instance
|
||||
\ aws_cloudfront_distribution
|
||||
\ aws_cloudfront_origin_access_identity
|
||||
\ aws_cloudfront_public_key
|
||||
@@ -1289,6 +1336,7 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_glacier_vault
|
||||
\ aws_glacier_vault_lock
|
||||
\ aws_globalaccelerator_accelerator
|
||||
\ aws_globalaccelerator_listener
|
||||
\ aws_glue_catalog_database
|
||||
\ aws_glue_catalog_table
|
||||
\ aws_glue_classifier
|
||||
@@ -1298,6 +1346,7 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_glue_security_configuration
|
||||
\ aws_glue_trigger
|
||||
\ aws_guardduty_detector
|
||||
\ aws_guardduty_invite_accepter
|
||||
\ aws_guardduty_ipset
|
||||
\ aws_guardduty_member
|
||||
\ aws_guardduty_threatintelset
|
||||
@@ -1342,6 +1391,8 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_kinesis_firehose_delivery_stream
|
||||
\ aws_kinesis_stream
|
||||
\ aws_kms_alias
|
||||
\ aws_kms_ciphertext
|
||||
\ aws_kms_external_key
|
||||
\ aws_kms_grant
|
||||
\ aws_kms_key
|
||||
\ aws_lambda_alias
|
||||
@@ -1444,6 +1495,8 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_route53_query_log
|
||||
\ aws_route53_record
|
||||
\ aws_route53_resolver_endpoint
|
||||
\ aws_route53_resolver_rule
|
||||
\ aws_route53_resolver_rule_association
|
||||
\ aws_route53_zone
|
||||
\ aws_route53_zone_association
|
||||
\ aws_route_table
|
||||
@@ -1456,6 +1509,7 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_s3_bucket_object
|
||||
\ aws_s3_bucket_policy
|
||||
\ aws_s3_bucket_public_access_block
|
||||
\ aws_sagemaker_endpoint_configuration
|
||||
\ aws_sagemaker_model
|
||||
\ aws_sagemaker_notebook_instance
|
||||
\ aws_secretsmanager_secret
|
||||
@@ -1585,11 +1639,19 @@ syn keyword terraResourceTypeBI
|
||||
\ azuread_service_principal_password
|
||||
\ azuread_user
|
||||
\ azurerm_api_management
|
||||
\ azurerm_api_management_api
|
||||
\ azurerm_api_management_api_operation
|
||||
\ azurerm_api_management_authorization_server
|
||||
\ azurerm_api_management_certificate
|
||||
\ azurerm_api_management_group
|
||||
\ azurerm_api_management_group_user
|
||||
\ azurerm_api_management_logger
|
||||
\ azurerm_api_management_openid_connect_provider
|
||||
\ azurerm_api_management_product
|
||||
\ azurerm_api_management_product_api
|
||||
\ azurerm_api_management_product_group
|
||||
\ azurerm_api_management_property
|
||||
\ azurerm_api_management_subscription
|
||||
\ azurerm_api_management_user
|
||||
\ azurerm_app_service
|
||||
\ azurerm_app_service_active_slot
|
||||
@@ -1829,6 +1891,7 @@ syn keyword terraResourceTypeBI
|
||||
\ bigip_ltm_pool_attachment
|
||||
\ bigip_ltm_profile_fasthttp
|
||||
\ bigip_ltm_profile_fastl4
|
||||
\ bigip_ltm_profile_http
|
||||
\ bigip_ltm_profile_http2
|
||||
\ bigip_ltm_profile_httpcompress
|
||||
\ bigip_ltm_profile_oneconnect
|
||||
@@ -1850,12 +1913,13 @@ syn keyword terraResourceTypeBI
|
||||
\ bitbucket_default_reviewers
|
||||
\ bitbucket_hook
|
||||
\ bitbucket_repository
|
||||
\ brightbox_api_client
|
||||
\ brightbox_cloudip
|
||||
\ brightbox_container
|
||||
\ brightbox_database_server
|
||||
\ brightbox_firewall_policy
|
||||
\ brightbox_firewall_rule
|
||||
\ brightbox_load_balancer
|
||||
\ brightbox_orbit_container
|
||||
\ brightbox_server
|
||||
\ brightbox_server_group
|
||||
\ chef_acl
|
||||
@@ -1938,6 +2002,7 @@ syn keyword terraResourceTypeBI
|
||||
\ cobbler_snippet
|
||||
\ cobbler_system
|
||||
\ consul_agent_service
|
||||
\ consul_autopilot_config
|
||||
\ consul_catalog_entry
|
||||
\ consul_intention
|
||||
\ consul_key_prefix
|
||||
@@ -1955,6 +2020,7 @@ syn keyword terraResourceTypeBI
|
||||
\ datadog_timeboard
|
||||
\ datadog_user
|
||||
\ digitalocean_certificate
|
||||
\ digitalocean_database_cluster
|
||||
\ digitalocean_domain
|
||||
\ digitalocean_droplet
|
||||
\ digitalocean_droplet_snapshot
|
||||
@@ -2280,10 +2346,12 @@ syn keyword terraResourceTypeBI
|
||||
\ heroku_addon
|
||||
\ heroku_addon_attachment
|
||||
\ heroku_app
|
||||
\ heroku_app_config_association
|
||||
\ heroku_app_feature
|
||||
\ heroku_app_release
|
||||
\ heroku_build
|
||||
\ heroku_cert
|
||||
\ heroku_config
|
||||
\ heroku_domain
|
||||
\ heroku_drain
|
||||
\ heroku_formation
|
||||
@@ -2397,6 +2465,30 @@ syn keyword terraResourceTypeBI
|
||||
\ influxdb_continuous_query
|
||||
\ influxdb_database
|
||||
\ influxdb_user
|
||||
\ jdcloud_availability_group
|
||||
\ jdcloud_disk
|
||||
\ jdcloud_disk_attachment
|
||||
\ jdcloud_eip
|
||||
\ jdcloud_eip_association
|
||||
\ jdcloud_instance
|
||||
\ jdcloud_instance_template
|
||||
\ jdcloud_key_pairs
|
||||
\ jdcloud_network_acl
|
||||
\ jdcloud_network_interface
|
||||
\ jdcloud_network_interface_attachment
|
||||
\ jdcloud_network_security_group
|
||||
\ jdcloud_network_security_group_rules
|
||||
\ jdcloud_oss_bucket
|
||||
\ jdcloud_oss_bucket_upload
|
||||
\ jdcloud_rds_account
|
||||
\ jdcloud_rds_database
|
||||
\ jdcloud_rds_instance
|
||||
\ jdcloud_rds_privilege
|
||||
\ jdcloud_route_table
|
||||
\ jdcloud_route_table_association
|
||||
\ jdcloud_route_table_rules
|
||||
\ jdcloud_subnet
|
||||
\ jdcloud_vpc
|
||||
\ kubernetes_cluster_role
|
||||
\ kubernetes_cluster_role_binding
|
||||
\ kubernetes_config_map
|
||||
@@ -2469,6 +2561,8 @@ syn keyword terraResourceTypeBI
|
||||
\ newrelic_infra_alert_condition
|
||||
\ newrelic_nrql_alert_condition
|
||||
\ newrelic_synthetics_alert_condition
|
||||
\ newrelic_synthetics_monitor
|
||||
\ newrelic_synthetics_monitor_script
|
||||
\ nomad_acl_policy
|
||||
\ nomad_acl_token
|
||||
\ nomad_job
|
||||
@@ -2605,6 +2699,7 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_database_autonomous_database
|
||||
\ oci_database_autonomous_database_backup
|
||||
\ oci_database_backup
|
||||
\ oci_database_data_guard_association
|
||||
\ oci_database_db_home
|
||||
\ oci_database_db_system
|
||||
\ oci_database_exadata_iorm_config
|
||||
@@ -2666,6 +2761,8 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_ons_notification_topic
|
||||
\ oci_ons_subscription
|
||||
\ oci_streaming_stream
|
||||
\ oci_waas_certificate
|
||||
\ oci_waas_waas_policy
|
||||
\ oneandone_baremetal
|
||||
\ oneandone_block_storage
|
||||
\ oneandone_firewall_policy
|
||||
@@ -2894,9 +2991,11 @@ syn keyword terraResourceTypeBI
|
||||
\ ovh_vrack_cloudproject
|
||||
\ ovh_vrack_publiccloud_attachment
|
||||
\ packet_bgp_session
|
||||
\ packet_connect
|
||||
\ packet_device
|
||||
\ packet_ip_attachment
|
||||
\ packet_organization
|
||||
\ packet_port_vlan_attachment
|
||||
\ packet_project
|
||||
\ packet_project_ssh_key
|
||||
\ packet_reserved_ip_block
|
||||
@@ -3057,6 +3156,7 @@ syn keyword terraResourceTypeBI
|
||||
\ random_shuffle
|
||||
\ random_string
|
||||
\ random_uuid
|
||||
\ resource_group_name
|
||||
\ rightscale_credential
|
||||
\ rightscale_cwf_process
|
||||
\ rightscale_deployment
|
||||
@@ -3259,6 +3359,8 @@ syn keyword terraResourceTypeBI
|
||||
\ vault_gcp_auth_backend
|
||||
\ vault_gcp_auth_backend_role
|
||||
\ vault_gcp_secret_backend
|
||||
\ vault_gcp_secret_roleset
|
||||
\ vault_generic_endpoint
|
||||
\ vault_generic_secret
|
||||
\ vault_github_auth_backend
|
||||
\ vault_github_team
|
||||
@@ -3267,6 +3369,7 @@ syn keyword terraResourceTypeBI
|
||||
\ vault_identity_entity_alias
|
||||
\ vault_identity_group
|
||||
\ vault_identity_group_alias
|
||||
\ vault_identity_group_policies
|
||||
\ vault_jwt_auth_backend
|
||||
\ vault_jwt_auth_backend_role
|
||||
\ vault_kubernetes_auth_backend_config
|
||||
@@ -3294,6 +3397,7 @@ syn keyword terraResourceTypeBI
|
||||
\ vault_rgp_policy
|
||||
\ vault_ssh_secret_backend_ca
|
||||
\ vault_ssh_secret_backend_role
|
||||
\ vault_token
|
||||
\ vault_token_auth_backend_role
|
||||
\ vcd_catalog
|
||||
\ vcd_catalog_item
|
||||
@@ -3301,6 +3405,7 @@ syn keyword terraResourceTypeBI
|
||||
\ vcd_dnat
|
||||
\ vcd_edgegateway_vpn
|
||||
\ vcd_firewall_rules
|
||||
\ vcd_independent_disk
|
||||
\ vcd_inserted_media
|
||||
\ vcd_network_direct
|
||||
\ vcd_network_isolated
|
||||
@@ -3308,6 +3413,7 @@ syn keyword terraResourceTypeBI
|
||||
\ vcd_org
|
||||
\ vcd_snat
|
||||
\ vcd_vapp
|
||||
\ vcd_vapp_network
|
||||
\ vcd_vapp_vm
|
||||
\ vsphere_compute_cluster
|
||||
\ vsphere_compute_cluster_host_group
|
||||
|
||||
@@ -176,7 +176,7 @@ if exists("typescript_enable_domhtmlcss")
|
||||
syntax keyword typescriptCssStyles contained border borderBottom borderLeft borderRight borderTop borderBottomColor borderLeftColor borderTopColor borderBottomStyle borderLeftStyle borderRightStyle borderTopStyle borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderColor borderStyle borderWidth borderCollapse borderSpacing captionSide emptyCells tableLayout
|
||||
syntax keyword typescriptCssStyles contained margin marginBottom marginLeft marginRight marginTop outline outlineColor outlineStyle outlineWidth padding paddingBottom paddingLeft paddingRight paddingTop
|
||||
syntax keyword typescriptCssStyles contained listStyle listStyleImage listStylePosition listStyleType
|
||||
syntax keyword typescriptCssStyles contained background backgroundAttachment backgroundColor backgroundImage gackgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat
|
||||
syntax keyword typescriptCssStyles contained background backgroundAttachment backgroundColor backgroundImage backgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat
|
||||
syntax keyword typescriptCssStyles contained clear clip clipBottom clipLeft clipRight clipTop content counterIncrement counterReset cssFloat cursor direction display filter layoutGrid layoutGridChar layoutGridLine layoutGridMode layoutGridType
|
||||
syntax keyword typescriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText
|
||||
syntax keyword typescriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor
|
||||
|
||||
197
syntax/xdc.vim
Normal file
197
syntax/xdc.vim
Normal file
@@ -0,0 +1,197 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'xdc') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: XDC - Xilinx Design Constraints
|
||||
" Author: Amal Khailtash <amal.khailtash@gmail.com>
|
||||
" Maintainer: Amal Khailtash <amal.khailtash@gmail.com>
|
||||
" Last Change: Tue, Oct 09, 2012 7:46:15 PM
|
||||
" Credits: Based on SDC Vim syntax file
|
||||
" Version: 1.2
|
||||
" Revision Comments:
|
||||
" Amal Khailtash <amal.khailtash@gmail.com> - Tue, Oct 09, 2012 7:46:15 PM
|
||||
" 1.2 - Added property values and constants
|
||||
" 1.1 - Cleanup
|
||||
" 1.0 - Initial revision
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Read the TCL syntax to start with
|
||||
runtime! syntax/tcl.vim
|
||||
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" SDC-specific keywords
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Operating Conditions
|
||||
syntax keyword sdcOperatingConditions set_operating_conditions
|
||||
|
||||
" System Interface
|
||||
syntax keyword sdcSystemInterface set_load
|
||||
|
||||
" Timing Constraints
|
||||
syntax keyword sdcTimingConstraints create_clock create_generated_clock group_path
|
||||
syntax keyword sdcTimingConstraints set_clock_groups set_clock_latency set_clock_sense
|
||||
syntax keyword sdcTimingConstraints set_clock_uncertainty set_data_check set_disable_timing
|
||||
syntax keyword sdcTimingConstraints set_input_delay set_max_time_borrow set_output_delay
|
||||
syntax keyword sdcTimingConstraints set_propagated_clock
|
||||
|
||||
" Timing Exceptions
|
||||
syntax keyword sdcTimingExceptions set_false_path set_max_delay set_min_delay set_multicycle_path
|
||||
|
||||
" Logic Assignments
|
||||
syntax keyword sdcLogicAssignments set_case_analysis set_logic_dc set_logic_one set_logic_zero
|
||||
|
||||
" Design Object Access Commands
|
||||
syntax keyword sdcObjectAccessCommands all_clocks all_fanin all_fanout all_inputs all_outputs
|
||||
syntax keyword sdcObjectAccessCommands all_registers current_design get_cells get_clocks get_nets
|
||||
syntax keyword sdcObjectAccessCommands get_pins get_ports get_timing_arcs get_timing_paths
|
||||
|
||||
" General Purpose Commands
|
||||
syntax keyword sdcGeneralPurposeCommands current_instance set_hierarchy_separator set_units
|
||||
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Unsupported SDC Commands
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Unsupported
|
||||
syntax keyword sdcCollection_Unsupported foreach_in_collection
|
||||
|
||||
" Wire Load Models
|
||||
syntax keyword sdcWireLoadModels_Unsupported set_wire_load_min_block_size set_wire_load_mode
|
||||
syntax keyword sdcWireLoadModels_Unsupported set_wire_load_model set_wire_load_selection_group
|
||||
|
||||
" System Interface
|
||||
syntax keyword sdcSystemInterface_Unsupported set_drive set_driving_cell set_fanout_load
|
||||
syntax keyword sdcSystemInterface_Unsupported set_input_transition set_port_fanout_number
|
||||
|
||||
" Design Rule Constraints
|
||||
syntax keyword sdcDesignRuleConstraints_Unsupported set_max_capacitance set_min_capacitance set_max_fanout
|
||||
syntax keyword sdcDesignRuleConstraints_Unsupported set_max_transition
|
||||
|
||||
" Timing Constraints
|
||||
syntax keyword sdcTimingConstraints_Unsupported set_clock_gating_check
|
||||
syntax keyword sdcTimingConstraints_Unsupported set_clock_transition
|
||||
syntax keyword sdcTimingConstraints_Unsupported set_ideal_latency set_ideal_network set_ideal_transition
|
||||
syntax keyword sdcTimingConstraints_Unsupported set_resistance set_timing_derate
|
||||
|
||||
" Area Constraints
|
||||
syntax keyword sdcAreaConstraints_Unsupported set_max_area
|
||||
|
||||
" Multivoltage and power optimization constraints
|
||||
syntax keyword sdcMultivoltagePowerOpt_Unsupported create_voltage_area set_level_shifter_strategy
|
||||
syntax keyword sdcMultivoltagePowerOpt_Unsupported set_level_shifter_threshold set_max_dynamic_power
|
||||
syntax keyword sdcMultivoltagePowerOpt_Unsupported set_max_leakage_power
|
||||
|
||||
" Altera Unsupported
|
||||
syntax keyword sdcAltera_Unsupported create_timing_netlist update_timing_netlist
|
||||
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" XDC-specific extension keywords
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Operating Conditions
|
||||
syntax keyword xdcOperatingConditions report_operating_conditions reset_operating_conditions
|
||||
|
||||
" Timing Constraints
|
||||
syntax keyword xdcTimingConstraints set_input_jitter set_external_delay set_system_jitter
|
||||
|
||||
" Logic Assignments
|
||||
syntax keyword xdcLogicAssignments set_logic_unconnected
|
||||
|
||||
" Design Object Access Commands
|
||||
syntax keyword xdcObjectAccessCommands all_cpus all_dsps all_ffs all_hsios all_latches all_rams
|
||||
syntax keyword xdcObjectAccessCommands get_generated_clocks get_iobanks get_package_pins
|
||||
syntax keyword xdcObjectAccessCommands get_path_groups get_sites filter set_property
|
||||
|
||||
" General Purpose Commands
|
||||
syntax keyword xdcGeneralPurposeCommands get_hierarchy_separator
|
||||
|
||||
" Floorplanning Commands
|
||||
syntax keyword xdcFloorplanCommands add_cells_to_pblock create_pblock delete_pblock get_pblocks
|
||||
syntax keyword xdcFloorplanCommands remove_cells_from_pblock resize_pblock
|
||||
|
||||
" Power-related Commands
|
||||
syntax keyword xdcPowerCommands set_default_switching_activity set_power_opt
|
||||
syntax keyword xdcPowerCommands set_switching_activity
|
||||
|
||||
" Power-related Commands
|
||||
syntax keyword xdcPinPlanningCommands set_package_pin_val
|
||||
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Constants
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
syntax keyword xdcConstant NO YES FALSE TRUE DISABLE ENABLE NONE BACKBONE SLOW FAST DONTCARE
|
||||
syntax keyword xdcConstant NORMAL HIGH IBUF IFD BOTH HALT CONTINUE CORRECT_AND_CONTINUE
|
||||
syntax keyword xdcConstant CORRECT_AND_HALT PRE_COMPUTED FIRST_READBACK
|
||||
syntax keyword xdcConstant DIFF_HSTL_I DIFF_HSTL_II DIFF_HSTL_II_18 DIFF_HSTL_II_DCI
|
||||
syntax keyword xdcConstant DIFF_HSTL_II_DCI_18 DIFF_HSTL_II_T_DCI DIFF_HSTL_II_T_DCI_18
|
||||
syntax keyword xdcConstant DIFF_HSTL_II__T_DCI DIFF_HSTL_I_18 DIFF_HSTL_I_DCI
|
||||
syntax keyword xdcConstant DIFF_HSTL_I_DCI_18 DIFF_HSUL_12_DCI DIFF_SSTL12_DCI
|
||||
syntax keyword xdcConstant DIFF_SSTL12_T_DCI DIFF_SSTL135 DIFF_SSTL135_DCI DIFF_SSTL135_R
|
||||
syntax keyword xdcConstant DIFF_SSTL135_T_DCI DIFF_SSTL15 DIFF_SSTL15_DCI DIFF_SSTL15_R
|
||||
syntax keyword xdcConstant DIFF_SSTL15_T_DCI DIFF_SSTL18_I DIFF_SSTL18_II DIFF_SSTL18_II_DCI
|
||||
syntax keyword xdcConstant DIFF_SSTL18_II_T_DCI DIFF_SSTL18_I_DCI HSLVDCI_15 HSLVDCI_18 HSTL_I
|
||||
syntax keyword xdcConstant HSTL_II HSTL_II_18 HSTL_II_DCI HSTL_II_DCI_18 HSTL_II_T_DCI
|
||||
syntax keyword xdcConstant HSTL_II_T_DCI_18 HSTL_I_18 HSTL_I_DCI HSTL_I_DCI_18 HSUL_12_DCI
|
||||
syntax keyword xdcConstant LVCMOS12 LVCMOS18 LVCMOS25 LVDCI_15 LVDCI_18 LVDCI_DV2_15 LVDS
|
||||
syntax keyword xdcConstant LVDCI_DV2_18 SSTL12_DCI SSTL12_T_DCI SSTL135 SSTL135_DCI SSTL135_R
|
||||
syntax keyword xdcConstant SSTL135_T_DCI SSTL15 SSTL15_DCI SSTL15_R SSTL15_T_DCI SSTL18_I
|
||||
syntax keyword xdcConstant SSTL18_II SSTL18_II_DCI SSTL18_II_T_DCI SSTL18_I_DCI
|
||||
syntax keyword xdcConstant TUNED_SPLIT UNTUNED_SPLIT_25 UNTUNED_SPLIT_40 UNTUNED_SPLIT_50
|
||||
syntax keyword xdcConstant UNTUNED_SPLIT_60 UNTINED_SPLIT_75 TUNED UNTUNED_25 UNTUNED_50
|
||||
syntax keyword xdcConstant UNTUNED_75
|
||||
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Properties
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
syntax keyword xdcProperty ASYNC_REG BEL CLOCK_DEDICATED_ROUTE COMPATIBLE_CONFIG_MODES
|
||||
syntax keyword xdcProperty DCI_CASCADE DIFF_TERM DONT_TOUCH DRIVE HIODELAY_GROUP HLUTNM IN_TERM
|
||||
syntax keyword xdcProperty INTERNAL_VREF IOB IODELAY_GROUP IOSTANDARD KEEP_HIERARCHY KEEPER LOC
|
||||
syntax keyword xdcProperty LUTNM MARK_DEBUG OUT_TERM PACKAGE_PIN POST_CRC POST_CRC_ACTION
|
||||
syntax keyword xdcProperty POST_CRC_FREQ POST_CRC_INIT_FLAG POST_CRC_SOURCE PROHIBIT PULLDOWN
|
||||
syntax keyword xdcProperty PULLUP SLEW VCCAUX_IO
|
||||
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Command Flags
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
syntax match xdcFlags "[[:space:]]-[[:alpha:]]*\>"
|
||||
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
" Define the default highlighting.
|
||||
" ----------------------------------------------------------------------------------------------------------------------
|
||||
highligh default link sdcOperatingConditions Operator
|
||||
highligh default link sdcSystemInterface Operator
|
||||
highligh default link sdcTimingConstraints Operator
|
||||
highligh default link sdcTimingExceptions Operator
|
||||
highligh default link sdcLogicAssignments Operator
|
||||
highligh default link sdcObjectAccessCommands Operator
|
||||
highligh default link sdcGeneralPurposeCommands Operator
|
||||
|
||||
highligh default link sdcCollection_Unsupported WarningMsg
|
||||
highligh default link sdcWireLoadModels_Unsupported WarningMsg
|
||||
highligh default link sdcSystemInterface_Unsupported WarningMsg
|
||||
highligh default link sdcDesignRuleConstraints_Unsupported WarningMsg
|
||||
highligh default link sdcTimingConstraints_Unsupported WarningMsg
|
||||
highligh default link sdcAreaConstraints_Unsupported WarningMsg
|
||||
highligh default link sdcMultivoltagePowerOpt_Unsupported WarningMsg
|
||||
highligh default link sdcAltera_Unsupported WarningMsg
|
||||
|
||||
highligh default link xdcOperatingConditions Operator
|
||||
highligh default link xdcTimingConstraints Operator
|
||||
highligh default link xdcLogicAssignments Operator
|
||||
highligh default link xdcObjectAccessCommands Operator
|
||||
highligh default link xdcGeneralPurposeCommands Operator
|
||||
highligh default link xdcFloorplanCommands Operaror
|
||||
highligh default link xdcPowerCommands Operaror
|
||||
highligh default link xdcPinPlanningCommands Operaror
|
||||
|
||||
highligh default link xdcConstant Constant
|
||||
highligh default link xdcProperty Type
|
||||
|
||||
highligh default link xdcFlags Special
|
||||
|
||||
let b:current_syntax = "xdc"
|
||||
|
||||
" vim: fileformat=unix tabstop=2 shiftwidth=2 expandtab
|
||||
Reference in New Issue
Block a user