mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fd5c11a20 | ||
|
|
679ccf0303 | ||
|
|
eacf785f5a | ||
|
|
83bd298476 | ||
|
|
415261dd1f | ||
|
|
4d18a5e5dd | ||
|
|
a55b6aa3aa | ||
|
|
1d45a6d4f0 |
15
README.md
15
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 100+ times faster** than the <!--Package Count-->133<!--/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`).
|
||||
@@ -84,7 +84,6 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) (syntax)
|
||||
- [go](https://github.com/fatih/vim-go) (syntax, compiler, indent)
|
||||
- [gradle](https://github.com/tfnico/vim-gradle) (compiler)
|
||||
- [graphql](https://github.com/jparise/vim-graphql) (syntax, indent, ftplugin)
|
||||
- [groovy-indent](https://github.com/vim-scripts/groovyindent-unix) (indent)
|
||||
- [groovy](https://github.com/vim-scripts/groovy.vim) (syntax)
|
||||
- [haml](https://github.com/sheerun/vim-haml) (syntax, indent, compiler, ftplugin)
|
||||
@@ -108,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)
|
||||
@@ -126,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)
|
||||
@@ -141,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)
|
||||
@@ -151,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)
|
||||
@@ -174,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)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
syn include @GraphQLSyntax syntax/graphql.vim
|
||||
if exists('s:current_syntax')
|
||||
let b:current_syntax = s:current_syntax
|
||||
endif
|
||||
|
||||
let s:tags = '\%(' . join(g:graphql_javascript_tags, '\|') . '\)'
|
||||
|
||||
exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend'
|
||||
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||
|
||||
" Support expression interpolation ((${...})) inside template strings.
|
||||
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=jsTemplateExpression containedin=graphqlFold keepend
|
||||
|
||||
hi def link graphqlTemplateString jsTemplateString
|
||||
hi def link graphqlTaggedTemplate jsTaggedTemplate
|
||||
hi def link graphqlTemplateExpression jsTemplateExpression
|
||||
|
||||
syn cluster jsExpression add=graphqlTaggedTemplate
|
||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||
1469
after/syntax/mma.vim
1469
after/syntax/mma.vim
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
syn include @GraphQLSyntax syntax/graphql.vim
|
||||
if exists('s:current_syntax')
|
||||
let b:current_syntax = s:current_syntax
|
||||
endif
|
||||
|
||||
let s:tags = '\%(' . join(g:graphql_javascript_tags, '\|') . '\)'
|
||||
|
||||
exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\`+ end=+`+ contains=@GraphQLSyntax,typescriptTemplateSubstitution extend'
|
||||
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||
|
||||
" Support expression interpolation ((${...})) inside template strings.
|
||||
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=typescriptTemplateSubstitution containedin=graphqlFold keepend
|
||||
|
||||
hi def link graphqlTemplateString typescriptTemplate
|
||||
hi def link graphqlTemplateExpression typescriptTemplateSubstitution
|
||||
|
||||
syn cluster typescriptExpression add=graphqlTaggedTemplate
|
||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||
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
@@ -37,21 +37,45 @@ function! s:run_cmd(cmd) abort
|
||||
return s:P.system(a:cmd)
|
||||
endfunction
|
||||
|
||||
function! s:find_root_by_spec(d) abort
|
||||
let dir = finddir('spec', a:d . ';')
|
||||
if dir ==# ''
|
||||
function! s:find_root_by(search_dir, d) abort
|
||||
let found_dir = finddir(a:search_dir, a:d . ';')
|
||||
if found_dir ==# ''
|
||||
return ''
|
||||
endif
|
||||
|
||||
" Note: ':h:h' for {root}/spec/ -> {root}/spec -> {root}
|
||||
return fnamemodify(dir, ':p:h:h')
|
||||
" Note: ':h:h' for {root}/{search_dir}/ -> {root}/{search_dir} -> {root}
|
||||
return fnamemodify(found_dir, ':p:h:h')
|
||||
endfunction
|
||||
|
||||
" Search the root directory containing a 'spec/' and a 'src/' directories.
|
||||
"
|
||||
" Searching for the 'spec/' directory is not enough: for example the crystal
|
||||
" compiler has a 'cr_sources/src/spec/' directory that would otherwise give the root
|
||||
" directory as 'cr_source/src/' instead of 'cr_sources/'.
|
||||
function! s:find_root_by_spec_and_src(d) abort
|
||||
" Search for 'spec/'
|
||||
let root = s:find_root_by('spec', a:d)
|
||||
" Check that 'src/' is also there
|
||||
if root !=# '' && isdirectory(root . '/src')
|
||||
return root
|
||||
endif
|
||||
|
||||
" Search for 'src/'
|
||||
let root = s:find_root_by('src', a:d)
|
||||
" Check that 'spec/' is also there
|
||||
if root !=# '' && isdirectory(root . '/spec')
|
||||
return root
|
||||
endif
|
||||
|
||||
" Cannot find a directory containing both 'src/' and 'spec/'
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! crystal_lang#entrypoint_for(file_path) abort
|
||||
let parent_dir = fnamemodify(a:file_path, ':p:h')
|
||||
let root_dir = s:find_root_by_spec(parent_dir)
|
||||
let root_dir = s:find_root_by_spec_and_src(parent_dir)
|
||||
if root_dir ==# ''
|
||||
" No spec diretory found. No need to make temporary file
|
||||
" No spec directory found. No need to make temporary file
|
||||
return a:file_path
|
||||
endif
|
||||
|
||||
@@ -232,7 +256,7 @@ endfunction
|
||||
|
||||
function! crystal_lang#run_all_spec(...) abort
|
||||
let path = a:0 == 0 ? expand('%:p:h') : a:1
|
||||
let root_path = s:find_root_by_spec(path)
|
||||
let root_path = s:find_root_by_spec_and_src(path)
|
||||
if root_path ==# ''
|
||||
return s:echo_error("'spec' directory is not found")
|
||||
endif
|
||||
@@ -250,9 +274,9 @@ function! crystal_lang#run_current_spec(...) abort
|
||||
let source_dir = fnamemodify(path, ':h')
|
||||
|
||||
" /foo/bar
|
||||
let root_dir = s:find_root_by_spec(source_dir)
|
||||
let root_dir = s:find_root_by_spec_and_src(source_dir)
|
||||
if root_dir ==# ''
|
||||
return s:echo_error("'spec' directory is not found")
|
||||
return s:echo_error("Root directory with 'src/' and 'spec/' not found")
|
||||
endif
|
||||
|
||||
" src
|
||||
|
||||
24
autoload/db/adapter/ecto.vim
Normal file
24
autoload/db/adapter/ecto.vim
Normal file
@@ -0,0 +1,24 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'elixir') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:path = expand('<sfile>:h')
|
||||
let s:cmd = join(['mix', 'run', '--no-start', '--no-compile', shellescape(s:path.'/get_repos.exs')])
|
||||
|
||||
function! s:repo_list() abort
|
||||
return map(systemlist(s:cmd), 'split(v:val)')
|
||||
endfunction
|
||||
|
||||
function! db#adapter#ecto#canonicalize(url) abort
|
||||
for l:item in s:repo_list()
|
||||
let l:name = get(l:item, 0)
|
||||
let l:url = get(l:item, 1)
|
||||
if !empty(l:name) && 'ecto:'.l:name ==# a:url
|
||||
return l:url
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! db#adapter#ecto#complete_opaque(url) abort
|
||||
return map(s:repo_list(), 'v:val[0]')
|
||||
endfunction
|
||||
@@ -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,16 @@ 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', [])
|
||||
return g:go_lsp_log
|
||||
endfunction
|
||||
|
||||
function! go#config#SetDebugDiag(value) abort
|
||||
let g:go_debug_diag = a:value
|
||||
endfunction
|
||||
@@ -239,15 +249,27 @@ function! go#config#SetTemplateAutocreate(value) abort
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterCommand() abort
|
||||
return get(g:, "go_metalinter_command", "")
|
||||
return get(g:, "go_metalinter_command", "gometalinter")
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterAutosaveEnabled() abort
|
||||
return get(g:, 'go_metalinter_autosave_enabled', ['vet', 'golint'])
|
||||
let l:default_enabled = ["vet", "golint"]
|
||||
|
||||
if go#config#MetalinterCommand() == "golangci-lint"
|
||||
let l:default_enabled = ["govet", "golint"]
|
||||
endif
|
||||
|
||||
return get(g:, "go_metalinter_autosave_enabled", default_enabled)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterEnabled() abort
|
||||
return get(g:, "go_metalinter_enabled", ['vet', 'golint', 'errcheck'])
|
||||
let l:default_enabled = ["vet", "golint", "errcheck"]
|
||||
|
||||
if go#config#MetalinterCommand() == "golangci-lint"
|
||||
let l:default_enabled = ["govet", "golint"]
|
||||
endif
|
||||
|
||||
return get(g:, "go_metalinter_enabled", default_enabled)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterDisabled() abort
|
||||
@@ -448,7 +470,6 @@ function! go#config#EchoGoInfo() abort
|
||||
return get(g:, "go_echo_go_info", 1)
|
||||
endfunction
|
||||
|
||||
|
||||
" Set the default value. A value of "1" is a shortcut for this, for
|
||||
" compatibility reasons.
|
||||
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -234,6 +240,9 @@ function! rustfmt#Cmd()
|
||||
endfunction
|
||||
|
||||
function! rustfmt#PreWrite()
|
||||
if !filereadable(expand("%@"))
|
||||
return
|
||||
endif
|
||||
if rust#GetConfigVar('rustfmt_autosave_if_config_present', 0)
|
||||
if findfile('rustfmt.toml', '.;') !=# '' || findfile('.rustfmt.toml', '.;') !=# ''
|
||||
let b:rustfmt_autosave = 1
|
||||
|
||||
@@ -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
|
||||
9
build
9
build
@@ -192,7 +192,6 @@ PACKS="
|
||||
gnuplot:vim-scripts/gnuplot-syntax-highlighting
|
||||
go:fatih/vim-go:_BASIC
|
||||
gradle:tfnico/vim-gradle
|
||||
graphql:jparise/vim-graphql
|
||||
groovy:vim-scripts/groovy.vim
|
||||
groovy-indent:vim-scripts/groovyindent-unix
|
||||
haml:sheerun/vim-haml
|
||||
@@ -215,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
|
||||
@@ -234,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
|
||||
@@ -265,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
|
||||
@@ -282,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
|
||||
|
||||
@@ -10,7 +10,7 @@ syntax match jsDocTags contained "@\(alias\|api\|augments\|borrows\|cla
|
||||
" tags containing type and param
|
||||
syntax match jsDocTags contained "@\(arg\|argument\|cfg\|param\|property\|prop\|typedef\)\>" skipwhite nextgroup=jsDocType
|
||||
" tags containing type but no param
|
||||
syntax match jsDocTags contained "@\(callback\|define\|enum\|external\|implements\|this\|type\|return\|returns\)\>" skipwhite nextgroup=jsDocTypeNoParam
|
||||
syntax match jsDocTags contained "@\(callback\|define\|enum\|external\|implements\|this\|type\|return\|returns\|yields\)\>" skipwhite nextgroup=jsDocTypeNoParam
|
||||
" tags containing references
|
||||
syntax match jsDocTags contained "@\(lends\|see\|tutorial\)\>" skipwhite nextgroup=jsDocSeeTag
|
||||
" other tags (no extra syntax)
|
||||
|
||||
@@ -462,14 +462,6 @@ au BufNewFile,BufRead *.gradle set filetype=groovy
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||
augroup filetypedetect
|
||||
" graphql, from graphql.vim in jparise/vim-graphql
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
au BufRead,BufNewFile *.graphql,*.graphqls,*.gql setfiletype graphql
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1
|
||||
augroup filetypedetect
|
||||
" haml, from haml.vim in sheerun/vim-haml
|
||||
@@ -669,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
|
||||
@@ -766,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
|
||||
@@ -841,8 +819,8 @@ endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
|
||||
augroup filetypedetect
|
||||
" ocaml, from jbuild.vim in rgrinberg/vim-ocaml
|
||||
au BufRead,BufNewFile jbuild,dune,dune-project set ft=jbuild
|
||||
" ocaml, from dune.vim in rgrinberg/vim-ocaml
|
||||
au BufRead,BufNewFile jbuild,dune,dune-project set ft=dune
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -948,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
|
||||
|
||||
@@ -1077,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
|
||||
|
||||
@@ -1225,7 +1202,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
|
||||
autocmd BufRead,BufNewFile *.rs setf rust
|
||||
autocmd BufRead,BufNewFile Cargo.toml if &filetype == "" | set filetype=cfg | endif
|
||||
autocmd BufRead,BufNewFile Cargo.toml setf FALLBACK cfg
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
augroup end
|
||||
@@ -1425,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\='
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@ let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s
|
||||
setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72
|
||||
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q
|
||||
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<'
|
||||
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n
|
||||
setlocal formatlistpat+=\\\|^\\s*[-*+]\\s\\+
|
||||
|
||||
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms< formatlistpat<'
|
||||
|
||||
if exists("g:no_gitcommit_commands") || v:version < 700
|
||||
finish
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin
|
||||
" Language: GraphQL
|
||||
" Maintainer: Jon Parise <jon@indelible.org>
|
||||
|
||||
if (exists('b:did_ftplugin'))
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t
|
||||
setlocal iskeyword+=$,@-@
|
||||
setlocal softtabstop=2
|
||||
setlocal shiftwidth=2
|
||||
setlocal expandtab
|
||||
|
||||
let b:undo_ftplugin = 'setlocal com< cms< fo< isk< sts< sw< et<'
|
||||
@@ -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'
|
||||
@@ -27,13 +27,13 @@ if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
|
||||
let b:match_words =
|
||||
\ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|=\@<!begin\)\>=\@!' .
|
||||
\ '{\|\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|=\@<!begin\)\>=\@!' .
|
||||
\ ':' .
|
||||
\ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
|
||||
\ ':' .
|
||||
\ '\%(^\|[^.\:@$=]\)\@<=\<end\:\@!\>' .
|
||||
\ '}\|\%(^\|[^.\:@$=]\)\@<=\<end\:\@!\>' .
|
||||
\ ',^=begin\>:^=end\>,' .
|
||||
\ ',{:},\[:\],(:)'
|
||||
\ ',\[:\],(:)'
|
||||
|
||||
let b:match_skip =
|
||||
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
|
||||
|
||||
@@ -12,7 +12,7 @@ if exists("g:loaded_terraform") || v:version < 700 || &cp || !executable('terraf
|
||||
endif
|
||||
let g:loaded_terraform = 1
|
||||
|
||||
if !exists("g:terraform_fmt_on_save")
|
||||
if !exists("g:terraform_fmt_on_save") || !filereadable(expand("%:p"))
|
||||
let g:terraform_fmt_on_save = 0
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language: GraphQL
|
||||
" Maintainer: Jon Parise <jon@indelible.org>
|
||||
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal nocindent
|
||||
setlocal nolisp
|
||||
setlocal nosmartindent
|
||||
|
||||
setlocal indentexpr=GetGraphQLIndent()
|
||||
setlocal indentkeys=0{,0},0),0[,0],0#,!^F,o,O
|
||||
|
||||
" If our indentation function already exists, we have nothing more to do.
|
||||
if exists('*GetGraphQLIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
" Check if the character at lnum:col is inside a string.
|
||||
function s:InString(lnum, col)
|
||||
return synIDattr(synID(a:lnum, a:col, 1), 'name') is# 'graphqlString'
|
||||
endfunction
|
||||
|
||||
function GetGraphQLIndent()
|
||||
" If this is the first non-blank line, we have nothing more to do because
|
||||
" all of our indentation rules are based on matching against earlier lines.
|
||||
let l:prevlnum = prevnonblank(v:lnum - 1)
|
||||
if l:prevlnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let l:line = getline(v:lnum)
|
||||
|
||||
" If this line contains just a closing bracket, find its matching opening
|
||||
" bracket and indent the closing backet to match.
|
||||
let l:col = matchend(l:line, '^\s*[]})]')
|
||||
if l:col > 0 && !s:InString(v:lnum, l:col)
|
||||
let l:bracket = l:line[l:col - 1]
|
||||
call cursor(v:lnum, l:col)
|
||||
|
||||
if l:bracket is# '}'
|
||||
let l:matched = searchpair('{', '', '}', 'bW')
|
||||
elseif l:bracket is# ']'
|
||||
let l:matched = searchpair('\[', '', '\]', 'bW')
|
||||
elseif l:bracket is# ')'
|
||||
let l:matched = searchpair('(', '', ')', 'bW')
|
||||
else
|
||||
let l:matched = -1
|
||||
endif
|
||||
|
||||
return l:matched > 0 ? indent(l:matched) : virtcol('.') - 1
|
||||
endif
|
||||
|
||||
" If we're inside of a multiline string, continue with the same indentation.
|
||||
if s:InString(v:lnum, matchend(l:line, '^\s*') + 1)
|
||||
return indent(v:lnum)
|
||||
endif
|
||||
|
||||
" If the previous line contained an opening bracket, and we are still in it,
|
||||
" add indent depending on the bracket type.
|
||||
if getline(l:prevlnum) =~# '[[{(]\s*$'
|
||||
return indent(l:prevlnum) + shiftwidth()
|
||||
endif
|
||||
|
||||
" Default to the existing indentation level.
|
||||
return indent(l:prevlnum)
|
||||
endfunction
|
||||
|
||||
let &cpoptions = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -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
|
||||
@@ -36,6 +36,7 @@ syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" c
|
||||
syn keyword bladeKeyword @if @elseif @foreach @forelse @for @while @can @cannot @elsecan @elsecannot @include
|
||||
\ @includeIf @each @inject @extends @section @stack @push @unless @yield @parent @hasSection @break @continue
|
||||
\ @unset @lang @choice @component @slot @prepend @json @isset @auth @guest @switch @case @includeFirst @empty
|
||||
\ @includeWhen
|
||||
\ nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt
|
||||
|
||||
syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @endforelse @endwhile @endcan
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -309,7 +309,7 @@ if !exists('g:crystal_no_comment_fold')
|
||||
endif
|
||||
|
||||
" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\|select\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|ifdef\|in\|module\|next\|nil\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(rescue\|return\|self\|super\|previous_def\|then\|true\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE
|
||||
|
||||
@@ -31,10 +31,10 @@ syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs
|
||||
syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to
|
||||
syn keyword lispFunc write-file system bash
|
||||
|
||||
syn cluster lispBaseListCluster add=jbuildVar
|
||||
syn match jbuildVar '\${[@<^]}' containedin=lispSymbol
|
||||
syn match jbuildVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
|
||||
syn cluster lispBaseListCluster add=duneVar
|
||||
syn match duneVar '\${[@<^]}' containedin=lispSymbol
|
||||
syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
|
||||
|
||||
hi def link jbuildVar Identifier
|
||||
hi def link duneVar Identifier
|
||||
|
||||
let b:current_syntax = "jbuild"
|
||||
let b:current_syntax = "dune"
|
||||
@@ -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
|
||||
|
||||
@@ -42,25 +42,48 @@ highlight default link gomodReplaceOperator Operator
|
||||
|
||||
|
||||
" highlight versions:
|
||||
" * vX.Y.Z-pre
|
||||
" * vX.Y.Z
|
||||
" * vX.0.0-yyyyymmddhhmmss-abcdefabcdef
|
||||
" * vX.Y.Z-pre.0.yyyymmddhhmmss-abcdefabcdef
|
||||
" * vX.Y.(Z+1)-0.yyyymmddhhss-abcdefabcdef
|
||||
" * +incompatible suffix when X > 1
|
||||
" see https://godoc.org/golang.org/x/tools/internal/semver for more
|
||||
" information about how semantic versions are parsed and
|
||||
" https://golang.org/cmd/go/ for how pseudo-versions and +incompatible
|
||||
" are applied.
|
||||
|
||||
|
||||
" match vX.Y.Z and their prereleases
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%(\w\+\.\)\+0\.\d\{14}-\x\+\)\?"
|
||||
" match target when most recent version before the target is X.Y.Z
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.[1-9]\{1}\d*\%(-0\.\%(\d\{14}-\x\+\)\)\?"
|
||||
" match target without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||
syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+"
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?"
|
||||
" ^--- version ---^^------------ pre-release ---------------------^^--------------- metadata ---------------------^
|
||||
" ^--------------------------------------- semantic version -------------------------------------------------------^
|
||||
|
||||
" match vX.Y.Z and their prereleases for X>1
|
||||
syntax match gomodVersion "v[2-9]\{1}\d\?\.\d\+\.\d\+\%(-\%(\w\+\.\)\+0\.\d\{14\}-\x\+\)\?\%(+incompatible\>\)\?"
|
||||
" match target when most recent version before the target is X.Y.Z for X>1
|
||||
syntax match gomodVersion "v[2-9]\{1}\d\?\.\d\+\.[1-9]\{1}\d*\%(-0\.\%(\d\{14\}-\x\+\)\)\?\%(+incompatible\>\)\?"
|
||||
" match target without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) for X>1
|
||||
syntax match gomodVersion "v[2-9]\{1}\d\?\.0\.0-\d\{14\}-\x\+\%(+incompatible\>\)\?"
|
||||
" match pseudo versions
|
||||
" without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||
syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+"
|
||||
" when most recent version before target is a pre-release
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\+"
|
||||
" ^--- version ---^^--- ------ pre-release -----------------^^--------------- metadata ---------------------^
|
||||
" ^------------------------------------- semantic version --------------------------------------------------^
|
||||
" most recent version before the target is X.Y.Z
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\+"
|
||||
" ^--- version ---^^--------------- metadata ---------------------^
|
||||
|
||||
" match incompatible vX.Y.Z and their prereleases
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?+incompatible"
|
||||
" ^------- version -------^^------------- pre-release ---------------------^^--------------- metadata ---------------------^
|
||||
" ^------------------------------------------- semantic version -----------------------------------------------------------^
|
||||
|
||||
" match incompatible pseudo versions
|
||||
" incompatible without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.0\.0-\d\{14\}-\x\++incompatible"
|
||||
" when most recent version before target is a pre-release
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\++incompatible"
|
||||
" ^------- version -------^^---------- pre-release -----------------^^--------------- metadata ---------------------^
|
||||
" ^---------------------------------------- semantic version ------------------------------------------------------^
|
||||
" most recent version before the target is X.Y.Z
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\++incompatible"
|
||||
" ^------- version -------^^---------------- metadata ---------------------^
|
||||
highlight default link gomodVersion Identifier
|
||||
|
||||
let b:current_syntax = "gomod"
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: GraphQL
|
||||
" Maintainer: Jon Parise <jon@indelible.org>
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match graphqlComment "#.*$" contains=@Spell
|
||||
|
||||
syn match graphqlOperator "=" display
|
||||
syn match graphqlOperator "!" display
|
||||
syn match graphqlOperator "|" display
|
||||
syn match graphqlOperator "\M..." display
|
||||
|
||||
syn keyword graphqlBoolean true false
|
||||
syn keyword graphqlNull null
|
||||
syn match graphqlNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" display
|
||||
syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
|
||||
syn region graphqlString start=+"""+ end=+"""+
|
||||
|
||||
syn keyword graphqlKeyword on nextgroup=graphqlType skipwhite
|
||||
|
||||
syn keyword graphqlStructure enum scalar type union nextgroup=graphqlType skipwhite
|
||||
syn keyword graphqlStructure input interface subscription nextgroup=graphqlType skipwhite
|
||||
syn keyword graphqlStructure implements nextgroup=graphqlType skipwhite
|
||||
syn keyword graphqlStructure query mutation fragment nextgroup=graphqlName skipwhite
|
||||
syn keyword graphqlStructure directive nextgroup=graphqlDirective skipwhite
|
||||
syn keyword graphqlStructure extend nextgroup=graphqlStructure skipwhite
|
||||
syn keyword graphqlStructure schema nextgroup=graphqlFold skipwhite
|
||||
|
||||
syn match graphqlDirective "\<@\h\w*\>" display
|
||||
syn match graphqlVariable "\<\$\h\w*\>" display
|
||||
syn match graphqlName "\<\h\w*\>" display
|
||||
syn match graphqlType "\<_*\u\w*\>" display
|
||||
syn match graphqlConstant "\<[A-Z_]\+\>" display
|
||||
|
||||
syn keyword graphqlMetaFields __schema __type __typename
|
||||
|
||||
syn region graphqlFold matchgroup=graphqlBraces start="{" end="}" transparent fold contains=ALLBUT,graphqlStructure
|
||||
syn region graphqlList matchgroup=graphqlBraces start="\[" end="]" transparent contains=ALLBUT,graphqlDirective,graphqlStructure
|
||||
|
||||
hi def link graphqlComment Comment
|
||||
hi def link graphqlOperator Operator
|
||||
|
||||
hi def link graphqlBraces Delimiter
|
||||
|
||||
hi def link graphqlBoolean Boolean
|
||||
hi def link graphqlNull Keyword
|
||||
hi def link graphqlNumber Number
|
||||
hi def link graphqlString String
|
||||
|
||||
hi def link graphqlConstant Constant
|
||||
hi def link graphqlDirective PreProc
|
||||
hi def link graphqlName Identifier
|
||||
hi def link graphqlMetaFields Special
|
||||
hi def link graphqlKeyword Keyword
|
||||
hi def link graphqlStructure Structure
|
||||
hi def link graphqlType Type
|
||||
hi def link graphqlVariable Identifier
|
||||
|
||||
syn sync minlines=500
|
||||
|
||||
let b:current_syntax = 'graphql'
|
||||
@@ -5,8 +5,8 @@ endif
|
||||
" Vim syntax file
|
||||
" Language: i3 config file
|
||||
" Maintainer: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
|
||||
" Version: 0.3
|
||||
" Last Change: 2017-10-27 23:59
|
||||
" Version: 0.4
|
||||
" Last Change: 2019-03-23 21:54
|
||||
|
||||
" References:
|
||||
" http://i3wm.org/docs/userguide.html#configuring
|
||||
@@ -24,231 +24,231 @@ en
|
||||
scriptencoding utf-8
|
||||
|
||||
" Error
|
||||
syn match Error /.*/
|
||||
syn match i3ConfigError /.*/
|
||||
|
||||
" Todo
|
||||
syn keyword Todo TODO FIXME XXX contained
|
||||
syn keyword i3ConfigTodo TODO FIXME XXX contained
|
||||
|
||||
" Comment
|
||||
" Comments are started with a # and can only be used at the beginning of a line
|
||||
syn match Comment /^\s*#.*$/ contains=Todo
|
||||
syn match i3ConfigComment /^\s*#.*$/ contains=i3ConfigTodo
|
||||
|
||||
" Font
|
||||
" A FreeType font description is composed by:
|
||||
" a font family, a style, a weight, a variant, a stretch and a size.
|
||||
syn match FontSeparator /,/ contained
|
||||
syn match FontSeparator /:/ contained
|
||||
syn keyword FontKeyword font contained
|
||||
syn match FontNamespace /\w\+:/ contained contains=FontSeparator
|
||||
syn match FontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=FontNamespace,FontSeparator,FontKeyword
|
||||
syn match FontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
||||
syn match Font /^\s*font\s\+.*$/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
"syn match Font /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
"syn match Font /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
"syn match Font /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
syn match i3ConfigFontSeparator /,/ contained
|
||||
syn match i3ConfigFontSeparator /:/ contained
|
||||
syn keyword i3ConfigFontKeyword font contained
|
||||
syn match i3ConfigFontNamespace /\w\+:/ contained contains=i3ConfigFontSeparator
|
||||
syn match i3ConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=i3ConfigFontNamespace,i3ConfigFontSeparator,i3ConfigFontKeyword
|
||||
syn match i3ConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
||||
syn match i3ConfigFont /^\s*font\s\+.*$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
|
||||
" variables
|
||||
syn match String /\(['"]\)\(.\{-}\)\1/ contained
|
||||
syn match Color /#\w\{6}/ contained
|
||||
syn match VariableModifier /+/ contained
|
||||
syn match VariableAndModifier /+\w\+/ contained contains=VariableModifier
|
||||
syn match Variable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=VariableModifier,VariableAndModifier
|
||||
syn keyword InitializeKeyword set contained
|
||||
syn match Initialize /^\s*set\s\+.*$/ contains=Variable,InitializeKeyword,Color,String
|
||||
syn match i3ConfigString /\(['"]\)\(.\{-}\)\1/ contained
|
||||
syn match i3ConfigColor /#\w\{6}/ contained
|
||||
syn match i3ConfigVariableModifier /+/ contained
|
||||
syn match i3ConfigVariableAndModifier /+\w\+/ contained contains=i3ConfigVariableModifier
|
||||
syn match i3ConfigVariable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=i3ConfigVariableModifier,i3ConfigVariableAndModifier
|
||||
syn keyword i3ConfigInitializeKeyword set contained
|
||||
syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString
|
||||
|
||||
" Gaps
|
||||
syn keyword GapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle contained
|
||||
syn match GapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(\d\+\|\$.*\)\)$/ contains=GapStyleKeyword,number,Variable
|
||||
syn keyword SmartGapKeyword on inverse_outer contained
|
||||
syn match SmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=SmartGapKeyword
|
||||
syn keyword SmartBorderKeyword on no_gaps contained
|
||||
syn match SmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=SmartBorderKeyword
|
||||
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 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
|
||||
syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=i3ConfigSmartBorderKeyword
|
||||
|
||||
" Keyboard bindings
|
||||
syn keyword Action toggle fullscreen restart key import kill shrink grow contained
|
||||
syn keyword Action focus move split layout resize restore reload mute unmute exit contained
|
||||
syn match Modifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=VariableModifier
|
||||
syn match Number /\s\d\+/ contained
|
||||
syn keyword BindKeyword bindsym bindcode exec gaps contained
|
||||
syn match BindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
||||
syn match Bind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=Variable,BindKeyword,VariableAndModifier,BindArgument,Number,Modifier,Action,String,GapStyleKeyword
|
||||
syn keyword i3ConfigAction toggle fullscreen restart key import kill shrink grow contained
|
||||
syn keyword i3ConfigAction focus move split layout resize restore reload mute unmute exit contained
|
||||
syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3ConfigVariableModifier
|
||||
syn match i3ConfigNumber /\s\d\+/ contained
|
||||
syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps contained
|
||||
syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
||||
syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigBindArgument,i3ConfigNumber,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword
|
||||
|
||||
" Floating
|
||||
syn keyword SizeSpecial x contained
|
||||
syn match NegativeSize /-/ contained
|
||||
syn match Size /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=SizeSpecial,Number,NegativeSize
|
||||
syn match Floating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=Variable
|
||||
syn match Floating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=Size
|
||||
syn keyword i3ConfigSizeSpecial x contained
|
||||
syn match i3ConfigNegativeSize /-/ contained
|
||||
syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize
|
||||
syn match i3ConfigFloating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
|
||||
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=Size
|
||||
|
||||
" Orientation
|
||||
syn keyword OrientationKeyword vertical horizontal auto contained
|
||||
syn match Orientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=OrientationKeyword
|
||||
syn keyword i3ConfigOrientationKeyword vertical horizontal auto contained
|
||||
syn match i3ConfigOrientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=i3ConfigOrientationKeyword
|
||||
|
||||
" Layout
|
||||
syn keyword LayoutKeyword default stacking tabbed contained
|
||||
syn match Layout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=LayoutKeyword
|
||||
syn keyword i3ConfigLayoutKeyword default stacking tabbed contained
|
||||
syn match i3ConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=i3ConfigLayoutKeyword
|
||||
|
||||
" Border style
|
||||
syn keyword BorderStyleKeyword none normal pixel contained
|
||||
syn match BorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=BorderStyleKeyword,number
|
||||
syn keyword i3ConfigBorderStyleKeyword none normal pixel contained
|
||||
syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,number
|
||||
|
||||
" Hide borders and edges
|
||||
syn keyword EdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
||||
syn match Edge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=EdgeKeyword
|
||||
syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
||||
syn match i3ConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=i3ConfigEdgeKeyword
|
||||
|
||||
" Arbitrary commands for specific windows (for_window)
|
||||
syn keyword CommandKeyword for_window contained
|
||||
syn region WindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=String
|
||||
syn region WindowCommandSpecial start="\[" end="\]" contained contains=WindowStringSpacial,String
|
||||
syn match ArbitraryCommand /^\s*for_window\s\+.*$/ contains=WindowCommandSpecial,CommandKeyword,BorderStyleKeyword,LayoutKeyword,OrientationKeyword,Size,Number
|
||||
syn keyword i3ConfigCommandKeyword for_window contained
|
||||
syn region i3ConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=i3ConfigString
|
||||
syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=WindowStringSpacial,i3ConfigString
|
||||
syn match i3ConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigCommandKeyword,i3ConfigBorderStyleKeyword,i3ConfigLayoutKeyword,i3ConfigOrientationKeyword,Size,i3ConfigNumber
|
||||
|
||||
" Disable focus open opening
|
||||
syn keyword NoFocusKeyword no_focus contained
|
||||
syn match DisableFocus /^\s*no_focus\s\+.*$/ contains=WindowCommandSpecial,NoFocusKeyword
|
||||
syn keyword i3ConfigNoFocusKeyword no_focus contained
|
||||
syn match i3ConfigDisableFocus /^\s*no_focus\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigNoFocusKeyword
|
||||
|
||||
" Move client to specific workspace automatically
|
||||
syn keyword AssignKeyword assign contained
|
||||
syn match AssignSpecial /→/ contained
|
||||
syn match Assign /^\s*assign\s\+.*$/ contains=AssignKeyword,WindowCommandSpecial,AssignSpecial
|
||||
syn keyword i3ConfigAssignKeyword assign contained
|
||||
syn match i3ConfigAssignSpecial /→/ contained
|
||||
syn match i3ConfigAssign /^\s*assign\s\+.*$/ contains=i3ConfigAssignKeyword,i3ConfigWindowCommandSpecial,i3ConfigAssignSpecial
|
||||
|
||||
" X resources
|
||||
syn keyword ResourceKeyword set_from_resource contained
|
||||
syn match Resource /^\s*set_from_resource\s\+.*$/ contains=ResourceKeyword,WindowCommandSpecial,Color,Variable
|
||||
syn keyword i3ConfigResourceKeyword set_from_resource contained
|
||||
syn match i3ConfigResource /^\s*set_from_resource\s\+.*$/ contains=i3ConfigResourceKeyword,i3ConfigWindowCommandSpecial,i3ConfigColor,i3ConfigVariable
|
||||
|
||||
" Auto start applications
|
||||
syn keyword ExecKeyword exec exec_always contained
|
||||
syn match NoStartupId /--no-startup-id/ contained " We are not using BindArgument as only no-startup-id is supported here
|
||||
syn match Exec /^\s*exec\(_always\)\?\s\+.*$/ contains=ExecKeyword,NoStartupId,String
|
||||
syn keyword i3ConfigExecKeyword exec exec_always contained
|
||||
syn match i3ConfigNoStartupId /--no-startup-id/ contained " We are not using i3ConfigBindArgument as only no-startup-id is supported here
|
||||
syn match i3ConfigExec /^\s*exec\(_always\)\?\s\+.*$/ contains=i3ConfigExecKeyword,i3ConfigNoStartupId,i3ConfigString
|
||||
|
||||
" Automatically putting workspaces on specific screens
|
||||
syn keyword WorkspaceKeyword workspace contained
|
||||
syn keyword Output output contained
|
||||
syn match Workspace /^\s*workspace\s\+.*$/ contains=WorkspaceKeyword,Number,String,Output
|
||||
syn keyword i3ConfigWorkspaceKeyword workspace contained
|
||||
syn keyword i3ConfigOutput output contained
|
||||
syn match i3ConfigWorkspace /^\s*workspace\s\+.*$/ contains=i3ConfigWorkspaceKeyword,i3ConfigNumber,i3ConfigString,i3ConfigOutput
|
||||
|
||||
" Changing colors
|
||||
syn keyword ClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
||||
syn match ClientColor /^\s*client.\w\+\s\+.*$/ contains=ClientColorKeyword,Color,Variable
|
||||
syn keyword i3ConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
||||
syn match i3ConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable
|
||||
|
||||
" Interprocess communication
|
||||
syn match InterprocessKeyword /ipc-socket/ contained
|
||||
syn match Interprocess /^\s*ipc-socket\s\+.*$/ contains=InterprocessKeyword
|
||||
syn match i3ConfigInterprocessKeyword /ipc-socket/ contained
|
||||
syn match i3ConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=i3ConfigInterprocessKeyword
|
||||
|
||||
" Mouse warping
|
||||
syn keyword MouseWarpingKeyword mouse_warping contained
|
||||
syn keyword MouseWarpingType output none contained
|
||||
syn match MouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=MouseWarpingKeyword,MouseWarpingType
|
||||
syn keyword i3ConfigMouseWarpingKeyword mouse_warping contained
|
||||
syn keyword i3ConfigMouseWarpingType output none contained
|
||||
syn match i3ConfigMouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=i3ConfigMouseWarpingKeyword,i3ConfigMouseWarpingType
|
||||
|
||||
" Focus follows mouse
|
||||
syn keyword FocusFollowsMouseKeyword focus_follows_mouse contained
|
||||
syn keyword FocusFollowsMouseType yes no contained
|
||||
syn match FocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=FocusFollowsMouseKeyword,FocusFollowsMouseType
|
||||
syn keyword i3ConfigFocusFollowsMouseKeyword focus_follows_mouse contained
|
||||
syn keyword i3ConfigFocusFollowsMouseType yes no contained
|
||||
syn match i3ConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusFollowsMouseKeyword,i3ConfigFocusFollowsMouseType
|
||||
|
||||
" Popups during fullscreen mode
|
||||
syn keyword PopupOnFullscreenKeyword popup_during_fullscreen contained
|
||||
syn keyword PopuponFullscreenType smart ignore leave_fullscreen contained
|
||||
syn match PopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=PopupOnFullscreenKeyword,PopupOnFullscreenType
|
||||
syn keyword i3ConfigPopupOnFullscreenKeyword popup_during_fullscreen contained
|
||||
syn keyword i3ConfigPopuponFullscreenType smart ignore leave_fullscreen contained
|
||||
syn match i3ConfigPopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=i3ConfigPopupOnFullscreenKeyword,i3ConfigPopupOnFullscreenType
|
||||
|
||||
" Focus wrapping
|
||||
syn keyword FocusWrappingKeyword force_focus_wrapping focus_wrapping contained
|
||||
syn keyword FocusWrappingType yes no contained
|
||||
syn match FocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,FocusWrappingKeyword
|
||||
syn keyword i3ConfigFocusWrappingKeyword force_focus_wrapping focus_wrapping contained
|
||||
syn keyword i3ConfigFocusWrappingType yes no contained
|
||||
syn match i3ConfigFocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigFocusWrappingKeyword
|
||||
|
||||
" Forcing Xinerama
|
||||
syn keyword ForceXineramaKeyword force_xinerama contained
|
||||
syn match ForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,ForceXineramaKeyword
|
||||
syn keyword i3ConfigForceXineramaKeyword force_xinerama contained
|
||||
syn match i3ConfigForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigForceXineramaKeyword
|
||||
|
||||
" Automatic back-and-forth when switching to the current workspace
|
||||
syn keyword AutomaticSwitchKeyword workspace_auto_back_and_forth contained
|
||||
syn match AutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,AutomaticSwitchKeyword
|
||||
syn keyword i3ConfigAutomaticSwitchKeyword workspace_auto_back_and_forth contained
|
||||
syn match i3ConfigAutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigAutomaticSwitchKeyword
|
||||
|
||||
" Delay urgency hint
|
||||
syn keyword TimeUnit ms contained
|
||||
syn keyword DelayUrgencyKeyword force_display_urgency_hint contained
|
||||
syn match DelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=FocusWrappingType,DelayUrgencyKeyword,Number,TimeUnit
|
||||
syn keyword i3ConfigTimeUnit ms contained
|
||||
syn keyword i3ConfigDelayUrgencyKeyword force_display_urgency_hint contained
|
||||
syn match i3ConfigDelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDelayUrgencyKeyword,i3ConfigNumber,i3ConfigTimeUnit
|
||||
|
||||
" Focus on window activation
|
||||
syn keyword FocusOnActivationKeyword focus_on_window_activation contained
|
||||
syn keyword FocusOnActivationType smart urgent focus none contained
|
||||
syn match FocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=FocusOnActivationKeyword,FocusOnActivationType
|
||||
syn keyword i3ConfigFocusOnActivationKeyword focus_on_window_activation contained
|
||||
syn keyword i3ConfigFocusOnActivationType smart urgent focus none contained
|
||||
syn match i3ConfigFocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=i3ConfigFocusOnActivationKeyword,i3ConfigFocusOnActivationType
|
||||
|
||||
" Automatic back-and-forth when switching to the current workspace
|
||||
syn keyword DrawingMarksKeyword show_marks contained
|
||||
syn match DrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,DrawingMarksKeyword
|
||||
syn keyword i3ConfigDrawingMarksKeyword show_marks contained
|
||||
syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDrawingMarksKeyword
|
||||
|
||||
" Group mode/bar
|
||||
syn keyword BlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||
syn region Block start=+.*s\?{$+ end=+^}$+ contains=BlockKeyword,String,Bind,Comment,Font,FocusWrappingType,Color,Variable transparent keepend extend
|
||||
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
|
||||
" Line continuation
|
||||
syn region LineCont start=/^.*\\$/ end=/^.*$/ contains=BlockKeyword,String,Bind,Comment,Font,FocusWrappingType,Color,Variable transparent keepend extend
|
||||
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
|
||||
" Define the highlighting.
|
||||
hi! def link Error Error
|
||||
hi! def link Todo Todo
|
||||
hi! def link Comment Comment
|
||||
hi! def link FontContent Type
|
||||
hi! def link FocusOnActivationType Type
|
||||
hi! def link PopupOnFullscreenType Type
|
||||
hi! def link OrientationKeyword Type
|
||||
hi! def link MouseWarpingType Type
|
||||
hi! def link FocusFollowsMouseType Type
|
||||
hi! def link GapStyleKeyword Type
|
||||
hi! def link SmartGapKeyword Type
|
||||
hi! def link SmartBorderKeyword Type
|
||||
hi! def link LayoutKeyword Type
|
||||
hi! def link BorderStyleKeyword Type
|
||||
hi! def link EdgeKeyword Type
|
||||
hi! def link Action Type
|
||||
hi! def link Command Type
|
||||
hi! def link Output Type
|
||||
hi! def link WindowCommandSpecial Type
|
||||
hi! def link FocusWrappingType Type
|
||||
hi! def link FontSize Constant
|
||||
hi! def link Color Constant
|
||||
hi! def link Number Constant
|
||||
hi! def link VariableAndModifier Constant
|
||||
hi! def link TimeUnit Constant
|
||||
hi! def link Modifier Constant
|
||||
hi! def link String Constant
|
||||
hi! def link NegativeSize Constant
|
||||
hi! def link FontSeparator Special
|
||||
hi! def link VariableModifier Special
|
||||
hi! def link SizeSpecial Special
|
||||
hi! def link WindowSpecial Special
|
||||
hi! def link AssignSpecial Special
|
||||
hi! def link FontNamespace PreProc
|
||||
hi! def link BindArgument PreProc
|
||||
hi! def link NoStartupId PreProc
|
||||
hi! def link FontKeyword Identifier
|
||||
hi! def link BindKeyword Identifier
|
||||
hi! def link Orientation Identifier
|
||||
hi! def link GapStyle Identifier
|
||||
hi! def link SmartGap Identifier
|
||||
hi! def link SmartBorder Identifier
|
||||
hi! def link Layout Identifier
|
||||
hi! def link BorderStyle Identifier
|
||||
hi! def link Edge Identifier
|
||||
hi! def link Floating Identifier
|
||||
hi! def link CommandKeyword Identifier
|
||||
hi! def link NoFocusKeyword Identifier
|
||||
hi! def link InitializeKeyword Identifier
|
||||
hi! def link AssignKeyword Identifier
|
||||
hi! def link ResourceKeyword Identifier
|
||||
hi! def link ExecKeyword Identifier
|
||||
hi! def link WorkspaceKeyword Identifier
|
||||
hi! def link ClientColorKeyword Identifier
|
||||
hi! def link InterprocessKeyword Identifier
|
||||
hi! def link MouseWarpingKeyword Identifier
|
||||
hi! def link FocusFollowsMouseKeyword Identifier
|
||||
hi! def link PopupOnFullscreenKeyword Identifier
|
||||
hi! def link FocusWrappingKeyword Identifier
|
||||
hi! def link ForceXineramaKeyword Identifier
|
||||
hi! def link AutomaticSwitchKeyword Identifier
|
||||
hi! def link DelayUrgencyKeyword Identifier
|
||||
hi! def link FocusOnActivationKeyword Identifier
|
||||
hi! def link DrawingMarksKeyword Identifier
|
||||
hi! def link BlockKeyword Identifier
|
||||
hi! def link Variable Statement
|
||||
hi! def link ArbitraryCommand Type
|
||||
hi! def link i3ConfigError Error
|
||||
hi! def link i3ConfigTodo Todo
|
||||
hi! def link i3ConfigComment Comment
|
||||
hi! def link i3ConfigFontContent Type
|
||||
hi! def link i3ConfigFocusOnActivationType Type
|
||||
hi! def link i3ConfigPopupOnFullscreenType Type
|
||||
hi! def link i3ConfigOrientationKeyword Type
|
||||
hi! def link i3ConfigMouseWarpingType Type
|
||||
hi! def link i3ConfigFocusFollowsMouseType Type
|
||||
hi! def link i3ConfigGapStyleKeyword Type
|
||||
hi! def link i3ConfigSmartGapKeyword Type
|
||||
hi! def link i3ConfigSmartBorderKeyword Type
|
||||
hi! def link i3ConfigLayoutKeyword Type
|
||||
hi! def link i3ConfigBorderStyleKeyword Type
|
||||
hi! def link i3ConfigEdgeKeyword Type
|
||||
hi! def link i3ConfigAction Type
|
||||
hi! def link i3ConfigCommand Type
|
||||
hi! def link i3ConfigOutput Type
|
||||
hi! def link i3ConfigWindowCommandSpecial Type
|
||||
hi! def link i3ConfigFocusWrappingType Type
|
||||
hi! def link i3ConfigFontSize Constant
|
||||
hi! def link i3ConfigColor Constant
|
||||
hi! def link i3ConfigNumber Constant
|
||||
hi! def link i3ConfigVariableAndModifier Constant
|
||||
hi! def link i3ConfigTimeUnit Constant
|
||||
hi! def link i3ConfigModifier Constant
|
||||
hi! def link i3ConfigString Constant
|
||||
hi! def link i3ConfigNegativeSize Constant
|
||||
hi! def link i3ConfigFontSeparator Special
|
||||
hi! def link i3ConfigVariableModifier Special
|
||||
hi! def link i3ConfigSizeSpecial Special
|
||||
hi! def link i3ConfigWindowSpecial Special
|
||||
hi! def link i3ConfigAssignSpecial Special
|
||||
hi! def link i3ConfigFontNamespace PreProc
|
||||
hi! def link i3ConfigBindArgument PreProc
|
||||
hi! def link i3ConfigNoStartupId PreProc
|
||||
hi! def link i3ConfigFontKeyword Identifier
|
||||
hi! def link i3ConfigBindKeyword Identifier
|
||||
hi! def link i3ConfigOrientation Identifier
|
||||
hi! def link i3ConfigGapStyle Identifier
|
||||
hi! def link i3ConfigSmartGap Identifier
|
||||
hi! def link i3ConfigSmartBorder Identifier
|
||||
hi! def link i3ConfigLayout Identifier
|
||||
hi! def link i3ConfigBorderStyle Identifier
|
||||
hi! def link i3ConfigEdge Identifier
|
||||
hi! def link i3ConfigFloating Identifier
|
||||
hi! def link i3ConfigCommandKeyword Identifier
|
||||
hi! def link i3ConfigNoFocusKeyword Identifier
|
||||
hi! def link i3ConfigInitializeKeyword Identifier
|
||||
hi! def link i3ConfigAssignKeyword Identifier
|
||||
hi! def link i3ConfigResourceKeyword Identifier
|
||||
hi! def link i3ConfigExecKeyword Identifier
|
||||
hi! def link i3ConfigWorkspaceKeyword Identifier
|
||||
hi! def link i3ConfigClientColorKeyword Identifier
|
||||
hi! def link i3ConfigInterprocessKeyword Identifier
|
||||
hi! def link i3ConfigMouseWarpingKeyword Identifier
|
||||
hi! def link i3ConfigFocusFollowsMouseKeyword Identifier
|
||||
hi! def link i3ConfigPopupOnFullscreenKeyword Identifier
|
||||
hi! def link i3ConfigFocusWrappingKeyword Identifier
|
||||
hi! def link i3ConfigForceXineramaKeyword Identifier
|
||||
hi! def link i3ConfigAutomaticSwitchKeyword Identifier
|
||||
hi! def link i3ConfigDelayUrgencyKeyword Identifier
|
||||
hi! def link i3ConfigFocusOnActivationKeyword Identifier
|
||||
hi! def link i3ConfigDrawingMarksKeyword Identifier
|
||||
hi! def link i3ConfigBlockKeyword Identifier
|
||||
hi! def link i3ConfigVariable Statement
|
||||
hi! def link i3ConfigArbitraryCommand Type
|
||||
|
||||
let b:current_syntax = "i3config"
|
||||
|
||||
@@ -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
File diff suppressed because one or more lines are too long
336
syntax/ruby.vim
336
syntax/ruby.vim
@@ -68,9 +68,8 @@ endfunction
|
||||
|
||||
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
|
||||
|
||||
" }}}
|
||||
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter
|
||||
" Not-Top Cluster {{{1
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses
|
||||
|
||||
" Whitespace Errors {{{1
|
||||
if exists("ruby_space_errors")
|
||||
@@ -83,20 +82,39 @@ if exists("ruby_space_errors")
|
||||
endif
|
||||
|
||||
" Operators {{{1
|
||||
if exists("ruby_operators")
|
||||
syn match rubyDotOperator "\.\|&\." containedin=rubyKeywordAsMethod
|
||||
syn match rubyTernaryOperator "[[:alnum:]]\@1<!?\|:"
|
||||
syn match rubyArithmeticOperator "\*\*\|[*/%+]\|->\@!"
|
||||
syn match rubyComparisonOperator "<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<<\@!\|>=\|[-=]\@1<!>"
|
||||
syn match rubyBitwiseOperator "[~^|]\|&\.\@!\|\%(class\s*\)\@<!<<\|>>"
|
||||
syn match rubyBooleanOperator "[[:alnum:]]\@1<!!\|&&\|||"
|
||||
syn match rubyRangeOperator "\.\.\.\="
|
||||
syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^="
|
||||
syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~"
|
||||
syn match rubyScopeOperator "::"
|
||||
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[\s*" end="\s*]" 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
|
||||
@@ -105,26 +123,26 @@ syn match rubyInterpolation "#\$\%(-\w\|[!$&"'*+,./0:;<>?@\`~_]\|\w\+\)"
|
||||
syn match rubyInterpolation "#@@\=\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable
|
||||
syn match rubyInterpolationDelimiter "#\ze[$@]" display contained
|
||||
|
||||
syn match rubyStringEscape "\\\_." contained display
|
||||
syn match rubyStringEscape "\\\o\{1,3}\|\\x\x\{1,2}" contained display
|
||||
syn match rubyStringEscape "\\u\%(\x\{4}\|{\x\{1,6}\%(\s\+\x\{1,6}\)*}\)" contained display
|
||||
syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
|
||||
syn match rubyStringEscape "\\\_." contained display
|
||||
syn match rubyStringEscape "\\\o\{1,3}\|\\x\x\{1,2}" contained display
|
||||
syn match rubyStringEscape "\\u\%(\x\{4}\|{\x\{1,6}\%(\s\+\x\{1,6}\)*}\)" contained display
|
||||
syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=.\)" contained display
|
||||
|
||||
syn match rubyBackslashEscape "\\\\" contained display
|
||||
syn match rubyQuoteEscape "\\'" contained display
|
||||
syn match rubySpaceEscape "\\ " contained display
|
||||
|
||||
syn match rubyParenthesesEscape "\\[()]" contained display
|
||||
syn match rubyCurlyBracesEscape "\\[{}]" contained display
|
||||
syn match rubyAngleBracketsEscape "\\[<>]" contained display
|
||||
syn match rubySquareBracketsEscape "\\[[\]]" contained display
|
||||
syn match rubyParenthesisEscape "\\[()]" contained display
|
||||
syn match rubyCurlyBraceEscape "\\[{}]" contained display
|
||||
syn match rubyAngleBracketEscape "\\[<>]" contained display
|
||||
syn match rubySquareBracketEscape "\\[[\]]" contained display
|
||||
|
||||
syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained
|
||||
syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained
|
||||
syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained
|
||||
syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained
|
||||
|
||||
syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesesEscape,rubyCurlyBracesEscape,rubyAngleBracketsEscape,rubySquareBracketsEscape
|
||||
syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesisEscape,rubyCurlyBraceEscape,rubyAngleBracketEscape,rubySquareBracketEscape
|
||||
syn cluster rubyNestedBrackets contains=rubyNested.\+
|
||||
syn cluster rubyStringSpecial contains=rubyInterpolation,rubyStringEscape
|
||||
syn cluster rubyStringNotTop contains=@rubyStringSpecial,@rubyNestedBrackets,@rubySingleCharEscape
|
||||
@@ -153,20 +171,17 @@ syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display
|
||||
syn cluster rubyRegexpSpecial contains=@rubyStringSpecial,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment,rubyRegexpIntersection
|
||||
|
||||
" Numbers {{{1
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display
|
||||
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*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyModuleName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!"
|
||||
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*(\)\@!"
|
||||
syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
|
||||
syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
|
||||
syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)"
|
||||
@@ -181,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
|
||||
@@ -195,7 +210,7 @@ syn match rubyPredefinedVariable "$_\>" display
|
||||
syn match rubyPredefinedVariable "$-[0FIWadilpvw]\>" display
|
||||
syn match rubyPredefinedVariable "$\%(stderr\|stdin\|stdout\)\>" display
|
||||
syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV\|DATA\|FALSE\|NIL\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV\|DATA\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\)\>\%(\s*(\)\@!"
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!"
|
||||
|
||||
" Deprecated/removed in 1.9
|
||||
@@ -203,12 +218,14 @@ syn match rubyPredefinedVariable "$="
|
||||
syn match rubyPredefinedVariable "$-K\>" display
|
||||
syn match rubyPredefinedVariable "$\%(deferr\|defout\)\>" display
|
||||
syn match rubyPredefinedVariable "$KCODE\>" display
|
||||
" Deprecated/removed in 2.4
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(FALSE\|NIL\|TRUE\)\>\%(\s*(\)\@!"
|
||||
|
||||
syn cluster rubyGlobalVariable contains=rubyGlobalVariable,rubyPredefinedVariable,rubyGlobalVariableError
|
||||
|
||||
" Normal Regular Expressions {{{1
|
||||
SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/\%([ \t=]\|$\)\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\s\+\)\@<=/\%(=\|\_s\)\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
|
||||
" Generalized Regular Expressions {{{1
|
||||
SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
@@ -219,8 +236,8 @@ SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%
|
||||
SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial
|
||||
|
||||
" Characters {{{1
|
||||
syn match rubyCharacter "\%(\w\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
|
||||
syn match rubyCharacter "\%(\w\|[]})\"'/]\)\@1<!?\\u\%(\x\{4}\|{\x\{1,6}}\)"
|
||||
syn match rubyCharacter "\%(\w\|[^\x00-\x7F]\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\[[:space:]]\|\\\=[^[:space:]]\)\)"
|
||||
syn match rubyCharacter "\%(\w\|[^\x00-\x7F]\|[]})\"'/]\)\@1<!?\\u\%(\x\{4}\|{\x\{1,6}}\)"
|
||||
|
||||
" Normal Strings {{{1
|
||||
let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : ''
|
||||
@@ -259,39 +276,38 @@ endfor
|
||||
unlet s:delimiter s:group s:names
|
||||
" }}}2
|
||||
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=rubyBackslashEscape,rubySpaceEscape
|
||||
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentSymbolDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=rubyBackslashEscape,rubySpaceEscape
|
||||
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
|
||||
" Generalized Double Quoted Strings, Symbols, Array of Strings, Array of Symbols and Shell Command Output {{{1
|
||||
" Note: %= is not matched here as the beginning of a double quoted string
|
||||
" Generalized Double Quoted Strings, Array of Strings, Array of Symbols and Shell Command Output {{{1
|
||||
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
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial
|
||||
|
||||
" Array of interpolated Symbols
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets
|
||||
@@ -299,15 +315,16 @@ SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses
|
||||
|
||||
" 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
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
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
|
||||
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
@@ -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:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration
|
||||
syn match rubyMethodName "\%(\s\|^\)\@1<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\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 rubyOperator "\<defined?" display
|
||||
syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!"
|
||||
syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__dir__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise
|
||||
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\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
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\w*\)\@<![?!]\)\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 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 rubyExceptionHandler "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyBlockExpression,rubyDoBlock
|
||||
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\w*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\<do\>" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop
|
||||
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\w*\)\@<![!?]\)\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
|
||||
@@ -389,28 +405,29 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
|
||||
exe "syn sync minlines=" . ruby_minlines
|
||||
|
||||
else
|
||||
syn match rubyControl "\<def\>[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<class\>[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<module\>[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|rescue\|ensure\|then\|when\|end\)\>[?!]\@!"
|
||||
syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!"
|
||||
syn match rubyControl "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|rescue\|ensure\|then\|when\|end\)\>"
|
||||
syn match rubyKeyword "\<\%(alias\|undef\)\>"
|
||||
endif
|
||||
|
||||
" Special Methods {{{1
|
||||
if !exists("ruby_no_special_methods")
|
||||
syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function
|
||||
" attr is a common variable name
|
||||
syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!"
|
||||
syn keyword rubyAttribute attr_accessor attr_reader attr_writer
|
||||
syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)"
|
||||
syn keyword rubyEval eval class_eval instance_eval module_eval
|
||||
syn keyword rubyException raise fail catch throw
|
||||
syn keyword rubyInclude autoload gem load require require_relative
|
||||
syn keyword rubyKeyword callcc caller lambda proc
|
||||
" false positive with 'include?'
|
||||
syn match rubyMacro "\<include\>[?!]\@!"
|
||||
syn keyword rubyMacro extend prepend refine using
|
||||
syn keyword 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
|
||||
@@ -431,20 +448,25 @@ else
|
||||
syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell
|
||||
endif
|
||||
|
||||
" {{{1 Useless line continuations
|
||||
syn match rubyUselessLineContinuation "\%([.:,;{([<>~\*%&^|+=-]\|\w\@1<![?!]\)\s*\zs\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty
|
||||
syn match rubyUselessLineContinuation "\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty contained
|
||||
" {{{1 Useless Line Continuations
|
||||
syn match rubyUselessLineContinuation "\%([.:,;{([<>~\*%&^|+=-]\|%(\%(\w\|[^\x00-\x7F]\)\@1<![?!]\)\s*\zs\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty
|
||||
syn match rubyUselessLineContinuation "\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty contained
|
||||
|
||||
" Keyword Nobbling {{{1
|
||||
" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\<\%(BEGIN\|END\)\>\)" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\(defined?\|exit!\)\@!\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE
|
||||
" prevent methods with keyword names being highlighted as keywords when called
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|&\.\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\%(BEGIN\|END\)\>\)" transparent contains=rubyDotOperator,rubyScopeOperator
|
||||
|
||||
" More Symbols {{{1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
|
||||
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="he=e-1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1
|
||||
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="hs=s+1,he=e-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 "\%#=1\<exit!" display
|
||||
endif
|
||||
syn match rubyDefinedOperator "\%#=1\<defined?" display
|
||||
|
||||
" 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="\%$"
|
||||
@@ -452,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
|
||||
@@ -491,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
|
||||
@@ -518,10 +554,10 @@ hi def link rubyTodo Todo
|
||||
hi def link rubyBackslashEscape rubyStringEscape
|
||||
hi def link rubyQuoteEscape rubyStringEscape
|
||||
hi def link rubySpaceEscape rubyStringEscape
|
||||
hi def link rubyParenthesesEscape rubyStringEscape
|
||||
hi def link rubyCurlyBracesEscape rubyStringEscape
|
||||
hi def link rubyAngleBracketsEscape rubyStringEscape
|
||||
hi def link rubySquareBracketsEscape rubyStringEscape
|
||||
hi def link rubyParenthesisEscape rubyStringEscape
|
||||
hi def link rubyCurlyBraceEscape rubyStringEscape
|
||||
hi def link rubyAngleBracketEscape rubyStringEscape
|
||||
hi def link rubySquareBracketEscape rubyStringEscape
|
||||
hi def link rubyStringEscape Special
|
||||
|
||||
hi def link rubyInterpolationDelimiter Delimiter
|
||||
|
||||
@@ -51,7 +51,7 @@ syn cluster scssSelectors contains=@comment,cssSelectorOp,cssTagName,cssPseudoCl
|
||||
syn match scssProperty "\([[:alnum:]-]\)\+\s*\(:\)\@=" contained contains=css.*Prop,cssVendor containedin=cssMediaBlock nextgroup=scssAttribute,scssAttributeWithNestedDefinition
|
||||
syn match scssAttribute ":[^;]*\ze\(;\|}\)" contained contains=css.*Attr,cssValue.*,cssColor,cssFunction,cssString.*,cssURL,scssFunction,scssInterpolation,scssVariable
|
||||
|
||||
syn match scssAttributeWithNestedDefinition ": [^#]*{\@=" nextgroup=scssNestedDefinition contained contains=css.*Attr,cssValue.*,scssVariable
|
||||
syn match scssAttributeWithNestedDefinition ": [^#"]*{\@=" nextgroup=scssNestedDefinition contained contains=css.*Attr,cssValue.*,scssVariable
|
||||
syn region scssNestedDefinition matchgroup=cssBraces start="{" end="}" contained contains=@comment,scssProperty,scssNestedProperty
|
||||
|
||||
" CSS properties from https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
|
||||
|
||||
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,14 +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
|
||||
@@ -36,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
|
||||
@@ -51,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
|
||||
@@ -63,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
|
||||
@@ -74,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
|
||||
@@ -124,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
|
||||
@@ -200,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
|
||||
@@ -210,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
|
||||
@@ -392,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
|
||||
@@ -400,13 +421,16 @@ syn keyword terraDataTypeBI
|
||||
\ google_netblock_ip_ranges
|
||||
\ google_organization
|
||||
\ google_project
|
||||
\ google_project_organization_policy
|
||||
\ google_project_services
|
||||
\ google_projects
|
||||
\ google_service_account
|
||||
\ google_service_account_key
|
||||
\ google_storage_bucket_object
|
||||
\ 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
|
||||
@@ -421,6 +445,7 @@ syn keyword terraDataTypeBI
|
||||
\ heroku_app
|
||||
\ heroku_space
|
||||
\ heroku_space_peering_info
|
||||
\ heroku_team
|
||||
\ http
|
||||
\ huaweicloud_antiddos_v1
|
||||
\ huaweicloud_cce_cluster_v3
|
||||
@@ -471,6 +496,24 @@ syn keyword terraDataTypeBI
|
||||
\ logentries_logset
|
||||
\ logicmonitor_collectors
|
||||
\ logicmonitor_device_group
|
||||
\ ncloud_access_control_group
|
||||
\ ncloud_access_control_groups
|
||||
\ ncloud_access_control_rule
|
||||
\ ncloud_access_control_rules
|
||||
\ ncloud_member_server_image
|
||||
\ ncloud_member_server_images
|
||||
\ ncloud_nas_volume
|
||||
\ ncloud_nas_volumes
|
||||
\ ncloud_port_forwarding_rule
|
||||
\ ncloud_port_forwarding_rules
|
||||
\ ncloud_public_ip
|
||||
\ ncloud_regions
|
||||
\ ncloud_root_password
|
||||
\ ncloud_server_image
|
||||
\ ncloud_server_images
|
||||
\ ncloud_server_product
|
||||
\ ncloud_server_products
|
||||
\ ncloud_zones
|
||||
\ newrelic_alert_channel
|
||||
\ newrelic_alert_policy
|
||||
\ newrelic_application
|
||||
@@ -502,6 +545,12 @@ syn keyword terraDataTypeBI
|
||||
\ nutanix_volume_groups
|
||||
\ oci_audit_configuration
|
||||
\ oci_audit_events
|
||||
\ oci_autoscaling_auto_scaling_configuration
|
||||
\ oci_autoscaling_auto_scaling_configurations
|
||||
\ oci_budget_alert_rule
|
||||
\ oci_budget_alert_rules
|
||||
\ oci_budget_budget
|
||||
\ oci_budget_budgets
|
||||
\ oci_containerengine_cluster_kube_config
|
||||
\ oci_containerengine_cluster_option
|
||||
\ oci_containerengine_clusters
|
||||
@@ -596,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
|
||||
@@ -609,6 +660,7 @@ syn keyword terraDataTypeBI
|
||||
\ oci_database_db_system_shapes
|
||||
\ oci_database_db_systems
|
||||
\ oci_database_db_versions
|
||||
\ oci_database_exadata_iorm_config
|
||||
\ oci_dns_records
|
||||
\ oci_dns_steering_policies
|
||||
\ oci_dns_steering_policy
|
||||
@@ -633,6 +685,8 @@ syn keyword terraDataTypeBI
|
||||
\ oci_health_checks_vantage_points
|
||||
\ oci_identity_api_keys
|
||||
\ oci_identity_auth_tokens
|
||||
\ oci_identity_authentication_policy
|
||||
\ oci_identity_availability_domain
|
||||
\ oci_identity_availability_domains
|
||||
\ oci_identity_compartment
|
||||
\ oci_identity_compartments
|
||||
@@ -648,6 +702,8 @@ syn keyword terraDataTypeBI
|
||||
\ oci_identity_regions
|
||||
\ oci_identity_smtp_credentials
|
||||
\ oci_identity_swift_passwords
|
||||
\ oci_identity_tag_default
|
||||
\ oci_identity_tag_defaults
|
||||
\ oci_identity_tag_namespaces
|
||||
\ oci_identity_tags
|
||||
\ oci_identity_tenancy
|
||||
@@ -677,6 +733,12 @@ syn keyword terraDataTypeBI
|
||||
\ oci_load_balancer_rule_sets
|
||||
\ oci_load_balancer_shapes
|
||||
\ oci_load_balancers
|
||||
\ oci_monitoring_alarm
|
||||
\ oci_monitoring_alarm_history_collection
|
||||
\ oci_monitoring_alarm_statuses
|
||||
\ oci_monitoring_alarms
|
||||
\ oci_monitoring_metric_data
|
||||
\ oci_monitoring_metrics
|
||||
\ oci_objectstorage_bucket
|
||||
\ oci_objectstorage_bucket_summaries
|
||||
\ oci_objectstorage_namespace
|
||||
@@ -687,8 +749,17 @@ syn keyword terraDataTypeBI
|
||||
\ oci_objectstorage_objects
|
||||
\ oci_objectstorage_preauthrequest
|
||||
\ oci_objectstorage_preauthrequests
|
||||
\ oci_ons_notification_topic
|
||||
\ oci_ons_notification_topics
|
||||
\ oci_ons_subscription
|
||||
\ 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
|
||||
@@ -723,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
|
||||
@@ -872,8 +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
|
||||
@@ -915,22 +993,29 @@ 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
|
||||
\ alicloud_cen_bandwidth_limit
|
||||
\ alicloud_cen_bandwidth_package
|
||||
\ 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
|
||||
@@ -946,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
|
||||
@@ -983,6 +1069,11 @@ 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
|
||||
\ alicloud_nas_mount_target
|
||||
\ alicloud_nat_gateway
|
||||
\ alicloud_network_interface
|
||||
\ alicloud_network_interface_attachment
|
||||
@@ -1077,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
|
||||
@@ -1088,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
|
||||
@@ -1095,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
|
||||
@@ -1240,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
|
||||
@@ -1249,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
|
||||
@@ -1293,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
|
||||
@@ -1394,6 +1494,9 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_route53_health_check
|
||||
\ 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
|
||||
@@ -1406,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
|
||||
@@ -1535,9 +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
|
||||
@@ -1777,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
|
||||
@@ -1798,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
|
||||
@@ -1886,6 +2002,7 @@ syn keyword terraResourceTypeBI
|
||||
\ cobbler_snippet
|
||||
\ cobbler_system
|
||||
\ consul_agent_service
|
||||
\ consul_autopilot_config
|
||||
\ consul_catalog_entry
|
||||
\ consul_intention
|
||||
\ consul_key_prefix
|
||||
@@ -1903,6 +2020,7 @@ syn keyword terraResourceTypeBI
|
||||
\ datadog_timeboard
|
||||
\ datadog_user
|
||||
\ digitalocean_certificate
|
||||
\ digitalocean_database_cluster
|
||||
\ digitalocean_domain
|
||||
\ digitalocean_droplet
|
||||
\ digitalocean_droplet_snapshot
|
||||
@@ -2119,6 +2237,7 @@ syn keyword terraResourceTypeBI
|
||||
\ google_dataproc_cluster
|
||||
\ google_dataproc_job
|
||||
\ google_dns_managed_zone
|
||||
\ google_dns_policy
|
||||
\ google_dns_record_set
|
||||
\ google_endpoints_service
|
||||
\ google_filestore_instance
|
||||
@@ -2204,6 +2323,7 @@ syn keyword terraResourceTypeBI
|
||||
\ google_storage_object_access_control
|
||||
\ google_storage_object_acl
|
||||
\ google_storage_transfer_job
|
||||
\ google_tpu_node
|
||||
\ grafana_alert_notification
|
||||
\ grafana_dashboard
|
||||
\ grafana_data_source
|
||||
@@ -2226,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
|
||||
@@ -2343,11 +2465,36 @@ 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
|
||||
\ kubernetes_daemonset
|
||||
\ kubernetes_deployment
|
||||
\ kubernetes_endpoint
|
||||
\ kubernetes_horizontal_pod_autoscaler
|
||||
\ kubernetes_limit_range
|
||||
\ kubernetes_namespace
|
||||
@@ -2393,6 +2540,15 @@ syn keyword terraResourceTypeBI
|
||||
\ mysql_role
|
||||
\ mysql_user
|
||||
\ mysql_user_password
|
||||
\ ncloud_block_storage
|
||||
\ ncloud_block_storage_snapshot
|
||||
\ ncloud_load_balancer
|
||||
\ ncloud_load_balancer_ssl_certificate
|
||||
\ ncloud_login_key
|
||||
\ ncloud_nas_volume
|
||||
\ ncloud_port_forwarding_rule
|
||||
\ ncloud_public_ip
|
||||
\ ncloud_server
|
||||
\ netlify_build_hook
|
||||
\ netlify_deploy_key
|
||||
\ netlify_hook
|
||||
@@ -2405,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
|
||||
@@ -2486,6 +2644,9 @@ syn keyword terraResourceTypeBI
|
||||
\ nutanix_virtual_machine
|
||||
\ nutanix_volume_group
|
||||
\ oci_audit_configuration
|
||||
\ oci_autoscaling_auto_scaling_configuration
|
||||
\ oci_budget_alert_rule
|
||||
\ oci_budget_budget
|
||||
\ oci_containerengine_cluster
|
||||
\ oci_containerengine_node_pool
|
||||
\ oci_core_app_catalog_listing_resource_version
|
||||
@@ -2538,8 +2699,10 @@ 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
|
||||
\ oci_dns_record
|
||||
\ oci_dns_steering_policy
|
||||
\ oci_dns_steering_policy_attachment
|
||||
@@ -2557,6 +2720,7 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_health_checks_ping_probe
|
||||
\ oci_identity_api_key
|
||||
\ oci_identity_auth_token
|
||||
\ oci_identity_authentication_policy
|
||||
\ oci_identity_compartment
|
||||
\ oci_identity_customer_secret_key
|
||||
\ oci_identity_dynamic_group
|
||||
@@ -2567,6 +2731,7 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_identity_smtp_credential
|
||||
\ oci_identity_swift_password
|
||||
\ oci_identity_tag
|
||||
\ oci_identity_tag_default
|
||||
\ oci_identity_tag_namespace
|
||||
\ oci_identity_ui_password
|
||||
\ oci_identity_user
|
||||
@@ -2587,12 +2752,17 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_load_balancer_load_balancer
|
||||
\ oci_load_balancer_path_route_set
|
||||
\ oci_load_balancer_rule_set
|
||||
\ oci_monitoring_alarm
|
||||
\ oci_objectstorage_bucket
|
||||
\ oci_objectstorage_namespace_metadata
|
||||
\ oci_objectstorage_object
|
||||
\ oci_objectstorage_object_lifecycle_policy
|
||||
\ oci_objectstorage_preauthrequest
|
||||
\ 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
|
||||
@@ -2821,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
|
||||
@@ -2984,6 +3156,7 @@ syn keyword terraResourceTypeBI
|
||||
\ random_shuffle
|
||||
\ random_string
|
||||
\ random_uuid
|
||||
\ resource_group_name
|
||||
\ rightscale_credential
|
||||
\ rightscale_cwf_process
|
||||
\ rightscale_deployment
|
||||
@@ -3138,6 +3311,7 @@ syn keyword terraResourceTypeBI
|
||||
\ triton_service_group
|
||||
\ triton_snapshot
|
||||
\ triton_vlan
|
||||
\ ucloud_db_instance
|
||||
\ ucloud_disk
|
||||
\ ucloud_disk_attachment
|
||||
\ ucloud_eip
|
||||
@@ -3147,6 +3321,8 @@ syn keyword terraResourceTypeBI
|
||||
\ ucloud_lb_attachment
|
||||
\ ucloud_lb_listener
|
||||
\ ucloud_lb_rule
|
||||
\ ucloud_lb_ssl
|
||||
\ ucloud_lb_ssl_attachment
|
||||
\ ucloud_security_group
|
||||
\ ucloud_subnet
|
||||
\ ucloud_udpn_connection
|
||||
@@ -3183,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
|
||||
@@ -3191,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
|
||||
@@ -3199,6 +3378,7 @@ syn keyword terraResourceTypeBI
|
||||
\ vault_ldap_auth_backend_group
|
||||
\ vault_ldap_auth_backend_user
|
||||
\ vault_mount
|
||||
\ vault_namespace
|
||||
\ vault_okta_auth_backend
|
||||
\ vault_okta_auth_backend_group
|
||||
\ vault_okta_auth_backend_user
|
||||
@@ -3217,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
|
||||
@@ -3224,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
|
||||
@@ -3231,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