mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae18284e5a | ||
|
|
e3024f21fc | ||
|
|
31d757fc7b | ||
|
|
556c56d185 | ||
|
|
fe84062992 | ||
|
|
8742443e69 | ||
|
|
832dfece76 | ||
|
|
933e42ea1f | ||
|
|
cdd6d73e39 | ||
|
|
a48874df4c | ||
|
|
21849c2e18 | ||
|
|
664aa988f6 | ||
|
|
3ddca5da46 | ||
|
|
140430ffb7 | ||
|
|
d527002849 | ||
|
|
15727e7eb0 | ||
|
|
6b169212f8 |
16
README.md
16
README.md
@@ -10,7 +10,7 @@ A collection of language packs for Vim.
|
||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||
|
||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->143<!--/Package Count--> packages it consists of.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->147<!--/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`).
|
||||
@@ -68,6 +68,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin)
|
||||
- [cue](https://github.com/mgrabovsky/vim-cuesheet) (syntax)
|
||||
- [dart](https://github.com/dart-lang/dart-vim-plugin) (syntax, indent, autoload, ftplugin)
|
||||
- [dhall](https://github.com/vmchale/dhall-vim) (syntax, ftplugin)
|
||||
- [dlang](https://github.com/JesseKPhillips/d.vim) (syntax, indent)
|
||||
- [dockerfile](https://github.com/ekalinin/Dockerfile.vim) (syntax, indent, ftplugin)
|
||||
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, autoload, ftplugin)
|
||||
@@ -76,7 +77,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [emblem](https://github.com/yalesov/vim-emblem) (syntax, indent, ftplugin)
|
||||
- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (syntax, indent)
|
||||
- [ferm](https://github.com/vim-scripts/ferm.vim) (syntax)
|
||||
- [fish](https://github.com/dag/vim-fish) (syntax, indent, compiler, autoload, ftplugin)
|
||||
- [fish](https://github.com/georgewitteman/vim-fish) (syntax, indent, compiler, autoload, ftplugin)
|
||||
- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (syntax)
|
||||
- [fsharp](https://github.com/fsharp/vim-fsharp) (syntax, indent)
|
||||
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin)
|
||||
@@ -85,6 +86,7 @@ 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, autoload, ftplugin, after)
|
||||
- [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)
|
||||
@@ -93,6 +95,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [haskell](https://github.com/neovimhaskell/haskell-vim) (syntax, indent, ftplugin)
|
||||
- [haxe](https://github.com/yaymukund/vim-haxe) (syntax)
|
||||
- [hcl](https://github.com/b4b4r07/vim-hcl) (syntax, indent, ftplugin)
|
||||
- [helm](https://github.com/towolf/vim-helm) (syntax)
|
||||
- [hive](https://github.com/zebradil/hive.vim) (syntax, ftplugin)
|
||||
- [html5](https://github.com/othree/html5.vim) (syntax, indent, autoload, ftplugin)
|
||||
- [i3](https://github.com/mboughaba/i3config.vim) (syntax, ftplugin)
|
||||
@@ -136,19 +139,18 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [powershell](https://github.com/PProvost/vim-ps1) (syntax, indent, ftplugin)
|
||||
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, indent)
|
||||
- [pug](https://github.com/digitaltoad/vim-pug) (syntax, indent, ftplugin)
|
||||
- [puppet](https://github.com/voxpupuli/vim-puppet) (syntax, indent, ftplugin)
|
||||
- [puppet](https://github.com/rodjek/vim-puppet) (syntax, indent, autoload, ftplugin)
|
||||
- [purescript](https://github.com/purescript-contrib/purescript-vim) (syntax, indent, ftplugin)
|
||||
- [python-compiler](https://github.com/aliev/vim-compiler-python) (compiler, autoload)
|
||||
- [python-indent](https://github.com/Vimjas/vim-python-pep8-indent) (indent)
|
||||
- [python](https://github.com/vim-python/python-syntax) (syntax)
|
||||
- [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)
|
||||
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax)
|
||||
- [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)
|
||||
- [rego](https://github.com/tsandall/vim-rego) (syntax)
|
||||
- [rspec](https://github.com/sheerun/rspec.vim) (syntax)
|
||||
- [rst](https://github.com/marshallward/vim-restructuredtext) (syntax, autoload, ftplugin)
|
||||
- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin)
|
||||
@@ -160,8 +162,9 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [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)
|
||||
- [styled-components](https://github.com/styled-components/vim-styled-components#main) (syntax, indent, ftplugin)
|
||||
- [styled-components](https://github.com/styled-components/vim-styled-components#main) (after)
|
||||
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin)
|
||||
- [svelte](https://github.com/evanleck/vim-svelte) (syntax, indent)
|
||||
- [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)
|
||||
@@ -187,6 +190,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [xml](https://github.com/amadeus/vim-xml) (syntax)
|
||||
- [yaml](https://github.com/stephpy/vim-yaml) (syntax, ftplugin)
|
||||
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
|
||||
- [zephir](https://github.com/xwsoul/vim-zephir) (syntax)
|
||||
- [zig](https://github.com/ziglang/zig.vim) (syntax, autoload, ftplugin)
|
||||
<!--/Language Packs-->
|
||||
|
||||
|
||||
21
after/autoload/styledcomplete.vim
Normal file
21
after/autoload/styledcomplete.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'styled-components') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim completion script
|
||||
" Language: styled-components (js/ts)
|
||||
" Maintainer: Karl Fleischmann <fleischmann.karl@gmail.com>
|
||||
" URL: https://github.com/styled-components/vim-styled-components
|
||||
|
||||
fun! styledcomplete#CompleteSC(findstart, base)
|
||||
if IsStyledDefinition(line('.'))
|
||||
return csscomplete#CompleteCSS(a:findstart, a:base)
|
||||
endif
|
||||
|
||||
" Only trigger original omnifunc if it was set in the first place
|
||||
if exists('b:prevofu')
|
||||
" create a funcref to call with the previous omnicomplete function
|
||||
let s:funcref = function(b:prevofu)
|
||||
return s:funcref(a:findstart, a:base)
|
||||
endif
|
||||
endfun
|
||||
@@ -1,6 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1
|
||||
|
||||
autocmd BufReadPost,BufNewFile *_spec.rb set syntax=rspec
|
||||
autocmd BufReadPost,BufNewFile *_spec.rb setlocal commentstring=#\ %s
|
||||
|
||||
endif
|
||||
@@ -14,7 +14,7 @@ if exists('b:undo_ftplugin')
|
||||
else
|
||||
let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<'
|
||||
endif
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -83,6 +83,10 @@ fu! IsStyledDefinition(lnum)
|
||||
endfu
|
||||
|
||||
if exists('&ofu')
|
||||
let b:prevofu=&ofu
|
||||
if &ofu
|
||||
" Do not keep track of previous omnifunc if it was not set in the first
|
||||
" place
|
||||
let b:prevofu=&ofu
|
||||
endif
|
||||
setl omnifunc=styledcomplete#CompleteSC
|
||||
endif
|
||||
|
||||
@@ -6,15 +6,6 @@ if !exists('g:puppet_align_hashes')
|
||||
let g:puppet_align_hashes = 1
|
||||
endif
|
||||
|
||||
if g:puppet_align_hashes && exists(':Tabularize')
|
||||
inoremap <buffer> <silent> > ><Esc>:call <SID>puppetalign()<CR>a
|
||||
function! s:puppetalign()
|
||||
let p = '^\s*\w+\s*[=+]>.*$'
|
||||
let column = strlen(substitute(getline('.')[0:col('.')],'\([^=]\|=[^>]\)','','g'))
|
||||
let position = strlen(matchstr(getline('.')[0:col('.')],'.*=>\s*\zs.*'))
|
||||
Tabularize /=>/l1
|
||||
normal! 0
|
||||
echo repeat('\([^=]\|=[^>]\)*=>',column).'\s\{-\}'.repeat('.',position)
|
||||
call search(repeat('\([^=]\|=[^>]\)*=>',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
|
||||
endfunction
|
||||
if g:puppet_align_hashes
|
||||
inoremap <buffer> <silent> => =><Esc>:call puppet#align#AlignHashrockets()<CR>$a
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -25,3 +25,7 @@ augroup jsx_comment
|
||||
augroup end
|
||||
|
||||
setlocal suffixesadd+=.tsx
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'styled-components') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,172 +2,4 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'styled-component
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: styled-components (js/ts)
|
||||
" Maintainer: Karl Fleischmann <fleischmann.karl@gmail.com>
|
||||
" URL: https://github.com/styled-components/vim-styled-components
|
||||
|
||||
" initialize variable to check, if the indentation expression is run
|
||||
" multiple times in a row, which indicates an infinite recursion
|
||||
let s:is_recursion = 0
|
||||
|
||||
" store current indentexpr for later
|
||||
let b:js_ts_indent=&indentexpr
|
||||
|
||||
" set indentexpr for this filetype (styled-components)
|
||||
setlocal indentexpr=GetStyledIndent()
|
||||
|
||||
" add the following keys to trigger reindenting, when in insert mode
|
||||
" - *; - Indent and insert on press of ';' key.
|
||||
" - *<:> - Indent and insert on press of ':' key.
|
||||
set indentkeys+=*;,*<:>,*<Return>
|
||||
|
||||
fu! s:GetSyntaxNames(lnum, cnum)
|
||||
return map(synstack(a:lnum, a:cnum), 'synIDattr(v:val, "name")')
|
||||
endfu
|
||||
|
||||
" re-implement SynSOL of vim-jsx
|
||||
" TODO: add dependency to the readme and remove duplicate implementation
|
||||
fu! s:SynSOL(lnum)
|
||||
return s:GetSyntaxNames(a:lnum, 1)
|
||||
endfu
|
||||
|
||||
" re-implement SynEOL of vim-jsx
|
||||
" TODO: add dependency to the readme and remove duplicate implementation
|
||||
fu! s:SynEOL(lnum, offset)
|
||||
let l:lnum = prevnonblank(a:lnum)
|
||||
let l:col = strlen(getline(l:lnum))
|
||||
|
||||
return s:GetSyntaxNames(l:lnum, l:col + a:offset)
|
||||
endfu
|
||||
|
||||
|
||||
"" Return whether the current line is a jsTemplateString
|
||||
fu! s:IsStyledDefinition(lnum)
|
||||
" iterate through all syntax items in the given line
|
||||
for item in s:SynSOL(a:lnum)
|
||||
" if syntax-item is a jsTemplateString return 1 - true
|
||||
" `==#` is a match case comparison of the item
|
||||
if item ==# 'styledDefinition'
|
||||
return 1
|
||||
endif
|
||||
endfor
|
||||
|
||||
" fallback to 0 - false
|
||||
return 0
|
||||
endfu
|
||||
|
||||
"" Count occurences of `str` at the beginning of the given `lnum` line
|
||||
fu! s:CountOccurencesInSOL(lnum, str)
|
||||
let l:occurence = 0
|
||||
|
||||
" iterate through all items in the given line
|
||||
for item in s:SynSOL(a:lnum)
|
||||
" if the syntax-item equals the given str increment the counter
|
||||
" `==?` is a case isensitive equal operation
|
||||
if item ==? a:str
|
||||
let l:occurence += 1
|
||||
endif
|
||||
endfor
|
||||
|
||||
" return the accumulated count of occurences
|
||||
return l:occurence
|
||||
endfu
|
||||
|
||||
"" Count occurences of `str` at the end of the given `lnum` line
|
||||
fu! s:CountOccurencesInEOL(lnum, str, offset)
|
||||
let l:occurence = 0
|
||||
|
||||
" iterate through all items in the given line
|
||||
for item in s:SynEOL(a:lnum, a:offset)
|
||||
" if the syntax-item equals the given str increment the counter
|
||||
" `==?` is a case insensitive equal operation
|
||||
if item == a:str
|
||||
let l:occurence += 1
|
||||
endif
|
||||
endfor
|
||||
|
||||
" return the accumulated count of occurences
|
||||
return l:occurence
|
||||
endfu
|
||||
|
||||
"" Get the indentation of the current line
|
||||
fu! GetStyledIndent()
|
||||
if s:IsStyledDefinition(v:lnum)
|
||||
let l:baseIndent = 0
|
||||
|
||||
" find last non-styled line
|
||||
let l:cnum = v:lnum
|
||||
while s:IsStyledDefinition(l:cnum)
|
||||
let l:cnum -= 1
|
||||
endwhile
|
||||
|
||||
" get indentation of the last non-styled line as base indentation
|
||||
let l:baseIndent = indent(l:cnum)
|
||||
|
||||
" incrementally build indentation based on current indentation
|
||||
" - one shiftwidth for the styled definition region
|
||||
" - one shiftwidth per open nested definition region
|
||||
let l:styledIndent = &sw
|
||||
let l:styledIndent += min([
|
||||
\ s:CountOccurencesInSOL(v:lnum, 'styledNestedRegion'),
|
||||
\ s:CountOccurencesInEOL(v:lnum, 'styledNestedRegion', 0)
|
||||
\ ]) * &sw
|
||||
|
||||
" decrease indentation by one shiftwidth, if the styled definition
|
||||
" region ends on the current line
|
||||
" - either directly via styled definition region, or
|
||||
" - if the very last
|
||||
if s:CountOccurencesInEOL(v:lnum, 'styledDefinition', 1) == 0
|
||||
let l:styledIndent -= &sw
|
||||
endif
|
||||
|
||||
" return the base indentation
|
||||
" (for nested styles inside classes/objects/etc.) plus the actual
|
||||
" indentation inside the styled definition region
|
||||
return l:baseIndent + l:styledIndent
|
||||
elseif len(b:js_ts_indent)
|
||||
let l:result = 0
|
||||
let l:offset = 0
|
||||
|
||||
" increase indentation by one shiftwidth, if the last line ended on a
|
||||
" styledXmlRegion and this line does not continue with it
|
||||
" this is a fix for an incorrectly indented xml prop after a
|
||||
" glamor-styled styledXmlRegion
|
||||
if s:CountOccurencesInEOL(v:lnum-1, 'styledXmlRegion', 0) == 1 &&
|
||||
\ s:CountOccurencesInSOL(v:lnum, 'styledXmlRegion') == 0
|
||||
let l:offset = &sw
|
||||
endif
|
||||
|
||||
" make sure `GetStyledIndent` and `GetJsxIndent` don't infinitely
|
||||
" recurse by incrementing a counter variable, before evaluating the
|
||||
" stored indent expression
|
||||
if s:is_recursion == 0
|
||||
let s:is_recursion = 1
|
||||
let l:result = eval(b:js_ts_indent)
|
||||
endif
|
||||
|
||||
" `is_recursion` being 0 at this point indicates, that
|
||||
" `eval(b:js_ts_indent)` did itself evaluate it's stored indentexpr
|
||||
" and thus it can be assumed, that the current line should be
|
||||
" indented as JS
|
||||
if s:is_recursion == 0
|
||||
" use one of `GetJavascriptIndent` or `GetJsIndent` if existing
|
||||
" fallback to cindent, if not
|
||||
if exists('*GetJavascriptIndent')
|
||||
let l:result = GetJavascriptIndent()
|
||||
elseif exists('*GetJsIndent')
|
||||
let l:result = GetJsIndent()
|
||||
else
|
||||
let l:result = cindent(v:lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" reset `is_recursion` counter and return the indentation value
|
||||
let s:is_recursion = 0
|
||||
return l:result + l:offset
|
||||
endif
|
||||
|
||||
" if all else fails indent according to C-syntax
|
||||
return cindent(v:lnum)
|
||||
endfu
|
||||
runtime! indent/javascript.vim
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -36,172 +36,4 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'styled-component
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: styled-components (js/ts)
|
||||
" Maintainer: Karl Fleischmann <fleischmann.karl@gmail.com>
|
||||
" URL: https://github.com/styled-components/vim-styled-components
|
||||
|
||||
" initialize variable to check, if the indentation expression is run
|
||||
" multiple times in a row, which indicates an infinite recursion
|
||||
let s:is_recursion = 0
|
||||
|
||||
" store current indentexpr for later
|
||||
let b:js_ts_indent=&indentexpr
|
||||
|
||||
" set indentexpr for this filetype (styled-components)
|
||||
setlocal indentexpr=GetStyledIndent()
|
||||
|
||||
" add the following keys to trigger reindenting, when in insert mode
|
||||
" - *; - Indent and insert on press of ';' key.
|
||||
" - *<:> - Indent and insert on press of ':' key.
|
||||
set indentkeys+=*;,*<:>,*<Return>
|
||||
|
||||
fu! s:GetSyntaxNames(lnum, cnum)
|
||||
return map(synstack(a:lnum, a:cnum), 'synIDattr(v:val, "name")')
|
||||
endfu
|
||||
|
||||
" re-implement SynSOL of vim-jsx
|
||||
" TODO: add dependency to the readme and remove duplicate implementation
|
||||
fu! s:SynSOL(lnum)
|
||||
return s:GetSyntaxNames(a:lnum, 1)
|
||||
endfu
|
||||
|
||||
" re-implement SynEOL of vim-jsx
|
||||
" TODO: add dependency to the readme and remove duplicate implementation
|
||||
fu! s:SynEOL(lnum, offset)
|
||||
let l:lnum = prevnonblank(a:lnum)
|
||||
let l:col = strlen(getline(l:lnum))
|
||||
|
||||
return s:GetSyntaxNames(l:lnum, l:col + a:offset)
|
||||
endfu
|
||||
|
||||
|
||||
"" Return whether the current line is a jsTemplateString
|
||||
fu! s:IsStyledDefinition(lnum)
|
||||
" iterate through all syntax items in the given line
|
||||
for item in s:SynSOL(a:lnum)
|
||||
" if syntax-item is a jsTemplateString return 1 - true
|
||||
" `==#` is a match case comparison of the item
|
||||
if item ==# 'styledDefinition'
|
||||
return 1
|
||||
endif
|
||||
endfor
|
||||
|
||||
" fallback to 0 - false
|
||||
return 0
|
||||
endfu
|
||||
|
||||
"" Count occurences of `str` at the beginning of the given `lnum` line
|
||||
fu! s:CountOccurencesInSOL(lnum, str)
|
||||
let l:occurence = 0
|
||||
|
||||
" iterate through all items in the given line
|
||||
for item in s:SynSOL(a:lnum)
|
||||
" if the syntax-item equals the given str increment the counter
|
||||
" `==?` is a case isensitive equal operation
|
||||
if item ==? a:str
|
||||
let l:occurence += 1
|
||||
endif
|
||||
endfor
|
||||
|
||||
" return the accumulated count of occurences
|
||||
return l:occurence
|
||||
endfu
|
||||
|
||||
"" Count occurences of `str` at the end of the given `lnum` line
|
||||
fu! s:CountOccurencesInEOL(lnum, str, offset)
|
||||
let l:occurence = 0
|
||||
|
||||
" iterate through all items in the given line
|
||||
for item in s:SynEOL(a:lnum, a:offset)
|
||||
" if the syntax-item equals the given str increment the counter
|
||||
" `==?` is a case insensitive equal operation
|
||||
if item == a:str
|
||||
let l:occurence += 1
|
||||
endif
|
||||
endfor
|
||||
|
||||
" return the accumulated count of occurences
|
||||
return l:occurence
|
||||
endfu
|
||||
|
||||
"" Get the indentation of the current line
|
||||
fu! GetStyledIndent()
|
||||
if s:IsStyledDefinition(v:lnum)
|
||||
let l:baseIndent = 0
|
||||
|
||||
" find last non-styled line
|
||||
let l:cnum = v:lnum
|
||||
while s:IsStyledDefinition(l:cnum)
|
||||
let l:cnum -= 1
|
||||
endwhile
|
||||
|
||||
" get indentation of the last non-styled line as base indentation
|
||||
let l:baseIndent = indent(l:cnum)
|
||||
|
||||
" incrementally build indentation based on current indentation
|
||||
" - one shiftwidth for the styled definition region
|
||||
" - one shiftwidth per open nested definition region
|
||||
let l:styledIndent = &sw
|
||||
let l:styledIndent += min([
|
||||
\ s:CountOccurencesInSOL(v:lnum, 'styledNestedRegion'),
|
||||
\ s:CountOccurencesInEOL(v:lnum, 'styledNestedRegion', 0)
|
||||
\ ]) * &sw
|
||||
|
||||
" decrease indentation by one shiftwidth, if the styled definition
|
||||
" region ends on the current line
|
||||
" - either directly via styled definition region, or
|
||||
" - if the very last
|
||||
if s:CountOccurencesInEOL(v:lnum, 'styledDefinition', 1) == 0
|
||||
let l:styledIndent -= &sw
|
||||
endif
|
||||
|
||||
" return the base indentation
|
||||
" (for nested styles inside classes/objects/etc.) plus the actual
|
||||
" indentation inside the styled definition region
|
||||
return l:baseIndent + l:styledIndent
|
||||
elseif len(b:js_ts_indent)
|
||||
let l:result = 0
|
||||
let l:offset = 0
|
||||
|
||||
" increase indentation by one shiftwidth, if the last line ended on a
|
||||
" styledXmlRegion and this line does not continue with it
|
||||
" this is a fix for an incorrectly indented xml prop after a
|
||||
" glamor-styled styledXmlRegion
|
||||
if s:CountOccurencesInEOL(v:lnum-1, 'styledXmlRegion', 0) == 1 &&
|
||||
\ s:CountOccurencesInSOL(v:lnum, 'styledXmlRegion') == 0
|
||||
let l:offset = &sw
|
||||
endif
|
||||
|
||||
" make sure `GetStyledIndent` and `GetJsxIndent` don't infinitely
|
||||
" recurse by incrementing a counter variable, before evaluating the
|
||||
" stored indent expression
|
||||
if s:is_recursion == 0
|
||||
let s:is_recursion = 1
|
||||
let l:result = eval(b:js_ts_indent)
|
||||
endif
|
||||
|
||||
" `is_recursion` being 0 at this point indicates, that
|
||||
" `eval(b:js_ts_indent)` did itself evaluate it's stored indentexpr
|
||||
" and thus it can be assumed, that the current line should be
|
||||
" indented as JS
|
||||
if s:is_recursion == 0
|
||||
" use one of `GetJavascriptIndent` or `GetJsIndent` if existing
|
||||
" fallback to cindent, if not
|
||||
if exists('*GetJavascriptIndent')
|
||||
let l:result = GetJavascriptIndent()
|
||||
elseif exists('*GetJsIndent')
|
||||
let l:result = GetJsIndent()
|
||||
else
|
||||
let l:result = cindent(v:lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" reset `is_recursion` counter and return the indentation value
|
||||
let s:is_recursion = 0
|
||||
return l:result + l:offset
|
||||
endif
|
||||
|
||||
" if all else fails indent according to C-syntax
|
||||
return cindent(v:lnum)
|
||||
endfu
|
||||
runtime! indent/javascript.vim
|
||||
|
||||
@@ -6,7 +6,7 @@ endif
|
||||
" Language: C++ Additions
|
||||
" Maintainer: Jon Haggblad <jon@haeggblad.com>
|
||||
" URL: http://www.haeggblad.com
|
||||
" Last Change: 1 Feb 2018
|
||||
" Last Change: 29 Jun 2019
|
||||
" Version: 0.6
|
||||
" Changelog:
|
||||
" 0.1 - initial version.
|
||||
@@ -964,6 +964,12 @@ if !exists("cpp_no_cpp11")
|
||||
syntax keyword cppSTLtype atomic_uintmax_t
|
||||
syntax keyword cppSTLconstant ATOMIC_FLAG_INIT
|
||||
syntax keyword cppSTLenum memory_order
|
||||
syntax keyword cppSTLtype memory_order_relaxed
|
||||
syntax keyword cppSTLtype memory_order_consume
|
||||
syntax keyword cppSTLtype memory_order_acquire
|
||||
syntax keyword cppSTLtype memory_order_release
|
||||
syntax keyword cppSTLtype memory_order_acq_rel
|
||||
syntax keyword cppSTLtype memory_order_seq_cst
|
||||
syntax keyword cppSTLfunction is_lock_free
|
||||
syntax keyword cppSTLfunction compare_exchange_weak
|
||||
syntax keyword cppSTLfunction compare_exchange_strong
|
||||
@@ -1983,6 +1989,9 @@ endif " C++17
|
||||
if !exists("cpp_no_cpp20")
|
||||
" type_traits
|
||||
syntax keyword cppSTLtype remove_cvref remove_cvref_t
|
||||
syntax keyword cppType char8_t
|
||||
syntax keyword cppStatement co_yield co_return co_await
|
||||
syntax keyword cppStorageClass consteval
|
||||
endif
|
||||
|
||||
|
||||
|
||||
17
after/syntax/haskell.vim
Normal file
17
after/syntax/haskell.vim
Normal file
@@ -0,0 +1,17 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dhall') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" store and remove current syntax value
|
||||
let old_syntax = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
|
||||
syn include @dhall syntax/dhall.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
syn region dhallBlock matchgroup=quasiQuote start=/\[\$\?staticDhallExpression|/ end=/|\]/ contains=@dhall
|
||||
|
||||
hi def link quasiQuote Underlined
|
||||
|
||||
" restore current syntax value
|
||||
let b:current_syntax = old_syntax
|
||||
@@ -1,4 +1,4 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -54,9 +54,7 @@ else " build-in javascript syntax
|
||||
syntax region javaScriptEmbed matchgroup=javaScriptEmbedBraces start=+\${+ end=+}+ contained contains=@javaScriptEmbededExpr,javaScript.*
|
||||
endif
|
||||
|
||||
" because this is autoloaded, when developing you're going to need to source
|
||||
" the autoload/jsx_pretty/*.vim file manually, or restart vim
|
||||
call jsx_pretty#syntax#highlight()
|
||||
runtime syntax/jsx_pretty.vim
|
||||
|
||||
let b:current_syntax = 'javascript.jsx'
|
||||
|
||||
@@ -169,55 +167,16 @@ syn match styledPrefix "\<styled\>\.\k\+"
|
||||
\ transparent fold
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,javascriptTagRef
|
||||
\ containedin=jsFuncBlock
|
||||
\ containedin=jsFuncBlock,jsParen,jsObject,jsObjectValue
|
||||
syn match styledPrefix "\.\<attrs\>\s*(\%(\n\|\s\|.\)\{-})"
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=jsObject,jsParen
|
||||
\ containedin=jsFuncBlock
|
||||
\ containedin=jsFuncBlock,jsParen,jsObject,jsObjectValue
|
||||
syn match styledPrefix "\.\<extend\>"
|
||||
\ transparent fold
|
||||
\ nextgroup=styledDefinition
|
||||
\ containedin=jsFuncBlock
|
||||
|
||||
" define custom API section, that contains typescript annotations
|
||||
" this is structurally similar to `jsFuncCall`, but allows type
|
||||
" annotations (delimited by brackets (e.g. "<>")) between `styled` and
|
||||
" the function call parenthesis
|
||||
syn match styledTypescriptPrefix
|
||||
\ "\<styled\><\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>(\%('\k\+'\|\"\k\+\"\|\k\+\))"
|
||||
\ transparent fold
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ styledTagNameString
|
||||
syn match styledTypescriptPrefix
|
||||
\ "\<styled\>\%((\%('\k\+'\|\"\k\+\"\|\k\+\))\|\.\k\+\)<\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ transparent fold
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ styledTagNameString
|
||||
syn match styledTypescriptPrefix "\.\<attrs\>\s*(\%(\n\|\s\|.\)\{-})<\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ styledTagNameString
|
||||
syn match styledTypescriptPrefix "\.\<extend\><\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ styledTagNameString
|
||||
\ containedin=jsFuncBlock,jsParen,jsObject,jsObjectValue
|
||||
|
||||
" define emotion css prop
|
||||
" to bypass problems from top-level defined xml/js definitions, this
|
||||
@@ -244,19 +203,13 @@ syn match cssError contained "{@<>"
|
||||
|
||||
" extend javascript matches to trigger styledDefinition highlighting
|
||||
syn match jsTaggedTemplate extend
|
||||
\ "\<css\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>\|\<createGlobalStyle\>"
|
||||
\ "\<css\>\|\.\<resolve\>\|\.\<global\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>\|\<createGlobalStyle\>"
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\<styled\>\s*(.\+)" transparent
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\<styled\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))"
|
||||
\ contains=styledTagNameString
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\<styled\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))<\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ contains=typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ styledTagNameString
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\.\<withComponent\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))"
|
||||
\ contains=styledTagNameString
|
||||
syn match jsFuncCall "\<dc\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))\%((\)\@="
|
||||
@@ -279,8 +232,6 @@ syn region styledDefinition contained transparent fold extend
|
||||
syn region styledDefinitionArgument contained transparent start=+(+ end=+)+
|
||||
\ contains=styledDefinition
|
||||
|
||||
syn cluster typescriptValue add=styledPrefix,jsFuncCall,styledTypescriptPrefix
|
||||
|
||||
""" yajs specific extensions
|
||||
" define template tag keywords, that trigger styledDefinitions again to be
|
||||
" contained in and also do contain the `javascriptTagRef` region
|
||||
@@ -295,13 +246,6 @@ syn cluster javascriptExpression
|
||||
\ add=styledPrefix,jsFuncCall,javascriptTagRefStyledPrefix
|
||||
syn cluster javascriptAfterIdentifier add=styledPrefix,jsFuncCall
|
||||
|
||||
""" yats specific extensions
|
||||
" extend typescriptIdentifierName to allow styledDefinitions in their
|
||||
" tagged templates
|
||||
syn match typescriptIdentifierName extend
|
||||
\ "\<css\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>\|\<createGlobalStyle\>"
|
||||
\ nextgroup=styledDefinition
|
||||
|
||||
" color the custom highlight elements
|
||||
hi def link cssCustomKeyFrameSelector Constant
|
||||
hi def link cssCustomPositioningPrefix StorageClass
|
||||
|
||||
27
after/syntax/javascript/graphql.vim
Normal file
27
after/syntax/javascript/graphql.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
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(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
|
||||
216
after/syntax/jsx_pretty.vim
Normal file
216
after/syntax/jsx_pretty.vim
Normal file
@@ -0,0 +1,216 @@
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0)
|
||||
|
||||
" <tag id="sample">
|
||||
" ~~~~~~~~~~~~~~~~~
|
||||
" and self close tag
|
||||
" <tag id="sample" />
|
||||
" ~~~~~~~~~~~~~~~~~~~
|
||||
syntax region jsxTag
|
||||
\ start=+<+
|
||||
\ matchgroup=jsxOpenPunct
|
||||
\ end=+>+
|
||||
\ matchgroup=NONE
|
||||
\ end=+\(/\_s*>\)\@=+
|
||||
\ contained
|
||||
\ contains=jsxOpenTag,jsxEscapeJs,jsxAttrib,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment,jsxSpreadOperator
|
||||
\ keepend
|
||||
\ extend
|
||||
|
||||
" <tag></tag>
|
||||
" ~~~~~~~~~~~
|
||||
" and fragment
|
||||
" <></>
|
||||
" ~~~~~
|
||||
" and self close tag
|
||||
" <tag />
|
||||
" ~~~~~~~
|
||||
syntax region jsxElement
|
||||
\ start=+<\_s*\(>\|\${\|\z(\<[-:_\.\$0-9A-Za-z]\+\>\)\)+
|
||||
\ end=+/\_s*>+
|
||||
\ end=+<\_s*/\_s*\z1\_s*>+
|
||||
\ contains=jsxElement,jsxEscapeJs,jsxTag,jsxComment,jsxCloseString,jsxCloseTag,@Spell
|
||||
\ keepend
|
||||
\ extend
|
||||
\ contained
|
||||
\ fold
|
||||
|
||||
" detect jsx region
|
||||
syntax region jsxRegion
|
||||
\ start=+\(\(\_[([,?:=+\-*/<>{}]\|&&\|||\|=>\|\<return\|\<default\|\<await\|\<yield\)\_s*\)\@<=<\_s*\(>\|\z(\(script\)\@!\<[_\$A-Za-z][-:_\.\$0-9A-Za-z]*\>\)\(\_s*\([-+*)\]}&|?]\|/\([/*]\|\_s*>\)\@!\)\)\@!\)+
|
||||
\ end=++
|
||||
\ contains=jsxElement
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~~~~~~~~~~~~~~
|
||||
syntax region jsxEscapeJs
|
||||
\ start=+{+
|
||||
\ end=++
|
||||
\ extend
|
||||
\ contained
|
||||
\ contains=jsBlock,javascriptBlock,javaScriptBlockBuildIn,typescriptBlock
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~~
|
||||
" and fragment start tag
|
||||
" <>
|
||||
" ~~
|
||||
exe 'syntax region jsxOpenTag
|
||||
\ matchgroup=jsxOpenPunct
|
||||
\ start=+<+
|
||||
\ end=+>+
|
||||
\ matchgroup=NONE
|
||||
\ end=+\>+
|
||||
\ contained
|
||||
\ contains=jsxTagName
|
||||
\ nextgroup=jsxAttrib
|
||||
\ skipwhite
|
||||
\ skipempty ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||
|
||||
" <foo.bar>
|
||||
" ~
|
||||
syntax match jsxDot +\.+ contained display
|
||||
|
||||
" <foo:bar>
|
||||
" ~
|
||||
syntax match jsxNamespace +:+ contained display
|
||||
|
||||
" <tag id="sample">
|
||||
" ~
|
||||
syntax match jsxEqual +=+ contained display nextgroup=jsxString,jsxEscapeJs,jsxRegion skipwhite
|
||||
|
||||
" <tag />
|
||||
" ~~
|
||||
syntax match jsxCloseString +/\_s*>+ contained
|
||||
|
||||
" </tag>
|
||||
" ~~~~~~
|
||||
" and fragment close tag
|
||||
" </>
|
||||
" ~~~
|
||||
syntax region jsxCloseTag
|
||||
\ matchgroup=jsxClosePunct
|
||||
\ start=+<\_s*/+
|
||||
\ end=+>+
|
||||
\ contained
|
||||
\ contains=jsxTagName
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~
|
||||
syntax match jsxAttrib
|
||||
\ +\<[-A-Za-z_][-:_\$0-9A-Za-z]*\>+
|
||||
\ contained
|
||||
\ nextgroup=jsxEqual
|
||||
\ skipwhite
|
||||
\ skipempty
|
||||
\ contains=jsxAttribKeyword
|
||||
\ display
|
||||
|
||||
" <MyComponent ...>
|
||||
" ~~~~~~~~~~~
|
||||
" NOT
|
||||
" <someCamel ...>
|
||||
" ~~~~~
|
||||
exe 'syntax match jsxComponentName
|
||||
\ +\<[A-Z][\$0-9A-Za-z]\+\>+
|
||||
\ contained
|
||||
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~
|
||||
exe 'syntax match jsxTagName
|
||||
\ +\<[-:_\.\$0-9A-Za-z]\+\>+
|
||||
\ contained
|
||||
\ contains=jsxComponentName,jsxDot,jsxNamespace
|
||||
\ nextgroup=jsxAttrib
|
||||
\ skipempty
|
||||
\ skipwhite
|
||||
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||
|
||||
" <tag id="sample">
|
||||
" ~~~~~~~~
|
||||
" and
|
||||
" <tag id='sample'>
|
||||
" ~~~~~~~~
|
||||
syntax region jsxString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ contained contains=@Spell display
|
||||
|
||||
let s:tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'raw'])
|
||||
let s:enable_tagged_jsx = !empty(s:tags)
|
||||
|
||||
" add support to JSX inside the tagged template string
|
||||
" https://github.com/developit/htm
|
||||
if s:enable_tagged_jsx
|
||||
exe 'syntax region jsxTaggedRegion
|
||||
\ start=+\%('. join(s:tags, '\|') .'\)\@<=`+ms=s+1
|
||||
\ end=+`+me=e-1
|
||||
\ extend
|
||||
\ contained
|
||||
\ containedin=jsTemplateString,javascriptTemplate,javaScriptStringT,typescriptStringB
|
||||
\ contains=jsxElement'
|
||||
|
||||
syntax region jsxEscapeJs
|
||||
\ start=+\${+
|
||||
\ end=++
|
||||
\ extend
|
||||
\ contained
|
||||
\ contains=jsTemplateExpression,javascriptTemplateSubstitution,javaScriptEmbed,typescriptInterpolation
|
||||
|
||||
syntax region jsxOpenTag
|
||||
\ matchgroup=jsxOpenPunct
|
||||
\ start=+<\%(\${\)\@=+
|
||||
\ matchgroup=NONE
|
||||
\ end=++
|
||||
\ contained
|
||||
\ contains=jsxEscapeJs
|
||||
\ nextgroup=jsxAttrib,jsxSpreadOperator
|
||||
\ skipwhite
|
||||
\ skipempty
|
||||
|
||||
syntax keyword jsxAttribKeyword class contained display
|
||||
|
||||
syntax match jsxSpreadOperator +\.\.\.+ contained display nextgroup=jsxEscapeJs skipwhite
|
||||
|
||||
syntax match jsxCloseTag +<//>+ display
|
||||
|
||||
syntax match jsxComment +<!--\_.\{-}-->+ display
|
||||
endif
|
||||
|
||||
" Highlight the tag name
|
||||
highlight def link jsxTag Function
|
||||
highlight def link jsxTagName Identifier
|
||||
highlight def link jsxComponentName Function
|
||||
|
||||
highlight def link jsxAttrib Type
|
||||
highlight def link jsxAttribKeyword jsxAttrib
|
||||
highlight def link jsxEqual Operator
|
||||
highlight def link jsxString String
|
||||
highlight def link jsxDot Operator
|
||||
highlight def link jsxNamespace Operator
|
||||
|
||||
if s:highlight_close_tag
|
||||
highlight def link jsxCloseString Identifier
|
||||
highlight def link jsxOpenPunct jsxTag
|
||||
else
|
||||
" Highlight the jsxCloseString (i.e. />), jsxPunct (i.e. <,>) and jsxCloseTag (i.e. <//>)
|
||||
highlight def link jsxCloseString Comment
|
||||
highlight def link jsxOpenPunct jsxPunct
|
||||
endif
|
||||
|
||||
highlight def link jsxPunct jsxCloseString
|
||||
highlight def link jsxClosePunct jsxPunct
|
||||
highlight def link jsxCloseTag jsxCloseString
|
||||
|
||||
highlight def link jsxComment Comment
|
||||
highlight def link jsxSpreadOperator Operator
|
||||
|
||||
let s:vim_jsx_pretty_colorful_config = get(g:, 'vim_jsx_pretty_colorful_config', 0)
|
||||
|
||||
if s:vim_jsx_pretty_colorful_config == 1
|
||||
highlight def link jsObjectKey Label
|
||||
highlight def link jsArrowFuncArgs Type
|
||||
highlight def link jsFuncArgs Type
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -28,21 +28,21 @@ endif
|
||||
" refine the typescript line comment
|
||||
syntax region typescriptLineComment start=+//+ end=/$/ contains=@Spell,typescriptCommentTodo,typescriptRef extend keepend
|
||||
|
||||
" add a typescriptBlock group for typescript
|
||||
syntax region typescriptBlock
|
||||
\ contained
|
||||
\ matchgroup=typescriptBraces
|
||||
\ start="{"
|
||||
\ end="}"
|
||||
\ extend
|
||||
\ contains=@typescriptAll,@typescriptExpression,typescriptBlock
|
||||
\ fold
|
||||
if !hlexists('typescriptTypeCast')
|
||||
" add a typescriptBlock group for typescript
|
||||
syntax region typescriptBlock
|
||||
\ matchgroup=typescriptBraces
|
||||
\ start="{"
|
||||
\ end="}"
|
||||
\ contained
|
||||
\ extend
|
||||
\ contains=@typescriptExpression,typescriptBlock
|
||||
\ fold
|
||||
endif
|
||||
|
||||
" because this is autoloaded, when developing you're going to need to source
|
||||
" the autoload/jsx_pretty/*.vim file manually, or restart vim
|
||||
call jsx_pretty#syntax#highlight()
|
||||
syntax cluster typescriptExpression add=jsxRegion,typescriptParens
|
||||
|
||||
syntax cluster typescriptExpression add=jsxRegion
|
||||
runtime syntax/jsx_pretty.vim
|
||||
|
||||
let b:current_syntax = 'typescript.tsx'
|
||||
|
||||
@@ -52,119 +52,7 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'styled-component
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: styled-components (js/ts)
|
||||
" Maintainer: Karl Fleischmann <fleischmann.karl@gmail.com>
|
||||
" URL: https://github.com/styled-components/vim-styled-components
|
||||
|
||||
if exists("b:current_syntax")
|
||||
let s:current_syntax=b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
|
||||
" fix for "-" before cssPositioningProp
|
||||
" - needs to be above CSS include to not match cssVendor definitions
|
||||
syn region cssCustomPositioningPrefix contained
|
||||
\ start='-' end='\%(\s\{-}:\)\@='
|
||||
\ contains=cssPositioningProp
|
||||
|
||||
" introduce CSS cluster from built-in (or single third party syntax file)
|
||||
syn include @CSS syntax/css.vim
|
||||
|
||||
" try to include CSS3 definitions from multiple files
|
||||
" this is only possible on vim version above 7
|
||||
if v:version >= 700
|
||||
try
|
||||
syn include @CSS3 syntax/css/*.vim
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
|
||||
" TODO: include react-native keywords
|
||||
|
||||
" define custom cssAttrRegion
|
||||
" - add ",", "`" and "{" to the end characters
|
||||
" - add "cssPseudoClassId" to it's containing elements
|
||||
" this will incorrectly highlight pseudo elements incorrectly used as
|
||||
" attributes but correctly highlight actual attributes
|
||||
syn region cssCustomAttrRegion contained
|
||||
\ start=":" end="\ze\%(;\|)\|{\|}\|`\)"
|
||||
\ contains=css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,
|
||||
\ cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,
|
||||
\ cssError,cssAttrComma,cssNoise,cssPseudoClassId,
|
||||
\ jsTemplateExpression,
|
||||
\ typescriptInterpolation,typescriptTemplateSubstitution
|
||||
syn region cssCustomAttrRegion contained
|
||||
\ start="transition\s*:" end="\ze\%(;\|)\|{\|}\|`\)"
|
||||
\ contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,
|
||||
\ cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,
|
||||
\ cssVendor,cssError,cssAttrComma,cssNoise,cssPseudoClassId,
|
||||
\ jsTemplateExpression,
|
||||
\ typescriptInterpolation,typescriptTemplateSubstitution
|
||||
|
||||
" define custom css elements to not utilize cssDefinition
|
||||
syn region cssCustomMediaBlock contained fold transparent matchgroup=cssBraces
|
||||
\ start="{" end="}"
|
||||
\ contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,
|
||||
\ cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,
|
||||
\ cssUnicodeEscape,cssVendor,cssTagName,cssClassName,
|
||||
\ cssIdentifier,cssPseudoClass,cssSelectorOp,cssSelectorOp2,
|
||||
\ cssAttributeSelector
|
||||
syn region cssCustomPageWrap contained transparent matchgroup=cssBraces
|
||||
\ start="{" end="}"
|
||||
\ contains=cssPageMargin,cssPageProp,cssCustomAttrRegion,css.*Prop,
|
||||
\ cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,
|
||||
\ cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,
|
||||
\ cssHacks
|
||||
syn match cssCustomPageMargin contained skipwhite skipnl
|
||||
\ "@\%(\%(top\|left\|right\|bottom\)-\%(left\|center\|right\|middle\|bottom\)\)\%(-corner\)\="
|
||||
syn match cssCustomKeyFrameSelector "\%(\d*%\|\<from\>\|\<to\>\)" contained
|
||||
\ skipwhite skipnl
|
||||
|
||||
" define css include customly to overwrite nextgroup
|
||||
syn region cssInclude start="@media\>" end="\ze{" skipwhite skipnl
|
||||
\ contains=cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,
|
||||
\ cssMediaMediaAttr,cssVencor,cssMediaType,cssIncludeKeyword,
|
||||
\ cssMediaComma,cssComment
|
||||
\ nextgroup=cssCustomMediaBlock
|
||||
|
||||
" define all non-contained css definitions
|
||||
syn cluster CSSTop
|
||||
\ contains=cssTagName,cssSelectorOp,cssAttributeSelector,cssClassName,
|
||||
\ cssBraces,cssIdentifier,cssIncludeKeyword,cssPage,cssKeyFrame,
|
||||
\ cssFontDescriptor,cssAttrComma,cssPseudoClass,cssUnicodeEscape
|
||||
|
||||
" custom highlights for styled components
|
||||
" - "&" inside top level
|
||||
" - cssTagName inside of jsStrings inside of styledPrefix regions
|
||||
" TODO: override highlighting of cssTagName with more subtle one
|
||||
syn match styledAmpersand contained "&"
|
||||
syn region styledTagNameString matchgroup=jsString contained
|
||||
\ start=+'+ end=+'+ skip=+\\\%(\'\|$\)+
|
||||
\ contains=cssTagName
|
||||
syn region styledTagNameString matchgroup=jsString contained
|
||||
\ start=+"+ end=+"+ skip=+\\\%(\"\|$\)+
|
||||
\ contains=cssTagName
|
||||
syn region styledTagNameString matchgroup=jsString contained
|
||||
\ start=+`+ end=+`+ skip=+\\\%(\`\|$\)+
|
||||
\ contains=cssTagName
|
||||
|
||||
" define custom API sections that trigger the styledDefinition highlighting
|
||||
syn match styledPrefix "\<styled\>\.\k\+"
|
||||
\ transparent fold
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,javascriptTagRef
|
||||
\ containedin=jsFuncBlock
|
||||
syn match styledPrefix "\.\<attrs\>\s*(\%(\n\|\s\|.\)\{-})"
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=jsObject,jsParen
|
||||
\ containedin=jsFuncBlock
|
||||
syn match styledPrefix "\.\<extend\>"
|
||||
\ transparent fold
|
||||
\ nextgroup=styledDefinition
|
||||
\ containedin=jsFuncBlock
|
||||
runtime! syntax/javascript.vim
|
||||
|
||||
" define custom API section, that contains typescript annotations
|
||||
" this is structurally similar to `jsFuncCall`, but allows type
|
||||
@@ -172,132 +60,57 @@ syn match styledPrefix "\.\<extend\>"
|
||||
" the function call parenthesis
|
||||
syn match styledTypescriptPrefix
|
||||
\ "\<styled\><\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>(\%('\k\+'\|\"\k\+\"\|\k\+\))"
|
||||
\ transparent fold
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ typescriptType,foldBraces,
|
||||
\ styledTagNameString
|
||||
\ containedin=foldBraces
|
||||
syn match styledTypescriptPrefix
|
||||
\ "\<styled\>\%((\%('\k\+'\|\"\k\+\"\|\k\+\))\|\.\k\+\)<\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ transparent fold
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ typescriptType,foldBraces,
|
||||
\ styledTagNameString
|
||||
\ containedin=foldBraces
|
||||
syn match styledTypescriptPrefix "\.\<attrs\>\s*(\%(\n\|\s\|.\)\{-})<\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ typescriptType,foldBraces,
|
||||
\ styledTagNameString
|
||||
\ containedin=foldBraces
|
||||
syn match styledTypescriptPrefix "\.\<extend\><\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ transparent fold extend
|
||||
\ nextgroup=styledDefinition
|
||||
\ contains=cssTagName,
|
||||
\ typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ typescriptType,foldBraces,
|
||||
\ styledTagNameString
|
||||
\ containedin=foldBraces
|
||||
|
||||
" define emotion css prop
|
||||
" to bypass problems from top-level defined xml/js definitions, this
|
||||
" plugin re-defines keywords/noise for highlighting inside of the custom
|
||||
" xmlAttrib definition
|
||||
syn keyword styledXmlRegionKeyword css contained
|
||||
syn match styledXmlRegionNoise "\%(=\|{\|}\)" contained
|
||||
" only include styledDefinitions inside of xmlAttribs, that are wrapped
|
||||
" in `css={}` regions, `keepend` is necessary to correctly break on the
|
||||
" higher-level xmlAttrib region end
|
||||
syn region styledXmlRegion
|
||||
\ start="\<css\>={" end="}"
|
||||
\ keepend fold
|
||||
\ containedin=xmlAttrib
|
||||
\ contains=styledXmlRegionKeyword,styledXmlRegionNoise,styledDefinition
|
||||
|
||||
" define nested region for indenting
|
||||
syn region styledNestedRegion contained transparent
|
||||
\ matchgroup=cssBraces
|
||||
\ start="{" end="}"
|
||||
|
||||
" re-define cssError to be highlighted correctly in styledNestedRegion
|
||||
syn match cssError contained "{@<>"
|
||||
|
||||
" extend javascript matches to trigger styledDefinition highlighting
|
||||
syn match jsTaggedTemplate extend
|
||||
\ "\<css\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>\|\<createGlobalStyle\>"
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\<styled\>\s*(.\+)" transparent
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\<styled\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))"
|
||||
\ contains=styledTagNameString
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\<styled\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))<\%(\[\|\]\|{\|}\||\|&\|:\|;\|,\|?\|'\|\"\|\k\|\s\|\n\)\+>"
|
||||
\ transparent fold
|
||||
\ contains=typescriptBraces,typescriptOpSymbols,typescriptEndColons,
|
||||
\ typescriptParens,typescriptStringS,@typescriptType,
|
||||
\ typescriptType,
|
||||
\ typescriptType,foldBraces,
|
||||
\ styledTagNameString
|
||||
\ nextgroup=styledDefinition
|
||||
syn match jsFuncCall "\.\<withComponent\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))"
|
||||
\ contains=styledTagNameString
|
||||
syn match jsFuncCall "\<dc\>\s*(\%('\k\+'\|\"\k\+\"\|`\k\+`\))\%((\)\@="
|
||||
\ contains=styledTagNameString
|
||||
\ nextgroup=styledDefinitionArgument
|
||||
|
||||
" inject css highlighting into custom jsTemplateString region
|
||||
" - use `extend` to not end all nested jsTemplateExpression on the first
|
||||
" closing one
|
||||
syn region styledDefinition contained transparent fold extend
|
||||
\ start="`" end="`" skip="\\\%(`\|$\)"
|
||||
\ contains=@CSSTop,
|
||||
\ css.*Prop,cssValue.*,cssColor,cssUrl,cssImportant,cssError,
|
||||
\ cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,
|
||||
\ cssHacks,
|
||||
\ cssCustom.*,
|
||||
\ jsComment,jsTemplateExpression,
|
||||
\ typescriptInterpolation,typescriptTemplateSubstitution,
|
||||
\ styledAmpersand,styledNestedRegion
|
||||
syn region styledDefinitionArgument contained transparent start=+(+ end=+)+
|
||||
\ contains=styledDefinition
|
||||
\ containedin=foldBraces
|
||||
|
||||
syn cluster typescriptValue add=styledPrefix,jsFuncCall,styledTypescriptPrefix
|
||||
|
||||
""" yajs specific extensions
|
||||
" define template tag keywords, that trigger styledDefinitions again to be
|
||||
" contained in and also do contain the `javascriptTagRef` region
|
||||
syn match javascriptTagRefStyledPrefix transparent fold
|
||||
\ "\<css\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>\|\<createGlobalStyle\>"
|
||||
\ containedin=javascriptTagRef
|
||||
\ contains=javascriptTagRef
|
||||
\ nextgroup=styledDefinition
|
||||
" extend the yajs clusters to include the previously and extraneously defined
|
||||
" styled-related matches
|
||||
syn cluster javascriptExpression
|
||||
\ add=styledPrefix,jsFuncCall,javascriptTagRefStyledPrefix
|
||||
syn cluster javascriptAfterIdentifier add=styledPrefix,jsFuncCall
|
||||
|
||||
""" yats specific extensions
|
||||
" extend typescriptIdentifierName to allow styledDefinitions in their
|
||||
" tagged templates
|
||||
syn match typescriptIdentifierName extend
|
||||
\ "\<css\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>\|\<createGlobalStyle\>"
|
||||
\ nextgroup=styledDefinition
|
||||
|
||||
" color the custom highlight elements
|
||||
hi def link cssCustomKeyFrameSelector Constant
|
||||
hi def link cssCustomPositioningPrefix StorageClass
|
||||
hi def link styledAmpersand Special
|
||||
|
||||
hi def link styledXmlRegionKeyword Type
|
||||
hi def link styledXmlRegionNoise Noise
|
||||
hi def link styledXmlRegion String
|
||||
|
||||
|
||||
if exists("s:current_syntax")
|
||||
let b:current_syntax=s:current_syntax
|
||||
endif
|
||||
|
||||
26
after/syntax/typescript/graphql.vim
Normal file
26
after/syntax/typescript/graphql.vim
Normal file
@@ -0,0 +1,26 @@
|
||||
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(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
|
||||
@@ -11,15 +11,15 @@ function! fish#Indent()
|
||||
let l:indent = 0
|
||||
let l:prevline = getline(l:prevlnum)
|
||||
if l:prevline =~# '\v^\s*switch>'
|
||||
let l:indent = l:shiftwidth * 2
|
||||
return indent(l:prevlnum) + l:shiftwidth
|
||||
elseif l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|case)>'
|
||||
let l:indent = l:shiftwidth
|
||||
endif
|
||||
let l:line = getline(v:lnum)
|
||||
if l:line =~# '\v^\s*end>'
|
||||
return indent(v:lnum) - (l:indent ==# 0 ? l:shiftwidth : l:indent)
|
||||
return indent(l:prevlnum) - (l:indent ==# 0 ? l:shiftwidth : l:indent)
|
||||
elseif l:line =~# '\v^\s*%(case|else)>'
|
||||
return indent(v:lnum) - l:shiftwidth
|
||||
return indent(l:prevlnum) - l:shiftwidth
|
||||
endif
|
||||
return indent(l:prevlnum) + l:indent
|
||||
endfunction
|
||||
|
||||
@@ -18,10 +18,6 @@ function! go#config#VersionWarning() abort
|
||||
return get(g:, 'go_version_warning', 1)
|
||||
endfunction
|
||||
|
||||
function! go#config#NullModuleWarning() abort
|
||||
return get(g:, 'go_null_module_warning', 1)
|
||||
endfunction
|
||||
|
||||
function! go#config#BuildTags() abort
|
||||
return get(g:, 'go_build_tags', '')
|
||||
endfunction
|
||||
@@ -29,10 +25,12 @@ endfunction
|
||||
function! go#config#SetBuildTags(value) abort
|
||||
if a:value is ''
|
||||
silent! unlet g:go_build_tags
|
||||
call go#lsp#ResetWorkspaceDirectories()
|
||||
return
|
||||
endif
|
||||
|
||||
let g:go_build_tags = a:value
|
||||
call go#lsp#ResetWorkspaceDirectories()
|
||||
endfunction
|
||||
|
||||
function! go#config#TestTimeout() abort
|
||||
@@ -55,6 +53,14 @@ function! go#config#TermMode() abort
|
||||
return get(g:, 'go_term_mode', 'vsplit')
|
||||
endfunction
|
||||
|
||||
function! go#config#TermCloseOnExit() abort
|
||||
return get(g:, 'go_term_close_on_exit', 1)
|
||||
endfunction
|
||||
|
||||
function! go#config#SetTermCloseOnExit(value) abort
|
||||
let g:go_term_close_on_exit = a:value
|
||||
endfunction
|
||||
|
||||
function! go#config#TermEnabled() abort
|
||||
return has('nvim') && get(g:, 'go_term_enabled', 0)
|
||||
endfunction
|
||||
@@ -182,6 +188,9 @@ function! go#config#DocUrl() abort
|
||||
return godoc_url
|
||||
endfunction
|
||||
|
||||
function! go#config#DocPopupWindow() abort
|
||||
return get(g:, 'go_doc_popup_window', 0)
|
||||
endfunction
|
||||
function! go#config#DefReuseBuffer() abort
|
||||
return get(g:, 'go_def_reuse_buffer', 0)
|
||||
endfunction
|
||||
@@ -276,10 +285,6 @@ function! go#config#MetalinterEnabled() abort
|
||||
return get(g:, "go_metalinter_enabled", default_enabled)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterDisabled() abort
|
||||
return get(g:, "go_metalinter_disabled", [])
|
||||
endfunction
|
||||
|
||||
function! go#config#GolintBin() abort
|
||||
return get(g:, "go_golint_bin", "golint")
|
||||
endfunction
|
||||
|
||||
16
autoload/graphql.vim
Normal file
16
autoload/graphql.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim plugin
|
||||
" Language: GraphQL
|
||||
" Maintainer: Jon Parise <jon@indelible.org>
|
||||
|
||||
if exists('g:autoloaded_graphql')
|
||||
finish
|
||||
endif
|
||||
let g:autoloaded_graphql = 1
|
||||
|
||||
function! graphql#javascript_tags() abort
|
||||
return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL'])
|
||||
endfunction
|
||||
@@ -1,4 +1,4 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -7,7 +7,7 @@ function! jsx_pretty#comment#update_commentstring(original)
|
||||
let syn_start = s:syn_name(line('.'), 1)
|
||||
let save_cursor = getcurpos()
|
||||
|
||||
if syn_start =~ '^jsx'
|
||||
if syn_start =~? '^jsx'
|
||||
let line = getline(".")
|
||||
let start = len(matchstr(line, '^\s*'))
|
||||
let syn_name = s:syn_name(line('.'), start + 1)
|
||||
@@ -16,7 +16,7 @@ function! jsx_pretty#comment#update_commentstring(original)
|
||||
let &l:commentstring = '// %s'
|
||||
elseif s:syn_contains(line('.'), col('.'), 'jsxTaggedRegion')
|
||||
let &l:commentstring = '<!-- %s -->'
|
||||
elseif syn_name =~ '^jsxAttrib'
|
||||
elseif syn_name =~? '^jsxAttrib'
|
||||
let &l:commentstring = '// %s'
|
||||
else
|
||||
let &l:commentstring = '{/* %s */}'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -37,7 +37,7 @@ function! s:prev_line(lnum)
|
||||
endfunction
|
||||
|
||||
function! s:syn_attr_jsx(synattr)
|
||||
return a:synattr =~ "^jsx"
|
||||
return a:synattr =~? "^jsx"
|
||||
endfunction
|
||||
|
||||
function! s:syn_xmlish(syns)
|
||||
@@ -45,21 +45,21 @@ function! s:syn_xmlish(syns)
|
||||
endfunction
|
||||
|
||||
function! s:syn_jsx_element(syns)
|
||||
return get(a:syns, -1) =~ 'jsxElement'
|
||||
return get(a:syns, -1) =~? 'jsxElement'
|
||||
endfunction
|
||||
|
||||
function! s:syn_js_comment(syns)
|
||||
return get(a:syns, -1) =~ 'Comment$'
|
||||
return get(a:syns, -1) =~? 'Comment$'
|
||||
endfunction
|
||||
|
||||
function! s:syn_jsx_escapejs(syns)
|
||||
return get(a:syns, -1) =~ '\(\(js\(Template\)\?\|javaScript\(Embed\)\?\|typescript\)Braces\|javascriptTemplateSB\|typescriptInterpolationDelimiter\)' &&
|
||||
\ (get(a:syns, -2) =~ 'jsxEscapeJs' ||
|
||||
\ get(a:syns, -3) =~ 'jsxEscapeJs')
|
||||
return get(a:syns, -1) =~? '\(\(js\(Template\)\?\|javaScript\(Embed\)\?\|typescript\)Braces\|javascriptTemplateSB\|typescriptInterpolationDelimiter\)' &&
|
||||
\ (get(a:syns, -2) =~? 'jsxEscapeJs' ||
|
||||
\ get(a:syns, -3) =~? 'jsxEscapeJs')
|
||||
endfunction
|
||||
|
||||
function! s:syn_jsx_attrib(syns)
|
||||
return len(filter(copy(a:syns), 'v:val =~ "jsxAttrib"'))
|
||||
return len(filter(copy(a:syns), 'v:val =~? "jsxAttrib"'))
|
||||
endfunction
|
||||
|
||||
let s:start_tag = '<\s*\([-:_\.\$0-9A-Za-z]\+\|>\)'
|
||||
@@ -73,17 +73,30 @@ function! jsx_pretty#indent#get(js_indent)
|
||||
let line = substitute(getline(lnum), '^\s*\|\s*$', '', 'g')
|
||||
let current_syn = s:syn_sol(lnum)
|
||||
let current_syn_eol = s:syn_eol(lnum)
|
||||
let prev_syn_sol = s:syn_sol(lnum - 1)
|
||||
let prev_syn_eol = s:syn_eol(lnum - 1)
|
||||
let prev_line_num = prevnonblank(lnum - 1)
|
||||
let prev_syn_sol = s:syn_sol(prev_line_num)
|
||||
let prev_syn_eol = s:syn_eol(prev_line_num)
|
||||
let prev_line = s:prev_line(lnum)
|
||||
let prev_ind = s:prev_indent(lnum)
|
||||
|
||||
if s:syn_xmlish(current_syn)
|
||||
|
||||
if !s:syn_xmlish(prev_syn_sol)
|
||||
\ && !s:syn_jsx_escapejs(prev_syn_sol)
|
||||
\ && !s:syn_jsx_escapejs(prev_syn_eol)
|
||||
\ && !s:syn_js_comment(prev_syn_sol)
|
||||
if line =~ '^/\s*>' || line =~ '^<\s*' . s:end_tag
|
||||
return prev_ind
|
||||
else
|
||||
return prev_ind + s:sw()
|
||||
endif
|
||||
elseif !s:syn_xmlish(prev_syn_sol) && !s:syn_js_comment(prev_syn_sol) && s:syn_jsx_attrib(current_syn)
|
||||
" For #79
|
||||
return prev_ind + s:sw()
|
||||
" {
|
||||
" <div></div>
|
||||
" ##} <--
|
||||
if s:syn_jsx_element(current_syn) && line =~ '}$'
|
||||
elseif s:syn_jsx_element(current_syn) && line =~ '}$'
|
||||
let pair_line = searchpair('{', '', '}', 'b')
|
||||
return indent(pair_line)
|
||||
elseif line =~ '^-->$'
|
||||
@@ -124,6 +137,8 @@ function! jsx_pretty#indent#get(js_indent)
|
||||
else
|
||||
return prev_ind
|
||||
endif
|
||||
elseif prev_line =~ '^\<return'
|
||||
return prev_ind
|
||||
else
|
||||
return prev_ind - s:sw()
|
||||
endif
|
||||
@@ -141,16 +156,6 @@ function! jsx_pretty#indent#get(js_indent)
|
||||
else
|
||||
return prev_ind
|
||||
endif
|
||||
elseif !s:syn_xmlish(prev_syn_sol)
|
||||
if prev_line =~ '^\<\(return\|default\|await\|yield\)'
|
||||
if line !~ '^/\s*>' || line !~ '^<\s*' . s:end_tag
|
||||
return prev_ind + s:sw()
|
||||
else
|
||||
return prev_ind
|
||||
endif
|
||||
else
|
||||
return prev_ind
|
||||
endif
|
||||
else
|
||||
return prev_ind
|
||||
endif
|
||||
@@ -174,7 +179,8 @@ function! jsx_pretty#indent#get(js_indent)
|
||||
return prev_ind + s:sw()
|
||||
endif
|
||||
endif
|
||||
elseif s:syn_jsx_escapejs(current_syn_eol)
|
||||
elseif line =~ '^`' && s:syn_jsx_escapejs(current_syn_eol)
|
||||
" For `} of template syntax
|
||||
let pair_line = searchpair('{', '', '}', 'bW')
|
||||
return indent(pair_line)
|
||||
elseif line =~ '^/[/*]' " js comment in jsx tag
|
||||
@@ -188,6 +194,14 @@ function! jsx_pretty#indent#get(js_indent)
|
||||
else
|
||||
let ind = a:js_indent()
|
||||
|
||||
" Issue #68
|
||||
" return (<div>
|
||||
" |<div>)
|
||||
if (line =~ '^/\s*>' || line =~ '^<\s*' . s:end_tag)
|
||||
\ && !s:syn_xmlish(prev_syn_sol)
|
||||
return prev_ind
|
||||
endif
|
||||
|
||||
" If current syntax is not a jsx syntax group
|
||||
if s:syn_xmlish(prev_syn_eol) && line !~ '^[)\]}]'
|
||||
let sol = matchstr(line, s:opfirst)
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
function! jsx_pretty#syntax#highlight()
|
||||
|
||||
let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0)
|
||||
|
||||
" <tag id="sample">
|
||||
" ~~~~~~~~~~~~~~~~~
|
||||
" and self close tag
|
||||
" <tag id="sample" />
|
||||
" ~~~~~~~~~~~~~~~~~~~
|
||||
syntax region jsxTag
|
||||
\ start=+<+
|
||||
\ matchgroup=jsxOpenPunct
|
||||
\ end=+>+
|
||||
\ matchgroup=NONE
|
||||
\ end=+\(/\_s*>\)\@=+
|
||||
\ contained
|
||||
\ contains=jsxOpenTag,jsxEscapeJs,jsxAttrib,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment,jsxSpreadOperator
|
||||
\ keepend
|
||||
\ extend
|
||||
|
||||
" <tag></tag>
|
||||
" ~~~~~~~~~~~
|
||||
" and fragment
|
||||
" <></>
|
||||
" ~~~~~
|
||||
" and self close tag
|
||||
" <tag />
|
||||
" ~~~~~~~
|
||||
syntax region jsxElement
|
||||
\ start=+<\_s*\(>\|\${\|\z(\<[-:_\.\$0-9A-Za-z]\+\>\)\)+
|
||||
\ end=+/\_s*>+
|
||||
\ end=+<\_s*/\_s*\z1\_s*>+
|
||||
\ contains=jsxElement,jsxEscapeJs,jsxTag,jsxComment,jsxCloseString,jsxCloseTag,@Spell
|
||||
\ keepend
|
||||
\ extend
|
||||
\ contained
|
||||
\ fold
|
||||
|
||||
" detect jsx region
|
||||
syntax region jsxRegion
|
||||
\ start=+\(\(\_[([,?:=+\-*/<>{}]\|&&\|||\|=>\|\<return\|\<default\|\<await\|\<yield\)\_s*\)\@<=<\_s*\(>\|\z(\(script\)\@!\<[_\$A-Za-z][-:_\.\$0-9A-Za-z]*\>\)\(\_s*\([-+*)\]}&|?]\|/\([/*]\|\_s*>\)\@!\)\)\@!\)+
|
||||
\ end=++
|
||||
\ contains=jsxElement
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~~~~~~~~~~~~~~
|
||||
syntax region jsxEscapeJs
|
||||
\ start=+{+
|
||||
\ end=++
|
||||
\ extend
|
||||
\ contained
|
||||
\ contains=jsBlock,javascriptBlock,javaScriptBlockBuildIn,typescriptBlock
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~~
|
||||
" and fragment start tag
|
||||
" <>
|
||||
" ~~
|
||||
exe 'syntax region jsxOpenTag
|
||||
\ matchgroup=jsxOpenPunct
|
||||
\ start=+<+
|
||||
\ end=+>+
|
||||
\ matchgroup=NONE
|
||||
\ end=+\>+
|
||||
\ contained
|
||||
\ contains=jsxTagName
|
||||
\ nextgroup=jsxAttrib
|
||||
\ skipwhite
|
||||
\ skipempty ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||
|
||||
" <foo.bar>
|
||||
" ~
|
||||
syntax match jsxDot +\.+ contained display
|
||||
|
||||
" <foo:bar>
|
||||
" ~
|
||||
syntax match jsxNamespace +:+ contained display
|
||||
|
||||
" <tag id="sample">
|
||||
" ~
|
||||
syntax match jsxEqual +=+ contained display nextgroup=jsxString,jsxEscapeJs,jsxRegion skipwhite
|
||||
|
||||
" <tag />
|
||||
" ~~
|
||||
syntax match jsxCloseString +/\_s*>+ contained
|
||||
|
||||
" </tag>
|
||||
" ~~~~~~
|
||||
" and fragment close tag
|
||||
" </>
|
||||
" ~~~
|
||||
syntax region jsxCloseTag
|
||||
\ matchgroup=jsxClosePunct
|
||||
\ start=+<\_s*/+
|
||||
\ end=+>+
|
||||
\ contained
|
||||
\ contains=jsxTagName
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~
|
||||
syntax match jsxAttrib
|
||||
\ +\<[-A-Za-z_][-:_\$0-9A-Za-z]*\>+
|
||||
\ contained
|
||||
\ nextgroup=jsxEqual
|
||||
\ skipwhite
|
||||
\ skipempty
|
||||
\ contains=jsxAttribKeyword
|
||||
\ display
|
||||
|
||||
" <MyComponent ...>
|
||||
" ~~~~~~~~~~~
|
||||
" NOT
|
||||
" <someCamel ...>
|
||||
" ~~~~~
|
||||
exe 'syntax match jsxComponentName
|
||||
\ +\<[A-Z][\$0-9A-Za-z]\+\>+
|
||||
\ contained
|
||||
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~
|
||||
exe 'syntax match jsxTagName
|
||||
\ +\<[-:_\.\$0-9A-Za-z]\+\>+
|
||||
\ contained
|
||||
\ contains=jsxComponentName,jsxDot,jsxNamespace
|
||||
\ nextgroup=jsxAttrib
|
||||
\ skipempty
|
||||
\ skipwhite
|
||||
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||
|
||||
" <tag id="sample">
|
||||
" ~~~~~~~~
|
||||
" and
|
||||
" <tag id='sample'>
|
||||
" ~~~~~~~~
|
||||
syntax region jsxString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ contained contains=@Spell display
|
||||
|
||||
let s:tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'raw'])
|
||||
let s:enable_tagged_jsx = !empty(s:tags)
|
||||
|
||||
" add support to JSX inside the tagged template string
|
||||
" https://github.com/developit/htm
|
||||
if s:enable_tagged_jsx
|
||||
exe 'syntax region jsxTaggedRegion
|
||||
\ start=+\%('. join(s:tags, '\|') .'\)\@<=`+ms=s+1
|
||||
\ end=+`+me=e-1
|
||||
\ extend
|
||||
\ contained
|
||||
\ containedin=jsTemplateString,javascriptTemplate,javaScriptStringT,typescriptStringB
|
||||
\ contains=jsxElement'
|
||||
|
||||
syntax region jsxEscapeJs
|
||||
\ start=+\${+
|
||||
\ end=++
|
||||
\ extend
|
||||
\ contained
|
||||
\ contains=jsTemplateExpression,javascriptTemplateSubstitution,javaScriptEmbed,typescriptInterpolation
|
||||
|
||||
syntax region jsxOpenTag
|
||||
\ matchgroup=jsxOpenPunct
|
||||
\ start=+<\%(\${\)\@=+
|
||||
\ matchgroup=NONE
|
||||
\ end=++
|
||||
\ contained
|
||||
\ contains=jsxEscapeJs
|
||||
\ nextgroup=jsxAttrib,jsxSpreadOperator
|
||||
\ skipwhite
|
||||
\ skipempty
|
||||
|
||||
syntax keyword jsxAttribKeyword class contained display
|
||||
|
||||
syntax match jsxSpreadOperator +\.\.\.+ contained display nextgroup=jsxEscapeJs skipwhite
|
||||
|
||||
syntax match jsxCloseTag +<//>+ display
|
||||
|
||||
syntax match jsxComment +<!--\_.\{-}-->+ display
|
||||
endif
|
||||
|
||||
" Highlight the tag name
|
||||
highlight def link jsxTag Function
|
||||
highlight def link jsxTagName Identifier
|
||||
highlight def link jsxComponentName Function
|
||||
|
||||
highlight def link jsxAttrib Type
|
||||
highlight def link jsxAttribKeyword jsxAttrib
|
||||
highlight def link jsxEqual Operator
|
||||
highlight def link jsxString String
|
||||
highlight def link jsxDot Operator
|
||||
highlight def link jsxNamespace Operator
|
||||
|
||||
" Highlight the jsxCloseString (i.e. />), jsxPunct (i.e. <,>) and jsxCloseTag (i.e. <//>)
|
||||
highlight def link jsxCloseString Comment
|
||||
highlight def link jsxPunct jsxCloseString
|
||||
highlight def link jsxOpenPunct jsxPunct
|
||||
highlight def link jsxClosePunct jsxPunct
|
||||
highlight def link jsxCloseTag jsxCloseString
|
||||
|
||||
highlight def link jsxComment Comment
|
||||
highlight def link jsxSpreadOperator Operator
|
||||
|
||||
if s:highlight_close_tag
|
||||
highlight! def link jsxOpenPunct jsxTag
|
||||
highlight! def link jsxCloseString Identifier
|
||||
endif
|
||||
|
||||
let s:vim_jsx_pretty_colorful_config = get(g:, 'vim_jsx_pretty_colorful_config', 0)
|
||||
|
||||
if s:vim_jsx_pretty_colorful_config == 1
|
||||
highlight def link jsObjectKey Label
|
||||
highlight def link jsArrowFuncArgs Type
|
||||
highlight def link jsFuncArgs Type
|
||||
endif
|
||||
|
||||
endfunction
|
||||
72
autoload/puppet/align.vim
Normal file
72
autoload/puppet/align.vim
Normal file
@@ -0,0 +1,72 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
function! puppet#align#IndentLevel(lnum)
|
||||
return indent(a:lnum) / &shiftwidth
|
||||
endfunction
|
||||
|
||||
function! puppet#align#LinesInBlock(lnum)
|
||||
let lines = []
|
||||
let indent_level = puppet#align#IndentLevel(a:lnum)
|
||||
|
||||
let marker = a:lnum - 1
|
||||
while marker >= 1
|
||||
let line_text = getline(marker)
|
||||
let line_indent = puppet#align#IndentLevel(marker)
|
||||
|
||||
if line_text =~? '\v\S'
|
||||
if line_indent < indent_level
|
||||
break
|
||||
elseif line_indent == indent_level
|
||||
call add(lines, marker)
|
||||
endif
|
||||
endif
|
||||
|
||||
let marker -= 1
|
||||
endwhile
|
||||
|
||||
let marker = a:lnum
|
||||
while marker <= line('$')
|
||||
let line_text = getline(marker)
|
||||
let line_indent = puppet#align#IndentLevel(marker)
|
||||
|
||||
if line_text =~? '\v\S'
|
||||
if line_indent < indent_level
|
||||
break
|
||||
elseif line_indent == indent_level
|
||||
call add(lines, marker)
|
||||
endif
|
||||
endif
|
||||
|
||||
let marker += 1
|
||||
endwhile
|
||||
|
||||
return lines
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Format lines with hashrocket (=>)
|
||||
" @param a:1 a line where function should search for first hashrocket
|
||||
" expression, if param is not given, line with active cursor is used
|
||||
function! puppet#align#AlignHashrockets(...) abort
|
||||
let l:lnum = get(a:, 1, line('.'))
|
||||
let lines_in_block = puppet#align#LinesInBlock(l:lnum)
|
||||
let max_left_len = 0
|
||||
let indent_str = printf('%' . indent(l:lnum) . 's', '')
|
||||
|
||||
for line_num in lines_in_block
|
||||
let data = matchlist(getline(line_num), '^\s*\(.\{-}\S\)\s*=>\s*\(.*\)$')
|
||||
if !empty(data)
|
||||
let max_left_len = max([max_left_len, strlen(data[1])])
|
||||
endif
|
||||
endfor
|
||||
|
||||
for line_num in lines_in_block
|
||||
let data = matchlist(getline(line_num), '^\s*\(.\{-}\S\)\s*=>\s*\(.*\)$')
|
||||
if !empty(data)
|
||||
let new_line = printf('%s%-' . max_left_len . 's => %s', indent_str, data[1], data[2])
|
||||
call setline(line_num, new_line)
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
40
autoload/puppet/ctags.vim
Normal file
40
autoload/puppet/ctags.vim
Normal file
@@ -0,0 +1,40 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
if !exists('s:ctags_type')
|
||||
let s:ctags_type = 0
|
||||
endif
|
||||
|
||||
let s:ctags_options_dir = expand('<sfile>:p:h:h:h') . '/ctags/'
|
||||
|
||||
" Return full path to option file for ctags application
|
||||
function! puppet#ctags#OptionFile()
|
||||
|
||||
if puppet#ctags#Type() == 'universal'
|
||||
let l:ctags_options = 'puppet_u.ctags'
|
||||
else
|
||||
let l:ctags_options = 'puppet.ctags'
|
||||
endif
|
||||
return s:ctags_options_dir . l:ctags_options
|
||||
endfunction
|
||||
|
||||
" Return type of installed ctags application,
|
||||
" can be 'universal' or 'exuberant'
|
||||
function! puppet#ctags#Type()
|
||||
|
||||
if !s:ctags_type
|
||||
let l:version = system('ctags --version')
|
||||
if l:version =~ 'Universal Ctags'
|
||||
let s:ctags_type = 'universal'
|
||||
elseif l:version =~ 'Exuberant Ctags'
|
||||
let s:ctags_type = 'exuberant'
|
||||
else
|
||||
echoerr 'Unknown version of Ctags'
|
||||
endif
|
||||
endif
|
||||
|
||||
return s:ctags_type
|
||||
endfunction
|
||||
|
||||
61
autoload/puppet/format.vim
Normal file
61
autoload/puppet/format.vim
Normal file
@@ -0,0 +1,61 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
"
|
||||
" Simple format using puppet's l:indents and align hashrockets function
|
||||
function! puppet#format#Format() abort
|
||||
let l:start_lnum = v:lnum
|
||||
let l:end_lnum = v:lnum + v:count - 1
|
||||
call puppet#format#Indention(l:start_lnum, l:end_lnum)
|
||||
call puppet#format#Hashrocket(l:start_lnum, l:end_lnum)
|
||||
call puppet#format#Fallback(l:start_lnum, l:end_lnum)
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Format hashrockets expressions in every line in range start_lnum and
|
||||
" end_lnum, both ends included
|
||||
"
|
||||
" TODO way of using AlignHashrockets function is ineffective, because it
|
||||
" formats same lines again and again, find better way to do it
|
||||
function! puppet#format#Hashrocket(start_lnum, end_lnum) abort
|
||||
let l:lnum = a:start_lnum
|
||||
while l:lnum <= a:end_lnum
|
||||
call puppet#align#AlignHashrockets(l:lnum)
|
||||
let l:lnum += 1
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Format indention in every line in range start_lnum and end_lnum, both ends
|
||||
" included
|
||||
"
|
||||
function! puppet#format#Indention(start_lnum, end_lnum) abort
|
||||
execute 'normal! ' . a:start_lnum . 'gg=' . a:end_lnum . 'gg'
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Use internal vim default autoformat method for every line in range, only
|
||||
" lines which exeed &widthline are formated
|
||||
"
|
||||
function! puppet#format#Fallback(start_lnum, end_lnum) abort
|
||||
" I'm using it to check if autoformat expand range
|
||||
let l:eof_lnum = line('$')
|
||||
let l:lnum = a:start_lnum
|
||||
let l:end_lnum = a:end_lnum
|
||||
while l:lnum <= l:end_lnum
|
||||
if strlen(getline(l:lnum)) > &textwidth
|
||||
call cursor(l:lnum)
|
||||
execute 'normal! gww'
|
||||
" Checking if autoformat expand number of lines if yes, I will extend
|
||||
" range too
|
||||
if l:eof_lnum < line('$')
|
||||
let l:end_lnum += line('$') - l:eof_lnum
|
||||
let l:eof_lnum = line('$')
|
||||
endif
|
||||
endif
|
||||
let l:lnum += 1
|
||||
endwhile
|
||||
|
||||
endfunction
|
||||
|
||||
@@ -509,7 +509,7 @@ function! rust#Test(all, options) abort
|
||||
return rust#Run(1, '--test ' . a:options)
|
||||
endif
|
||||
|
||||
if exists(':terminal')
|
||||
if has('terminal') || has('nvim')
|
||||
let cmd = 'terminal '
|
||||
else
|
||||
let cmd = '!'
|
||||
@@ -530,7 +530,7 @@ function! rust#Test(all, options) abort
|
||||
let func_name = s:SearchTestFunctionNameUnderCursor()
|
||||
if func_name ==# ''
|
||||
echohl ErrorMsg
|
||||
echo 'No test function was found under the cursor. Please add ! to command if you want to run all tests'
|
||||
echomsg 'No test function was found under the cursor. Please add ! to command if you want to run all tests'
|
||||
echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -5,6 +5,7 @@ endif
|
||||
" For debugging, inspired by https://github.com/w0rp/rust/blob/master/autoload/rust/debugging.vim
|
||||
|
||||
let s:global_variable_list = [
|
||||
\ '_rustfmt_autosave_because_of_config',
|
||||
\ 'ftplugin_rust_source_path',
|
||||
\ 'loaded_syntastic_rust_cargo_checker',
|
||||
\ 'loaded_syntastic_rust_filetype',
|
||||
@@ -32,7 +33,6 @@ let s:global_variable_list = [
|
||||
\ 'rustc_makeprg_no_percent',
|
||||
\ 'rustc_path',
|
||||
\ 'rustfmt_autosave',
|
||||
\ 'rustfmt_autosave_because_of_config',
|
||||
\ 'rustfmt_autosave_if_config_present',
|
||||
\ 'rustfmt_command',
|
||||
\ 'rustfmt_emit_files',
|
||||
@@ -48,7 +48,9 @@ endfunction
|
||||
|
||||
function! s:EchoGlobalVariables() abort
|
||||
for l:key in s:global_variable_list
|
||||
call s:Echo('let g:' . l:key . ' = ' . string(get(g:, l:key, v:null)))
|
||||
if l:key !~# '^_'
|
||||
call s:Echo('let g:' . l:key . ' = ' . string(get(g:, l:key, v:null)))
|
||||
endif
|
||||
|
||||
if has_key(b:, l:key)
|
||||
call s:Echo('let b:' . l:key . ' = ' . string(b:[l:key]))
|
||||
|
||||
21
autoload/rust/tags.vim
Normal file
21
autoload/rust/tags.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'rust') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Tagbar support code, for the sake of not automatically overriding its
|
||||
" configuration in case Universal Ctags is detected.
|
||||
|
||||
let s:ctags_is_uctags = 0
|
||||
let s:checked_ctags = 0
|
||||
|
||||
function! rust#tags#IsUCtags() abort
|
||||
if s:checked_ctags == 0
|
||||
if system('ctags --version') =~? 'universal ctags'
|
||||
let s:ctags_is_uctags = 1
|
||||
endif
|
||||
let s:checked_ctags = 1
|
||||
endif
|
||||
return s:ctags_is_uctags
|
||||
endfunction
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
@@ -246,7 +246,12 @@ function! rustfmt#PreWrite()
|
||||
if rust#GetConfigVar('rustfmt_autosave_if_config_present', 0)
|
||||
if findfile('rustfmt.toml', '.;') !=# '' || findfile('.rustfmt.toml', '.;') !=# ''
|
||||
let b:rustfmt_autosave = 1
|
||||
let b:rustfmt_autosave_because_of_config = 1
|
||||
let b:_rustfmt_autosave_because_of_config = 1
|
||||
endif
|
||||
else
|
||||
if has_key(b:, '_rustfmt_autosave_because_of_config')
|
||||
unlet b:_rustfmt_autosave_because_of_config
|
||||
unlet b:rustfmt_autosave
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,24 +2,59 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'terraform') != -
|
||||
finish
|
||||
endif
|
||||
|
||||
" Adapted from vim-hclfmt:
|
||||
" https://github.com/fatih/vim-hclfmt/blob/master/autoload/fmt.vim
|
||||
function! terraform#fmt()
|
||||
if !filereadable(expand('%:p'))
|
||||
return
|
||||
endif
|
||||
let l:curw = winsaveview()
|
||||
let l:tmpfile = tempname() . '.tf'
|
||||
call writefile(getline(1, '$'), l:tmpfile)
|
||||
let output = system('terraform fmt -write ' . l:tmpfile)
|
||||
if v:shell_error == 0
|
||||
try | silent undojoin | catch | endtry
|
||||
call rename(l:tmpfile, resolve(expand('%')))
|
||||
silent edit!
|
||||
let &syntax = &syntax
|
||||
else
|
||||
echo output
|
||||
call delete(l:tmpfile)
|
||||
" Make a fake change so that the undo point is right.
|
||||
normal! ix
|
||||
normal! "_x
|
||||
silent execute '%!terraform fmt -no-color -'
|
||||
if v:shell_error != 0
|
||||
let output = getline(1, '$')
|
||||
silent undo
|
||||
echo join(output, "\n")
|
||||
endif
|
||||
call winrestview(l:curw)
|
||||
endfunction
|
||||
|
||||
function! terraform#align()
|
||||
let p = '^.*=[^>]*$'
|
||||
if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
|
||||
let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g'))
|
||||
let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*'))
|
||||
Tabularize/=/l1
|
||||
normal! 0
|
||||
call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! terraform#commands(A, L, P)
|
||||
return [
|
||||
\ 'apply',
|
||||
\ 'console',
|
||||
\ 'destroy',
|
||||
\ 'env',
|
||||
\ 'fmt',
|
||||
\ 'get',
|
||||
\ 'graph',
|
||||
\ 'import',
|
||||
\ 'init',
|
||||
\ 'output',
|
||||
\ 'plan',
|
||||
\ 'providers',
|
||||
\ 'refresh',
|
||||
\ 'show',
|
||||
\ 'taint',
|
||||
\ 'untaint',
|
||||
\ 'validate',
|
||||
\ 'version',
|
||||
\ 'workspace',
|
||||
\ '0.12upgrade',
|
||||
\ 'debug',
|
||||
\ 'force-unlock',
|
||||
\ 'push',
|
||||
\ 'state'
|
||||
\ ]
|
||||
endfunction
|
||||
|
||||
24
build
24
build
@@ -6,13 +6,13 @@ DIRS="syntax indent compiler autoload ftplugin after/syntax after/indent after/f
|
||||
# shellcheck disable=SC2034
|
||||
DIRS_BASIC="syntax compiler indent after/syntax after/indent"
|
||||
# shellcheck disable=SC2034
|
||||
DIRS_ALL="syntax indent compiler autoload ftplugin after"
|
||||
DIRS_ALL="syntax indent compiler autoload ftplugin after extras"
|
||||
# shellcheck disable=SC2034
|
||||
DIRS_SYNTAX="syntax indent after/syntax after/indent"
|
||||
# shellcheck disable=SC2034
|
||||
DIRS_NOAFTER="syntax compiler indent autoload ftplugin"
|
||||
DIRS_JAVASCRIPT="${DIRS} extras"
|
||||
read -r -a DIRS_RM <<<"$DIRS_JAVASCRIPT"
|
||||
read -r -a DIRS_RM <<<"$DIRS_ALL"
|
||||
|
||||
OUTPUT=""
|
||||
|
||||
@@ -127,7 +127,11 @@ copy_file() {
|
||||
touch "$file_in_dst"
|
||||
|
||||
# Use comma instead of / to handle cases like c/c++
|
||||
sed -e "s,%%PACK%%,${package_name}," -e "/%%CONTENT%%/{r ${file_in_tmp}" -e "d;}" plugin_guard.vim.template >> "$file_in_dst"
|
||||
if [[ "${package_name}" == "jsx" ]]; then
|
||||
sed -e "s,%%PACK%%,${package_name}," -e "/%%CONTENT%%/{r ${file_in_tmp}" -e "d;}" plugin_guard_jsx.vim.template >> "$file_in_dst"
|
||||
else
|
||||
sed -e "s,%%PACK%%,${package_name}," -e "/%%CONTENT%%/{r ${file_in_tmp}" -e "d;}" plugin_guard.vim.template >> "$file_in_dst"
|
||||
fi
|
||||
}
|
||||
|
||||
update_readme() {
|
||||
@@ -178,6 +182,7 @@ PACKS="
|
||||
cucumber:tpope/vim-cucumber
|
||||
cue:mgrabovsky/vim-cuesheet
|
||||
dart:dart-lang/dart-vim-plugin
|
||||
dhall:vmchale/dhall-vim
|
||||
dlang:JesseKPhillips/d.vim
|
||||
dockerfile:ekalinin/Dockerfile.vim
|
||||
elixir:elixir-lang/vim-elixir
|
||||
@@ -186,7 +191,7 @@ PACKS="
|
||||
emblem:yalesov/vim-emblem
|
||||
erlang:vim-erlang/vim-erlang-runtime
|
||||
ferm:vim-scripts/ferm.vim
|
||||
fish:dag/vim-fish
|
||||
fish:georgewitteman/vim-fish
|
||||
flatbuffers:dcharbon/vim-flatbuffers
|
||||
fsharp:fsharp/vim-fsharp:_BASIC
|
||||
git:tpope/vim-git
|
||||
@@ -194,6 +199,7 @@ PACKS="
|
||||
gmpl:maelvalais/gmpl.vim
|
||||
gnuplot:vim-scripts/gnuplot-syntax-highlighting
|
||||
go:fatih/vim-go:_BASIC
|
||||
graphql:jparise/vim-graphql:_ALL
|
||||
gradle:tfnico/vim-gradle
|
||||
groovy:vim-scripts/groovy.vim
|
||||
groovy-indent:vim-scripts/groovyindent-unix
|
||||
@@ -203,6 +209,7 @@ PACKS="
|
||||
haskell:neovimhaskell/haskell-vim
|
||||
haxe:yaymukund/vim-haxe
|
||||
hcl:b4b4r07/vim-hcl
|
||||
helm:towolf/vim-helm
|
||||
hive:zebradil/hive.vim
|
||||
html5:othree/html5.vim
|
||||
i3:mboughaba/i3config.vim
|
||||
@@ -246,19 +253,18 @@ PACKS="
|
||||
powershell:PProvost/vim-ps1
|
||||
protobuf:uarun/vim-protobuf
|
||||
pug:digitaltoad/vim-pug
|
||||
puppet:voxpupuli/vim-puppet
|
||||
puppet:rodjek/vim-puppet
|
||||
purescript:purescript-contrib/purescript-vim
|
||||
python-compiler:aliev/vim-compiler-python
|
||||
python-indent:Vimjas/vim-python-pep8-indent
|
||||
python:vim-python/python-syntax
|
||||
qmake:artoj/qmake-syntax-vim
|
||||
qml:peterhoeg/vim-qml
|
||||
r-lang:vim-scripts/R.vim
|
||||
r-lang:vim-scripts/R.vim:_BASIC
|
||||
racket:wlangstroth/vim-racket
|
||||
ragel:jneen/ragel.vim
|
||||
raml:IN3D/vim-raml
|
||||
reason:reasonml-editor/vim-reason-plus
|
||||
rego:tsandall/vim-rego
|
||||
rspec:sheerun/rspec.vim
|
||||
rst:marshallward/vim-restructuredtext
|
||||
ruby:vim-ruby/vim-ruby
|
||||
@@ -270,8 +276,9 @@ PACKS="
|
||||
slime:slime-lang/vim-slime-syntax
|
||||
smt2:bohlender/vim-smt2
|
||||
solidity:tomlion/vim-solidity
|
||||
styled-components:styled-components/vim-styled-components#main
|
||||
styled-components:styled-components/vim-styled-components#main:_ALL
|
||||
stylus:wavded/vim-stylus
|
||||
svelte:evanleck/vim-svelte
|
||||
svg-indent:jasonshell/vim-svg-indent
|
||||
svg:vim-scripts/svg.vim
|
||||
swift:keith/swift.vim
|
||||
@@ -297,6 +304,7 @@ PACKS="
|
||||
xls:vim-scripts/XSLT-syntax
|
||||
yaml:stephpy/vim-yaml
|
||||
yard:sheerun/vim-yardoc
|
||||
zephir:xwsoul/vim-zephir
|
||||
zig:ziglang/zig.vim
|
||||
"
|
||||
|
||||
|
||||
@@ -11,5 +11,5 @@ if exists(":CompilerSet") != 2
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=%f:%l:\ %t:\ %m
|
||||
CompilerSet errorformat=%f:%l:%c:\ %t:\ %m,%f:%l:\ %t:\ %m
|
||||
CompilerSet makeprg=mix\ credo\ suggest\ --format=flycheck
|
||||
|
||||
@@ -11,5 +11,10 @@ if exists(":CompilerSet") != 2
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=%A%t%*[^:]:\ %m,%C%f:%l:\ %m,%C%f:%l,%Z
|
||||
CompilerSet makeprg=mix
|
||||
CompilerSet makeprg=mix\ compile
|
||||
CompilerSet errorformat=
|
||||
\%Wwarning:\ %m,
|
||||
\%C%f:%l,%Z,
|
||||
\%E==\ Compilation\ error\ in\ file\ %f\ ==,
|
||||
\%C**\ (%\\w%\\+)\ %f:%l:\ %m,%Z
|
||||
|
||||
|
||||
@@ -25,7 +25,11 @@ endif
|
||||
if get(g:, 'rustc_makeprg_no_percent', 0)
|
||||
CompilerSet makeprg=rustc
|
||||
else
|
||||
CompilerSet makeprg=rustc\ \%
|
||||
if has('patch-7.4.191')
|
||||
CompilerSet makeprg=rustc\ \%:S
|
||||
else
|
||||
CompilerSet makeprg=rustc\ \%
|
||||
endif
|
||||
endif
|
||||
|
||||
" New errorformat (after nightly 2016/08/10)
|
||||
|
||||
11
config.vim
11
config.vim
@@ -1,9 +1,3 @@
|
||||
function! s:setf(filetype) abort
|
||||
if &filetype !=# a:filetype
|
||||
let &filetype = a:filetype
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Enable jsx syntax by default
|
||||
if !exists('g:jsx_ext_required')
|
||||
let g:jsx_ext_required = 0
|
||||
@@ -50,8 +44,9 @@ augroup filetypedetect
|
||||
|
||||
|
||||
" elixir
|
||||
au BufRead,BufNewFile *.ex,*.exs call s:setf('elixir')
|
||||
au BufRead,BufNewFile *.eex call s:setf('eelixir')
|
||||
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
|
||||
au BufRead,BufNewFile *.eex,*.leex set filetype=eelixir
|
||||
au BufRead,BufNewFile mix.lock set filetype=elixir
|
||||
|
||||
" fish
|
||||
autocmd BufRead,BufNewFile *.fish setfiletype fish
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
function! s:setf(filetype) abort
|
||||
if &filetype !=# a:filetype
|
||||
let &filetype = a:filetype
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Enable jsx syntax by default
|
||||
if !exists('g:jsx_ext_required')
|
||||
let g:jsx_ext_required = 0
|
||||
endif
|
||||
|
||||
" Make csv loading faster
|
||||
if !exists('g:csv_start')
|
||||
let g:csv_start = 1
|
||||
@@ -50,8 +39,9 @@ augroup filetypedetect
|
||||
|
||||
|
||||
" elixir
|
||||
au BufRead,BufNewFile *.ex,*.exs call s:setf('elixir')
|
||||
au BufRead,BufNewFile *.eex call s:setf('eelixir')
|
||||
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
|
||||
au BufRead,BufNewFile *.eex,*.leex set filetype=eelixir
|
||||
au BufRead,BufNewFile mix.lock set filetype=elixir
|
||||
|
||||
" fish
|
||||
autocmd BufRead,BufNewFile *.fish setfiletype fish
|
||||
@@ -294,6 +284,15 @@ autocmd BufRead,BufNewFile *.dart set filetype=dart
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1
|
||||
augroup filetypedetect
|
||||
" dhall, from dhall.vim in vmchale/dhall-vim
|
||||
augroup dhall
|
||||
autocmd BufNewFile,BufRead *.dhall set filetype=dhall
|
||||
augroup END
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1
|
||||
augroup filetypedetect
|
||||
" dlang, from d.vim in JesseKPhillips/d.vim
|
||||
@@ -332,6 +331,8 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
augroup filetypedetect
|
||||
" dockerfile, from Dockerfile.vim in ekalinin/Dockerfile.vim
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
|
||||
" Dockerfile
|
||||
autocmd BufRead,BufNewFile [Dd]ockerfile set ft=Dockerfile
|
||||
autocmd BufRead,BufNewFile Dockerfile* set ft=Dockerfile
|
||||
@@ -344,6 +345,8 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
augroup filetypedetect
|
||||
" dockerfile, from docker-compose.vim in ekalinin/Dockerfile.vim
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
|
||||
" docker-compose.yml
|
||||
autocmd BufRead,BufNewFile docker-compose*.{yaml,yml}* set ft=yaml.docker-compose
|
||||
augroup end
|
||||
@@ -497,6 +500,14 @@ unlet s:cpo_save
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||
augroup filetypedetect
|
||||
" graphql, from graphql.vim in jparise/vim-graphql:_ALL
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
au BufRead,BufNewFile *.graphql,*.graphqls,*.gql setfiletype graphql
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1
|
||||
augroup filetypedetect
|
||||
" gradle, from gradle.vim in tfnico/vim-gradle
|
||||
@@ -517,8 +528,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') ==
|
||||
augroup filetypedetect
|
||||
" handlebars, from mustache.vim in mustache/vim-mustache-handlebars
|
||||
if has("autocmd")
|
||||
au BufNewFile,BufRead *.mustache,*.hogan,*.hulk,*.hjs set filetype=html.mustache syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
|
||||
au BufNewFile,BufRead *.handlebars,*.hbs set filetype=html.handlebars syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
|
||||
au BufNewFile,BufRead *.mustache,*.hogan,*.hulk,*.hjs set filetype=html.mustache syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim indent/handlebars.vim
|
||||
au BufNewFile,BufRead *.handlebars,*.hdbs,*.hbs,*.hb set filetype=html.handlebars syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
|
||||
endif
|
||||
augroup end
|
||||
endif
|
||||
@@ -556,6 +567,13 @@ autocmd BufNewFile,BufRead Appfile set filetype=hcl
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'helm') == -1
|
||||
augroup filetypedetect
|
||||
" helm, from helm.vim in towolf/vim-helm
|
||||
autocmd BufRead,BufNewFile */templates/*.yaml,*/templates/*.tpl set ft=helm
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hive') == -1
|
||||
augroup filetypedetect
|
||||
" hive, from hive.vim in zebradil/hive.vim
|
||||
@@ -619,11 +637,8 @@ fun! s:SelectJavascript()
|
||||
endif
|
||||
endfun
|
||||
|
||||
augroup javascript_syntax_detection
|
||||
autocmd!
|
||||
autocmd BufNewFile,BufRead *.{js,mjs,jsm,es,es6},Jakefile setfiletype javascript
|
||||
autocmd BufNewFile,BufRead * call s:SelectJavascript()
|
||||
augroup END
|
||||
autocmd BufNewFile,BufRead *.{js,mjs,jsm,es,es6},Jakefile setfiletype javascript
|
||||
autocmd BufNewFile,BufRead * call s:SelectJavascript()
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -631,11 +646,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1
|
||||
augroup filetypedetect
|
||||
" jenkins, from Jenkinsfile.vim in martinda/Jenkinsfile-vim-syntax
|
||||
" Jenkinsfile
|
||||
autocmd BufRead,BufNewFile Jenkinsfile set ft=Jenkinsfile
|
||||
autocmd BufRead,BufNewFile Jenkinsfile* setf Jenkinsfile
|
||||
autocmd BufRead,BufNewFile *.jenkinsfile set ft=Jenkinsfile
|
||||
autocmd BufRead,BufNewFile *.jenkinsfile setf Jenkinsfile
|
||||
autocmd BufRead,BufNewFile *.Jenkinsfile setf Jenkinsfile
|
||||
|
||||
augroup JenkinsAUGroup
|
||||
autocmd BufRead,BufNewFile *Jenkins* set ft=Jenkinsfile
|
||||
autocmd BufRead,BufNewFile *jenkins* set ft=Jenkinsfile
|
||||
augroup END
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1035,7 +1050,7 @@ endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
|
||||
augroup filetypedetect
|
||||
" puppet, from puppet.vim in voxpupuli/vim-puppet
|
||||
" puppet, from puppet.vim in rodjek/vim-puppet
|
||||
au! BufRead,BufNewFile *.pp setfiletype puppet
|
||||
au! BufRead,BufNewFile Puppetfile setfiletype ruby
|
||||
augroup end
|
||||
@@ -1085,7 +1100,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 setf racket
|
||||
au BufRead,BufNewFile *.rkt,*.rktl set filetype=racket
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1107,17 +1122,6 @@ au BufNewFile,BufRead .merlin set ft=merlin
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rego') == -1
|
||||
augroup filetypedetect
|
||||
" rego, from rego.vim in tsandall/vim-rego
|
||||
autocmd BufRead,BufNewFile *.rego set filetype=rego
|
||||
|
||||
" Use # as a comment prefix
|
||||
setlocal comments=b:#,fb:-
|
||||
setlocal commentstring=#\ %s
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1
|
||||
augroup filetypedetect
|
||||
" ruby, from ruby.vim in vim-ruby/vim-ruby
|
||||
@@ -1244,7 +1248,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
|
||||
autocmd BufRead,BufNewFile *.rs call s:set_rust_filetype()
|
||||
autocmd BufRead,BufNewFile Cargo.toml setf FALLBACK cfg
|
||||
|
||||
if has('patch-8.0.613')
|
||||
autocmd BufRead,BufNewFile Cargo.toml setf FALLBACK cfg
|
||||
endif
|
||||
|
||||
function! s:set_rust_filetype() abort
|
||||
if &filetype !=# 'rust'
|
||||
@@ -1313,6 +1320,13 @@ autocmd BufNewFile,BufReadPost *.stylus set filetype=stylus
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1
|
||||
augroup filetypedetect
|
||||
" svelte, from svelte.vim in evanleck/vim-svelte
|
||||
au BufRead,BufNewFile *.svelte setfiletype svelte
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sxhkd') == -1
|
||||
augroup filetypedetect
|
||||
" sxhkd, from sxhkdrc.vim in baskerville/vim-sxhkdrc
|
||||
@@ -1341,6 +1355,8 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1
|
||||
augroup filetypedetect
|
||||
" terraform, from terraform.vim in hashivim/vim-terraform
|
||||
" By default, Vim associates .tf files with TinyFugue - tell it not to.
|
||||
autocmd! filetypedetect BufRead,BufNewFile *.tf
|
||||
autocmd BufRead,BufNewFile *.tf set filetype=terraform
|
||||
autocmd BufRead,BufNewFile *.tfvars set filetype=terraform
|
||||
autocmd BufRead,BufNewFile *.tfstate set filetype=json
|
||||
@@ -1439,6 +1455,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
|
||||
" vifm, from vifm.vim in vifm/vifm.vim
|
||||
autocmd BufRead,BufNewFile vifmrc :set filetype=vifm
|
||||
autocmd BufRead,BufNewFile *vifm/colors/* :set filetype=vifm
|
||||
autocmd BufRead,BufNewFile *.vifm :set filetype=vifm
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1464,6 +1481,13 @@ autocmd BufNewFile,BufRead *.xdc setfiletype xdc
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zephir') == -1
|
||||
augroup filetypedetect
|
||||
" zephir, from zephir.vim in xwsoul/vim-zephir
|
||||
autocmd BufNewFile,BufReadPost *.zep set filetype=zephir
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1
|
||||
augroup filetypedetect
|
||||
" zig, from zig.vim in ziglang/zig.vim
|
||||
|
||||
@@ -2,6 +2,12 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dockerfile') !=
|
||||
finish
|
||||
endif
|
||||
|
||||
" Define comment string
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal formatoptions+=cro
|
||||
|
||||
function! DockerfileReplaceInstruction(original, replacement)
|
||||
let syn = synIDtrans(synID(line("."), col(".") - 1, 0))
|
||||
if syn != hlID("Comment") && syn != hlID("Constant") && strlen(getline(".")) == 0
|
||||
|
||||
39
ftplugin/dhall.vim
Normal file
39
ftplugin/dhall.vim
Normal file
@@ -0,0 +1,39 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dhall') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('b:dhall_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:dhall_ftplugin = 1
|
||||
|
||||
setlocal commentstring=--\ %s
|
||||
|
||||
set smarttab
|
||||
|
||||
if exists('g:dhall_use_ctags')
|
||||
if g:dhall_use_ctags == 1
|
||||
augroup dhall
|
||||
autocmd BufWritePost *.dhall silent !ctags -R .
|
||||
augroup END
|
||||
endif
|
||||
endif
|
||||
|
||||
function! StripTrailingWhitespace()
|
||||
let myline=line('.')
|
||||
let mycolumn = col('.')
|
||||
exec 'silent %s/ *$//'
|
||||
call cursor(myline, mycolumn)
|
||||
endfunction
|
||||
|
||||
if exists('g:dhall_strip_whitespace')
|
||||
if g:dhall_strip_whitespace == 1
|
||||
augroup dhall
|
||||
au BufWritePre *.dhall silent! call StripTrailingWhitespace()
|
||||
augroup END
|
||||
endif
|
||||
endif
|
||||
|
||||
augroup dhall
|
||||
au BufNewFile,BufRead *.dhall setl shiftwidth=2
|
||||
augroup END
|
||||
9
ftplugin/docker-compose.vim
Normal file
9
ftplugin/docker-compose.vim
Normal file
@@ -0,0 +1,9 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dockerfile') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Define comment string
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal formatoptions+=cro
|
||||
22
ftplugin/graphql.vim
Normal file
22
ftplugin/graphql.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
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<'
|
||||
@@ -25,6 +25,9 @@ if exists("loaded_matchit") && exists("b:match_words")
|
||||
\ . '\%({{\)\@<=/\s*\1\s*}}'
|
||||
endif
|
||||
|
||||
" Set template for comment
|
||||
setlocal commentstring={{!--\ %s\ --}}
|
||||
|
||||
if exists("g:mustache_abbreviations")
|
||||
inoremap <buffer> {{{ {{{}}}<left><left><left>
|
||||
inoremap <buffer> {{ {{}}<left><left>
|
||||
|
||||
@@ -28,7 +28,9 @@ if exists('loaded_matchit')
|
||||
\ ',\<hnote\>:\<endhnote\>' .
|
||||
\ ',\<title\>:\<endtitle\>' .
|
||||
\ ',\<\while\>:\<endwhile\>' .
|
||||
\ ',@startuml:@enduml'
|
||||
\ ',@startuml:@enduml' .
|
||||
\ ',@startwbs:@endwbs' .
|
||||
\ ',@startmindmap:@endmindmap'
|
||||
endif
|
||||
|
||||
if get(g:, 'plantuml_set_makeprg', 1)
|
||||
|
||||
48
ftplugin/puppet_tagbar.vim
Normal file
48
ftplugin/puppet_tagbar.vim
Normal file
@@ -0,0 +1,48 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Puppet set up for Tagbar plugin
|
||||
" (https://github.com/majutsushi/tagbar).
|
||||
|
||||
if !exists(':Tagbar')
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:tagbar_type_puppet = {
|
||||
\ 'ctagstype': 'puppet',
|
||||
\ 'kinds': [
|
||||
\ 'c:Classes',
|
||||
\ 's:Sites',
|
||||
\ 'n:Nodes',
|
||||
\ 'v:Variables',
|
||||
\ 'i:Includes',
|
||||
\ 'd:Definitions',
|
||||
\ 'r:Resources',
|
||||
\ 'f:Defaults',
|
||||
\ 't:Types',
|
||||
\ 'u:Functions',
|
||||
\],
|
||||
\}
|
||||
|
||||
if puppet#ctags#Type() == 'universal'
|
||||
" There no sense to split objects by colon
|
||||
let g:tagbar_type_puppet.sro = '__'
|
||||
let g:tagbar_type_puppet.kind2scope = {
|
||||
\ 'd': 'definition',
|
||||
\ 'c': 'class',
|
||||
\ 'r': 'resource',
|
||||
\ 'i': 'include',
|
||||
\ 'v': 'variable',
|
||||
\}
|
||||
let g:tagbar_type_puppet.scope2kind = {
|
||||
\ 'definition' : 'd',
|
||||
\ 'class' : 'c',
|
||||
\ 'resource' : 'r',
|
||||
\ 'include' : 'i',
|
||||
\ 'variable' : 'v',
|
||||
\}
|
||||
endif
|
||||
|
||||
let g:tagbar_type_puppet.deffile = puppet#ctags#OptionFile()
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'r-lang') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" ftplugin for R files
|
||||
"
|
||||
" Author: Iago Mosqueira <i.mosqueira@ic.ac.uk>
|
||||
" Author: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Author: Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br>
|
||||
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Last Change: 2007 Nov 21
|
||||
" SVN: $Id: r.vim 75 2007-11-21 13:34:02Z ranke $
|
||||
"
|
||||
" Code written in vim is sent to R through a perl pipe
|
||||
" [funnel.pl, by Larry Clapp <vim@theclapp.org>], as individual lines,
|
||||
" blocks, or the whole file.
|
||||
|
||||
" Press <F2> to open a new xterm with a new R interpreter listening
|
||||
" to its standard input (you can type R commands into the xterm)
|
||||
" as well as to code pasted from within vim.
|
||||
"
|
||||
" After selecting a visual block, 'r' sends it to the R interpreter
|
||||
"
|
||||
" In insert mode, <M-Enter> sends the active line to R and moves to the next
|
||||
" line (write and process mode).
|
||||
"
|
||||
" Maps:
|
||||
" <F2> Start a listening R interpreter in new xterm
|
||||
" <F3> Start a listening R-devel interpreter in new xterm
|
||||
" <F4> Start a listening R --vanilla interpreter in new xterm
|
||||
" <F5> Run current file
|
||||
" <F9> Run line under cursor
|
||||
" r Run visual block
|
||||
" <M-Enter> Write and process
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Disable backup for .r-pipe
|
||||
setl backupskip=.*pipe
|
||||
|
||||
" Set tabstop so it is compatible with the emacs edited code. Personally, I
|
||||
" prefer shiftwidth=2, which I have in my .vimrc anyway
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
set tabstop=8
|
||||
|
||||
" Start a listening R interpreter in new xterm
|
||||
noremap <buffer> <F2> :!xterm -T 'R' -e funnel.pl ~/.r-pipe "R && echo -e 'Interpreter has finished. Exiting. Goodbye.\n'"&<CR><CR>
|
||||
|
||||
" Start a listening R-devel interpreter in new xterm
|
||||
noremap <buffer> <F3> :!xterm -T 'R' -e funnel.pl ~/.r-pipe "R-devel && echo 'Interpreter has finished. Exiting. Goodbye.'"&<CR><CR>
|
||||
|
||||
" Start a listening R --vanilla interpreter in new xterm
|
||||
noremap <buffer> <F4> :!xterm -T 'R' -e funnel.pl ~/.r-pipe "R -vanilla && echo 'Interpreter has finished. Exiting. Goodbye.'"&<CR><CR>
|
||||
|
||||
" Send line under cursor to R
|
||||
noremap <buffer> <F9> :execute line(".") 'w >> ~/.r-pipe'<CR>
|
||||
inoremap <buffer> <F9> <Esc> :execute line(".") 'w >> ~/.r-pipe'<CR>
|
||||
|
||||
" Send visual selected block to R
|
||||
vnoremap <buffer> r :w >> ~/.r-pipe<CR>
|
||||
|
||||
" Write and process mode (somehow mapping <C-Enter> does not work)
|
||||
inoremap <M-Enter> <Esc>:execute line(".") 'w >> ~/.r-pipe'<CR>o
|
||||
|
||||
" Send current file to R
|
||||
noremap <buffer> <F5> :execute '1 ,' line("$") 'w >> ~/.r-pipe' <CR><CR>
|
||||
@@ -1,52 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'r-lang') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" ftplugin for R help files
|
||||
"
|
||||
" Author: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Last Change: 2007 Nov 21
|
||||
" SVN: $Id: rhelp.vim 75 2007-11-21 13:34:02Z ranke $
|
||||
"
|
||||
" Usage:
|
||||
"
|
||||
" Press <F2> to open a new xterm with a new R interpreter listening
|
||||
" to its standard input (you can type R commands into the xterm)
|
||||
" as well as to code pasted from within vim.
|
||||
"
|
||||
" After selecting a visual block, 'r' sends it to the R interpreter
|
||||
"
|
||||
" Add to filetypes.vim, if you don't use vim 7
|
||||
" au BufNewFile,BufRead *.Rd,*.rd setf rhelp
|
||||
"
|
||||
" Maps:
|
||||
" <F2> Start a listening R interpreter in new xterm
|
||||
" <F9> Run line under cursor
|
||||
" r Run visual block
|
||||
" <M-Enter> Write and process R code
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Set tabbing
|
||||
set expandtab
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
|
||||
" Start a listening R interpreter in new xterm
|
||||
noremap <buffer> <F2> :!xterm -T 'R' -e funnel.pl ~/.r-pipe "R && echo -e 'Interpreter has finished. Exiting. Goodbye.\n'"&<CR><CR>
|
||||
|
||||
" Send line under cursor to R
|
||||
noremap <buffer> <F9> :execute line(".") 'w >> ~/.r-pipe'<CR>
|
||||
inoremap <buffer> <F9> <Esc> :execute line(".") 'w >> ~/.r-pipe'<CR>
|
||||
|
||||
" Send visual selected block to R
|
||||
vnoremap <buffer> r :w >> ~/.r-pipe<CR>
|
||||
|
||||
" Write and process mode (somehow mapping <C-Enter> does not work)
|
||||
inoremap <M-Enter> <Esc>:execute line(".") 'w >> ~/.r-pipe'<CR>o
|
||||
@@ -1,63 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'r-lang') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" ftplugin for Sweave files containing both LaTeX and R code
|
||||
"
|
||||
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Last Change: 2007 Nov 21
|
||||
" SVN: $Id: rnoweb.vim 75 2007-11-21 13:34:02Z ranke $
|
||||
"
|
||||
" Usage:
|
||||
"
|
||||
" Press <F2> to open a new xterm with a new R interpreter listening
|
||||
" to its standard input (you can type R commands into the xterm)
|
||||
" as well as to code pasted from within vim.
|
||||
"
|
||||
" A Makefile for producing R noweb files is in included in my Vim script
|
||||
" R.vim:
|
||||
" http://www.vim.org/scripts/script.php?script_id=1048
|
||||
" You can also look in my SVN repository under:
|
||||
" http://kri/viewcvs/*checkout*/Makefile.rnoweb?root=vim
|
||||
"
|
||||
"
|
||||
" After selecting a visual block, 'r' sends it to the R interpreter
|
||||
"
|
||||
" Add to filetypes.vim, if you don't use vim 7
|
||||
" au BufNewFile,BufRead *.Rnw,*.rnw setf rnoweb
|
||||
" and/or
|
||||
" au BufNewFile,BufRead *.Snw,*.snw setf rnoweb
|
||||
"
|
||||
" Maps:
|
||||
" <F2> Start a listening R interpreter in new xterm
|
||||
" <F9> Run line under cursor
|
||||
" r Run visual block
|
||||
" <M-Enter> Write and process R code
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Disable backup for .r-pipe
|
||||
setl backupskip=.*pipe
|
||||
|
||||
" Set R friendly tabbing
|
||||
set expandtab
|
||||
set shiftwidth=2
|
||||
|
||||
" Start a listening R interpreter in new xterm
|
||||
noremap <buffer> <F2> :!xterm -T 'R' -e funnel.pl ~/.r-pipe "R && echo -e 'Interpreter has finished. Exiting. Goodbye.\n'"&<CR><CR>
|
||||
|
||||
" Send line under cursor to R
|
||||
noremap <buffer> <F9> :execute line(".") 'w >> ~/.r-pipe'<CR>
|
||||
inoremap <buffer> <F9> <Esc> :execute line(".") 'w >> ~/.r-pipe'<CR>
|
||||
|
||||
" Send visual selected block to R
|
||||
vnoremap <buffer> r :w >> ~/.r-pipe<CR>
|
||||
|
||||
" Write and process mode (somehow mapping <C-Enter> does not work)
|
||||
inoremap <M-Enter> <Esc>:execute line(".") 'w >> ~/.r-pipe'<CR>o
|
||||
@@ -38,7 +38,7 @@ if exists("g:rst_style") && g:rst_style != 0
|
||||
setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
|
||||
endif
|
||||
|
||||
if has('patch-7.3.867') " Introduced the TextChanged event.
|
||||
if g:rst_fold_enabled != 0 && has('patch-7.3.867') " Introduced the TextChanged event.
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=RstFold#GetRstFold()
|
||||
setlocal foldtext=RstFold#GetRstFoldText()
|
||||
|
||||
@@ -39,7 +39,7 @@ if get(g:, 'rust_bang_comment_leader', 0)
|
||||
" leaders. I'm fairly sure that's a Vim bug.
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,s0:/*,mb:\ ,ex:*/,:///,://!,://
|
||||
else
|
||||
setlocal comments=s0:/*!,m:\ ,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,://
|
||||
setlocal comments=s0:/*!,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,://
|
||||
endif
|
||||
setlocal commentstring=//%s
|
||||
setlocal formatoptions-=t formatoptions+=croqnl
|
||||
@@ -195,7 +195,7 @@ augroup END
|
||||
|
||||
setlocal matchpairs+=<:>
|
||||
" For matchit.vim (rustArrow stops `Fn() -> X` messing things up)
|
||||
let b:match_skip = 's:comment\|string\|rustArrow'
|
||||
let b:match_skip = 's:comment\|string\|rustCharacter\|rustArrow'
|
||||
|
||||
" vint: -ProhibitAbbreviationOption
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
"
|
||||
" Support for Tagbar -- https://github.com/majutsushi/tagbar
|
||||
"
|
||||
if !exists(':Tagbar')
|
||||
if !exists(':Tagbar') || rust#tags#IsUCtags()
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ setlocal commentstring=//\ %s
|
||||
|
||||
setlocal shiftwidth=2 softtabstop=2 expandtab
|
||||
|
||||
setlocal include='^\s*import'
|
||||
setlocal includeexpr='substitute(v:fname,"\\.","/","g")'
|
||||
setlocal include=^\\s*import
|
||||
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
|
||||
setlocal path+=src/main/scala,src/test/scala
|
||||
setlocal suffixesadd=.scala
|
||||
|
||||
@@ -11,128 +11,34 @@ endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpoptions
|
||||
|
||||
setlocal formatoptions-=t
|
||||
let b:undo_ftplugin = 'setlocal formatoptions<'
|
||||
|
||||
" Include hyphens as keyword characters so that a keyword appearing as part of
|
||||
" a longer name doesn't get partially highlighted.
|
||||
setlocal iskeyword+=-
|
||||
let b:undo_ftplugin .= ' iskeyword<'
|
||||
|
||||
set cpoptions&vim
|
||||
|
||||
if !exists('g:terraform_align')
|
||||
let g:terraform_align = 0
|
||||
" j is a relatively recent addition; silence warnings when setting it.
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
silent! setlocal formatoptions+=j
|
||||
let b:undo_ftplugin = 'setlocal formatoptions<'
|
||||
|
||||
if !has('patch-7.4.1142')
|
||||
" Include hyphens as keyword characters so that a keyword appearing as
|
||||
" part of a longer name doesn't get partially highlighted.
|
||||
setlocal iskeyword+=-
|
||||
let b:undo_ftplugin .= ' iskeyword<'
|
||||
endif
|
||||
|
||||
if !exists('g:terraform_remap_spacebar')
|
||||
let g:terraform_remap_spacebar = 0
|
||||
endif
|
||||
|
||||
if !exists('g:terraform_fold_sections')
|
||||
let g:terraform_fold_sections = 0
|
||||
endif
|
||||
|
||||
if g:terraform_align && exists(':Tabularize')
|
||||
inoremap <buffer> <silent> = =<Esc>:call <SID>terraformalign()<CR>a
|
||||
function! s:terraformalign()
|
||||
let p = '^.*=[^>]*$'
|
||||
if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
|
||||
let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g'))
|
||||
let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*'))
|
||||
Tabularize/=/l1
|
||||
normal! 0
|
||||
call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if g:terraform_fold_sections
|
||||
function! TerraformFolds()
|
||||
let thisline = getline(v:lnum)
|
||||
if match(thisline, '^resource') >= 0
|
||||
return '>1'
|
||||
elseif match(thisline, '^provider') >= 0
|
||||
return '>1'
|
||||
elseif match(thisline, '^module') >= 0
|
||||
return '>1'
|
||||
elseif match(thisline, '^variable') >= 0
|
||||
return '>1'
|
||||
elseif match(thisline, '^output') >= 0
|
||||
return '>1'
|
||||
elseif match(thisline, '^data') >= 0
|
||||
return '>1'
|
||||
elseif match(thisline, '^terraform') >= 0
|
||||
return '>1'
|
||||
elseif match(thisline, '^locals') >= 0
|
||||
return '>1'
|
||||
else
|
||||
return '='
|
||||
endif
|
||||
endfunction
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=TerraformFolds()
|
||||
setlocal foldlevel=1
|
||||
let b:undo_ftplugin .= ' foldmethod< foldexpr< foldlevel<'
|
||||
|
||||
function! TerraformFoldText()
|
||||
let foldsize = (v:foldend-v:foldstart)
|
||||
return getline(v:foldstart).' ('.foldsize.' lines)'
|
||||
endfunction
|
||||
setlocal foldtext=TerraformFoldText()
|
||||
let b:undo_ftplugin .= ' foldtext<'
|
||||
endif
|
||||
|
||||
" Re-map the space bar to fold and unfold
|
||||
if get(g:, 'terraform_remap_spacebar', 1)
|
||||
"inoremap <space> <C-O>za
|
||||
nnoremap <space> za
|
||||
onoremap <space> <C-C>za
|
||||
vnoremap <space> zf
|
||||
if get(g:, 'terraform_fold_sections', 0)
|
||||
setlocal foldmethod=syntax
|
||||
let b:undo_ftplugin .= ' foldmethod<'
|
||||
endif
|
||||
|
||||
" Set the commentstring
|
||||
if exists('g:terraform_commentstring')
|
||||
let &l:commentstring=g:terraform_commentstring
|
||||
else
|
||||
setlocal commentstring=#%s
|
||||
endif
|
||||
setlocal commentstring=#%s
|
||||
let b:undo_ftplugin .= ' commentstring<'
|
||||
|
||||
if !exists('g:terraform_fmt_on_save')
|
||||
let g:terraform_fmt_on_save = 0
|
||||
if get(g:, 'terraform_align', 0) && exists(':Tabularize')
|
||||
inoremap <buffer> <silent> = =<Esc>:call terraform#align()<CR>a
|
||||
let b:undo_ftplugin .= '|iunmap <buffer> ='
|
||||
endif
|
||||
|
||||
function! s:commands(A, L, P)
|
||||
return [
|
||||
\ 'apply',
|
||||
\ 'console',
|
||||
\ 'destroy',
|
||||
\ 'env',
|
||||
\ 'fmt',
|
||||
\ 'get',
|
||||
\ 'graph',
|
||||
\ 'import',
|
||||
\ 'init',
|
||||
\ 'output',
|
||||
\ 'plan',
|
||||
\ 'providers',
|
||||
\ 'push',
|
||||
\ 'refresh',
|
||||
\ 'show',
|
||||
\ 'taint',
|
||||
\ 'untaint',
|
||||
\ 'validate',
|
||||
\ 'version',
|
||||
\ 'workspace',
|
||||
\ '0.12checklist',
|
||||
\ 'debug',
|
||||
\ 'force-unlock',
|
||||
\ 'state'
|
||||
\ ]
|
||||
endfunction
|
||||
|
||||
let &cpoptions = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -141,13 +47,14 @@ if !executable('terraform')
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
command! -nargs=+ -complete=customlist,s:commands -buffer Terraform execute '!terraform '.<q-args>. ' -no-color'
|
||||
command! -nargs=+ -complete=customlist,terraform#commands -buffer Terraform execute '!terraform '.<q-args>. ' -no-color'
|
||||
command! -nargs=0 -buffer TerraformFmt call terraform#fmt()
|
||||
let b:undo_ftplugin .= '|delcommand Terraform|delcommand TerraformFmt'
|
||||
|
||||
if get(g:, 'terraform_fmt_on_save', 1)
|
||||
augroup terraform
|
||||
if get(g:, 'terraform_fmt_on_save', 0)
|
||||
augroup vim.terraform.fmt
|
||||
autocmd!
|
||||
autocmd BufWritePre *.tf call terraform#fmt()
|
||||
autocmd BufWritePre *.tfvars call terraform#fmt()
|
||||
|
||||
14
indent/dune.vim
Normal file
14
indent/dune.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'ocaml') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language: dune
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" dune format-dune-file uses 1 space to indent
|
||||
set softtabstop=1 shiftwidth=1 expandtab
|
||||
81
indent/graphql.vim
Normal file
81
indent/graphql.vim
Normal file
@@ -0,0 +1,81 @@
|
||||
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
|
||||
@@ -23,9 +23,6 @@ endif
|
||||
unlet! b:did_indent
|
||||
setlocal indentexpr=
|
||||
|
||||
" keep track of whether or not we are in a block expression for indenting
|
||||
unlet! s:in_block_expr
|
||||
|
||||
runtime! indent/html.vim
|
||||
unlet! b:did_indent
|
||||
|
||||
@@ -87,23 +84,19 @@ function! GetHandlebarsIndent(...)
|
||||
" tag is on a separate line
|
||||
|
||||
" indent after block {{#block
|
||||
if prevLine =~# '\v\s*\{\{\#.*\s*'
|
||||
let s:in_block_expr = 1
|
||||
if prevLine =~# '\v\s*\{\{[#^].*\s*'
|
||||
let ind = ind + sw
|
||||
endif
|
||||
" but not if the block ends on the same line
|
||||
if prevLine =~# '\v\s*\{\{\#(.+)(\s+|\}\}).*\{\{\/\1'
|
||||
let s:in_block_expr = 0
|
||||
let ind = ind - sw
|
||||
endif
|
||||
" unindent after block close {{/block}}
|
||||
if currentLine =~# '\v^\s*\{\{\/\S*\}\}\s*'
|
||||
let s:in_block_expr = 0
|
||||
let ind = ind - sw
|
||||
endif
|
||||
" indent after component block {{a-component
|
||||
if prevLine =~# '\v\s*\{\{\w'
|
||||
let s:in_block_expr = 0
|
||||
let ind = ind + sw
|
||||
endif
|
||||
" but not if the component block ends on the same line
|
||||
@@ -111,9 +104,16 @@ function! GetHandlebarsIndent(...)
|
||||
let ind = ind - sw
|
||||
endif
|
||||
" unindent }} lines, and following lines if not inside a block expression
|
||||
let savedPos = getpos('.')
|
||||
if currentLine =~# '\v^\s*\}\}\s*$' || (currentLine !~# '\v^\s*\{\{\/' && prevLine =~# '\v^\s*[^\{\} \t]+\}\}\s*$')
|
||||
if !s:in_block_expr
|
||||
let ind = ind - sw
|
||||
let closingLnum = search('}}\s*$', 'Wbc', lnum)
|
||||
let [openingLnum, col] = searchpairpos('{{', '', '}}', 'Wb')
|
||||
if openingLnum > 0 && closingLnum > 0
|
||||
if strpart(getline(openingLnum), col - 1, 3) !~ '{{[#^]'
|
||||
let ind = ind - sw
|
||||
endif
|
||||
else
|
||||
call setpos('.', savedPos)
|
||||
endif
|
||||
endif
|
||||
" unindent {{else}}
|
||||
|
||||
@@ -396,7 +396,9 @@ function GetJavascriptIndent()
|
||||
if idx != -1
|
||||
call s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:SkipFunc()')
|
||||
elseif getline(v:lnum) !~ '^\S' && s:stack[-1] =~? 'block\|^jsobject$'
|
||||
call s:GetPair('{','}','bW','s:SkipFunc()')
|
||||
if !s:GetPair('{','}','bW','s:SkipFunc()') && s:stack[-1] ==# 'jsObject'
|
||||
return indent(l:lnum)
|
||||
endif
|
||||
else
|
||||
call s:AlternatePair()
|
||||
endif
|
||||
|
||||
@@ -24,7 +24,7 @@ setlocal indentkeys-=:
|
||||
setlocal indentkeys-=0#
|
||||
setlocal indentkeys-=e
|
||||
|
||||
if has('patch-7.3.694') || (v:version == 703 && has('patch694'))
|
||||
if exists('*shiftwidth')
|
||||
fun! s:shiftwidth()
|
||||
return shiftwidth()
|
||||
endf
|
||||
@@ -41,16 +41,12 @@ endif
|
||||
" 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=)
|
||||
setlocal indentkeys+==~begin,=~end,=~else,=~elseif,=~elsif,0=~when,=~exception,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
|
||||
|
||||
@@ -340,7 +336,7 @@ function! GetSQLIndent()
|
||||
" Check current line; search for simplistic matching start-of-block
|
||||
let line = getline(v:lnum)
|
||||
|
||||
if line =~? '^\s*els'
|
||||
if line =~? '^\s*els' || line =~? '^\s*begin' || line =~? '^\s*exception'
|
||||
" Any line when you type else will automatically back up one
|
||||
" ident level (ie else, elseif, elsif)
|
||||
let ind = ind - s:shiftwidth()
|
||||
|
||||
@@ -16,6 +16,7 @@ let b:did_indent = 1
|
||||
setlocal autoindent smartindent
|
||||
setlocal indentexpr=GetPuppetIndent()
|
||||
setlocal indentkeys+=0],0)
|
||||
setlocal formatexpr=puppet#format#Format()
|
||||
|
||||
if exists("*GetPuppetIndent")
|
||||
finish
|
||||
@@ -33,7 +34,7 @@ function! s:PartOfInclude(lnum)
|
||||
if line !~ ',$'
|
||||
break
|
||||
endif
|
||||
if line =~ '^\s*include\s\+[^,]\+,$'
|
||||
if line =~ '^\s*include\s\+[^,]\+,$' && line !~ '[=>]>'
|
||||
return 1
|
||||
endif
|
||||
endwhile
|
||||
@@ -42,24 +43,70 @@ endfunction
|
||||
|
||||
function! s:OpenBrace(lnum)
|
||||
call cursor(a:lnum, 1)
|
||||
return searchpair('{\|\[\|(', '', '}\|\]\|)', 'nbW')
|
||||
return searchpair('{\|\[\|(', '', '}\|\]\|)', 'nbW',
|
||||
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "comment\\|string"')
|
||||
endfunction
|
||||
|
||||
function! GetPuppetIndent()
|
||||
let pnum = prevnonblank(v:lnum - 1)
|
||||
function! s:InsideMultilineString(lnum)
|
||||
return synIDattr(synID(a:lnum, 1, 0), 'name') =~? 'string'
|
||||
endfunction
|
||||
|
||||
function! s:PrevNonMultilineString(lnum)
|
||||
let l:lnum = a:lnum
|
||||
while l:lnum > 0 && s:InsideMultilineString(lnum)
|
||||
let l:lnum = l:lnum - 1
|
||||
endwhile
|
||||
|
||||
return l:lnum
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Get indent number for line, line can be given as params, otherwise function
|
||||
" use line where cursor is
|
||||
" @param a:1 (optional) line number in current buffer
|
||||
" @return integer
|
||||
function! GetPuppetIndent(...)
|
||||
let l:lnum = get(a:, 1, v:lnum)
|
||||
|
||||
let pnum = prevnonblank(l:lnum - 1)
|
||||
if pnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = getline(v:lnum)
|
||||
let line = getline(l:lnum)
|
||||
let pline = getline(pnum)
|
||||
let ind = indent(pnum)
|
||||
|
||||
" Avoid cases of closing braces or parens on the current line: returning
|
||||
" the same indent here would be premature since for that particular case
|
||||
" we want to instead get the indent level of the matching opening brace or
|
||||
" parenthenses.
|
||||
if pline =~ '^\s*#' && line !~ '^\s*\(}\(,\|;\)\?$\|]:\|],\|}]\|];\?$\|)\)'
|
||||
return ind
|
||||
endif
|
||||
|
||||
" We are inside a multi-line string: if we interfere with indentation here
|
||||
" we're actually changing the contents of of the string!
|
||||
if s:InsideMultilineString(l:lnum)
|
||||
return indent(l:lnum)
|
||||
endif
|
||||
|
||||
" Previous line was inside a multi-line string: we've lost the indent
|
||||
" level. We need to find this value from the last line that was not inside
|
||||
" of a multi-line string to restore proper alignment.
|
||||
if s:InsideMultilineString(pnum)
|
||||
if pnum - 1 == 0
|
||||
return ind
|
||||
endif
|
||||
|
||||
let ind = indent(s:PrevNonMultilineString(pnum - 1))
|
||||
endif
|
||||
|
||||
if pline =~ '\({\|\[\|(\|:\)\s*\(#.*\)\?$'
|
||||
let ind += &sw
|
||||
elseif pline =~ ';$' && pline !~ '[^:]\+:.*[=+]>.*'
|
||||
let ind -= &sw
|
||||
elseif pline =~ '^\s*include\s\+.*,$'
|
||||
elseif pline =~ '^\s*include\s\+.*,$' && pline !~ '[=+]>'
|
||||
let ind += &sw
|
||||
endif
|
||||
|
||||
@@ -76,7 +123,6 @@ function! GetPuppetIndent()
|
||||
if line =~ '^\s*}\s*els\(e\|if\).*{\s*$'
|
||||
let ind -= &sw
|
||||
endif
|
||||
|
||||
" Don't indent resources that are one after another with a ->(ordering arrow)
|
||||
" file {'somefile':
|
||||
" ...
|
||||
|
||||
@@ -15,8 +15,8 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal cindent
|
||||
setlocal cinoptions=L0,(0,Ws,J1,j1,m1
|
||||
setlocal cinkeys=0{,0},!^F,o,O,0[,0]
|
||||
setlocal cinoptions=L0,(s,Ws,J1,j1,m1
|
||||
setlocal cinkeys=0{,0},!^F,o,O,0[,0],0(,0)
|
||||
" Don't think cinwords will actually do anything at all... never mind
|
||||
setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,extern,macro
|
||||
|
||||
@@ -24,7 +24,7 @@ setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,ex
|
||||
setlocal nolisp " Make sure lisp indenting doesn't supersede us
|
||||
setlocal autoindent " indentexpr isn't much help otherwise
|
||||
" Also do indentkeys, otherwise # gets shoved to column 0 :-/
|
||||
setlocal indentkeys=0{,0},!^F,o,O,0[,0]
|
||||
setlocal indentkeys=0{,0},!^F,o,O,0[,0],0(,0)
|
||||
|
||||
setlocal indentexpr=GetRustIndent(v:lnum)
|
||||
|
||||
@@ -85,8 +85,17 @@ function! s:is_string_comment(lnum, col)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function GetRustIndent(lnum)
|
||||
if exists('*shiftwidth')
|
||||
function! s:shiftwidth()
|
||||
return shiftwidth()
|
||||
endfunc
|
||||
else
|
||||
function! s:shiftwidth()
|
||||
return &shiftwidth
|
||||
endfunc
|
||||
endif
|
||||
|
||||
function GetRustIndent(lnum)
|
||||
" Starting assumption: cindent (called at the end) will do it right
|
||||
" normally. We just want to fix up a few cases.
|
||||
|
||||
@@ -132,14 +141,65 @@ function GetRustIndent(lnum)
|
||||
let prevline = s:get_line_trimmed(prevlinenum)
|
||||
endwhile
|
||||
|
||||
" A standalone '{', '}', or 'where'
|
||||
let l:standalone_open = line =~# '\V\^\s\*{\s\*\$'
|
||||
let l:standalone_close = line =~# '\V\^\s\*}\s\*\$'
|
||||
let l:standalone_where = line =~# '\V\^\s\*where\s\*\$'
|
||||
if l:standalone_open || l:standalone_close || l:standalone_where
|
||||
" ToDo: we can search for more items than 'fn' and 'if'.
|
||||
let [l:found_line, l:col, l:submatch] =
|
||||
\ searchpos('\<\(fn\)\|\(if\)\>', 'bnWp')
|
||||
if l:found_line !=# 0
|
||||
" Now we count the number of '{' and '}' in between the match
|
||||
" locations and the current line (there is probably a better
|
||||
" way to compute this).
|
||||
let l:i = l:found_line
|
||||
let l:search_line = strpart(getline(l:i), l:col - 1)
|
||||
let l:opens = 0
|
||||
let l:closes = 0
|
||||
while l:i < a:lnum
|
||||
let l:search_line2 = substitute(l:search_line, '\V{', '', 'g')
|
||||
let l:opens += strlen(l:search_line) - strlen(l:search_line2)
|
||||
let l:search_line3 = substitute(l:search_line2, '\V}', '', 'g')
|
||||
let l:closes += strlen(l:search_line2) - strlen(l:search_line3)
|
||||
let l:i += 1
|
||||
let l:search_line = getline(l:i)
|
||||
endwhile
|
||||
if l:standalone_open || l:standalone_where
|
||||
if l:opens ==# l:closes
|
||||
return indent(l:found_line)
|
||||
endif
|
||||
else
|
||||
" Expect to find just one more close than an open
|
||||
if l:opens ==# l:closes + 1
|
||||
return indent(l:found_line)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" A standalone 'where' adds a shift.
|
||||
let l:standalone_prevline_where = prevline =~# '\V\^\s\*where\s\*\$'
|
||||
if l:standalone_prevline_where
|
||||
return indent(prevlinenum) + 4
|
||||
endif
|
||||
|
||||
" Handle where clauses nicely: subsequent values should line up nicely.
|
||||
if prevline[len(prevline) - 1] ==# ","
|
||||
\ && prevline =~# '^\s*where\s'
|
||||
return indent(prevlinenum) + 6
|
||||
endif
|
||||
|
||||
if prevline[len(prevline) - 1] ==# ","
|
||||
\ && s:get_line_trimmed(a:lnum) !~# '^\s*[\[\]{}]'
|
||||
let l:last_prevline_character = prevline[len(prevline) - 1]
|
||||
|
||||
" A line that ends with '.<expr>;' is probably an end of a long list
|
||||
" of method operations.
|
||||
if prevline =~# '\V\^\s\*.' && l:last_prevline_character ==# ';'
|
||||
return indent(prevlinenum) - s:shiftwidth()
|
||||
endif
|
||||
|
||||
if l:last_prevline_character ==# ","
|
||||
\ && s:get_line_trimmed(a:lnum) !~# '^\s*[\[\]{})]'
|
||||
\ && prevline !~# '^\s*fn\s'
|
||||
\ && prevline !~# '([^()]\+,$'
|
||||
\ && s:get_line_trimmed(a:lnum) !~# '^\s*\S\+\s*=>'
|
||||
|
||||
@@ -21,7 +21,10 @@ if exists("*GetScalaIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:defMatcher = '\%(\%(private\|protected\)\%(\[[^\]]*\]\)\?\s\+\|abstract\s\+\|override\s\+\)*\<def\>'
|
||||
let s:annotationMatcher = '@[A-Za-z._]\+\s\+'
|
||||
let s:modifierMatcher = s:annotationMatcher . '\|\%(private\|protected\)\%(\[[^\]]*\]\)\?\s\+\|abstract\s\+\|override\s\+\|final\s\+'
|
||||
let s:defMatcher = '\%(' . s:modifierMatcher . '\)*\<def\>'
|
||||
let s:valMatcher = '\%(' . s:modifierMatcher . '\|lazy\s\+\)*\<va[lr]\>'
|
||||
let s:funcNameMatcher = '\w\+'
|
||||
let s:typeSpecMatcher = '\%(\s*\[\_[^\]]*\]\)'
|
||||
let s:defArgMatcher = '\%((\_.\{-})\)'
|
||||
@@ -185,7 +188,7 @@ function! scala#NumberOfBraceGroups(line)
|
||||
endfunction
|
||||
|
||||
function! scala#MatchesIncompleteDefValr(line)
|
||||
if a:line =~ '^\s*\%(' . s:defMatcher . '\|\<va[lr]\>\).*[=({]\s*$'
|
||||
if a:line =~ '^\s*\%(' . s:defMatcher . '\|' . s:valMatcher . '\).*[=({]\s*$'
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -435,7 +438,7 @@ function! GetScalaIndent()
|
||||
" If 'val', 'var', 'def' end with =, this is a one-line block
|
||||
if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1)
|
||||
\ || prevline =~ '^\s*' . s:defMatcher . '.*=\s*$'
|
||||
\ || prevline =~ '^\s*\<va[lr]\>.*[=]\s*$'
|
||||
\ || prevline =~ '^\s*' . s:valMatcher . '.*[=]\s*$'
|
||||
\ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$'
|
||||
\ || prevline =~ '=\s*$'
|
||||
call scala#ConditionalConfirm("4")
|
||||
|
||||
148
indent/svelte.vim
Normal file
148
indent/svelte.vim
Normal file
@@ -0,0 +1,148 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'svelte') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language: Svelte 3 (HTML/JavaScript)
|
||||
" Author: Evan Lecklider <evan@lecklider.com>
|
||||
" Maintainer: Evan Lecklide <evan@lecklider.com>
|
||||
" URL: https://github.com/evanleck/vim-svelte
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! indent/html.vim
|
||||
unlet! b:did_indent
|
||||
|
||||
let s:html_indent = &l:indentexpr
|
||||
let b:did_indent = 1
|
||||
|
||||
if !exists('g:svelte_indent_script')
|
||||
let g:svelte_indent_script = 1
|
||||
endif
|
||||
|
||||
if !exists('g:svelte_indent_style')
|
||||
let g:svelte_indent_style = 1
|
||||
endif
|
||||
|
||||
setlocal indentexpr=GetSvelteIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],!^F,;,=:else,=:then,=:catch,=/if,=/each,=/await
|
||||
|
||||
" Only define the function once.
|
||||
if exists('*GetSvelteIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
function! GetSvelteIndent()
|
||||
let current_line_number = v:lnum
|
||||
|
||||
if current_line_number == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let current_line = getline(current_line_number)
|
||||
|
||||
" Opening script and style tags should be all the way outdented.
|
||||
if current_line =~ '^\s*</\?\(script\|style\)'
|
||||
return 0
|
||||
endif
|
||||
|
||||
let previous_line_number = prevnonblank(current_line_number - 1)
|
||||
let previous_line = getline(previous_line_number)
|
||||
let previous_line_indent = indent(previous_line_number)
|
||||
|
||||
" The inside of scripts an styles should be indented unless disabled.
|
||||
if previous_line =~ '^\s*<script'
|
||||
if g:svelte_indent_script
|
||||
return previous_line_indent + shiftwidth()
|
||||
else
|
||||
return previous_line_indent
|
||||
endif
|
||||
endif
|
||||
|
||||
if previous_line =~ '^\s*<style'
|
||||
if g:svelte_indent_style
|
||||
return previous_line_indent + shiftwidth()
|
||||
else
|
||||
return previous_line_indent
|
||||
endif
|
||||
endif
|
||||
|
||||
execute "let indent = " . s:html_indent
|
||||
|
||||
" For some reason, the HTML CSS indentation keeps indenting the next line over
|
||||
" and over after each style declaration.
|
||||
if searchpair('<style>', '', '</style>', 'bW') && previous_line =~ ';$' && current_line !~ '}'
|
||||
return previous_line_indent
|
||||
endif
|
||||
|
||||
" "/await" or ":catch" or ":then"
|
||||
if current_line =~ '^\s*{\s*\/await' || current_line =~ '^\s*{\s*:\(catch\|then\)'
|
||||
let await_start = searchpair('{\s*#await\>', '', '{\s*\/await\>', 'bW')
|
||||
|
||||
if await_start
|
||||
return indent(await_start)
|
||||
endif
|
||||
endif
|
||||
|
||||
" "/each"
|
||||
if current_line =~ '^\s*{\s*\/each'
|
||||
let each_start = searchpair('{\s*#each\>', '', '{\s*\/each\>', 'bW')
|
||||
|
||||
if each_start
|
||||
return indent(each_start)
|
||||
endif
|
||||
endif
|
||||
|
||||
" "/if"
|
||||
if current_line =~ '^\s*{\s*\/if'
|
||||
let if_start = searchpair('{\s*#if\>', '', '{\s*\/if\>', 'bW')
|
||||
|
||||
if if_start
|
||||
return indent(if_start)
|
||||
endif
|
||||
endif
|
||||
|
||||
" ":else" is tricky because it can match an opening "#each" _or_ an opening
|
||||
" "#if", so we try to be smart and look for the closest of the two.
|
||||
if current_line =~ '^\s*{\s*:else'
|
||||
let if_start = searchpair('{\s*#if\>', '', '{\s*\/if\>', 'bW')
|
||||
|
||||
" If it's an "else if" then we know to look for an "#if"
|
||||
if current_line =~ '^\s*{\s*:else if' && if_start
|
||||
return indent(if_start)
|
||||
else
|
||||
" The greater line number will be closer to the cursor position because
|
||||
" we're searching backward.
|
||||
return indent(max([if_start, searchpair('{\s*#each\>', '', '{\s*\/each\>', 'bW')]))
|
||||
endif
|
||||
endif
|
||||
|
||||
" "#if" or "#each"
|
||||
if previous_line =~ '^\s*{\s*#\(if\|each\|await\)'
|
||||
return previous_line_indent + shiftwidth()
|
||||
endif
|
||||
|
||||
" ":else" or ":then"
|
||||
if previous_line =~ '^\s*{\s*:\(else\|catch\|then\)'
|
||||
return previous_line_indent + shiftwidth()
|
||||
endif
|
||||
|
||||
" Custom element juggling for abnormal self-closing tags (<Widget />),
|
||||
" capitalized component tags (<Widget></Widget>), and custom svelte tags
|
||||
" (<svelte:head></svelte:head>).
|
||||
if synID(previous_line_number, match(previous_line, '\S') + 1, 0) == hlID('htmlTag')
|
||||
\ && synID(current_line_number, match(current_line, '\S') + 1, 0) != hlID('htmlEndTag')
|
||||
let indents_match = indent == previous_line_indent
|
||||
let previous_closes = previous_line =~ '/>$'
|
||||
|
||||
if indents_match && !previous_closes && previous_line =~ '<\(\u\|\l\+:\l\+\)'
|
||||
return previous_line_indent + shiftwidth()
|
||||
elseif !indents_match && previous_closes
|
||||
return previous_line_indent
|
||||
endif
|
||||
endif
|
||||
|
||||
return indent
|
||||
endfunction
|
||||
@@ -34,24 +34,19 @@ function! TerraformIndent(lnum)
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Previous non-blank line should continue the indent level
|
||||
" Usual case is to continue at the same indent as the previous non-blank line.
|
||||
let prevlnum = prevnonblank(a:lnum-1)
|
||||
let thisindent = indent(prevlnum)
|
||||
|
||||
" Previous line without comments should continue the indent level
|
||||
let prevline = substitute(getline(prevlnum), '//.*$', '', '')
|
||||
let previndent = indent(prevlnum)
|
||||
let thisindent = previndent
|
||||
|
||||
" Config block starting with [ { ( should increase the indent level
|
||||
if prevline =~# '[\[{\(]\s*$'
|
||||
" If that previous line is a non-comment ending in [ { (, increase the
|
||||
" indent level.
|
||||
let prevline = getline(prevlnum)
|
||||
if prevline !~# '^\s*\(#\|//\)' && prevline =~# '[\[{\(]\s*$'
|
||||
let thisindent += &shiftwidth
|
||||
endif
|
||||
|
||||
" Current line without comments should continue the indent level
|
||||
let thisline = substitute(getline(a:lnum), '//.*$', '', '')
|
||||
|
||||
" Config block ending with ) } ] should get the indentation
|
||||
" level from the initial config block
|
||||
" If the current line ends a block, decrease the indent level.
|
||||
let thisline = getline(a:lnum)
|
||||
if thisline =~# '^\s*[\)}\]]'
|
||||
let thisindent -= &shiftwidth
|
||||
endif
|
||||
|
||||
5
plugin_guard_jsx.vim.template
Normal file
5
plugin_guard_jsx.vim.template
Normal file
@@ -0,0 +1,5 @@
|
||||
if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||
finish
|
||||
endif
|
||||
|
||||
%%CONTENT%%
|
||||
@@ -61,8 +61,3 @@ hi link dockerfileTodo Todo
|
||||
hi link bashStatement Function
|
||||
|
||||
let b:current_syntax = "dockerfile"
|
||||
|
||||
set commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal fo+=cro
|
||||
|
||||
66
syntax/dhall.vim
Normal file
66
syntax/dhall.vim
Normal file
@@ -0,0 +1,66 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dhall') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax match dhallInterpolation "\v\$\{[^\}]*\}"
|
||||
syntax keyword dhallTodo TODO FIXME
|
||||
syntax match dhallBrackets "[<>|]"
|
||||
syntax match dhallOperator "+\|*\|#"
|
||||
syntax match dhallOperator "//\|⫽"
|
||||
syntax match dhallOperator "/\\\|∧"
|
||||
syntax match dhallOperator "//\\\\\|⩓"
|
||||
syntax match dhallNumber "\v[0-9]"
|
||||
syntax match dhallNumber "\v\+[0-9]"
|
||||
syntax match dhallIndex "\v\@[0-9]+" contains=dhallNumber
|
||||
syntax match dhallLambda "∀\|λ\|→\|->\|\\"
|
||||
syntax match dhallType "\v[A-Z][a-z0-9A-Z_]*"
|
||||
syntax match dhallSpecialLabel "\v`[A-Z][a-z]*`"
|
||||
syntax match dhallLabel "\v[A-Z][a-z]*/[a-z_][A-Za-z0-9\.\-]*"
|
||||
syntax match dhallLabel "\v[a-z_][A-Za-z0-9\-]*"
|
||||
syntax match dhallType "\v[a-zA-Z]+\.[A-Z][a-z0-9A-Z_]*"
|
||||
syntax match dhallParens "(\|)\|\[\|\]\|,"
|
||||
syntax match dhallRecord "{\|}\|:"
|
||||
syntax keyword dhallKeyword let in forall constructors if then else merge env as
|
||||
syntax match dhallEsc +\\["\\abfnrtv$/]+
|
||||
syntax match dhallSingleSpecial +'''+
|
||||
syntax match dhallSingleSpecial +''${+
|
||||
syntax match dhallComment '\v--.*$' contains=@Spell,dhallTodo
|
||||
syntax region dhallMultilineComment start="{-" end="-}" contains=@Spell,dhallTodo,dhallMultilineComment
|
||||
syntax match dhallUrl "https://[a-zA-Z0-9/.\-_\?\=\&]*"
|
||||
syntax match dhallUrl "http://[a-zA-Z0-9/.\-_\?\=\&]*"
|
||||
syntax match dhallUrl "/[a-zA-Z0-9/.\-_]*"
|
||||
syntax match dhallUrl "\.\./[a-zA-Z0-9/.\-_]*"
|
||||
syntax match dhallUrl "\./[a-zA-Z0-9/.\-_]*"
|
||||
syntax region dhallString start=+''+ end=+''+ contains=@Spell,dhallInterpolation,dhallSingleSpecial
|
||||
syntax region dhallString start=+"+ end=+"+ contains=dhallInterpolation,dhallEsc
|
||||
syntax region dhallString start=+"/+ end=+"+ contains=dhallInterpolation,dhallEsc
|
||||
syntax keyword dhallBool True False
|
||||
|
||||
highlight link dhallSingleSpecial Special
|
||||
highlight link dhallIndex Special
|
||||
highlight link dhallSpecialLabel Operator
|
||||
highlight link dhallEsc Special
|
||||
highlight link dhallInterpolation Special
|
||||
highlight link dhallTodo Todo
|
||||
highlight link dhallBrackets Operator
|
||||
highlight link dhallBool Underlined
|
||||
highlight link dhallUrl String
|
||||
highlight link dhallOperator Operator
|
||||
highlight link dhallNumber Number
|
||||
highlight link dhallLambda Special
|
||||
highlight link dhallString String
|
||||
highlight link dhallLabel Identifier
|
||||
highlight link dhallRecord Special
|
||||
highlight link dhallKeyword Keyword
|
||||
highlight link dhallType Structure
|
||||
highlight link dhallParens Special
|
||||
highlight link dhallComment Comment
|
||||
highlight link dhallMultilineComment Comment
|
||||
|
||||
let b:current_syntax = 'dhall'
|
||||
@@ -6,10 +6,10 @@ endif
|
||||
" Language: Dockerfile
|
||||
" Maintainer: Eugene Kalinin
|
||||
" Latest Revision: 11 September 2013
|
||||
" Source: http://docs.docker.io/en/latest/use/builder/
|
||||
" Source: https://docs.docker.com/compose/
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
if !exists('main_syntax')
|
||||
let main_syntax = 'yaml'
|
||||
endif
|
||||
|
||||
" case sensitivity (fix #17)
|
||||
@@ -20,7 +20,7 @@ syn keyword dockercomposeKeywords build context dockerfile args cap_add cap_drop
|
||||
syn keyword dockercomposeKeywords command cgroup_parent container_name devices depends_on
|
||||
syn keyword dockercomposeKeywords dns dns_search tmpfs entrypoint env_file environment
|
||||
syn keyword dockercomposeKeywords expose extends extends external_links extra_hosts
|
||||
syn keyword dockercomposeKeywords group_add image isolation labels links
|
||||
syn keyword dockercomposeKeywords group_add image isolation labels links
|
||||
syn keyword dockercomposeKeywords log_opt net network_mode networks aliases
|
||||
syn keyword dockercomposeKeywords ipv4_address ipv6_address link_local_ips pid ports
|
||||
syn keyword dockercomposeKeywords security_opt stop_signal ulimits volumes volume_driver
|
||||
@@ -82,8 +82,3 @@ hi link dockercomposeTodo Todo
|
||||
hi link bashStatement Function
|
||||
|
||||
let b:current_syntax = "dockercompose"
|
||||
|
||||
set commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal fo+=cro
|
||||
|
||||
@@ -2,16 +2,16 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'elixir') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
if !exists("main_syntax")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = "elixir"
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" syncing starts 2000 lines before top line so docstrings don't screw things up
|
||||
syn sync minlines=2000
|
||||
|
||||
syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable,elixirStructDelimiter
|
||||
syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation
|
||||
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
|
||||
@@ -112,12 +112,14 @@ syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end=
|
||||
|
||||
" LiveView Sigils surrounded with ~L"""
|
||||
syntax include @HTML syntax/html.vim
|
||||
unlet b:current_syntax
|
||||
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
|
||||
unlet b:current_syntax
|
||||
syn cluster elixirDocStringContained contains=@markdown,@Spell,elixirInterpolation
|
||||
else
|
||||
let g:elixir_use_markdown_for_docs = 0
|
||||
@@ -172,9 +174,12 @@ syn match elixirExceptionDeclaration "[^[:space:];#<]\+" contained
|
||||
syn match elixirCallbackDeclaration "[^[:space:];#<,()\[\]]\+" contained contains=elixirFunctionDeclaration skipwhite skipnl
|
||||
|
||||
" ExUnit
|
||||
syn match elixirExUnitMacro "\(^\s*\)\@<=\<\(test\|describe\|setup\|setup_all\|on_exit\|doctest\)\>"
|
||||
syn match elixirExUnitAssert "\(^\s*\)\@<=\<\(assert\|assert_in_delta\|assert_raise\|assert_receive\|assert_received\|catch_error\)\>"
|
||||
syn match elixirExUnitAssert "\(^\s*\)\@<=\<\(catch_exit\|catch_throw\|flunk\|refute\|refute_in_delta\|refute_receive\|refute_received\)\>"
|
||||
syn match elixirExUnitMacro "\C\(^\s*\)\@<=\<\(test\|describe\|setup\|setup_all\|on_exit\|doctest\)\>"
|
||||
syn match elixirExUnitAssert "\C\(^\s*\)\@<=\<\(assert\|assert_in_delta\|assert_raise\|assert_receive\|assert_received\|catch_error\)\>"
|
||||
syn match elixirExUnitAssert "\C\(^\s*\)\@<=\<\(catch_exit\|catch_throw\|flunk\|refute\|refute_in_delta\|refute_receive\|refute_received\)\>"
|
||||
|
||||
" syncing starts 2000 lines before top line so docstrings don't screw things up
|
||||
syn sync minlines=2000
|
||||
|
||||
hi def link elixirBlockDefinition Define
|
||||
hi def link elixirDefine Define
|
||||
@@ -234,5 +239,9 @@ hi def link elixirPrivateRecordDeclaration elixirRecordDeclaration
|
||||
|
||||
let b:current_syntax = "elixir"
|
||||
|
||||
if main_syntax == "elixir"
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -6,7 +6,7 @@ endif
|
||||
" Language: Erlang (http://www.erlang.org)
|
||||
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
|
||||
" Contributor: Adam Rutkowski <hq@mtod.org>
|
||||
" Last Update: 2017-Mar-05
|
||||
" Last Update: 2019-Jun-18
|
||||
" License: Vim license
|
||||
" URL: https://github.com/vim-erlang/vim-erlang-runtime
|
||||
|
||||
@@ -121,7 +121,7 @@ syn keyword erlangBIF garbage_collect get get_keys group_leader contained
|
||||
syn keyword erlangBIF halt hd integer_to_binary integer_to_list contained
|
||||
syn keyword erlangBIF iolist_to_binary iolist_size is_alive contained
|
||||
syn keyword erlangBIF is_atom is_binary is_bitstring is_boolean contained
|
||||
syn keyword erlangBIF is_float is_function is_integer is_list is_map contained
|
||||
syn keyword erlangBIF is_float is_function is_integer is_list is_map is_map_key contained
|
||||
syn keyword erlangBIF is_number is_pid is_port is_process_alive contained
|
||||
syn keyword erlangBIF is_record is_reference is_tuple length link contained
|
||||
syn keyword erlangBIF list_to_atom list_to_binary contained
|
||||
|
||||
@@ -22,7 +22,7 @@ endif
|
||||
syn include @gitcommitDiff syntax/diff.vim
|
||||
syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff
|
||||
|
||||
syn match gitcommitSummary ".*\%<50v" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
|
||||
syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
|
||||
syn match gitcommitOverflow ".*" contained contains=@Spell
|
||||
syn match gitcommitBlank "^[^#].*" contained contains=@Spell
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ hi def link gitconfigBoolean Boolean
|
||||
hi def link gitconfigNumber Number
|
||||
hi def link gitconfigString String
|
||||
hi def link gitconfigDelim Delimiter
|
||||
hi def link gitconfigEscape Delimiter
|
||||
hi def link gitconfigEscape Special
|
||||
hi def link gitconfigError Error
|
||||
|
||||
let b:current_syntax = "gitconfig"
|
||||
|
||||
@@ -121,7 +121,7 @@ if go#config#HighlightFormatStrings()
|
||||
\@<=%[-#0 +]*\
|
||||
\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\
|
||||
\%(\.\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\)\=\
|
||||
\%(\[\d\+\]\)\=[vTtbcdoqxXUeEfFgGsp]/ contained containedin=goString,goRawString
|
||||
\%(\[\d\+\]\)\=[vTtbcdoqxXUeEfFgGspw]/ contained containedin=goString,goRawString
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
endif
|
||||
|
||||
|
||||
68
syntax/graphql.vim
Normal file
68
syntax/graphql.vim
Normal file
@@ -0,0 +1,68 @@
|
||||
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'
|
||||
95
syntax/helm.vim
Normal file
95
syntax/helm.vim
Normal file
@@ -0,0 +1,95 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'helm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("main_syntax")
|
||||
let main_syntax = 'yaml'
|
||||
endif
|
||||
|
||||
let b:current_syntax = ''
|
||||
unlet b:current_syntax
|
||||
runtime! syntax/yaml.vim
|
||||
|
||||
let b:current_syntax = ''
|
||||
unlet b:current_syntax
|
||||
syntax include @Yaml syntax/yaml.vim
|
||||
|
||||
syn case match
|
||||
|
||||
" Go escapes
|
||||
syn match goEscapeOctal display contained "\\[0-7]\{3}"
|
||||
syn match goEscapeC display contained +\\[abfnrtv\\'"]+
|
||||
syn match goEscapeX display contained "\\x\x\{2}"
|
||||
syn match goEscapeU display contained "\\u\x\{4}"
|
||||
syn match goEscapeBigU display contained "\\U\x\{8}"
|
||||
syn match goEscapeError display contained +\\[^0-7xuUabfnrtv\\'"]+
|
||||
|
||||
hi def link goEscapeOctal goSpecialString
|
||||
hi def link goEscapeC goSpecialString
|
||||
hi def link goEscapeX goSpecialString
|
||||
hi def link goEscapeU goSpecialString
|
||||
hi def link goEscapeBigU goSpecialString
|
||||
hi def link goSpecialString Special
|
||||
hi def link goEscapeError Error
|
||||
|
||||
" Strings and their contents
|
||||
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
|
||||
syn region goString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
|
||||
syn region goRawString contained start=+`+ end=+`+
|
||||
|
||||
hi def link goString String
|
||||
hi def link goRawString String
|
||||
|
||||
" Characters; their contents
|
||||
syn cluster goCharacterGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU
|
||||
syn region goCharacter contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@goCharacterGroup
|
||||
|
||||
hi def link goCharacter Character
|
||||
|
||||
" Integers
|
||||
syn match goDecimalInt contained "\<\d\+\([Ee]\d\+\)\?\>"
|
||||
syn match goHexadecimalInt contained "\<0x\x\+\>"
|
||||
syn match goOctalInt contained "\<0\o\+\>"
|
||||
syn match goOctalError contained "\<0\o*[89]\d*\>"
|
||||
syn cluster goInt contains=goDecimalInt,goHexadecimalInt,goOctalInt
|
||||
" Floating point
|
||||
syn match goFloat contained "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
|
||||
syn match goFloat contained "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
|
||||
syn match goFloat contained "\<\d\+[Ee][-+]\d\+\>"
|
||||
" Imaginary literals
|
||||
syn match goImaginary contained "\<\d\+i\>"
|
||||
syn match goImaginary contained "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match goImaginary contained "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match goImaginary contained "\<\d\+[Ee][-+]\d\+i\>"
|
||||
|
||||
hi def link goInt Number
|
||||
hi def link goFloat Number
|
||||
hi def link goImaginary Number
|
||||
|
||||
" Token groups
|
||||
syn cluster gotplLiteral contains=goString,goRawString,goCharacter,@goInt,goFloat,goImaginary
|
||||
syn keyword gotplControl contained if else end range with template include tpl required define
|
||||
syn keyword gotplFunctions contained and call html index js len not or print printf println urlquery eq ne lt le gt ge
|
||||
syn keyword goSprigFunctions contained abbrev abbrevboth add add1 adler32sum ago append atoi b32dec b32enc b64dec b64enc base biggest buildCustomCert camelcase cat ceil clean coalesce \contains compact date dateInZone dateModify date_in_zone date_modify default derivePassword dict dir div empty ext fail first float64 floor fromJson fromYaml genCA genPrivateKey genSelfSignedCert genSignedCert has hasKey hasPrefix hasSuffix hello htmlDate htmlDateInZone indent initial initials int int64 isAbs join kebabcase keys kindIs kindOf last list lower max merge mergeOverwrite min mod mul nindent nospace now omit pick pluck plural prepend quote randAlpha randAlphaNum randAscii randNumeric regexFind regexFindAll regexMatch regexReplaceAll regexReplaceAllLiteral regexSplit repeat replace rest reverse round semver semverCompare set sha1sum sha256sum shuffle slice snakecase sortAlpha split splitList splitn squote sub substr swapcase ternary title toDate toJson toPrettyJson toString toStrings toToml toYaml trim trimAll trimPrefix trimSuffix trimall trunc tuple typeIs typeIsLike typeOf uniq unixEpoch unset until untilStep untitle upper uuidv4 values without wrap wrapWith
|
||||
syn match gotplVariable contained /\$[a-zA-Z0-9_]*\>/
|
||||
syn match goTplIdentifier contained /\.[^\s}]+\>/
|
||||
|
||||
hi def link gotplControl Keyword
|
||||
hi def link gotplFunctions Function
|
||||
hi def link goSprigFunctions Function
|
||||
hi def link goTplVariable Special
|
||||
|
||||
syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable,goTplIdentifier containedin=yamlFlowString display
|
||||
syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable containedin=yamlFlowString display
|
||||
syn region goTplComment start="{{\(- \)\?/\*" end="\*/\( -\)\?}}" display
|
||||
syn region goTplComment start="\[\[\(- \)\?/\*" end="\*/\( -\)\?\]\]" display
|
||||
|
||||
hi def link gotplAction PreProc
|
||||
hi def link goTplComment Comment
|
||||
let b:current_syntax = "helm"
|
||||
|
||||
" vim: sw=2 ts=2 et
|
||||
@@ -65,7 +65,7 @@ syntax match jsFloat /\c\<\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%(e[+-]\=
|
||||
" Regular Expressions
|
||||
syntax match jsSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{4,5}})|c\u|.)"
|
||||
syntax region jsTemplateExpression contained matchgroup=jsTemplateBraces start=+${+ end=+}+ contains=@jsExpression keepend
|
||||
syntax region jsRegexpCharClass contained start=+\[+ skip=+\\.+ end=+\]+ contains=jsSpecial
|
||||
syntax region jsRegexpCharClass contained start=+\[+ skip=+\\.+ end=+\]+ contains=jsSpecial extend
|
||||
syntax match jsRegexpBoundary contained "\v\c[$^]|\\b"
|
||||
syntax match jsRegexpBackRef contained "\v\\[1-9]\d*"
|
||||
syntax match jsRegexpQuantifier contained "\v[^\\]%([?*+]|\{\d+%(,\d*)?})\??"lc=1
|
||||
|
||||
@@ -155,11 +155,11 @@ endif
|
||||
|
||||
" Strike through
|
||||
if get(g:, 'vim_markdown_strikethrough', 0)
|
||||
syn region mkdStrike matchgroup=mkdStrike start="\%(\~\~\)" end="\%(\~\~\)"
|
||||
execute 'syn region mkdStrike matchgroup=htmlStrike start="\%(\~\~\)" end="\%(\~\~\)"' . s:concealends
|
||||
HtmlHiLink mkdStrike htmlStrike
|
||||
endif
|
||||
|
||||
syn cluster mkdNonListItem contains=@htmlTop,htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdInlineURL,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,mkdMath,htmlStrike
|
||||
syn cluster mkdNonListItem contains=@htmlTop,htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdInlineURL,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,mkdMath,mkdStrike
|
||||
|
||||
"highlighting for Markdown groups
|
||||
HtmlHiLink mkdString String
|
||||
|
||||
@@ -73,6 +73,7 @@ syn keyword mesonBuiltin
|
||||
\ add_project_arguments
|
||||
\ add_project_link_arguments
|
||||
\ add_test_setup
|
||||
\ alias_target
|
||||
\ assert
|
||||
\ benchmark
|
||||
\ both_libraries
|
||||
@@ -101,6 +102,7 @@ syn keyword mesonBuiltin
|
||||
\ install_headers
|
||||
\ install_man
|
||||
\ install_subdir
|
||||
\ is_disabler
|
||||
\ is_variable
|
||||
\ jar
|
||||
\ join_paths
|
||||
|
||||
@@ -6,8 +6,8 @@ endif
|
||||
" Language: Mustache, Handlebars
|
||||
" Maintainer: Juvenn Woo <machese@gmail.com>
|
||||
" Screenshot: http://imgur.com/6F408
|
||||
" Version: 5
|
||||
" Last Change: Nov 23rd 2018
|
||||
" Version: 6
|
||||
" Last Change: Jul 16 2019
|
||||
" Remark:
|
||||
" It lexically hilights embedded mustaches (exclusively) in html file.
|
||||
" While it was written for Ruby-based Mustache template system, it should
|
||||
@@ -45,21 +45,34 @@ endif
|
||||
|
||||
syntax match mustacheError '}}}\?'
|
||||
syntax match mustacheInsideError '{{[{$#<>=!\/]\?'
|
||||
syntax region mustacheInside start=/{{[^!][$#^/]\?/ end=/}}}\?/ keepend containedin=TOP,@htmlMustacheContainer
|
||||
syntax match mustacheOperators '=\|\.\|/' contained containedin=mustacheInside,mustacheParam
|
||||
syntax region mustacheHtmlValue start=/={{[^!][$#^/]\?/rs=s+1,hs=s+1 end=/}}/ oneline keepend contained containedin=htmlTag contains=mustacheInside
|
||||
syntax region mustachePartial start=/{{[<>]/lc=2 end=/}}/me=e-2 contained containedin=mustacheInside,@htmlMustacheContainer
|
||||
syntax region mustacheMarkerSet start=/{{=/lc=2 end=/=}}/me=e-2 contained containedin=mustacheInside,@htmlMustacheContainer
|
||||
syntax match mustacheHandlebars '{{\|}}' contained containedin=mustacheInside,@htmlMustacheContainer
|
||||
syntax match mustacheUnescape '{{{\|}}}' contained containedin=mustacheInside,@htmlMustacheContainer
|
||||
syntax match mustacheConditionals '\([/#]\?if\|unless\|else\)' contained containedin=mustacheInside
|
||||
syntax match mustacheHelpers '[/#]\?\(with\|link\-to\|each\(\-in\)\?\)' contained containedin=mustacheInside
|
||||
syntax match mustacheHelpers 'else \(if\|unless\|with\|link\-to\|each\(\-in\)\?\)' contained containedin=mustacheInside
|
||||
syntax match mustacheParam /[a-z@_-]\+=/he=e-1 contained containedin=mustacheInside
|
||||
syntax region mustacheComment start=/{{!/rs=s+2 skip=/{{.\{-}}}/ end=/}}/re=e-2 contains=Todo contained containedin=TOP,mustacheInside,@htmlMustacheContainer
|
||||
syntax region mustacheBlockComment start=/{{!--/rs=s+2 skip=/{{.\{-}}}/ end=/--}}/re=e-2 contains=Todo contained extend containedin=TOP,mustacheInside,@htmlMustacheContainer
|
||||
syntax region mustacheQString start=/'/ skip=/\\'/ end=/'/ contained containedin=mustacheInside
|
||||
syntax region mustacheDQString start=/"/ skip=/\\"/ end=/"/ contained containedin=mustacheInside
|
||||
|
||||
" Ember angle bracket syntax syntax starts with a capital letter:
|
||||
" https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md
|
||||
syntax case match
|
||||
syntax region mustacheAngleComponent start=/<\/\?[[:upper:]]/ end=/>/ keepend containedin=TOP,@htmlMustacheContainer
|
||||
syntax case ignore
|
||||
syntax match mustacheAngleBrackets '</\?\|/\?>' contained containedin=mustacheAngleComponent
|
||||
syntax match mustacheAngleComponentName '</[[:alnum:]]\+'hs=s+2 contained containedin=mustacheAngleBrackets
|
||||
syntax match mustacheAngleComponentName '<[[:alnum:]]\+'hs=s+1 contained containedin=mustacheAngleBrackets
|
||||
|
||||
syntax region mustacheHbsComponent start=/{{[^!][$#^/]\?/ end=/}}}\?/ keepend containedin=TOP,@htmlMustacheContainer
|
||||
|
||||
syntax cluster mustacheInside add=mustacheHbsComponent,mustacheAngleComponent
|
||||
|
||||
syntax match mustacheOperators '=\|\.\|/^>' contained containedin=@mustacheInside,mustacheParam
|
||||
syntax region mustacheHtmlValue start=/={{[^!][$#^/]\?/rs=s+1,hs=s+1 end=/}}/ oneline keepend contained containedin=htmlTag contains=@mustacheInside
|
||||
syntax region mustachePartial start=/{{[<>]/lc=2 end=/}}/me=e-2 contained containedin=@mustacheInside,@htmlMustacheContainer
|
||||
syntax region mustacheMarkerSet start=/{{=/lc=2 end=/=}}/me=e-2 contained containedin=@mustacheInside,@htmlMustacheContainer
|
||||
syntax match mustacheHandlebars '{{\|}}' contained containedin=@mustacheInside
|
||||
syntax match mustacheUnescape '{{{\|}}}' contained containedin=@mustacheInside
|
||||
syntax match mustacheConditionals '\([/#]\?\<\(if\|unless\)\|\<else\)\>' contained containedin=@mustacheInside
|
||||
syntax match mustacheHelpers '[/#]\?\<\(with\|link\-to\|each\(\-in\)\?\|let\)\>' contained containedin=@mustacheInside
|
||||
syntax match mustacheHelpers 'else \(if\|unless\|with\|link\-to\|each\(\-in\)\?\)' contained containedin=@mustacheInside
|
||||
syntax match mustacheParam /[a-z@_-]\+=/he=e-1 contained containedin=@mustacheInside
|
||||
syntax region mustacheComment start=/{{!/rs=s+2 skip=/{{.\{-}}}/ end=/}}/re=e-2 contains=Todo contained containedin=TOP,@mustacheInside,@htmlMustacheContainer
|
||||
syntax region mustacheBlockComment start=/{{!--/rs=s+2 skip=/{{.\{-}}}/ end=/--}}/re=e-2 contains=Todo contained extend containedin=TOP,@mustacheInside,@htmlMustacheContainer
|
||||
syntax region mustacheQString start=/'/ skip=/\\'/ end=/'/ contained containedin=@mustacheInside
|
||||
syntax region mustacheDQString start=/"/ skip=/\\"/ end=/"/ contained containedin=@mustacheInside
|
||||
|
||||
" Clustering
|
||||
syntax cluster htmlMustacheContainer add=htmlHead,htmlTitle,htmlString,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,htmlLink,htmlBold,htmlUnderline,htmlItalic,htmlValue
|
||||
@@ -73,6 +86,7 @@ HtmlHiLink mustacheVariableUnescape Number
|
||||
HtmlHiLink mustachePartial Number
|
||||
HtmlHiLink mustacheMarkerSet Number
|
||||
HtmlHiLink mustacheParam htmlArg
|
||||
HtmlHiLink mustacheAngleComponentName htmlTag
|
||||
|
||||
HtmlHiLink mustacheComment Comment
|
||||
HtmlHiLink mustacheBlockComment Comment
|
||||
@@ -80,6 +94,7 @@ HtmlHiLink mustacheError Error
|
||||
HtmlHiLink mustacheInsideError Error
|
||||
|
||||
HtmlHiLink mustacheHandlebars Special
|
||||
HtmlHiLink mustacheAngleBrackets htmlTagName
|
||||
HtmlHiLink mustacheUnescape Identifier
|
||||
HtmlHiLink mustacheOperators Operator
|
||||
HtmlHiLink mustacheConditionals Conditional
|
||||
|
||||
@@ -33,6 +33,9 @@ endif
|
||||
" ' can be used in OCaml identifiers
|
||||
setlocal iskeyword+='
|
||||
|
||||
" ` is part of the name of polymorphic variants
|
||||
setlocal iskeyword+=`
|
||||
|
||||
" OCaml is case sensitive.
|
||||
syn case match
|
||||
|
||||
|
||||
557
syntax/pgsql.vim
557
syntax/pgsql.vim
@@ -5,11 +5,11 @@ endif
|
||||
" Vim syntax file
|
||||
" Language: SQL (PostgreSQL dialect), PL/pgSQL, PL/…, PostGIS, …
|
||||
" Maintainer: Lifepillar
|
||||
" Version: 2.2.0
|
||||
" Version: 2.2.2
|
||||
" License: This file is placed in the public domain.
|
||||
|
||||
" Based on PostgreSQL 11.2
|
||||
" Automatically generated on 2019-02-25 at 08:57:58
|
||||
" Based on PostgreSQL 11.4
|
||||
" Automatically generated on 2019-08-08 at 11:23:38
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -26,10 +26,10 @@ syn region sqlIsPsql start=/^\s*\\/ end=/\n/ oneline contains=sqlPsqlCommand,
|
||||
syn keyword sqlSpecial contained false null true
|
||||
|
||||
" Statements
|
||||
syn keyword sqlStatement contained abort alter analyze begin checkpoint close cluster comment commit
|
||||
syn keyword sqlStatement contained constraints copy create deallocate declare delete discard do drop end
|
||||
syn keyword sqlStatement contained execute explain fetch grant import insert label listen load lock move
|
||||
syn keyword sqlStatement contained notify prepare prepared reassign refresh reindex release reset
|
||||
syn keyword sqlStatement contained abort add alter analyze begin checkpoint close cluster comment
|
||||
syn keyword sqlStatement contained commit constraints copy create deallocate declare delete discard do drop
|
||||
syn keyword sqlStatement contained end execute explain fetch grant import insert label listen load lock
|
||||
syn keyword sqlStatement contained move notify prepare prepared reassign refresh reindex release reset
|
||||
syn keyword sqlStatement contained revoke rollback savepoint security select select set show start
|
||||
syn keyword sqlStatement contained transaction truncate unlisten update vacuum values work
|
||||
" Types
|
||||
@@ -68,55 +68,68 @@ syn keyword sqlType contained txid_snapshot unionarg upc us_gaz us_gaz_id_seq us
|
||||
syn keyword sqlType contained us_rules us_rules_id_seq uuid valid_detail
|
||||
syn keyword sqlType contained validatetopology_returntype varbit varchar void xid xml yes_or_no zcta5 zcta5_gid_seq
|
||||
syn keyword sqlType contained zip_lookup zip_lookup_all zip_lookup_base zip_state zip_state_loc
|
||||
syn match sqlType /pg_toast_\d\+/
|
||||
syn match sqlType /\<pg_toast_\d\+\>/
|
||||
syn match sqlType /\<time\%[stamp]\s\+with\%[out]\>/
|
||||
syn match sqlKeyword /\<with\s\+grant\>/
|
||||
syn match sqlKeyword /\<on\s\+\%(tables\|sequences\|routines\)\>/
|
||||
syn match sqlType /\<text\>/
|
||||
syn match sqlKeyword /\<text\s\+search\>/
|
||||
" Additional types
|
||||
syn keyword sqlType contained array bigint bigserial bit boolean char character cube decimal
|
||||
syn keyword sqlType contained array at bigint bigserial bit boolean char character cube decimal
|
||||
syn keyword sqlType contained double int integer interval numeric precision real serial serial2
|
||||
syn keyword sqlType contained serial4 serial8 smallint smallserial text timestamp varchar varying xml
|
||||
syn keyword sqlType contained zone
|
||||
syn keyword sqlType contained serial4 serial8 smallint smallserial timestamp varchar varying xml zone
|
||||
" Keywords
|
||||
syn keyword sqlKeyword contained absolute access action add admin after aggregate all also always
|
||||
syn keyword sqlKeyword contained analyse and any as asc assertion assignment asymmetric at attach
|
||||
syn keyword sqlKeyword contained attribute authorization backward before between binary both by cache call
|
||||
syn keyword sqlKeyword contained called cascade cascaded case cast catalog chain characteristics check
|
||||
syn keyword sqlKeyword contained class coalesce collate collation column columns comments committed
|
||||
syn keyword sqlKeyword contained concurrently configuration conflict connection constraint
|
||||
syn keyword sqlKeyword contained content continue conversion cost cross csv current current_catalog
|
||||
syn keyword sqlKeyword contained current_date current_role current_schema current_time
|
||||
syn keyword sqlKeyword contained current_timestamp current_user cursor cycle data database day dec default defaults
|
||||
syn keyword sqlKeyword contained absolute access action admin after aggregate all also always
|
||||
syn keyword sqlKeyword contained analyse and any as asc assertion assignment asymmetric attach attribute
|
||||
syn keyword sqlKeyword contained authorization backward basetype before between binary both by
|
||||
syn keyword sqlKeyword contained bypassrls cache call called cascade cascaded case cast catalog century chain
|
||||
syn keyword sqlKeyword contained characteristics check class coalesce collate collation column
|
||||
syn keyword sqlKeyword contained columns combinefunc comments committed concurrently configuration
|
||||
syn keyword sqlKeyword contained conflict connection constraint content continue conversion cost
|
||||
syn keyword sqlKeyword contained createdb createrole cross csv current current_catalog current_date
|
||||
syn keyword sqlKeyword contained current_role current_schema current_time current_timestamp
|
||||
syn keyword sqlKeyword contained current_user cursor cycle data database day dec decade default defaults
|
||||
syn keyword sqlKeyword contained deferrable deferred definer delimiter delimiters depends desc
|
||||
syn keyword sqlKeyword contained detach dictionary disable distinct document domain each else enable
|
||||
syn keyword sqlKeyword contained encoding encrypted enum escape event except exclude excluding exclusive
|
||||
syn keyword sqlKeyword contained exists extension external extract false family filter first float
|
||||
syn keyword sqlKeyword contained deserialfunc detach dictionary disable distinct document domain dow doy each
|
||||
syn keyword sqlKeyword contained else enable encoding encrypted enum epoch escape event except exclude
|
||||
syn keyword sqlKeyword contained excluding exclusive exists extension external extract false family
|
||||
syn keyword sqlKeyword contained filter finalfunc finalfunc_extra finalfunc_modify first float
|
||||
syn keyword sqlKeyword contained following for force foreign forward freeze from full function functions
|
||||
syn keyword sqlKeyword contained generated global granted greatest group grouping groups handler
|
||||
syn keyword sqlKeyword contained having header hold hour identity if ilike immediate immutable implicit
|
||||
syn keyword sqlKeyword contained in include including increment index indexes inherit inherits
|
||||
syn keyword sqlKeyword contained initially inline inner inout input insensitive instead intersect into
|
||||
syn keyword sqlKeyword contained invoker is isnull isolation join key language large last lateral leading
|
||||
syn keyword sqlKeyword contained leakproof least left level like limit local localtime localtimestamp
|
||||
syn keyword sqlKeyword contained location locked logged mapping match materialized maxvalue method
|
||||
syn keyword sqlKeyword contained minute minvalue mode month name names national natural nchar new next
|
||||
syn keyword sqlKeyword contained no none not nothing notnull nowait null nullif nulls object of off
|
||||
syn keyword sqlKeyword contained offset oids old on only operator option options or order ordinality others
|
||||
syn keyword sqlKeyword contained out outer over overlaps overlay overriding owned owner parallel
|
||||
syn keyword sqlKeyword contained parser partial partition passing password placing plans policy position
|
||||
syn keyword sqlKeyword contained preceding preserve primary prior privileges procedural procedure
|
||||
syn keyword sqlKeyword contained procedures program publication quote range read recheck recursive ref
|
||||
syn keyword sqlKeyword contained references referencing relative rename repeatable replace replica
|
||||
syn keyword sqlKeyword contained restart restrict returning returns right role rollup routine
|
||||
syn keyword sqlKeyword contained routines row rows rule schema schemas scroll search second sequence
|
||||
syn keyword sqlKeyword contained sequences serializable server session session_user setof sets share
|
||||
syn keyword sqlKeyword contained similar simple skip snapshot some sql stable standalone statement
|
||||
syn keyword sqlKeyword contained statistics stdin stdout storage strict strip subscription substring
|
||||
syn keyword sqlKeyword contained symmetric sysid system table tables tablesample tablespace temp template
|
||||
syn keyword sqlKeyword contained temporary then ties to trailing transform treat trigger trim true
|
||||
syn keyword sqlKeyword contained having header hold hour hypothetical identity if ilike immediate
|
||||
syn keyword sqlKeyword contained immutable implicit in include including increment index indexes inherit
|
||||
syn keyword sqlKeyword contained inherits initcond initially inline inner inout input insensitive
|
||||
syn keyword sqlKeyword contained instead intersect into invoker is isnull isodow isolation isoyear join key
|
||||
syn keyword sqlKeyword contained language large last lateral lc_collate lc_ctype leading leakproof
|
||||
syn keyword sqlKeyword contained least left level like limit local locale localtime localtimestamp
|
||||
syn keyword sqlKeyword contained location locked logged login mapping match materialized maxvalue
|
||||
syn keyword sqlKeyword contained method mfinalfunc mfinalfunc_extra mfinalfunc_modify microseconds
|
||||
syn keyword sqlKeyword contained millennium milliseconds minitcond minute minvalue minvfunc mode month
|
||||
syn keyword sqlKeyword contained msfunc msspace mstype name names national natural nchar new next no
|
||||
syn keyword sqlKeyword contained nobypassrls nocreatedb nocreaterole noinherit nologin none
|
||||
syn keyword sqlKeyword contained noreplication nosuperuser not nothing notnull nowait null nullif nulls
|
||||
syn keyword sqlKeyword contained object of off offset oids old on only operator option options or order
|
||||
syn keyword sqlKeyword contained ordinality others out outer over overlaps overlay overriding owned owner
|
||||
syn keyword sqlKeyword contained parallel parser partial partition passing password permissive
|
||||
syn keyword sqlKeyword contained placing plans policy position preceding preserve primary prior privileges
|
||||
syn keyword sqlKeyword contained procedural procedure procedures program provider public
|
||||
syn keyword sqlKeyword contained publication quarter quote range read read_write readonly recheck recursive
|
||||
syn keyword sqlKeyword contained ref references referencing relative rename repeatable replace
|
||||
syn keyword sqlKeyword contained replica replication restart restrict restricted restrictive returning
|
||||
syn keyword sqlKeyword contained returns right role rollup routine routines row rows rule safe schema
|
||||
syn keyword sqlKeyword contained schemas scroll search second sequence sequences serialfunc
|
||||
syn keyword sqlKeyword contained serializable server session session_user setof sets sfunc share shareable
|
||||
syn keyword sqlKeyword contained similar simple skip snapshot some sortop sql sspace stable standalone
|
||||
syn keyword sqlKeyword contained statement statistics stdin stdout storage strict strip stype
|
||||
syn keyword sqlKeyword contained subscription substring superuser symmetric sysid system table tables
|
||||
syn keyword sqlKeyword contained tablesample tablespace temp template temporary then ties timezone
|
||||
syn keyword sqlKeyword contained timezone_hour timezone_minute to trailing transform treat trigger trim true
|
||||
syn keyword sqlKeyword contained trusted type types unbounded uncommitted unencrypted union unique
|
||||
syn keyword sqlKeyword contained unknown unlogged until user using valid validate validator value variadic
|
||||
syn keyword sqlKeyword contained verbose version view views volatile when where whitespace window with
|
||||
syn keyword sqlKeyword contained within without wrapper write xmlattributes xmlconcat xmlelement
|
||||
syn keyword sqlKeyword contained xmlexists xmlforest xmlnamespaces xmlparse xmlpi xmlroot
|
||||
syn keyword sqlKeyword contained xmlserialize xmltable year yes
|
||||
syn keyword sqlKeyword contained unknown unlogged unsafe until usage user using valid validate
|
||||
syn keyword sqlKeyword contained validator value variadic verbose version view views volatile week when where
|
||||
syn keyword sqlKeyword contained whitespace window with within without wrapper write xmlattributes
|
||||
syn keyword sqlKeyword contained xmlconcat xmlelement xmlexists xmlforest xmlnamespaces xmlparse
|
||||
syn keyword sqlKeyword contained xmlpi xmlroot xmlserialize xmltable year yes
|
||||
syn keyword sqlConstant contained information_schema pg_catalog
|
||||
" Built-in functions
|
||||
syn keyword sqlFunction contained RI_FKey_cascade_del RI_FKey_cascade_upd RI_FKey_check_ins
|
||||
@@ -523,90 +536,89 @@ syn keyword sqlFunction contained pg_walfile_name pg_walfile_name_offset pg_xact
|
||||
syn keyword sqlFunction contained phraseto_tsquery pi plainto_tsquery plperl_call_handler
|
||||
syn keyword sqlFunction contained plperl_inline_handler plperl_validator plperlu_call_handler
|
||||
syn keyword sqlFunction contained plperlu_inline_handler plperlu_validator plpgsql_call_handler
|
||||
syn keyword sqlFunction contained plpgsql_inline_handler plpgsql_validator plpython3_call_handler
|
||||
syn keyword sqlFunction contained plpython3_inline_handler plpython3_validator pltcl_call_handler
|
||||
syn keyword sqlFunction contained plpgsql_inline_handler plpgsql_validator pltcl_call_handler
|
||||
syn keyword sqlFunction contained pltclu_call_handler point point_above point_add point_below point_distance
|
||||
syn keyword sqlFunction contained point_div point_eq point_horiz point_in point_left point_mul
|
||||
syn keyword sqlFunction contained point_ne point_out point_recv point_right point_send point_sub
|
||||
syn keyword sqlFunction contained point_vert poly_above poly_below poly_center poly_contain
|
||||
syn keyword sqlFunction contained poly_contain_pt poly_contained poly_distance poly_in poly_left poly_npoints
|
||||
syn keyword sqlFunction contained poly_out poly_overabove poly_overbelow poly_overlap
|
||||
syn keyword sqlFunction contained poly_overleft poly_overright poly_recv poly_right poly_same poly_send polygon
|
||||
syn keyword sqlFunction contained popen position positionjoinsel positionsel
|
||||
syn keyword sqlFunction contained postgresql_fdw_validator pow power prefixjoinsel prefixsel prsd_end prsd_headline
|
||||
syn keyword sqlFunction contained point_div point_eq point_horiz point_in point_left point_mul point_ne
|
||||
syn keyword sqlFunction contained point_out point_recv point_right point_send point_sub point_vert
|
||||
syn keyword sqlFunction contained poly_above poly_below poly_center poly_contain poly_contain_pt
|
||||
syn keyword sqlFunction contained poly_contained poly_distance poly_in poly_left poly_npoints
|
||||
syn keyword sqlFunction contained poly_out poly_overabove poly_overbelow poly_overlap poly_overleft
|
||||
syn keyword sqlFunction contained poly_overright poly_recv poly_right poly_same poly_send polygon popen
|
||||
syn keyword sqlFunction contained position positionjoinsel positionsel postgresql_fdw_validator
|
||||
syn keyword sqlFunction contained pow power prefixjoinsel prefixsel prsd_end prsd_headline
|
||||
syn keyword sqlFunction contained prsd_lextype prsd_nexttoken prsd_start pt_contained_circle
|
||||
syn keyword sqlFunction contained pt_contained_poly query_to_xml query_to_xml_and_xmlschema
|
||||
syn keyword sqlFunction contained query_to_xmlschema querytree quote_ident quote_literal quote_nullable
|
||||
syn keyword sqlFunction contained radians radius random range_adjacent range_after range_before range_cmp
|
||||
syn keyword sqlFunction contained pt_contained_poly query_to_xml query_to_xml_and_xmlschema query_to_xmlschema
|
||||
syn keyword sqlFunction contained querytree quote_ident quote_literal quote_nullable radians
|
||||
syn keyword sqlFunction contained radius random range_adjacent range_after range_before range_cmp
|
||||
syn keyword sqlFunction contained range_contained_by range_contains range_contains_elem range_eq
|
||||
syn keyword sqlFunction contained range_ge range_gist_consistent range_gist_penalty
|
||||
syn keyword sqlFunction contained range_gist_picksplit range_gist_same range_gist_union range_gt range_in
|
||||
syn keyword sqlFunction contained range_intersect range_le range_lt range_merge range_minus range_ne
|
||||
syn keyword sqlFunction contained range_out range_overlaps range_overleft range_overright
|
||||
syn keyword sqlFunction contained range_recv range_send range_typanalyze range_union rangesel rank
|
||||
syn keyword sqlFunction contained rank_final record_eq record_ge record_gt record_image_eq record_image_ge
|
||||
syn keyword sqlFunction contained range_out range_overlaps range_overleft range_overright range_recv
|
||||
syn keyword sqlFunction contained range_send range_typanalyze range_union rangesel rank rank_final
|
||||
syn keyword sqlFunction contained record_eq record_ge record_gt record_image_eq record_image_ge
|
||||
syn keyword sqlFunction contained record_image_gt record_image_le record_image_lt record_image_ne
|
||||
syn keyword sqlFunction contained record_in record_le record_lt record_ne record_out record_recv
|
||||
syn keyword sqlFunction contained record_send regclass regclassin regclassout regclassrecv
|
||||
syn keyword sqlFunction contained regclasssend regconfigin regconfigout regconfigrecv regconfigsend
|
||||
syn keyword sqlFunction contained record_send regclass regclassin regclassout regclassrecv regclasssend
|
||||
syn keyword sqlFunction contained regconfigin regconfigout regconfigrecv regconfigsend
|
||||
syn keyword sqlFunction contained regdictionaryin regdictionaryout regdictionaryrecv regdictionarysend
|
||||
syn keyword sqlFunction contained regexeqjoinsel regexeqsel regexnejoinsel regexnesel regexp_match
|
||||
syn keyword sqlFunction contained regexp_matches regexp_replace regexp_split_to_array
|
||||
syn keyword sqlFunction contained regexp_split_to_table regnamespacein regnamespaceout regnamespacerecv
|
||||
syn keyword sqlFunction contained regnamespacesend regoperatorin regoperatorout regoperatorrecv
|
||||
syn keyword sqlFunction contained regoperatorsend regoperin regoperout regoperrecv regopersend
|
||||
syn keyword sqlFunction contained regprocedurein regprocedureout regprocedurerecv regproceduresend
|
||||
syn keyword sqlFunction contained regprocin regprocout regprocrecv regprocsend regr_avgx regr_avgy
|
||||
syn keyword sqlFunction contained regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy
|
||||
syn keyword sqlFunction contained regr_syy regrolein regroleout regrolerecv regrolesend regtypein
|
||||
syn keyword sqlFunction contained regtypeout regtyperecv regtypesend reltime reltimeeq reltimege reltimegt
|
||||
syn keyword sqlFunction contained regprocedurein regprocedureout regprocedurerecv regproceduresend regprocin
|
||||
syn keyword sqlFunction contained regprocout regprocrecv regprocsend regr_avgx regr_avgy regr_count
|
||||
syn keyword sqlFunction contained regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy
|
||||
syn keyword sqlFunction contained regrolein regroleout regrolerecv regrolesend regtypein regtypeout
|
||||
syn keyword sqlFunction contained regtyperecv regtypesend reltime reltimeeq reltimege reltimegt
|
||||
syn keyword sqlFunction contained reltimein reltimele reltimelt reltimene reltimeout reltimerecv
|
||||
syn keyword sqlFunction contained reltimesend repeat replace reverse right round row_number
|
||||
syn keyword sqlFunction contained row_security_active row_to_json rpad rtrim satisfies_hash_partition
|
||||
syn keyword sqlFunction contained scalargejoinsel scalargesel scalargtjoinsel scalargtsel
|
||||
syn keyword sqlFunction contained scalarlejoinsel scalarlesel scalarltjoinsel scalarltsel scale schema_to_xml
|
||||
syn keyword sqlFunction contained schema_to_xml_and_xmlschema schema_to_xmlschema session_user
|
||||
syn keyword sqlFunction contained set_bit set_byte set_config set_masklen setseed setval setweight
|
||||
syn keyword sqlFunction contained sha224 sha256 sha384 sha512 shell_in shell_out
|
||||
syn keyword sqlFunction contained shift_jis_2004_to_euc_jis_2004 shift_jis_2004_to_utf8 shobj_description sign
|
||||
syn keyword sqlFunction contained similar_escape sin sind sjis_to_euc_jp sjis_to_mic sjis_to_utf8 slope
|
||||
syn keyword sqlFunction contained smgreq smgrin smgrne smgrout spg_bbox_quad_config spg_box_quad_choose
|
||||
syn keyword sqlFunction contained scalargejoinsel scalargesel scalargtjoinsel scalargtsel scalarlejoinsel
|
||||
syn keyword sqlFunction contained scalarlesel scalarltjoinsel scalarltsel scale schema_to_xml
|
||||
syn keyword sqlFunction contained schema_to_xml_and_xmlschema schema_to_xmlschema session_user set_bit
|
||||
syn keyword sqlFunction contained set_byte set_config set_masklen setseed setval setweight sha224
|
||||
syn keyword sqlFunction contained sha256 sha384 sha512 shell_in shell_out
|
||||
syn keyword sqlFunction contained shift_jis_2004_to_euc_jis_2004 shift_jis_2004_to_utf8 shobj_description sign similar_escape
|
||||
syn keyword sqlFunction contained sin sind sjis_to_euc_jp sjis_to_mic sjis_to_utf8 slope smgreq
|
||||
syn keyword sqlFunction contained smgrin smgrne smgrout spg_bbox_quad_config spg_box_quad_choose
|
||||
syn keyword sqlFunction contained spg_box_quad_config spg_box_quad_inner_consistent
|
||||
syn keyword sqlFunction contained spg_box_quad_leaf_consistent spg_box_quad_picksplit spg_kd_choose
|
||||
syn keyword sqlFunction contained spg_kd_config spg_kd_inner_consistent spg_kd_picksplit
|
||||
syn keyword sqlFunction contained spg_poly_quad_compress spg_quad_choose spg_quad_config
|
||||
syn keyword sqlFunction contained spg_quad_inner_consistent spg_quad_leaf_consistent spg_quad_picksplit
|
||||
syn keyword sqlFunction contained spg_range_quad_choose spg_range_quad_config
|
||||
syn keyword sqlFunction contained spg_range_quad_inner_consistent spg_range_quad_leaf_consistent spg_range_quad_picksplit
|
||||
syn keyword sqlFunction contained spg_box_quad_leaf_consistent spg_box_quad_picksplit spg_kd_choose spg_kd_config
|
||||
syn keyword sqlFunction contained spg_kd_inner_consistent spg_kd_picksplit
|
||||
syn keyword sqlFunction contained spg_poly_quad_compress spg_quad_choose spg_quad_config spg_quad_inner_consistent
|
||||
syn keyword sqlFunction contained spg_quad_leaf_consistent spg_quad_picksplit
|
||||
syn keyword sqlFunction contained spg_range_quad_choose spg_range_quad_config spg_range_quad_inner_consistent
|
||||
syn keyword sqlFunction contained spg_range_quad_leaf_consistent spg_range_quad_picksplit
|
||||
syn keyword sqlFunction contained spg_text_choose spg_text_config spg_text_inner_consistent
|
||||
syn keyword sqlFunction contained spg_text_leaf_consistent spg_text_picksplit spghandler split_part sqrt
|
||||
syn keyword sqlFunction contained starts_with statement_timestamp stddev stddev_pop stddev_samp
|
||||
syn keyword sqlFunction contained string_agg string_agg_finalfn string_agg_transfn string_to_array
|
||||
syn keyword sqlFunction contained strip strpos substr substring sum
|
||||
syn keyword sqlFunction contained suppress_redundant_updates_trigger system table_to_xml table_to_xml_and_xmlschema
|
||||
syn keyword sqlFunction contained table_to_xmlschema tan tand text text_ge text_gt text_larger text_le text_lt
|
||||
syn keyword sqlFunction contained string_agg string_agg_finalfn string_agg_transfn string_to_array strip
|
||||
syn keyword sqlFunction contained strpos substr substring sum suppress_redundant_updates_trigger
|
||||
syn keyword sqlFunction contained system table_to_xml table_to_xml_and_xmlschema table_to_xmlschema
|
||||
syn keyword sqlFunction contained tan tand text text_ge text_gt text_larger text_le text_lt
|
||||
syn keyword sqlFunction contained text_pattern_ge text_pattern_gt text_pattern_le text_pattern_lt
|
||||
syn keyword sqlFunction contained text_smaller textanycat textcat texteq texticlike texticnlike
|
||||
syn keyword sqlFunction contained texticregexeq texticregexne textin textlen textlike textne textnlike
|
||||
syn keyword sqlFunction contained textout textrecv textregexeq textregexne textsend thesaurus_init
|
||||
syn keyword sqlFunction contained thesaurus_lexize tideq tidge tidgt tidin tidlarger tidle tidlt tidne
|
||||
syn keyword sqlFunction contained tidout tidrecv tidsend tidsmaller time time_cmp time_eq time_ge
|
||||
syn keyword sqlFunction contained time_gt time_hash time_hash_extended time_in time_larger time_le
|
||||
syn keyword sqlFunction contained time_lt time_mi_interval time_mi_time time_ne time_out
|
||||
syn keyword sqlFunction contained time_pl_interval time_recv time_send time_smaller time_transform timedate_pl
|
||||
syn keyword sqlFunction contained timemi timenow timeofday timepl timestamp timestamp_cmp
|
||||
syn keyword sqlFunction contained timestamp_cmp_date timestamp_cmp_timestamptz timestamp_eq
|
||||
syn keyword sqlFunction contained timestamp_eq_date timestamp_eq_timestamptz timestamp_ge timestamp_ge_date
|
||||
syn keyword sqlFunction contained texticregexeq texticregexne textin textlen textlike textne textnlike textout
|
||||
syn keyword sqlFunction contained textrecv textregexeq textregexne textsend thesaurus_init
|
||||
syn keyword sqlFunction contained thesaurus_lexize tideq tidge tidgt tidin tidlarger tidle tidlt tidne tidout
|
||||
syn keyword sqlFunction contained tidrecv tidsend tidsmaller time time_cmp time_eq time_ge time_gt
|
||||
syn keyword sqlFunction contained time_hash time_hash_extended time_in time_larger time_le time_lt
|
||||
syn keyword sqlFunction contained time_mi_interval time_mi_time time_ne time_out time_pl_interval
|
||||
syn keyword sqlFunction contained time_recv time_send time_smaller time_transform timedate_pl timemi
|
||||
syn keyword sqlFunction contained timenow timeofday timepl timestamp timestamp_cmp
|
||||
syn keyword sqlFunction contained timestamp_cmp_date timestamp_cmp_timestamptz timestamp_eq timestamp_eq_date
|
||||
syn keyword sqlFunction contained timestamp_eq_timestamptz timestamp_ge timestamp_ge_date
|
||||
syn keyword sqlFunction contained timestamp_ge_timestamptz timestamp_gt timestamp_gt_date
|
||||
syn keyword sqlFunction contained timestamp_gt_timestamptz timestamp_hash timestamp_hash_extended
|
||||
syn keyword sqlFunction contained timestamp_in timestamp_izone_transform timestamp_larger timestamp_le
|
||||
syn keyword sqlFunction contained timestamp_gt_timestamptz timestamp_hash timestamp_hash_extended timestamp_in
|
||||
syn keyword sqlFunction contained timestamp_izone_transform timestamp_larger timestamp_le
|
||||
syn keyword sqlFunction contained timestamp_le_date timestamp_le_timestamptz timestamp_lt
|
||||
syn keyword sqlFunction contained timestamp_lt_date timestamp_lt_timestamptz timestamp_mi
|
||||
syn keyword sqlFunction contained timestamp_mi_interval timestamp_ne timestamp_ne_date
|
||||
syn keyword sqlFunction contained timestamp_ne_timestamptz timestamp_out timestamp_pl_interval timestamp_recv
|
||||
syn keyword sqlFunction contained timestamp_send timestamp_smaller timestamp_sortsupport
|
||||
syn keyword sqlFunction contained timestamp_transform timestamp_zone_transform timestamptypmodin
|
||||
syn keyword sqlFunction contained timestamptypmodout timestamptz timestamptz_cmp timestamptz_cmp_date
|
||||
syn keyword sqlFunction contained timestamp_mi_interval timestamp_ne timestamp_ne_date timestamp_ne_timestamptz
|
||||
syn keyword sqlFunction contained timestamp_out timestamp_pl_interval timestamp_recv timestamp_send
|
||||
syn keyword sqlFunction contained timestamp_smaller timestamp_sortsupport timestamp_transform
|
||||
syn keyword sqlFunction contained timestamp_zone_transform timestamptypmodin timestamptypmodout
|
||||
syn keyword sqlFunction contained timestamptz timestamptz_cmp timestamptz_cmp_date
|
||||
syn keyword sqlFunction contained timestamptz_cmp_timestamp timestamptz_eq timestamptz_eq_date
|
||||
syn keyword sqlFunction contained timestamptz_eq_timestamp timestamptz_ge timestamptz_ge_date
|
||||
syn keyword sqlFunction contained timestamptz_ge_timestamp timestamptz_gt timestamptz_gt_date
|
||||
@@ -615,78 +627,77 @@ syn keyword sqlFunction contained timestamptz_le_date timestamptz_le_timestamp t
|
||||
syn keyword sqlFunction contained timestamptz_lt_date timestamptz_lt_timestamp timestamptz_mi
|
||||
syn keyword sqlFunction contained timestamptz_mi_interval timestamptz_ne timestamptz_ne_date
|
||||
syn keyword sqlFunction contained timestamptz_ne_timestamp timestamptz_out timestamptz_pl_interval
|
||||
syn keyword sqlFunction contained timestamptz_recv timestamptz_send timestamptz_smaller
|
||||
syn keyword sqlFunction contained timestamptztypmodin timestamptztypmodout timetypmodin timetypmodout timetz
|
||||
syn keyword sqlFunction contained timetz_cmp timetz_eq timetz_ge timetz_gt timetz_hash
|
||||
syn keyword sqlFunction contained timetz_hash_extended timetz_in timetz_larger timetz_le timetz_lt
|
||||
syn keyword sqlFunction contained timetz_mi_interval timetz_ne timetz_out timetz_pl_interval timetz_recv
|
||||
syn keyword sqlFunction contained timetz_send timetz_smaller timetzdate_pl timetztypmodin timetztypmodout
|
||||
syn keyword sqlFunction contained timezone tinterval tintervalct tintervalend tintervaleq
|
||||
syn keyword sqlFunction contained tintervalge tintervalgt tintervalin tintervalle tintervalleneq
|
||||
syn keyword sqlFunction contained tintervallenge tintervallengt tintervallenle tintervallenlt
|
||||
syn keyword sqlFunction contained tintervallenne tintervallt tintervalne tintervalout tintervalov
|
||||
syn keyword sqlFunction contained tintervalrecv tintervalrel tintervalsame tintervalsend tintervalstart
|
||||
syn keyword sqlFunction contained to_ascii to_char to_date to_hex to_json to_jsonb to_number to_regclass
|
||||
syn keyword sqlFunction contained to_regnamespace to_regoper to_regoperator to_regproc
|
||||
syn keyword sqlFunction contained to_regprocedure to_regrole to_regtype to_timestamp to_tsquery to_tsvector
|
||||
syn keyword sqlFunction contained transaction_timestamp translate trigger_in trigger_out trunc
|
||||
syn keyword sqlFunction contained ts_debug ts_delete ts_filter ts_headline ts_lexize ts_match_qv
|
||||
syn keyword sqlFunction contained ts_match_tq ts_match_tt ts_match_vq ts_parse ts_rank ts_rank_cd
|
||||
syn keyword sqlFunction contained ts_rewrite ts_stat ts_token_type ts_typanalyze tsm_handler_in
|
||||
syn keyword sqlFunction contained tsm_handler_out tsmatchjoinsel tsmatchsel tsq_mcontained tsq_mcontains
|
||||
syn keyword sqlFunction contained timestamptz_recv timestamptz_send timestamptz_smaller timestamptztypmodin
|
||||
syn keyword sqlFunction contained timestamptztypmodout timetypmodin timetypmodout timetz timetz_cmp
|
||||
syn keyword sqlFunction contained timetz_eq timetz_ge timetz_gt timetz_hash timetz_hash_extended
|
||||
syn keyword sqlFunction contained timetz_in timetz_larger timetz_le timetz_lt timetz_mi_interval
|
||||
syn keyword sqlFunction contained timetz_ne timetz_out timetz_pl_interval timetz_recv timetz_send
|
||||
syn keyword sqlFunction contained timetz_smaller timetzdate_pl timetztypmodin timetztypmodout
|
||||
syn keyword sqlFunction contained timezone tinterval tintervalct tintervalend tintervaleq tintervalge
|
||||
syn keyword sqlFunction contained tintervalgt tintervalin tintervalle tintervalleneq tintervallenge
|
||||
syn keyword sqlFunction contained tintervallengt tintervallenle tintervallenlt tintervallenne
|
||||
syn keyword sqlFunction contained tintervallt tintervalne tintervalout tintervalov tintervalrecv
|
||||
syn keyword sqlFunction contained tintervalrel tintervalsame tintervalsend tintervalstart to_ascii
|
||||
syn keyword sqlFunction contained to_char to_date to_hex to_json to_jsonb to_number to_regclass
|
||||
syn keyword sqlFunction contained to_regnamespace to_regoper to_regoperator to_regproc to_regprocedure
|
||||
syn keyword sqlFunction contained to_regrole to_regtype to_timestamp to_tsquery to_tsvector
|
||||
syn keyword sqlFunction contained transaction_timestamp translate trigger_in trigger_out trunc ts_debug
|
||||
syn keyword sqlFunction contained ts_delete ts_filter ts_headline ts_lexize ts_match_qv ts_match_tq
|
||||
syn keyword sqlFunction contained ts_match_tt ts_match_vq ts_parse ts_rank ts_rank_cd ts_rewrite
|
||||
syn keyword sqlFunction contained ts_stat ts_token_type ts_typanalyze tsm_handler_in tsm_handler_out
|
||||
syn keyword sqlFunction contained tsmatchjoinsel tsmatchsel tsq_mcontained tsq_mcontains
|
||||
syn keyword sqlFunction contained tsquery_and tsquery_cmp tsquery_eq tsquery_ge tsquery_gt tsquery_le
|
||||
syn keyword sqlFunction contained tsquery_lt tsquery_ne tsquery_not tsquery_or tsquery_phrase
|
||||
syn keyword sqlFunction contained tsqueryin tsqueryout tsqueryrecv tsquerysend tsrange tsrange_subdiff
|
||||
syn keyword sqlFunction contained tstzrange tstzrange_subdiff tsvector_cmp tsvector_concat
|
||||
syn keyword sqlFunction contained tsvector_eq tsvector_ge tsvector_gt tsvector_le tsvector_lt tsvector_ne
|
||||
syn keyword sqlFunction contained tsquery_lt tsquery_ne tsquery_not tsquery_or tsquery_phrase tsqueryin
|
||||
syn keyword sqlFunction contained tsqueryout tsqueryrecv tsquerysend tsrange tsrange_subdiff
|
||||
syn keyword sqlFunction contained tstzrange tstzrange_subdiff tsvector_cmp tsvector_concat tsvector_eq
|
||||
syn keyword sqlFunction contained tsvector_ge tsvector_gt tsvector_le tsvector_lt tsvector_ne
|
||||
syn keyword sqlFunction contained tsvector_to_array tsvector_update_trigger
|
||||
syn keyword sqlFunction contained tsvector_update_trigger_column tsvectorin tsvectorout tsvectorrecv tsvectorsend
|
||||
syn keyword sqlFunction contained txid_current txid_current_if_assigned txid_current_snapshot
|
||||
syn keyword sqlFunction contained txid_snapshot_in txid_snapshot_out txid_snapshot_recv
|
||||
syn keyword sqlFunction contained txid_snapshot_send txid_snapshot_xip txid_snapshot_xmax txid_snapshot_xmin
|
||||
syn keyword sqlFunction contained txid_status txid_visible_in_snapshot uhc_to_utf8
|
||||
syn keyword sqlFunction contained unique_key_recheck unknownin unknownout unknownrecv unknownsend unnest upper
|
||||
syn keyword sqlFunction contained upper_inc upper_inf utf8_to_ascii utf8_to_big5 utf8_to_euc_cn
|
||||
syn keyword sqlFunction contained txid_snapshot_in txid_snapshot_out txid_snapshot_recv txid_snapshot_send
|
||||
syn keyword sqlFunction contained txid_snapshot_xip txid_snapshot_xmax txid_snapshot_xmin
|
||||
syn keyword sqlFunction contained txid_status txid_visible_in_snapshot uhc_to_utf8 unique_key_recheck
|
||||
syn keyword sqlFunction contained unknownin unknownout unknownrecv unknownsend unnest upper upper_inc
|
||||
syn keyword sqlFunction contained upper_inf utf8_to_ascii utf8_to_big5 utf8_to_euc_cn
|
||||
syn keyword sqlFunction contained utf8_to_euc_jis_2004 utf8_to_euc_jp utf8_to_euc_kr utf8_to_euc_tw
|
||||
syn keyword sqlFunction contained utf8_to_gb18030 utf8_to_gbk utf8_to_iso8859 utf8_to_iso8859_1
|
||||
syn keyword sqlFunction contained utf8_to_johab utf8_to_koi8r utf8_to_koi8u utf8_to_shift_jis_2004
|
||||
syn keyword sqlFunction contained utf8_to_sjis utf8_to_uhc utf8_to_win uuid_cmp uuid_eq uuid_ge
|
||||
syn keyword sqlFunction contained uuid_gt uuid_hash uuid_hash_extended uuid_in uuid_le uuid_lt uuid_ne
|
||||
syn keyword sqlFunction contained uuid_out uuid_recv uuid_send uuid_sortsupport var_pop var_samp
|
||||
syn keyword sqlFunction contained varbit varbit_in varbit_out varbit_recv varbit_send
|
||||
syn keyword sqlFunction contained varbit_transform varbitcmp varbiteq varbitge varbitgt varbitle varbitlt varbitne
|
||||
syn keyword sqlFunction contained varbittypmodin varbittypmodout varchar varchar_transform
|
||||
syn keyword sqlFunction contained varcharin varcharout varcharrecv varcharsend varchartypmodin
|
||||
syn keyword sqlFunction contained varchartypmodout variance version void_in void_out void_recv void_send
|
||||
syn keyword sqlFunction contained websearch_to_tsquery width width_bucket win1250_to_latin2
|
||||
syn keyword sqlFunction contained win1250_to_mic win1251_to_iso win1251_to_koi8r win1251_to_mic
|
||||
syn keyword sqlFunction contained win1251_to_win866 win866_to_iso win866_to_koi8r win866_to_mic
|
||||
syn keyword sqlFunction contained win866_to_win1251 win_to_utf8 xideq xideqint4 xidin xidneq xidneqint4 xidout
|
||||
syn keyword sqlFunction contained xidrecv xidsend xml xml_in xml_is_well_formed
|
||||
syn keyword sqlFunction contained xml_is_well_formed_content xml_is_well_formed_document xml_out xml_recv xml_send
|
||||
syn keyword sqlFunction contained xmlagg xmlcomment xmlconcat2 xmlexists xmlvalidate xpath
|
||||
syn keyword sqlFunction contained xpath_exists
|
||||
syn keyword sqlFunction contained utf8_to_sjis utf8_to_uhc utf8_to_win uuid_cmp uuid_eq uuid_ge uuid_gt
|
||||
syn keyword sqlFunction contained uuid_hash uuid_hash_extended uuid_in uuid_le uuid_lt uuid_ne
|
||||
syn keyword sqlFunction contained uuid_out uuid_recv uuid_send uuid_sortsupport var_pop var_samp varbit
|
||||
syn keyword sqlFunction contained varbit_in varbit_out varbit_recv varbit_send varbit_transform
|
||||
syn keyword sqlFunction contained varbitcmp varbiteq varbitge varbitgt varbitle varbitlt varbitne
|
||||
syn keyword sqlFunction contained varbittypmodin varbittypmodout varchar varchar_transform varcharin
|
||||
syn keyword sqlFunction contained varcharout varcharrecv varcharsend varchartypmodin varchartypmodout
|
||||
syn keyword sqlFunction contained variance version void_in void_out void_recv void_send
|
||||
syn keyword sqlFunction contained websearch_to_tsquery width width_bucket win1250_to_latin2 win1250_to_mic
|
||||
syn keyword sqlFunction contained win1251_to_iso win1251_to_koi8r win1251_to_mic win1251_to_win866
|
||||
syn keyword sqlFunction contained win866_to_iso win866_to_koi8r win866_to_mic win866_to_win1251
|
||||
syn keyword sqlFunction contained win_to_utf8 xideq xideqint4 xidin xidneq xidneqint4 xidout xidrecv
|
||||
syn keyword sqlFunction contained xidsend xml xml_in xml_is_well_formed xml_is_well_formed_content
|
||||
syn keyword sqlFunction contained xml_is_well_formed_document xml_out xml_recv xml_send xmlagg
|
||||
syn keyword sqlFunction contained xmlcomment xmlconcat2 xmlexists xmlvalidate xpath xpath_exists
|
||||
" Extensions names
|
||||
syn keyword sqlConstant contained address_standardizer address_standardizer_data_us adminpack
|
||||
syn keyword sqlConstant contained amcheck autoinc bloom btree_gin btree_gist citext cube dblink
|
||||
syn keyword sqlConstant contained dict_int dict_xsyn earthdistance file_fdw fuzzystrmatch hstore
|
||||
syn keyword sqlConstant contained hstore_plperl hstore_plperlu hstore_plpython3u insert_username intagg
|
||||
syn keyword sqlConstant contained intarray isn jsonb_plperl jsonb_plperlu jsonb_plpython3u lo ltree
|
||||
syn keyword sqlConstant contained ltree_plpython3u moddatetime pageinspect pg_buffercache
|
||||
syn keyword sqlConstant contained pg_freespacemap pg_prewarm pg_stat_statements pg_trgm pg_visibility
|
||||
syn keyword sqlConstant contained pgcrypto pgrouting pgrowlocks pgstattuple pgtap plperl plperlu plpgsql
|
||||
syn keyword sqlConstant contained plpython3u pltcl pltclu postgis postgis_sfcgal
|
||||
syn keyword sqlConstant contained hstore_plperl hstore_plperlu insert_username intagg intarray isn
|
||||
syn keyword sqlConstant contained jsonb_plperl jsonb_plperlu lo ltree moddatetime pageinspect
|
||||
syn keyword sqlConstant contained pg_buffercache pg_freespacemap pg_prewarm pg_stat_statements pg_trgm
|
||||
syn keyword sqlConstant contained pg_visibility pgcrypto pgrouting pgrowlocks pgstattuple pgtap plperl
|
||||
syn keyword sqlConstant contained plperlu plpgsql pltcl pltclu postgis postgis_sfcgal
|
||||
syn keyword sqlConstant contained postgis_tiger_geocoder postgis_topology postgres_fdw refint seg sslinfo tablefunc
|
||||
syn keyword sqlConstant contained tcn temporal_tables timetravel tsm_system_rows tsm_system_time
|
||||
syn keyword sqlConstant contained unaccent xml2
|
||||
" Legacy extensions names
|
||||
syn keyword sqlConstant contained chkpass hstore_plpython2u hstore_plpythonu ltree_plpython2u
|
||||
syn keyword sqlConstant contained ltree_plpythonu pldbgapi plpython2u plpythonu
|
||||
syn keyword sqlConstant contained chkpass hstore_plpython2u hstore_plpython3u hstore_plpythonu
|
||||
syn keyword sqlConstant contained jsonb_plpython3u ltree_plpython2u ltree_plpython3u
|
||||
syn keyword sqlConstant contained ltree_plpythonu pldbgapi plpython2u plpython3u plpythonu
|
||||
" Extension: refint (v1.0)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'refint') == -1
|
||||
syn keyword sqlFunction contained check_foreign_key check_primary_key
|
||||
endif " refint
|
||||
" Extension: postgis (v2.5.1)
|
||||
" Extension: postgis (v2.5.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'postgis') == -1
|
||||
syn keyword sqlFunction contained addauth addgeometrycolumn
|
||||
syn keyword sqlFunction contained addoverviewconstraints addrasterconstraints box box2d
|
||||
@@ -989,11 +1000,6 @@ if index(get(g:, 'pgsql_disabled_extensions', []), 'btree_gin') == -1
|
||||
syn keyword sqlFunction contained gin_extract_value_timetz
|
||||
syn keyword sqlFunction contained gin_extract_value_uuid gin_extract_value_varbit gin_numeric_cmp
|
||||
endif " btree_gin
|
||||
" Extension: plpython3u (v1.0)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'plpython3u') == -1
|
||||
syn keyword sqlFunction contained plpython3_call_handler plpython3_inline_handler
|
||||
syn keyword sqlFunction contained plpython3_validator
|
||||
endif " plpython3u
|
||||
" Extension: ltree (v1.1)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'ltree') == -1
|
||||
syn keyword sqlFunction contained index lca lquery_in lquery_out
|
||||
@@ -1031,7 +1037,7 @@ endif " adminpack
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'dict_xsyn') == -1
|
||||
syn keyword sqlFunction contained dxsyn_init dxsyn_lexize
|
||||
endif " dict_xsyn
|
||||
" Extension: address_standardizer (v2.5.1)
|
||||
" Extension: address_standardizer (v2.5.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'address_standardizer') == -1
|
||||
syn keyword sqlFunction contained parse_address standardize_address
|
||||
syn keyword sqlType contained stdaddr
|
||||
@@ -1089,7 +1095,7 @@ if index(get(g:, 'pgsql_disabled_extensions', []), 'cube') == -1
|
||||
syn keyword sqlType contained cube
|
||||
syn keyword sqlFunction contained g_cube_compress g_cube_decompress
|
||||
endif " cube
|
||||
" Extension: postgis_tiger_geocoder (v2.5.1)
|
||||
" Extension: postgis_tiger_geocoder (v2.5.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'postgis_tiger_geocoder') == -1
|
||||
syn keyword sqlFunction contained count_words create_census_base_tables
|
||||
syn keyword sqlFunction contained cull_null diff_zip
|
||||
@@ -1176,10 +1182,6 @@ endif " lo
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'pgrowlocks') == -1
|
||||
syn keyword sqlFunction contained pgrowlocks
|
||||
endif " pgrowlocks
|
||||
" Extension: jsonb_plpython3u (v1.0)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'jsonb_plpython3u') == -1
|
||||
syn keyword sqlFunction contained jsonb_to_plpython3 plpython3_to_jsonb
|
||||
endif " jsonb_plpython3u
|
||||
" Extension: sslinfo (v1.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'sslinfo') == -1
|
||||
syn keyword sqlFunction contained ssl_cipher ssl_client_cert_present
|
||||
@@ -1197,15 +1199,11 @@ endif " pgstattuple
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'autoinc') == -1
|
||||
syn keyword sqlFunction contained autoinc
|
||||
endif " autoinc
|
||||
" Extension: address_standardizer_data_us (v2.5.1)
|
||||
" Extension: address_standardizer_data_us (v2.5.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'address_standardizer_data_us') == -1
|
||||
syn keyword sqlTable contained us_gaz us_lex us_rules
|
||||
endif " address_standardizer_data_us
|
||||
" Extension: hstore_plpython3u (v1.0)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'hstore_plpython3u') == -1
|
||||
syn keyword sqlFunction contained hstore_to_plpython3 plpython3_to_hstore
|
||||
endif " hstore_plpython3u
|
||||
" Extension: postgis_topology (v2.5.1)
|
||||
" Extension: postgis_topology (v2.5.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'postgis_topology') == -1
|
||||
syn keyword sqlFunction contained addedge addface addnode
|
||||
syn keyword sqlFunction contained addtopogeometrycolumn addtosearchpath asgml
|
||||
@@ -1516,10 +1514,6 @@ if index(get(g:, 'pgsql_disabled_extensions', []), 'fuzzystrmatch') == -1
|
||||
syn keyword sqlFunction contained levenshtein levenshtein_less_equal
|
||||
syn keyword sqlFunction contained metaphone soundex text_soundex
|
||||
endif " fuzzystrmatch
|
||||
" Extension: ltree_plpython3u (v1.0)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'ltree_plpython3u') == -1
|
||||
syn keyword sqlFunction contained ltree_to_plpython3
|
||||
endif " ltree_plpython3u
|
||||
" Extension: pgrouting (v2.6.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'pgrouting') == -1
|
||||
syn keyword sqlFunction contained pgr_alphashape pgr_analyzegraph
|
||||
@@ -1566,7 +1560,7 @@ if index(get(g:, 'pgsql_disabled_extensions', []), 'pgcrypto') == -1
|
||||
syn keyword sqlFunction contained pgp_sym_decrypt_bytea pgp_sym_encrypt
|
||||
syn keyword sqlFunction contained pgp_sym_encrypt_bytea
|
||||
endif " pgcrypto
|
||||
" Extension: postgis_sfcgal (v2.5.1)
|
||||
" Extension: postgis_sfcgal (v2.5.2)
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'postgis_sfcgal') == -1
|
||||
syn keyword sqlFunction contained postgis_sfcgal_scripts_installed
|
||||
syn keyword sqlFunction contained postgis_sfcgal_version st_3darea st_3ddifference
|
||||
@@ -1638,6 +1632,11 @@ if index(get(g:, 'pgsql_disabled_extensions', []), 'plpython2u') == -1
|
||||
syn keyword sqlFunction contained plpython2_call_handler plpython2_inline_handler
|
||||
syn keyword sqlFunction contained plpython2_validator
|
||||
endif " plpython2u
|
||||
" Extension: plpython3u
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'plpython3u') == -1
|
||||
syn keyword sqlFunction contained plpython3_call_handler plpython3_inline_handler
|
||||
syn keyword sqlFunction contained plpython3_validator
|
||||
endif " plpython3u
|
||||
" Extension: hstore_plpythonu
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'hstore_plpythonu') == -1
|
||||
syn keyword sqlFunction contained hstore_to_plpython plpython_to_hstore
|
||||
@@ -1646,6 +1645,14 @@ endif " hstore_plpythonu
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'hstore_plpython2u') == -1
|
||||
syn keyword sqlFunction contained hstore_to_plpython2 plpython2_to_hstore
|
||||
endif " hstore_plpython2u
|
||||
" Extension: hstore_plpython3u
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'hstore_plpython3u') == -1
|
||||
syn keyword sqlFunction contained hstore_to_plpython3 plpython3_to_hstore
|
||||
endif " hstore_plpython3u
|
||||
" Extension: jsonb_plpython3u
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'jsonb_plpython3u') == -1
|
||||
syn keyword sqlFunction contained jsonb_to_plpython3 plpython3_to_jsonb
|
||||
endif " jsonb_plpython3u
|
||||
" Extension: ltree_plpythonu
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'ltree_plpythonu') == -1
|
||||
syn keyword sqlFunction contained ltree_to_plpython
|
||||
@@ -1654,6 +1661,10 @@ endif " ltree_plpythonu
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'ltree_plpython2u') == -1
|
||||
syn keyword sqlFunction contained ltree_to_plpython2
|
||||
endif " ltree_plpython2u
|
||||
" Extension: ltree_plpython3u
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'ltree_plpython3u') == -1
|
||||
syn keyword sqlFunction contained ltree_to_plpython3
|
||||
endif " ltree_plpython3u
|
||||
" Extension: pldbgapi
|
||||
if index(get(g:, 'pgsql_disabled_extensions', []), 'pldbgapi') == -1
|
||||
syn keyword sqlFunction contained pldbg_abort_target pldbg_attach_to_port pldbg_continue
|
||||
@@ -1733,87 +1744,93 @@ syn keyword sqlErrorCode contained deadlock_detected dependent_objects_still_exi
|
||||
syn keyword sqlErrorCode contained dependent_privilege_descriptors_still_exist deprecated_feature diagnostics_exception
|
||||
syn keyword sqlErrorCode contained disk_full division_by_zero duplicate_alias duplicate_column
|
||||
syn keyword sqlErrorCode contained duplicate_cursor duplicate_database duplicate_file
|
||||
syn keyword sqlErrorCode contained duplicate_function duplicate_object duplicate_prepared_statement
|
||||
syn keyword sqlErrorCode contained duplicate_schema duplicate_table dynamic_result_sets_returned
|
||||
syn keyword sqlErrorCode contained error_in_assignment escape_character_conflict
|
||||
syn keyword sqlErrorCode contained event_trigger_protocol_violated exclusion_violation external_routine_exception
|
||||
syn keyword sqlErrorCode contained external_routine_invocation_exception fdw_column_name_not_found
|
||||
syn keyword sqlErrorCode contained fdw_dynamic_parameter_value_needed fdw_error
|
||||
syn keyword sqlErrorCode contained fdw_function_sequence_error fdw_inconsistent_descriptor_information
|
||||
syn keyword sqlErrorCode contained fdw_invalid_attribute_value fdw_invalid_column_name fdw_invalid_column_number
|
||||
syn keyword sqlErrorCode contained fdw_invalid_data_type fdw_invalid_data_type_descriptors
|
||||
syn keyword sqlErrorCode contained fdw_invalid_descriptor_field_identifier fdw_invalid_handle
|
||||
syn keyword sqlErrorCode contained fdw_invalid_option_index fdw_invalid_option_name
|
||||
syn keyword sqlErrorCode contained fdw_invalid_string_format fdw_invalid_string_length_or_buffer_length
|
||||
syn keyword sqlErrorCode contained fdw_invalid_use_of_null_pointer fdw_no_schemas fdw_option_name_not_found
|
||||
syn keyword sqlErrorCode contained fdw_out_of_memory fdw_reply_handle fdw_schema_not_found
|
||||
syn keyword sqlErrorCode contained fdw_table_not_found fdw_too_many_handles
|
||||
syn keyword sqlErrorCode contained fdw_unable_to_create_execution fdw_unable_to_create_reply
|
||||
syn keyword sqlErrorCode contained fdw_unable_to_establish_connection feature_not_supported floating_point_exception
|
||||
syn keyword sqlErrorCode contained foreign_key_violation function_executed_no_return_statement
|
||||
syn keyword sqlErrorCode contained generated_always grouping_error
|
||||
syn keyword sqlErrorCode contained held_cursor_requires_same_isolation_level idle_in_transaction_session_timeout
|
||||
syn keyword sqlErrorCode contained implicit_zero_bit_padding in_failed_sql_transaction
|
||||
syn keyword sqlErrorCode contained duplicate_function duplicate_json_object_key_value duplicate_object
|
||||
syn keyword sqlErrorCode contained duplicate_prepared_statement duplicate_schema duplicate_table
|
||||
syn keyword sqlErrorCode contained dynamic_result_sets_returned error_in_assignment
|
||||
syn keyword sqlErrorCode contained escape_character_conflict event_trigger_protocol_violated exclusion_violation
|
||||
syn keyword sqlErrorCode contained external_routine_exception external_routine_invocation_exception
|
||||
syn keyword sqlErrorCode contained fdw_column_name_not_found fdw_dynamic_parameter_value_needed
|
||||
syn keyword sqlErrorCode contained fdw_error fdw_function_sequence_error
|
||||
syn keyword sqlErrorCode contained fdw_inconsistent_descriptor_information fdw_invalid_attribute_value
|
||||
syn keyword sqlErrorCode contained fdw_invalid_column_name fdw_invalid_column_number fdw_invalid_data_type
|
||||
syn keyword sqlErrorCode contained fdw_invalid_data_type_descriptors
|
||||
syn keyword sqlErrorCode contained fdw_invalid_descriptor_field_identifier fdw_invalid_handle fdw_invalid_option_index
|
||||
syn keyword sqlErrorCode contained fdw_invalid_option_name fdw_invalid_string_format
|
||||
syn keyword sqlErrorCode contained fdw_invalid_string_length_or_buffer_length fdw_invalid_use_of_null_pointer
|
||||
syn keyword sqlErrorCode contained fdw_no_schemas fdw_option_name_not_found fdw_out_of_memory
|
||||
syn keyword sqlErrorCode contained fdw_reply_handle fdw_schema_not_found fdw_table_not_found
|
||||
syn keyword sqlErrorCode contained fdw_too_many_handles fdw_unable_to_create_execution
|
||||
syn keyword sqlErrorCode contained fdw_unable_to_create_reply fdw_unable_to_establish_connection feature_not_supported
|
||||
syn keyword sqlErrorCode contained floating_point_exception foreign_key_violation
|
||||
syn keyword sqlErrorCode contained function_executed_no_return_statement generated_always grouping_error
|
||||
syn keyword sqlErrorCode contained held_cursor_requires_same_isolation_level
|
||||
syn keyword sqlErrorCode contained idle_in_transaction_session_timeout implicit_zero_bit_padding in_failed_sql_transaction
|
||||
syn keyword sqlErrorCode contained inappropriate_access_mode_for_branch_transaction
|
||||
syn keyword sqlErrorCode contained inappropriate_isolation_level_for_branch_transaction indeterminate_collation indeterminate_datatype
|
||||
syn keyword sqlErrorCode contained index_corrupted indicator_overflow insufficient_privilege
|
||||
syn keyword sqlErrorCode contained insufficient_resources integrity_constraint_violation internal_error
|
||||
syn keyword sqlErrorCode contained interval_field_overflow invalid_argument_for_logarithm
|
||||
syn keyword sqlErrorCode contained invalid_argument_for_nth_value_function
|
||||
syn keyword sqlErrorCode contained invalid_argument_for_ntile_function invalid_argument_for_power_function
|
||||
syn keyword sqlErrorCode contained invalid_argument_for_width_bucket_function
|
||||
syn keyword sqlErrorCode contained invalid_authorization_specification invalid_binary_representation invalid_catalog_name
|
||||
syn keyword sqlErrorCode contained invalid_character_value_for_cast invalid_column_definition
|
||||
syn keyword sqlErrorCode contained invalid_column_reference invalid_cursor_definition invalid_cursor_name
|
||||
syn keyword sqlErrorCode contained invalid_cursor_state invalid_database_definition
|
||||
syn keyword sqlErrorCode contained invalid_datetime_format invalid_escape_character invalid_escape_octet
|
||||
syn keyword sqlErrorCode contained invalid_escape_sequence invalid_foreign_key
|
||||
syn keyword sqlErrorCode contained invalid_function_definition invalid_grant_operation invalid_grantor
|
||||
syn keyword sqlErrorCode contained invalid_indicator_parameter_value invalid_locator_specification invalid_name
|
||||
syn keyword sqlErrorCode contained invalid_object_definition invalid_parameter_value
|
||||
syn keyword sqlErrorCode contained inappropriate_isolation_level_for_branch_transaction
|
||||
syn keyword sqlErrorCode contained indeterminate_collation indeterminate_datatype index_corrupted indicator_overflow
|
||||
syn keyword sqlErrorCode contained insufficient_privilege insufficient_resources
|
||||
syn keyword sqlErrorCode contained integrity_constraint_violation internal_error interval_field_overflow
|
||||
syn keyword sqlErrorCode contained invalid_argument_for_logarithm
|
||||
syn keyword sqlErrorCode contained invalid_argument_for_nth_value_function invalid_argument_for_ntile_function
|
||||
syn keyword sqlErrorCode contained invalid_argument_for_power_function invalid_argument_for_width_bucket_function
|
||||
syn keyword sqlErrorCode contained invalid_authorization_specification
|
||||
syn keyword sqlErrorCode contained invalid_binary_representation invalid_catalog_name invalid_character_value_for_cast
|
||||
syn keyword sqlErrorCode contained invalid_column_definition invalid_column_reference
|
||||
syn keyword sqlErrorCode contained invalid_cursor_definition invalid_cursor_name invalid_cursor_state
|
||||
syn keyword sqlErrorCode contained invalid_database_definition invalid_datetime_format
|
||||
syn keyword sqlErrorCode contained invalid_escape_character invalid_escape_octet invalid_escape_sequence
|
||||
syn keyword sqlErrorCode contained invalid_foreign_key invalid_function_definition invalid_grant_operation
|
||||
syn keyword sqlErrorCode contained invalid_grantor invalid_indicator_parameter_value
|
||||
syn keyword sqlErrorCode contained invalid_json_subscript invalid_json_text invalid_locator_specification
|
||||
syn keyword sqlErrorCode contained invalid_name invalid_object_definition invalid_parameter_value
|
||||
syn keyword sqlErrorCode contained invalid_password invalid_preceding_or_following_size
|
||||
syn keyword sqlErrorCode contained invalid_prepared_statement_definition invalid_recursion invalid_regular_expression
|
||||
syn keyword sqlErrorCode contained invalid_role_specification invalid_row_count_in_limit_clause
|
||||
syn keyword sqlErrorCode contained invalid_row_count_in_result_offset_clause
|
||||
syn keyword sqlErrorCode contained invalid_savepoint_specification invalid_schema_definition invalid_schema_name
|
||||
syn keyword sqlErrorCode contained invalid_sql_statement_name invalid_sqlstate_returned
|
||||
syn keyword sqlErrorCode contained invalid_table_definition invalid_tablesample_argument
|
||||
syn keyword sqlErrorCode contained invalid_prepared_statement_definition invalid_recursion
|
||||
syn keyword sqlErrorCode contained invalid_regular_expression invalid_role_specification
|
||||
syn keyword sqlErrorCode contained invalid_row_count_in_limit_clause invalid_row_count_in_result_offset_clause
|
||||
syn keyword sqlErrorCode contained invalid_savepoint_specification invalid_schema_definition
|
||||
syn keyword sqlErrorCode contained invalid_schema_name invalid_sql_statement_name
|
||||
syn keyword sqlErrorCode contained invalid_sqlstate_returned invalid_table_definition invalid_tablesample_argument
|
||||
syn keyword sqlErrorCode contained invalid_tablesample_repeat invalid_text_representation
|
||||
syn keyword sqlErrorCode contained invalid_time_zone_displacement_value invalid_transaction_initiation
|
||||
syn keyword sqlErrorCode contained invalid_transaction_state invalid_transaction_termination
|
||||
syn keyword sqlErrorCode contained invalid_use_of_escape_character invalid_xml_comment invalid_xml_content
|
||||
syn keyword sqlErrorCode contained invalid_xml_document invalid_xml_processing_instruction io_error
|
||||
syn keyword sqlErrorCode contained locator_exception lock_file_exists lock_not_available
|
||||
syn keyword sqlErrorCode contained modifying_sql_data_not_permitted most_specific_type_mismatch name_too_long
|
||||
syn keyword sqlErrorCode contained invalid_use_of_escape_character invalid_xml_comment
|
||||
syn keyword sqlErrorCode contained invalid_xml_content invalid_xml_document invalid_xml_processing_instruction
|
||||
syn keyword sqlErrorCode contained io_error json_array_not_found json_member_not_found
|
||||
syn keyword sqlErrorCode contained json_number_not_found json_scalar_required locator_exception
|
||||
syn keyword sqlErrorCode contained lock_file_exists lock_not_available modifying_sql_data_not_permitted
|
||||
syn keyword sqlErrorCode contained more_than_one_json_item most_specific_type_mismatch name_too_long
|
||||
syn keyword sqlErrorCode contained no_active_sql_transaction
|
||||
syn keyword sqlErrorCode contained no_active_sql_transaction_for_branch_transaction no_additional_dynamic_result_sets_returned
|
||||
syn keyword sqlErrorCode contained no_data no_data_found nonstandard_use_of_escape_character
|
||||
syn keyword sqlErrorCode contained no_data no_data_found no_json_item non_numeric_json_item
|
||||
syn keyword sqlErrorCode contained non_unique_keys_in_json_object nonstandard_use_of_escape_character
|
||||
syn keyword sqlErrorCode contained not_an_xml_document not_null_violation
|
||||
syn keyword sqlErrorCode contained null_value_eliminated_in_set_function null_value_no_indicator_parameter
|
||||
syn keyword sqlErrorCode contained null_value_not_allowed numeric_value_out_of_range object_in_use
|
||||
syn keyword sqlErrorCode contained object_not_in_prerequisite_state operator_intervention out_of_memory
|
||||
syn keyword sqlErrorCode contained plpgsql_error privilege_not_granted privilege_not_revoked
|
||||
syn keyword sqlErrorCode contained program_limit_exceeded prohibited_sql_statement_attempted
|
||||
syn keyword sqlErrorCode contained protocol_violation query_canceled raise_exception read_only_sql_transaction
|
||||
syn keyword sqlErrorCode contained reading_sql_data_not_permitted reserved_name restrict_violation
|
||||
syn keyword sqlErrorCode contained savepoint_exception
|
||||
syn keyword sqlErrorCode contained schema_and_data_statement_mixing_not_supported sequence_generator_limit_exceeded serialization_failure
|
||||
syn keyword sqlErrorCode contained snapshot_too_old sql_routine_exception
|
||||
syn keyword sqlErrorCode contained sql_statement_not_yet_complete sqlclient_unable_to_establish_sqlconnection
|
||||
syn keyword sqlErrorCode contained sqlserver_rejected_establishment_of_sqlconnection
|
||||
syn keyword sqlErrorCode contained srf_protocol_violated stacked_diagnostics_accessed_without_active_handler
|
||||
syn keyword sqlErrorCode contained statement_completion_unknown statement_too_complex
|
||||
syn keyword sqlErrorCode contained string_data_length_mismatch string_data_right_truncation substring_error
|
||||
syn keyword sqlErrorCode contained successful_completion syntax_error
|
||||
syn keyword sqlErrorCode contained syntax_error_or_access_rule_violation system_error too_many_arguments too_many_columns
|
||||
syn keyword sqlErrorCode contained too_many_connections too_many_rows
|
||||
syn keyword sqlErrorCode contained transaction_integrity_constraint_violation transaction_resolution_unknown transaction_rollback
|
||||
syn keyword sqlErrorCode contained object_not_found object_not_in_prerequisite_state operator_intervention
|
||||
syn keyword sqlErrorCode contained out_of_memory plpgsql_error privilege_not_granted
|
||||
syn keyword sqlErrorCode contained privilege_not_revoked program_limit_exceeded
|
||||
syn keyword sqlErrorCode contained prohibited_sql_statement_attempted protocol_violation query_canceled raise_exception
|
||||
syn keyword sqlErrorCode contained read_only_sql_transaction reading_sql_data_not_permitted reserved_name
|
||||
syn keyword sqlErrorCode contained restrict_violation savepoint_exception
|
||||
syn keyword sqlErrorCode contained schema_and_data_statement_mixing_not_supported sequence_generator_limit_exceeded
|
||||
syn keyword sqlErrorCode contained serialization_failure singleton_json_item_required
|
||||
syn keyword sqlErrorCode contained snapshot_too_old sql_routine_exception sql_statement_not_yet_complete
|
||||
syn keyword sqlErrorCode contained sqlclient_unable_to_establish_sqlconnection
|
||||
syn keyword sqlErrorCode contained sqlserver_rejected_establishment_of_sqlconnection srf_protocol_violated
|
||||
syn keyword sqlErrorCode contained stacked_diagnostics_accessed_without_active_handler
|
||||
syn keyword sqlErrorCode contained statement_completion_unknown statement_too_complex string_data_length_mismatch
|
||||
syn keyword sqlErrorCode contained string_data_right_truncation substring_error
|
||||
syn keyword sqlErrorCode contained successful_completion syntax_error syntax_error_or_access_rule_violation
|
||||
syn keyword sqlErrorCode contained system_error too_many_arguments too_many_columns too_many_connections
|
||||
syn keyword sqlErrorCode contained too_many_json_array_elements too_many_json_object_members
|
||||
syn keyword sqlErrorCode contained too_many_rows transaction_integrity_constraint_violation
|
||||
syn keyword sqlErrorCode contained transaction_resolution_unknown transaction_rollback
|
||||
syn keyword sqlErrorCode contained trigger_protocol_violated triggered_action_exception
|
||||
syn keyword sqlErrorCode contained triggered_data_change_violation trim_error undefined_column
|
||||
syn keyword sqlErrorCode contained undefined_file undefined_function undefined_object undefined_parameter
|
||||
syn keyword sqlErrorCode contained undefined_table unique_violation unsafe_new_enum_value_usage
|
||||
syn keyword sqlErrorCode contained unterminated_c_string untranslatable_character warning
|
||||
syn keyword sqlErrorCode contained windowing_error with_check_option_violation wrong_object_type
|
||||
syn keyword sqlErrorCode contained triggered_data_change_violation trim_error undefined_column undefined_file
|
||||
syn keyword sqlErrorCode contained undefined_function undefined_object undefined_parameter undefined_table
|
||||
syn keyword sqlErrorCode contained unique_violation unsafe_new_enum_value_usage
|
||||
syn keyword sqlErrorCode contained unterminated_c_string untranslatable_character warning windowing_error
|
||||
syn keyword sqlErrorCode contained with_check_option_violation wrong_object_type
|
||||
syn keyword sqlErrorCode contained zero_length_character_string
|
||||
|
||||
" Legacy keywords
|
||||
@@ -1850,14 +1867,31 @@ syn match sqlOperator contained "\%(<->>>\|<<->>\|<<<->\|!\~\~\*\|\#<=\#\|\#>=\#
|
||||
syn match sqlOperator contained "\%(!\~\~\|\#<\#\|\#<=\|\#<>\|\#>\#\|\#>=\|\#>>\|%>>\|&&&\|&/&\|&<|\|\*<=\|\*<>\|\*>=\|->>\|-|-\|<\#>\)\ze\%([^!?~#^@<=>%&|*/+-]\|$\)"
|
||||
syn match sqlOperator contained "\%(<->\|<<%\|<<=\|<<@\|<<|\|<=>\|<?>\|<@>\|>>=\|?-|\|?<@\|?@>\|?||\|@-@\|@>>\|@@@\)\ze\%([^!?~#^@<=>%&|*/+-]\|$\)"
|
||||
syn match sqlOperator contained "\%(\^<@\|\^@>\||&>\||=|\||>>\|||/\|\~<\~\|\~==\|\~>\~\|\~\~\*\|!!\|!\~\|\#\#\|\#-\|\#<\|\#=\|\#>\|%\#\|%%\|%>\)\ze\%([^!?~#^@<=>%&|*/+-]\|$\)"
|
||||
syn match sqlOperator contained "\%(&&\|&<\|&>\|\*<\|\*=\|\*>\|->\|<%\|<<\|<=\|<>\|<@\|<\^\|>=\|>>\|>\^\|?\#\|?&\|?-\|?@\|?|\|?\~\|@>\|@@\)\ze\%([^!?~#^@<=>%&|*/+-]\|$\)"
|
||||
syn match sqlOperator contained "\%(\^?\|\^@\|\^\~\||/\|||\|\~\*\|\~=\|\~>\|\~\~\|!\|\#\|%\|&\|\*\|+\|-\|/\|<\|=\|>\|?\|@\|\^\||\|\~\)\ze\%([^!?~#^@<=>%&|*/+-]\|$\)"
|
||||
syn match sqlOperator contained "\%(&&\|&<\|&>\|\*<\|\*=\|\*>\|->\|<%\|<<\|<=\|<>\|<@\|<\^\|=>\|>=\|>>\|>\^\|?\#\|?&\|?-\|?@\|?|\|?\~\|@>\)\ze\%([^!?~#^@<=>%&|*/+-]\|$\)"
|
||||
syn match sqlOperator contained "\%(@@\|\^?\|\^@\|\^\~\||/\|||\|\~\*\|\~=\|\~>\|\~\~\|!\|\#\|%\|&\|\*\|+\|-\|/\|<\|=\|>\|?\|@\|\^\||\|\~\)\ze\%([^!?~#^@<=>%&|*/+-]\|$\)"
|
||||
|
||||
" Comments
|
||||
syn region sqlComment start="/\*" end="\*/" contains=sqlTodo,@Spell
|
||||
syn match sqlComment "#\s.*$" contains=sqlTodo,@Spell
|
||||
syn match sqlComment "--.*$" contains=sqlTodo,@Spell
|
||||
|
||||
" CREATE TYPE statement
|
||||
syn region sqlCreateType start=+create\s\+type.*(+ end=+)+
|
||||
\ contains=sqlIsKeyword,sqlCreateTypeKeyword,sqlIsOperator,sqlString,sqlComment,sqlNumber,sqlTodo
|
||||
syn keyword sqlCreateTypeKeyword contained input output receive send typmod_in typmod_out analyze internallength passedbyvalue
|
||||
syn keyword sqlCreateTypeKeyword contained alignment storage like category preferred default element delimiter collatable
|
||||
syn keyword sqlCreateTypeKeyword contained collate subtype subtype_opclass canonical subtype_diff
|
||||
|
||||
" CREATE OPERATOR [CLASS] statements
|
||||
syn region sqlCreateOperator start=+create\s\+operator.*(+ end=+)+
|
||||
\ contains=sqlIsKeyword,sqlCreateOperatorKeyword,sqlIsOperator,sqlString,sqlComment,sqlNumber,sqlTodo
|
||||
syn keyword sqlCreateOperatorKeyword contained function procedure leftarg rightarg commutator negator restrict join hashes merges
|
||||
|
||||
" CREATE TEXT SEARCH statements
|
||||
syn region sqlCreateTextSearch start=+create\s\+text\s\+search.*(+ end=+)+
|
||||
\ contains=sqlIsKeyword,sqlCreateTextSearchKeyword,sqlIsOperator,sqlString,sqlComment,sqlNumber,sqlTodo
|
||||
syn keyword sqlCreateTextSearchKeyword contained text parser copy template start gettoken end lextypes headline init lexize
|
||||
|
||||
" Options
|
||||
syn keyword sqlOption contained client_min_messages search_path
|
||||
|
||||
@@ -1908,13 +1942,18 @@ syn match sqlPlpgsqlVariable "\<_[A-Za-z0-9][A-Za-z0-9_]*\>" contained
|
||||
syn match sqlPlpgsqlVariable "\$\d\+" contained
|
||||
" @ arguments
|
||||
syn match sqlPlpgsqlVariable ".\zs@[A-z0-9_]\+" contained
|
||||
" PL/pgSQL operators
|
||||
syn match sqlPlpgsqlOperator ":=" contained
|
||||
|
||||
syn region plpgsql matchgroup=sqlString start=+\$pgsql\$+ end=+\$pgsql\$+ keepend contains=ALL
|
||||
syn region plpgsql matchgroup=sqlString start=+\$body\$+ end=+\$body\$+ keepend contains=ALL
|
||||
syn region plpgsql matchgroup=sqlString start=+\$pgsql\$+ end=+\$pgsql\$+ keepend
|
||||
\ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo
|
||||
syn region plpgsql matchgroup=sqlString start=+\$body\$+ end=+\$body\$+ keepend
|
||||
\ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo
|
||||
if get(g:, 'pgsql_dollar_strings', 0)
|
||||
syn region sqlString start=+\$\$+ end=+\$\$+ contains=@Spell
|
||||
else
|
||||
syn region plpgsql matchgroup=sqlString start=+\$\$+ end=+\$\$+ keepend contains=ALL
|
||||
syn region plpgsql matchgroup=sqlString start=+\$\$+ end=+\$\$+ keepend
|
||||
\ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo
|
||||
endif
|
||||
|
||||
" PL/<any other language>
|
||||
@@ -1938,6 +1977,7 @@ hi def link sqlIdentifier Identifier
|
||||
hi def link sqlKeyword sqlSpecial
|
||||
hi def link sqlPlpgsqlKeyword sqlSpecial
|
||||
hi def link sqlPlpgsqlVariable Identifier
|
||||
hi def link sqlPlpgsqlOperator sqlOperator
|
||||
hi def link sqlNumber Number
|
||||
hi def link sqlOperator sqlStatement
|
||||
hi def link sqlOption Define
|
||||
@@ -1950,6 +1990,9 @@ hi def link sqlView sqlTable
|
||||
hi def link sqlTodo Todo
|
||||
hi def link sqlPsqlCommand SpecialKey
|
||||
hi def link sqlPsqlKeyword Keyword
|
||||
hi def link sqlCreateTypeKeyword sqlKeyword
|
||||
hi def link sqlCreateOperatorKeyword sqlKeyword
|
||||
hi def link sqlCreateTextSearchKeyword sqlKeyword
|
||||
|
||||
let b:current_syntax = "sql"
|
||||
|
||||
|
||||
@@ -22,25 +22,30 @@ let b:current_syntax = 'plantuml'
|
||||
|
||||
syntax sync minlines=100
|
||||
|
||||
syntax match plantumlPreProc /\%(^@startuml\|^@enduml\)\|!\%(define\|definelong\|else\|enddefinelong\|endif\|exit\|if\|ifdef\|ifndef\|include\|pragma\|undef\)\s*.*/ contains=plantumlDir
|
||||
syntax match plantumlPreProc /\%(\%(^@start\|^@end\)\%(dot\|mindmap\|uml\|salt\|wbs\)\)\|!\%(define\|definelong\|else\|enddefinelong\|endif\|exit\|if\|ifdef\|ifndef\|include\|pragma\|undef\)\s*.*/ contains=plantumlDir
|
||||
syntax region plantumlDir start=/\s\+/ms=s+1 end=/$/ contained
|
||||
|
||||
" type
|
||||
syntax keyword plantumlTypeKeyword abstract actor agent archimate artifact boundary card cloud component control
|
||||
syntax keyword plantumlTypeKeyword database entity enum file folder frame node object package participant
|
||||
syntax keyword plantumlTypeKeyword database diamond entity enum file folder frame node object package participant
|
||||
syntax keyword plantumlTypeKeyword queue rectangle stack state storage usecase
|
||||
|
||||
" class and interface are defined as plantumlClassKeyword
|
||||
syntax keyword plantumlClassKeyword class interface
|
||||
|
||||
syntax keyword plantumlKeyword activate again also alt as autonumber bottom box break caption center create
|
||||
syntax keyword plantumlKeyword critical deactivate destroy down else elseif end endif endsplit endwhile footbox
|
||||
syntax keyword plantumlKeyword footer fork group header hide hnote if is kill left legend link loop namespace
|
||||
syntax keyword plantumlKeyword newpage note of on opt over package page par partition ref repeat return right
|
||||
syntax keyword plantumlKeyword rnote rotate show skin skinparam split start stop title top up while
|
||||
" keyword
|
||||
" Exclude 'top to bottom direction'
|
||||
syntax keyword plantumlKeyword accross activate again allow_mixing allowmixing also alt as autonumber bottom
|
||||
syntax keyword plantumlKeyword box break caption center create critical deactivate destroy down else elseif end
|
||||
syntax keyword plantumlKeyword endif endwhile footbox footer fork group header hide hnote if is kill left
|
||||
syntax keyword plantumlKeyword legend link loop mainframe namespace newpage note of on opt order over package
|
||||
syntax keyword plantumlKeyword page par partition ref repeat return right rnote rotate show skin skinparam
|
||||
syntax keyword plantumlKeyword start stop title top up while
|
||||
" Not in 'java - jar plantuml.jar - language' output
|
||||
syntax keyword plantumlKeyword then detach sprite
|
||||
syntax keyword plantumlKeyword then detach split sprite
|
||||
|
||||
syntax keyword plantumlCommentTODO XXX TODO FIXME NOTE contained
|
||||
syntax match plantumlColor /#[0-9A-Fa-f]\{6\}\>/
|
||||
syntax case ignore
|
||||
syntax keyword plantumlColor APPLICATION AliceBlue AntiqueWhite Aqua Aquamarine Azure BUSINESS Beige Bisque
|
||||
syntax keyword plantumlColor Black BlanchedAlmond Blue BlueViolet Brown BurlyWood CadetBlue Chartreuse
|
||||
syntax keyword plantumlColor Chocolate Coral CornflowerBlue Cornsilk Crimson Cyan DarkBlue DarkCyan
|
||||
@@ -62,6 +67,7 @@ syntax keyword plantumlColor RosyBrown RoyalBlue STRATEGY SaddleBrown Salmon San
|
||||
syntax keyword plantumlColor Sienna Silver SkyBlue SlateBlue SlateGray SlateGrey Snow SpringGreen SteelBlue
|
||||
syntax keyword plantumlColor TECHNOLOGY Tan Teal Thistle Tomato Turquoise Violet Wheat White WhiteSmoke
|
||||
syntax keyword plantumlColor Yellow YellowGreen
|
||||
syntax case match
|
||||
|
||||
" Arrows
|
||||
syntax match plantumlArrow /.\@=\([.-]\)\1\+\ze\s*\%(\w\|(\)/
|
||||
@@ -69,7 +75,7 @@ syntax match plantumlArrow /.\@=\([.-]\)\1\+\ze\s*\%(\w\|(\)/
|
||||
syntax match plantumlClassRelationLR /\([-.]\)\1*\%(\w\{,5\}\1\+\)\?\%(|>\|>\|*\|o\|x\|#\|{\|+\|\^\)/ contains=plantumlArrowDirectedLine
|
||||
syntax match plantumlClassRelationRL /\%(<|\|<\|*\|o\|x\|#\|}\|+\|\^\)\([-.]\)\1*\%(\w\{,5\}\1\+\)\?/ contains=plantumlArrowDirectedLine
|
||||
|
||||
syntax match plantumlArrowLR /\[\?\([-.]\)\1*\%(\w\{,5}\1\+\)\?\(>\|\\\|\/\)\2\?[ox]\?\]\?\%(\[[^\]]*\]\)\?/ contains=plantumlText,plantumlArrowDirectedLine
|
||||
syntax match plantumlArrowLR /\[\?\([-.]\)\1*\%(\w\{,5}\1\+\)\?\%(\[[^\]]\+\]\)\?\1*\(>\|\\\|\/\)\2\?[ox]\?\]\?\%(\[[^\]]*\]\)\?/ contains=plantumlText,plantumlArrowDirectedLine
|
||||
syntax match plantumlArrowRL /\[\?[ox]\?\(<\|\\\|\/\)\1\?\([-.]\)\2*\%(\w\{,5}\2\+\)\?\]\?\%(\[[^\]]*\]\)\?/ contains=plantumlText,plantumlArrowDirectedLine
|
||||
syntax match plantumlArrowBoth /[ox]\?\(<\|\\\|\/\)\1\?\([-.]\)\2*\%(\w\{,5}\2\+\)\?\(>\|\\\|\/\)\3\?[ox]\?/ contains=plantumlArrowDirectedLine
|
||||
syntax region plantumlText oneline start=/\[/ms=s+1 end=/\]/me=s-1 contained
|
||||
@@ -77,15 +83,18 @@ syntax region plantumlText oneline start=/\[/ms=s+1 end=/\]/me=s-1 contained
|
||||
syntax match plantumlArrowDirectedLine /\([-.]\)\%(l\%[eft]\|r\%[ight]\|up\?\|d\%[own]\)\1/ contained
|
||||
|
||||
" Note
|
||||
syntax region plantumlNoteMultiLine start=/\%(^\s*[rh]\?note\)\@<=\s\%([^:"]\+$\)\@=/ end=/^\%(\s*end \?[rh]\?note$\)\@=/ contains=plantumlSpecialString,plantumlNoteMultiLineStart
|
||||
syntax match plantumlNoteMultiLineStart /\%(^\s*[rh]\?note\)\@<=\s\%([^:]\+$\)/ contained contains=plantumlKeyword,plantumlColor,plantumlString
|
||||
syntax region plantumlNoteMultiLine start=/\%(^\s*[rh]\?note\)\@<=\s\%([^:"]\+$\)\@=/ end=/^\%(\s*end \?[rh]\?note$\)\@=/ contains=plantumlSpecialString,plantumlNoteMultiLineStart,plantumlTag
|
||||
syntax match plantumlNoteMultiLineStart /\%(^\s*[rh]\?note\)\@<=\s\%([^:]\+$\)/ contained contains=plantumlKeyword,plantumlColor,plantumlString,plantumlTag
|
||||
|
||||
" Class
|
||||
syntax region plantumlClass start=/\%(\%(class\|interface\|object\)\s[^{]\+\)\@<=\zs{/ end=/^\s*}/ contains=plantumlClassArrows,
|
||||
\ plantumlClassKeyword,
|
||||
\ @plantumlClassOp,
|
||||
\ plantumlClassSeparator,
|
||||
\ plantumlComment
|
||||
syntax region plantumlClass
|
||||
\ start=/\%(\%(class\|interface\|object\)\s[^{]\+\)\@<=\zs{/
|
||||
\ end=/^\s*}/
|
||||
\ contains=plantumlClassArrows,
|
||||
\ plantumlClassKeyword,
|
||||
\ @plantumlClassOp,
|
||||
\ plantumlClassSeparator,
|
||||
\ plantumlComment
|
||||
|
||||
syntax match plantumlClassPublic /^\s*+\s*\w\+/ contained
|
||||
syntax match plantumlClassPrivate /^\s*-\s*\w\+/ contained
|
||||
@@ -94,9 +103,9 @@ syntax match plantumlClassPackPrivate /^\s*\~\s*\w\+/ contained
|
||||
syntax match plantumlClassSeparator /__\%(.\+__\)\?\|==\%(.\+==\)\?\|--\%(.\+--\)\?\|\.\.\%(.\+\.\.\)\?/ contained
|
||||
|
||||
syntax cluster plantumlClassOp contains=plantumlClassPublic,
|
||||
\ plantumlClassPrivate,
|
||||
\ plantumlClassProtected,
|
||||
\ plantumlClassPackPrivate
|
||||
\ plantumlClassPrivate,
|
||||
\ plantumlClassProtected,
|
||||
\ plantumlClassPackPrivate
|
||||
|
||||
" Strings
|
||||
syntax match plantumlSpecialString /\\n/ contained
|
||||
@@ -105,6 +114,9 @@ syntax region plantumlString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=plantum
|
||||
syntax match plantumlComment /'.*$/ contains=plantumlCommentTODO
|
||||
syntax region plantumlMultilineComment start=/\/'/ end=/'\// contains=plantumlCommentTODO
|
||||
|
||||
syntax match plantumlTag /<\/\?[bi]>/
|
||||
syntax region plantumlTag start=/<\/\?\%(back\|color\|del\|font\|img\|s\|size\|strike\|u\|w\)/ end=/>/
|
||||
|
||||
" Labels with a colon
|
||||
syntax match plantumlColonLine /\S\@<=\s*\zs:.\+$/ contains=plantumlSpecialString
|
||||
|
||||
@@ -126,6 +138,26 @@ syntax region plantumlText oneline matchgroup=plantumlSequenceDelay start=/^\.\{
|
||||
" Usecase diagram
|
||||
syntax match plantumlUsecaseActor /:.\{-1,}:/ contains=plantumlSpecialString
|
||||
|
||||
" Mindmap diagram
|
||||
let s:mindmapHilightLinks = [
|
||||
\ 'WarningMsg', 'Directory', 'Special', 'MoreMsg', 'Statement', 'Title',
|
||||
\ 'Question', 'LineNr', 'ModeMsg', 'Title', 'MoreMsg', 'SignColumn',
|
||||
\ 'Function', 'Todo'
|
||||
\ ]
|
||||
|
||||
syntax match plantumlMindmap1 /^[-+*][_<>]\?/ contained
|
||||
|
||||
let i = 1
|
||||
let contained = []
|
||||
while i < len(s:mindmapHilightLinks)
|
||||
execute "syntax match plantumlMindmap" . i . " /^\\%(\\s\\|[-+*]\\)\\{" . (i - 1) . "}[-+*][_<>]\\?/ contained"
|
||||
execute "highlight default link plantumlMindmap" . i . " " . s:mindmapHilightLinks[i - 1]
|
||||
call add(contained, "plantumlMindmap" . i)
|
||||
let i = i + 1
|
||||
endwhile
|
||||
|
||||
execute "syntax region plantumlMindmap oneline start=/^\\s*[-+*]_\\?/ end=/$/ contains=" . join(contained, ',')
|
||||
|
||||
" Skinparam keywords
|
||||
syntax case ignore
|
||||
syntax keyword plantumlSkinparamKeyword ActivityBackgroundColor ActivityBarColor ActivityBorderColor
|
||||
@@ -136,85 +168,116 @@ syntax keyword plantumlSkinparamKeyword ActivityFontColor ActivityFontName Activ
|
||||
syntax keyword plantumlSkinparamKeyword ActivityStartColor ActorBackgroundColor ActorBorderColor ActorFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ActorFontName ActorFontSize ActorFontStyle ActorStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ActorStereotypeFontName ActorStereotypeFontSize ActorStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword AgentBackgroundColor AgentBorderColor AgentFontColor AgentFontName AgentFontSize
|
||||
syntax keyword plantumlSkinparamKeyword AgentFontStyle AgentStereotypeFontColor AgentStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword AgentStereotypeFontSize AgentStereotypeFontStyle ArrowColor ArrowFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ArrowFontName ArrowFontSize ArrowFontStyle ArtifactBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword ArtifactBorderColor ArtifactFontColor ArtifactFontName ArtifactFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ArtifactFontStyle ArtifactStereotypeFontColor ArtifactStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword AgentBackgroundColor AgentBorderColor AgentBorderThickness AgentFontColor
|
||||
syntax keyword plantumlSkinparamKeyword AgentFontName AgentFontSize AgentFontStyle AgentStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword AgentStereotypeFontName AgentStereotypeFontSize AgentStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword ArchimateBackgroundColor ArchimateBorderColor ArchimateBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword ArchimateFontColor ArchimateFontName ArchimateFontSize ArchimateFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword ArchimateStereotypeFontColor ArchimateStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword ArchimateStereotypeFontSize ArchimateStereotypeFontStyle ArrowColor
|
||||
syntax keyword plantumlSkinparamKeyword ArrowFontColor ArrowFontName ArrowFontSize ArrowFontStyle ArrowLollipopColor
|
||||
syntax keyword plantumlSkinparamKeyword ArrowMessageAlignment ArrowThickness ArtifactBackgroundColor ArtifactBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ArtifactFontColor ArtifactFontName ArtifactFontSize ArtifactFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword ArtifactStereotypeFontColor ArtifactStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword ArtifactStereotypeFontSize ArtifactStereotypeFontStyle BackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword BoundaryBackgroundColor BoundaryBorderColor BoundaryFontColor BoundaryFontName
|
||||
syntax keyword plantumlSkinparamKeyword BoundaryFontSize BoundaryFontStyle BoundaryStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword BoundaryStereotypeFontName BoundaryStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword BoundaryStereotypeFontStyle CaptionFontColor CaptionFontName CaptionFontSize
|
||||
syntax keyword plantumlSkinparamKeyword CaptionFontStyle CircledCharacterFontColor CircledCharacterFontName
|
||||
syntax keyword plantumlSkinparamKeyword CircledCharacterFontSize CircledCharacterFontStyle CircledCharacterRadius
|
||||
syntax keyword plantumlSkinparamKeyword ClassAttributeFontColor ClassAttributeFontName ClassAttributeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ClassAttributeFontStyle ClassAttributeIconSize ClassBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword ClassBorderColor ClassBorderThickness ClassFontColor ClassFontName ClassFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ClassFontStyle ClassHeaderBackgroundColor ClassStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ClassStereotypeFontName ClassStereotypeFontSize ClassStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword CloudBackgroundColor CloudBorderColor CloudFontColor CloudFontName CloudFontSize
|
||||
syntax keyword plantumlSkinparamKeyword CloudFontStyle CloudStereotypeFontColor CloudStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword CloudStereotypeFontSize CloudStereotypeFontStyle CollectionsBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword CollectionsBorderColor ColorArrowSeparationSpace ComponentBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword ComponentBorderColor ComponentFontColor ComponentFontName ComponentFontSize
|
||||
syntax keyword plantumlSkinparamKeyword BiddableBackgroundColor BiddableBorderColor BoundaryBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword BoundaryBorderColor BoundaryFontColor BoundaryFontName BoundaryFontSize
|
||||
syntax keyword plantumlSkinparamKeyword BoundaryFontStyle BoundaryStereotypeFontColor BoundaryStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword BoundaryStereotypeFontSize BoundaryStereotypeFontStyle BoxPadding
|
||||
syntax keyword plantumlSkinparamKeyword CaptionFontColor CaptionFontName CaptionFontSize CaptionFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword CardBackgroundColor CardBorderColor CardBorderThickness CardFontColor
|
||||
syntax keyword plantumlSkinparamKeyword CardFontName CardFontSize CardFontStyle CardStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword CardStereotypeFontName CardStereotypeFontSize CardStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword CircledCharacterFontColor CircledCharacterFontName CircledCharacterFontSize
|
||||
syntax keyword plantumlSkinparamKeyword CircledCharacterFontStyle CircledCharacterRadius ClassAttributeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ClassAttributeFontName ClassAttributeFontSize ClassAttributeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword ClassAttributeIconSize ClassBackgroundColor ClassBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ClassBorderThickness ClassFontColor ClassFontName ClassFontSize ClassFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword ClassHeaderBackgroundColor ClassStereotypeFontColor ClassStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword ClassStereotypeFontSize ClassStereotypeFontStyle CloudBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword CloudBorderColor CloudFontColor CloudFontName CloudFontSize CloudFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword CloudStereotypeFontColor CloudStereotypeFontName CloudStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword CloudStereotypeFontStyle CollectionsBackgroundColor CollectionsBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ColorArrowSeparationSpace ComponentBackgroundColor ComponentBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ComponentBorderThickness ComponentFontColor ComponentFontName ComponentFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ComponentFontStyle ComponentStereotypeFontColor ComponentStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword ComponentStereotypeFontSize ComponentStereotypeFontStyle ComponentStyle
|
||||
syntax keyword plantumlSkinparamKeyword ConditionStyle ControlBackgroundColor ControlBorderColor ControlFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ControlFontName ControlFontSize ControlFontStyle ControlStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ControlStereotypeFontName ControlStereotypeFontSize ControlStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword DatabaseBackgroundColor DatabaseBorderColor DatabaseFontColor DatabaseFontName
|
||||
syntax keyword plantumlSkinparamKeyword DatabaseFontSize DatabaseFontStyle DatabaseStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword DatabaseStereotypeFontName DatabaseStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword DatabaseStereotypeFontStyle DefaultFontColor DefaultFontName DefaultFontSize
|
||||
syntax keyword plantumlSkinparamKeyword DefaultFontStyle DefaultMonospacedFontName DefaultTextAlignment
|
||||
syntax keyword plantumlSkinparamKeyword DiagramBorderColor DiagramBorderThickness Dpi EntityBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword EntityBorderColor EntityFontColor EntityFontName EntityFontSize EntityFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword EntityStereotypeFontColor EntityStereotypeFontName EntityStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword EntityStereotypeFontStyle FileBackgroundColor FileBorderColor FileFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ConditionEndStyle ConditionStyle ControlBackgroundColor ControlBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ControlFontColor ControlFontName ControlFontSize ControlFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword ControlStereotypeFontColor ControlStereotypeFontName ControlStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ControlStereotypeFontStyle DatabaseBackgroundColor DatabaseBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword DatabaseFontColor DatabaseFontName DatabaseFontSize DatabaseFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword DatabaseStereotypeFontColor DatabaseStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword DatabaseStereotypeFontSize DatabaseStereotypeFontStyle DefaultFontColor
|
||||
syntax keyword plantumlSkinparamKeyword DefaultFontName DefaultFontSize DefaultFontStyle DefaultMonospacedFontName
|
||||
syntax keyword plantumlSkinparamKeyword DefaultTextAlignment DesignedBackgroundColor DesignedBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword DesignedDomainBorderThickness DesignedDomainFontColor DesignedDomainFontName
|
||||
syntax keyword plantumlSkinparamKeyword DesignedDomainFontSize DesignedDomainFontStyle DesignedDomainStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword DesignedDomainStereotypeFontName DesignedDomainStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword DesignedDomainStereotypeFontStyle DiagramBorderColor DiagramBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword DomainBackgroundColor DomainBorderColor DomainBorderThickness DomainFontColor
|
||||
syntax keyword plantumlSkinparamKeyword DomainFontName DomainFontSize DomainFontStyle DomainStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword DomainStereotypeFontName DomainStereotypeFontSize DomainStereotypeFontStyle Dpi
|
||||
syntax keyword plantumlSkinparamKeyword EntityBackgroundColor EntityBorderColor EntityFontColor EntityFontName
|
||||
syntax keyword plantumlSkinparamKeyword EntityFontSize EntityFontStyle EntityStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword EntityStereotypeFontName EntityStereotypeFontSize EntityStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword EnumBackgroundColor FileBackgroundColor FileBorderColor FileFontColor
|
||||
syntax keyword plantumlSkinparamKeyword FileFontName FileFontSize FileFontStyle FileStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword FileStereotypeFontName FileStereotypeFontSize FileStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword FolderBackgroundColor FolderBorderColor FolderFontColor FolderFontName
|
||||
syntax keyword plantumlSkinparamKeyword FolderFontSize FolderFontStyle FolderStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword FolderStereotypeFontName FolderStereotypeFontSize FolderStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword FooterFontColor FooterFontName FooterFontSize FooterFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword FrameBackgroundColor FrameBorderColor FrameFontColor FrameFontName FrameFontSize
|
||||
syntax keyword plantumlSkinparamKeyword FrameFontStyle FrameStereotypeFontColor FrameStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword FrameStereotypeFontSize FrameStereotypeFontStyle Guillemet Handwritten
|
||||
syntax keyword plantumlSkinparamKeyword HeaderFontColor HeaderFontName HeaderFontSize HeaderFontStyle HyperlinkColor
|
||||
syntax keyword plantumlSkinparamKeyword HyperlinkUnderline IconIEMandatoryColor IconPackageBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword IconPackageColor IconPrivateBackgroundColor IconPrivateColor
|
||||
syntax keyword plantumlSkinparamKeyword IconProtectedBackgroundColor IconProtectedColor IconPublicBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword IconPublicColor InterfaceBackgroundColor InterfaceBorderColor InterfaceFontColor
|
||||
syntax keyword plantumlSkinparamKeyword FixCircleLabelOverlapping FolderBackgroundColor FolderBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword FolderFontColor FolderFontName FolderFontSize FolderFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword FolderStereotypeFontColor FolderStereotypeFontName FolderStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword FolderStereotypeFontStyle FooterFontColor FooterFontName FooterFontSize
|
||||
syntax keyword plantumlSkinparamKeyword FooterFontStyle FrameBackgroundColor FrameBorderColor FrameFontColor
|
||||
syntax keyword plantumlSkinparamKeyword FrameFontName FrameFontSize FrameFontStyle FrameStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword FrameStereotypeFontName FrameStereotypeFontSize FrameStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword GenericDisplay Guillemet Handwritten HeaderFontColor HeaderFontName
|
||||
syntax keyword plantumlSkinparamKeyword HeaderFontSize HeaderFontStyle HyperlinkColor HyperlinkUnderline
|
||||
syntax keyword plantumlSkinparamKeyword IconIEMandatoryColor IconPackageBackgroundColor IconPackageColor
|
||||
syntax keyword plantumlSkinparamKeyword IconPrivateBackgroundColor IconPrivateColor IconProtectedBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword IconProtectedColor IconPublicBackgroundColor IconPublicColor
|
||||
syntax keyword plantumlSkinparamKeyword InterfaceBackgroundColor InterfaceBorderColor InterfaceFontColor
|
||||
syntax keyword plantumlSkinparamKeyword InterfaceFontName InterfaceFontSize InterfaceFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword InterfaceStereotypeFontColor InterfaceStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword InterfaceStereotypeFontSize InterfaceStereotypeFontStyle LegendBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword LegendBorderColor LegendBorderThickness LegendFontColor LegendFontName
|
||||
syntax keyword plantumlSkinparamKeyword LegendFontSize LegendFontStyle Linetype MaxAsciiMessageLength MaxMessageSize
|
||||
syntax keyword plantumlSkinparamKeyword MinClassWidth Monochrome NodeBackgroundColor NodeBorderColor NodeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword NodeFontName NodeFontSize NodeFontStyle NodeStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword LegendFontSize LegendFontStyle LexicalBackgroundColor LexicalBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword LifelineStrategy Linetype MachineBackgroundColor MachineBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword MachineBorderThickness MachineFontColor MachineFontName MachineFontSize
|
||||
syntax keyword plantumlSkinparamKeyword MachineFontStyle MachineStereotypeFontColor MachineStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword MachineStereotypeFontSize MachineStereotypeFontStyle MaxAsciiMessageLength
|
||||
syntax keyword plantumlSkinparamKeyword MaxMessageSize MinClassWidth Monochrome NodeBackgroundColor NodeBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword NodeFontColor NodeFontName NodeFontSize NodeFontStyle NodeStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword NodeStereotypeFontName NodeStereotypeFontSize NodeStereotypeFontStyle Nodesep
|
||||
syntax keyword plantumlSkinparamKeyword NoteBackgroundColor NoteBorderColor NoteBorderThickness NoteFontColor
|
||||
syntax keyword plantumlSkinparamKeyword NoteFontName NoteFontSize NoteFontStyle NoteShadowing ObjectAttributeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ObjectAttributeFontName ObjectAttributeFontSize ObjectAttributeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword ObjectBackgroundColor ObjectBorderColor ObjectBorderThickness ObjectFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ObjectFontName ObjectFontSize ObjectFontStyle ObjectStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ObjectStereotypeFontName ObjectStereotypeFontSize ObjectStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword PackageBackgroundColor PackageBorderColor PackageBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword PackageFontColor PackageFontName PackageFontSize PackageFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword PackageStereotypeFontColor PackageStereotypeFontName PackageStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword PackageStereotypeFontStyle PackageStyle Padding ParticipantBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantBorderColor ParticipantFontColor ParticipantFontName
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantFontSize ParticipantFontStyle PartitionBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword PartitionBorderColor PartitionBorderThickness PartitionFontColor
|
||||
syntax keyword plantumlSkinparamKeyword PartitionFontName PartitionFontSize PartitionFontStyle QueueBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword QueueBorderColor QueueFontColor QueueFontName QueueFontSize QueueFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword NoteFontName NoteFontSize NoteFontStyle NoteShadowing NoteTextAlignment
|
||||
syntax keyword plantumlSkinparamKeyword ObjectAttributeFontColor ObjectAttributeFontName ObjectAttributeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ObjectAttributeFontStyle ObjectBackgroundColor ObjectBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ObjectBorderThickness ObjectFontColor ObjectFontName ObjectFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ObjectFontStyle ObjectStereotypeFontColor ObjectStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword ObjectStereotypeFontSize ObjectStereotypeFontStyle PackageBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword PackageBorderColor PackageBorderThickness PackageFontColor PackageFontName
|
||||
syntax keyword plantumlSkinparamKeyword PackageFontSize PackageFontStyle PackageStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword PackageStereotypeFontName PackageStereotypeFontSize PackageStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword PackageStyle PackageTitleAlignment Padding PageBorderColor PageExternalColor
|
||||
syntax keyword plantumlSkinparamKeyword PageMargin ParticipantBackgroundColor ParticipantBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantFontColor ParticipantFontName ParticipantFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantFontStyle ParticipantPadding ParticipantStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantStereotypeFontName ParticipantStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantStereotypeFontStyle PartitionBackgroundColor PartitionBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword PartitionBorderThickness PartitionFontColor PartitionFontName PartitionFontSize
|
||||
syntax keyword plantumlSkinparamKeyword PartitionFontStyle PathHoverColor QueueBackgroundColor QueueBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword QueueFontColor QueueFontName QueueFontSize QueueFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword QueueStereotypeFontColor QueueStereotypeFontName QueueStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword QueueStereotypeFontStyle Ranksep RectangleBackgroundColor RectangleBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword RectangleBorderThickness RectangleFontColor RectangleFontName RectangleFontSize
|
||||
syntax keyword plantumlSkinparamKeyword RectangleFontStyle RectangleStereotypeFontColor RectangleStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword RectangleStereotypeFontSize RectangleStereotypeFontStyle RoundCorner
|
||||
syntax keyword plantumlSkinparamKeyword RectangleStereotypeFontSize RectangleStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword RequirementBackgroundColor RequirementBorderColor RequirementBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword RequirementFontColor RequirementFontName RequirementFontSize
|
||||
syntax keyword plantumlSkinparamKeyword RequirementFontStyle RequirementStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword RequirementStereotypeFontName RequirementStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword RequirementStereotypeFontStyle ResponseMessageBelowArrow RoundCorner
|
||||
syntax keyword plantumlSkinparamKeyword SameClassWidth SequenceActorBorderThickness SequenceArrowThickness
|
||||
syntax keyword plantumlSkinparamKeyword SequenceBoxBackgroundColor SequenceBoxBorderColor SequenceBoxFontColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceBoxFontName SequenceBoxFontSize SequenceBoxFontStyle
|
||||
@@ -228,35 +291,41 @@ syntax keyword plantumlSkinparamKeyword SequenceGroupFontSize SequenceGroupFontS
|
||||
syntax keyword plantumlSkinparamKeyword SequenceGroupHeaderFontName SequenceGroupHeaderFontSize
|
||||
syntax keyword plantumlSkinparamKeyword SequenceGroupHeaderFontStyle SequenceLifeLineBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceLifeLineBorderColor SequenceLifeLineBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword SequenceMessageAlignment SequenceMessageTextAlignment
|
||||
syntax keyword plantumlSkinparamKeyword SequenceNewpageSeparatorColor SequenceParticipant
|
||||
syntax keyword plantumlSkinparamKeyword SequenceParticipantBorderThickness SequenceReferenceBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceReferenceBorderColor SequenceReferenceBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword SequenceReferenceFontColor SequenceReferenceFontName SequenceReferenceFontSize
|
||||
syntax keyword plantumlSkinparamKeyword SequenceReferenceFontStyle SequenceReferenceHeaderBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceStereotypeFontColor SequenceStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword SequenceStereotypeFontSize SequenceStereotypeFontStyle SequenceTitleFontColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceTitleFontName SequenceTitleFontSize SequenceTitleFontStyle Shadowing
|
||||
syntax keyword plantumlSkinparamKeyword StackBackgroundColor StackBorderColor StackFontColor StackFontName StackFontSize
|
||||
syntax keyword plantumlSkinparamKeyword StackFontStyle StackStereotypeFontColor StackStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword StackStereotypeFontSize StackStereotypeFontStyle StateAttributeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword StateAttributeFontName StateAttributeFontSize StateAttributeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword StateBackgroundColor StateBorderColor StateEndColor StateFontColor StateFontName
|
||||
syntax keyword plantumlSkinparamKeyword StateFontSize StateFontStyle StateStartColor StereotypeABackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword StereotypeCBackgroundColor StereotypeEBackgroundColor StereotypeIBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword StereotypeNBackgroundColor StereotypePosition StorageBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword StorageBorderColor StorageFontColor StorageFontName StorageFontSize
|
||||
syntax keyword plantumlSkinparamKeyword StorageFontStyle StorageStereotypeFontColor StorageStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword StorageStereotypeFontSize StorageStereotypeFontStyle Style SvglinkTarget
|
||||
syntax keyword plantumlSkinparamKeyword SwimlaneBorderColor SwimlaneBorderThickness SwimlaneTitleFontColor
|
||||
syntax keyword plantumlSkinparamKeyword SwimlaneTitleFontName SwimlaneTitleFontSize SwimlaneTitleFontStyle TabSize
|
||||
syntax keyword plantumlSkinparamKeyword TitleBackgroundColor TitleBorderColor TitleBorderRoundCorner
|
||||
syntax keyword plantumlSkinparamKeyword SequenceParticipantBorderThickness SequenceReferenceAlignment
|
||||
syntax keyword plantumlSkinparamKeyword SequenceReferenceBackgroundColor SequenceReferenceBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceReferenceBorderThickness SequenceReferenceFontColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceReferenceFontName SequenceReferenceFontSize SequenceReferenceFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword SequenceReferenceHeaderBackgroundColor SequenceStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword SequenceStereotypeFontName SequenceStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword SequenceStereotypeFontStyle SequenceTitleFontColor SequenceTitleFontName
|
||||
syntax keyword plantumlSkinparamKeyword SequenceTitleFontSize SequenceTitleFontStyle Shadowing StackBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword StackBorderColor StackFontColor StackFontName StackFontSize StackFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword StackStereotypeFontColor StackStereotypeFontName StackStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword StackStereotypeFontStyle StateAttributeFontColor StateAttributeFontName
|
||||
syntax keyword plantumlSkinparamKeyword StateAttributeFontSize StateAttributeFontStyle StateBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword StateBorderColor StateEndColor StateFontColor StateFontName StateFontSize
|
||||
syntax keyword plantumlSkinparamKeyword StateFontStyle StateMessageAlignment StateStartColor StereotypeABackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword StereotypeABorderColor StereotypeCBackgroundColor StereotypeCBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword StereotypeEBackgroundColor StereotypeEBorderColor StereotypeIBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword StereotypeIBorderColor StereotypeNBackgroundColor StereotypeNBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword StereotypePosition StorageBackgroundColor StorageBorderColor StorageFontColor
|
||||
syntax keyword plantumlSkinparamKeyword StorageFontName StorageFontSize StorageFontStyle StorageStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword StorageStereotypeFontName StorageStereotypeFontSize StorageStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword Style SvglinkTarget SwimlaneBorderColor SwimlaneBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword SwimlaneTitleBackgroundColor SwimlaneTitleFontColor SwimlaneTitleFontName
|
||||
syntax keyword plantumlSkinparamKeyword SwimlaneTitleFontSize SwimlaneTitleFontStyle SwimlaneWidth
|
||||
syntax keyword plantumlSkinparamKeyword SwimlaneWrapTitleWidth TabSize TimingFontColor TimingFontName TimingFontSize
|
||||
syntax keyword plantumlSkinparamKeyword TimingFontStyle TitleBackgroundColor TitleBorderColor TitleBorderRoundCorner
|
||||
syntax keyword plantumlSkinparamKeyword TitleBorderThickness TitleFontColor TitleFontName TitleFontSize TitleFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword UsecaseBackgroundColor UsecaseBorderColor UsecaseBorderThickness UsecaseFontColor
|
||||
syntax keyword plantumlSkinparamKeyword UsecaseFontName UsecaseFontSize UsecaseFontStyle UsecaseStereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword UsecaseStereotypeFontName UsecaseStereotypeFontSize UsecaseStereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword UsecaseBackgroundColor UsecaseBorderColor UsecaseBorderThickness
|
||||
syntax keyword plantumlSkinparamKeyword UsecaseFontColor UsecaseFontName UsecaseFontSize UsecaseFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword UsecaseStereotypeFontColor UsecaseStereotypeFontName UsecaseStereotypeFontSize
|
||||
syntax keyword plantumlSkinparamKeyword UsecaseStereotypeFontStyle WrapWidth
|
||||
" Not in 'java - jar plantuml.jar - language' output
|
||||
syntax keyword plantumlSkinparamKeyword activityArrowColor activityArrowFontColor activityArrowFontName
|
||||
syntax keyword plantumlSkinparamKeyword activityArrowFontSize activityArrowFontStyle BarColor BorderColor BoxPadding
|
||||
syntax keyword plantumlSkinparamKeyword activityArrowFontSize activityArrowFontStyle BarColor BorderColor
|
||||
syntax keyword plantumlSkinparamKeyword CharacterFontColor CharacterFontName CharacterFontSize CharacterFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword CharacterRadius classArrowColor classArrowFontColor classArrowFontName
|
||||
syntax keyword plantumlSkinparamKeyword classArrowFontSize classArrowFontStyle Color componentArrowColor
|
||||
@@ -267,7 +336,7 @@ syntax keyword plantumlSkinparamKeyword DividerFontName DividerFontSize DividerF
|
||||
syntax keyword plantumlSkinparamKeyword FontSize FontStyle GroupBackgroundColor GroupingFontColor GroupingFontName
|
||||
syntax keyword plantumlSkinparamKeyword GroupingFontSize GroupingFontStyle GroupingHeaderFontColor
|
||||
syntax keyword plantumlSkinparamKeyword GroupingHeaderFontName GroupingHeaderFontSize GroupingHeaderFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword LifeLineBackgroundColor LifeLineBorderColor ParticipantPadding
|
||||
syntax keyword plantumlSkinparamKeyword LifeLineBackgroundColor LifeLineBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword sequenceActorBackgroundColor sequenceActorBorderColor sequenceActorFontColor
|
||||
syntax keyword plantumlSkinparamKeyword sequenceActorFontName sequenceActorFontSize sequenceActorFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword sequenceArrowColor sequenceArrowFontColor sequenceArrowFontName
|
||||
@@ -312,6 +381,7 @@ highlight default link plantumlClassPackPrivate Function
|
||||
highlight default link plantumlClassSeparator Comment
|
||||
highlight default link plantumlSequenceDivider Comment
|
||||
highlight default link plantumlSequenceSpace Comment
|
||||
highlight default link plantumlTag Identifier
|
||||
highlight default link plantumlSequenceDelay Identifier
|
||||
highlight default link plantumlSpecialString Special
|
||||
highlight default link plantumlString String
|
||||
|
||||
@@ -2,439 +2,173 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Language: Puppet
|
||||
" Maintainer: Voxpupuli
|
||||
" URL: https://github.com/voxpupuli/vim-puppet
|
||||
" puppet syntax file
|
||||
" Filename: puppet.vim
|
||||
" Language: puppet configuration file
|
||||
" Maintainer: Luke Kanies <luke@madstop.com>
|
||||
" URL:
|
||||
" Last Change:
|
||||
" Version:
|
||||
"
|
||||
" Thanks to Doug Kearns who maintains the vim syntax file for Ruby. Many constructs, including interpolation
|
||||
" and heredoc was copied from ruby and then modified to comply with Puppet syntax.
|
||||
|
||||
" Prelude {{{1
|
||||
if exists("b:current_syntax")
|
||||
" Copied from the cfengine, ruby, and perl syntax files
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" this file uses line continuations
|
||||
let s:cpo_sav = &cpo
|
||||
set cpo&vim
|
||||
" match class/definition/node declarations
|
||||
syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe,@NoSpell
|
||||
syn keyword puppetDefType class define node inherits contained
|
||||
syn region puppetDefArguments start="(" end=")" contained contains=puppetType,puppetArgument,puppetString,puppetComment,puppetMultilineComment
|
||||
syn match puppetArgument "\w\+" contained
|
||||
syn match puppetArgument "\$\w\+" contained
|
||||
syn match puppetArgument "'[^']+'" contained
|
||||
syn match puppetArgument '"[^"]+"' contained
|
||||
syn keyword puppetType Any Array Boolean Callable Catalogentry Collection Data Default Enum Float Hash Integer Numeric Optional Pattern Regexp Scalar Sensitive String Struct Tuple Type Undef Variant
|
||||
syn match puppetDefName "\w\+" contained
|
||||
syn match puppetNodeRe "/.*/" contained
|
||||
|
||||
syn cluster puppetNotTop contains=@puppetExtendedStringSpecial,@puppetRegexpSpecial,@puppetDeclaration,puppetConditional,puppetExceptional,puppetMethodExceptional,puppetTodo
|
||||
" match 'foo' in 'class foo { ...'
|
||||
" match 'foo::bar' in 'class foo::bar { ...'
|
||||
" match 'Foo::Bar' in 'Foo::Bar["..."]
|
||||
"FIXME: "Foo-bar" doesn't get highlighted as expected, although "foo-bar" does.
|
||||
syn match puppetInstance "[A-Za-z0-9_-]\+\(::[A-Za-z0-9_-]\+\)*\s*{" contains=puppetTypeName,puppetTypeDefault,@NoSpell
|
||||
syn match puppetInstance "[A-Z][a-z_-]\+\(::[A-Z][a-z_-]\+\)*\s*[[{]" contains=puppetTypeName,puppetTypeDefault,@NoSpell
|
||||
syn match puppetInstance "[A-Z][a-z_-]\+\(::[A-Z][a-z_-]\+\)*\s*<\?<|" contains=puppetTypeName,puppetTypeDefault,@NoSpell
|
||||
syn match puppetTypeName "[a-z]\w*" contained
|
||||
syn match puppetTypeDefault "[A-Z]\w*" contained
|
||||
|
||||
syn match puppetSpaceError display excludenl "\s\+$"
|
||||
syn match puppetSpaceError display " \+\t"me=e-1
|
||||
syn match puppetParam "\(\w\+\|\*\)\s*\(=\|+\)>" contains=puppetTypeRArrow,puppetParamName
|
||||
syn match puppetParamRArrow "\(=\|+\)>" contained
|
||||
syn match puppetParamName "\(\w\+\|\*\)" contained contains=@NoSpell
|
||||
syn match puppetVariable "$\(\(\(::\)\?\w\+\)\+\|{\(\(::\)\?\w\+\)\+}\)"
|
||||
syn match puppetParen "("
|
||||
syn match puppetParen ")"
|
||||
syn match puppetBrace "{"
|
||||
syn match puppetBrace "}"
|
||||
syn match puppetBrack "\["
|
||||
syn match puppetBrack "\]"
|
||||
syn match puppetBrack "<|"
|
||||
syn match puppetBrack "|>"
|
||||
|
||||
" one character operators
|
||||
syn match puppetOperator "[=><+/*%!.|@:,;?~-]"
|
||||
" match 'present' in 'ensure => present'
|
||||
" match '2755' in 'mode => 2755'
|
||||
" don't match 'bar' in 'foo => bar'
|
||||
syn match puppetParam "\w\+\s*[=+]>\s*[a-z0-9]\+" contains=puppetParamString,puppetParamName
|
||||
syn match puppetParamString "[=+]>\s*\w\+" contains=puppetParamKeyword,puppetParamSpecial,puppetParamDigits contained
|
||||
syn keyword puppetParamKeyword present absent purged latest installed running stopped mounted unmounted role configured file directory link on_failure contained
|
||||
syn keyword puppetParamSpecial true false undef contained
|
||||
syn match puppetParamDigits "[0-9]\+"
|
||||
|
||||
" two character operators
|
||||
syn match puppetOperator "+=\|-=\|==\|!=\|=\~\|!\~\|>=\|<=\|<-\|<\~\|=>\|+>\|->\|\~>\|<<\||>\|@@"
|
||||
" match 'template' in 'content => template("...")'
|
||||
syn match puppetParam "\w\+\s*[=+]>\s*\w\+\s*(" contains=puppetFunction,puppetParamName
|
||||
" statements
|
||||
syn region puppetFunction start="^\s*\(alert\|crit\|debug\|emerg\|err\|fail\|include\|info\|notice\|realize\|require\|search\|tag\|warning\)\s*(" end=")" contained contains=puppetString
|
||||
" rvalues
|
||||
syn region puppetFunction start="^\s*\(defined\|file\|fqdn_rand\|generate\|inline_template\|regsubst\|sha1\|shellquote\|split\|sprintf\|tagged\|template\|versioncmp\)\s*(" end=")" contained contains=puppetString
|
||||
|
||||
" three character operators
|
||||
syn match puppetOperator "<<|\||>>"
|
||||
syn match puppetVariable "$[a-zA-Z0-9_:]\+" contains=@NoSpell
|
||||
syn match puppetVariable "${[a-zA-Z0-9_:'\[\]]\+}" contains=@NoSpell
|
||||
|
||||
syn region puppetBracketOperator matchgroup=puppetDelimiter start="\[\s*" end="\s*]" contains=ALLBUT,@puppetNotTop
|
||||
syn region puppetBraceOperator matchgroup=puppetDelimiter start="{\s*" end="\s*}" contains=ALLBUT,@puppetNotTop
|
||||
syn region puppetParenOperator matchgroup=puppetDelimiter start="(\s*" end="\s*)" contains=ALLBUT,@puppetNotTop
|
||||
" match anything between simple/double quotes.
|
||||
" don't match variables if preceded by a backslash.
|
||||
syn region puppetString start=+'+ skip=+\\\\\|\\'+ end=+'+
|
||||
syn region puppetString start=+@(\z\([^/)]*\)\(/[\\nts$uL]*\)\?)$+ end=+|-\? *\z1 *$+
|
||||
syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable,puppetNotVariable
|
||||
syn region puppetString start=+@("\z\([^/)]*\)"\(/[\\nts$uL]*\)\?)$+ end=+|-\? *\z1 *$+ contains=puppetVariable,puppetNotVariable
|
||||
syn match puppetNotVariable "\\$\w\+" contained
|
||||
syn match puppetNotVariable "\\${\w\+}" contained
|
||||
|
||||
" Expression Substitution and Backslash Notation {{{1
|
||||
syn match puppetStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
|
||||
syn match puppetStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
|
||||
syn match puppetQuoteEscape "\\[\\']" contained display
|
||||
" match keywords and control words except when used as a parameter
|
||||
syn match puppetKeyword "\(\<import\>\|\<inherits\>\|\<include\>\|\<require\>\|\<contain\>\)\(\s*=>\)\@!"
|
||||
syn match puppetControl "\(\<case\>\|\<default\>\|\<unless\>\|\<if\>\|\<else\>\|\<elsif\>\)\(\s*=>\)\@!"
|
||||
syn keyword puppetSpecial true false undef
|
||||
|
||||
syn region puppetInterpolation matchgroup=puppetInterpolationDelimiter start="${" end="}" contained contains=ALLBUT,@puppetNotTop
|
||||
syn match puppetInterpolation "$\w\+" display contained contains=puppetInterpolationDelimiter,puppetVariable
|
||||
syn match puppetInterpolationDelimiter "$\ze\$\w\+" display contained
|
||||
syn match puppetInterpolation "$\$\%(-\w\|\W\)" display contained contains=puppetInterpolationDelimiter,puppetVariable,puppetInvalidVariable
|
||||
syn match puppetInterpolationDelimiter "$\ze\$\%(-\w\|\W\)" display contained
|
||||
syn region puppetNoInterpolation start="\\${" end="}" contained
|
||||
syn match puppetNoInterpolation "\\${" display contained
|
||||
syn match puppetNoInterpolation "\\$\w\+" display contained
|
||||
syn match puppetClass "[A-Za-z0-9_-]\+\(::[A-Za-z0-9_-]\+\)\+" contains=@NoSpell
|
||||
|
||||
syn match puppetDelimiterEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE
|
||||
|
||||
syn region puppetNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=puppetString end=")" transparent contained
|
||||
syn region puppetNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=puppetString end="}" transparent contained
|
||||
syn region puppetNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=puppetString end=">" transparent contained
|
||||
syn region puppetNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=puppetString end="\]" transparent contained
|
||||
|
||||
" Regular Expression Metacharacters {{{1
|
||||
" These are mostly Oniguruma ready
|
||||
syn region puppetRegexpComment matchgroup=puppetRegexpSpecial start="(?#" skip="\\)" end=")" contained
|
||||
syn region puppetRegexpParens matchgroup=puppetRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@puppetRegexpSpecial
|
||||
syn region puppetRegexpBrackets matchgroup=puppetRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=puppetStringEscape,puppetRegexpEscape,puppetRegexpCharClass oneline
|
||||
syn match puppetRegexpCharClass "\\[DdHhSsWw]" contained display
|
||||
syn match puppetRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained
|
||||
syn match puppetRegexpEscape "\\[].*?+^$|\\/(){}[]" contained
|
||||
syn match puppetRegexpQuantifier "[*?+][?+]\=" contained display
|
||||
syn match puppetRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
|
||||
syn match puppetRegexpAnchor "[$^]\|\\[ABbGZz]" contained display
|
||||
syn match puppetRegexpDot "\." contained display
|
||||
syn match puppetRegexpSpecial "|" contained display
|
||||
syn match puppetRegexpSpecial "\\[1-9]\d\=\d\@!" contained display
|
||||
syn match puppetRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display
|
||||
syn match puppetRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display
|
||||
syn match puppetRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display
|
||||
syn match puppetRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display
|
||||
|
||||
syn cluster puppetStringSpecial contains=puppetInterpolation,puppetNoInterpolation,puppetStringEscape
|
||||
syn cluster puppetExtendedStringSpecial contains=@puppetStringSpecial,puppetNestedParentheses,puppetNestedCurlyBraces,puppetNestedAngleBrackets,puppetNestedSquareBrackets
|
||||
syn cluster puppetRegexpSpecial contains=puppetRegexpSpecial,puppetRegexpEscape,puppetRegexpBrackets,puppetRegexpCharClass,puppetRegexpDot,puppetRegexpQuantifier,puppetRegexpAnchor,puppetRegexpParens,puppetRegexpComment
|
||||
|
||||
syn match puppetInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display
|
||||
syn match puppetInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display
|
||||
syn match puppetInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display
|
||||
syn match puppetInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display
|
||||
syn match puppetFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display
|
||||
syn match puppetFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)r\=i\=\>" display
|
||||
|
||||
syn match puppetVariable "$\%(::\)\=\w\+\%(::\w\+\)*" display
|
||||
syn match puppetName "\%(::\)\=[a-z]\w*\%(::[a-z]\w*\)*" display
|
||||
syn match puppetType "\%(::\)\=[A-Z]\w*\%(::[A-Z]\w*\)*" display
|
||||
syn match puppetWord "\%(\%(::\)\=\%(_[\w-]*\w\+\)\|\%([a-z]\%(\w*-\)\+\w\+\)\)\+" display
|
||||
|
||||
" bad name containing combinations of segment starting with lower case and segement starting with upper case (or vice versa)
|
||||
syn match puppetNameBad "\%(::\)\=\%(\w\+::\)*\%(\%([a-z]\w*::[A-Z]\w*\)\|\%([A-Z]\w*::[a-z]\w*\)\)\%(::\w\+\)*" display
|
||||
syn cluster puppetNameOrType contains=puppetVariable,puppetName,puppetType,puppetWord,puppetNameBad
|
||||
|
||||
syn keyword puppetControl case and or in
|
||||
syn keyword puppetKeyword class define inherits node undef function type attr private
|
||||
syn keyword puppetKeyword application consumes produces site
|
||||
syn keyword puppetKeyword present absent purged latest installed running stopped mounted unmounted role configured file directory link on_failure contained
|
||||
syn keyword puppetConstant default undef
|
||||
syn keyword puppetConditional if else elsif unless
|
||||
syn keyword puppetBoolean true false
|
||||
|
||||
" Core functions
|
||||
syn match puppetFunction "\<alert\>"
|
||||
syn match puppetFunction "\<assert_type\>"
|
||||
syn match puppetFunction "\<binary_file\>"
|
||||
syn match puppetFunction "\<break\>"
|
||||
syn match puppetFunction "\<contain\>"
|
||||
syn match puppetFunction "\<crit\>"
|
||||
syn match puppetFunction "\<create_resources\>"
|
||||
syn match puppetFunction "\<debug\>"
|
||||
syn match puppetFunction "\<defined\>"
|
||||
syn match puppetFunction "\<dig\>"
|
||||
syn match puppetFunction "\<each\>"
|
||||
syn match puppetFunction "\<emerg\>"
|
||||
syn match puppetFunction "\<epp\>"
|
||||
syn match puppetFunction "\<err\>"
|
||||
syn match puppetFunction "\<fail\>"
|
||||
syn match puppetFunction "\<file\>"
|
||||
syn match puppetFunction "\<filter\>"
|
||||
syn match puppetFunction "\<find_file\>"
|
||||
syn match puppetFunction "\<fqdn_rand\>"
|
||||
syn match puppetFunction "\<hiera\>"
|
||||
syn match puppetFunction "\<hiera_array\>"
|
||||
syn match puppetFunction "\<hiera_hash\>"
|
||||
syn match puppetFunction "\<hiera_include\>"
|
||||
syn match puppetFunction "\<import\>"
|
||||
syn match puppetFunction "\<include\>"
|
||||
syn match puppetFunction "\<info\>"
|
||||
syn match puppetFunction "\<inline_epp\>"
|
||||
syn match puppetFunction "\<lest\>"
|
||||
syn match puppetFunction "\<lookup\>"
|
||||
syn match puppetFunction "\<map\>"
|
||||
syn match puppetFunction "\<match\>"
|
||||
syn match puppetFunction "\<new\>"
|
||||
syn match puppetFunction "\<next\>"
|
||||
syn match puppetFunction "\<notice\>"
|
||||
syn match puppetFunction "\<realize\>"
|
||||
syn match puppetFunction "\<reduce\>"
|
||||
syn match puppetFunction "\<regsubst\>"
|
||||
syn match puppetFunction "\<require\>"
|
||||
syn match puppetFunction "\<return\>"
|
||||
syn match puppetFunction "\<reverse_each\>"
|
||||
syn match puppetFunction "\<scanf\>"
|
||||
syn match puppetFunction "\<sha1\>"
|
||||
syn match puppetFunction "\<shellquote\>"
|
||||
syn match puppetFunction "\<slice\>"
|
||||
syn match puppetFunction "\<split\>"
|
||||
syn match puppetFunction "\<sprintf\>"
|
||||
syn match puppetFunction "\<step\>"
|
||||
syn match puppetFunction "\<strftime\>"
|
||||
syn match puppetFunction "\<tag\>"
|
||||
syn match puppetFunction "\<tagged\>"
|
||||
syn match puppetFunction "\<template\>"
|
||||
syn match puppetFunction "\<then\>"
|
||||
syn match puppetFunction "\<type\>"
|
||||
syn match puppetFunction "\<unwrap\>"
|
||||
syn match puppetFunction "\<versioncmp\>"
|
||||
syn match puppetFunction "\<warning\>"
|
||||
syn match puppetFunction "\<with\>"
|
||||
|
||||
" Stdlib functions
|
||||
syn match puppetStdLibFunction "\<abs\>"
|
||||
syn match puppetStdLibFunction "\<any2array\>"
|
||||
syn match puppetStdLibFunction "\<any2bool\>"
|
||||
syn match puppetStdLibFunction "\<assert_private\>"
|
||||
syn match puppetStdLibFunction "\<base64\>"
|
||||
syn match puppetStdLibFunction "\<basename\>"
|
||||
syn match puppetStdLibFunction "\<bool2num\>"
|
||||
syn match puppetStdLibFunction "\<bool2str\>"
|
||||
syn match puppetStdLibFunction "\<camelcase\>"
|
||||
syn match puppetStdLibFunction "\<capitalize\>"
|
||||
syn match puppetStdLibFunction "\<ceiling\>"
|
||||
syn match puppetStdLibFunction "\<chomp\>"
|
||||
syn match puppetStdLibFunction "\<chop\>"
|
||||
syn match puppetStdLibFunction "\<clamp\>"
|
||||
syn match puppetStdLibFunction "\<concat\>"
|
||||
syn match puppetStdLibFunction "\<convert_base\>"
|
||||
syn match puppetStdLibFunction "\<count\>"
|
||||
syn match puppetStdLibFunction "\<deep_merge\>"
|
||||
syn match puppetStdLibFunction "\<defined_with_params\>"
|
||||
syn match puppetStdLibFunction "\<delete\>"
|
||||
syn match puppetStdLibFunction "\<delete_at\>"
|
||||
syn match puppetStdLibFunction "\<delete_regex\>"
|
||||
syn match puppetStdLibFunction "\<delete_undef_values\>"
|
||||
syn match puppetStdLibFunction "\<delete_values\>"
|
||||
syn match puppetStdLibFunction "\<deprecation\>"
|
||||
syn match puppetStdLibFunction "\<difference\>"
|
||||
syn match puppetStdLibFunction "\<dig\>"
|
||||
syn match puppetStdLibFunction "\<dig44\>"
|
||||
syn match puppetStdLibFunction "\<dirname\>"
|
||||
syn match puppetStdLibFunction "\<dos2unix\>"
|
||||
syn match puppetStdLibFunction "\<downcase\>"
|
||||
syn match puppetStdLibFunction "\<empty\>"
|
||||
syn match puppetStdLibFunction "\<enclose_ipv6\>"
|
||||
syn match puppetStdLibFunction "\<ensure_packages\>"
|
||||
syn match puppetStdLibFunction "\<ensure_resource\>"
|
||||
syn match puppetStdLibFunction "\<ensure_resources\>"
|
||||
syn match puppetStdLibFunction "\<flatten\>"
|
||||
syn match puppetStdLibFunction "\<floor\>"
|
||||
syn match puppetStdLibFunction "\<fqdn_rand_string\>"
|
||||
syn match puppetStdLibFunction "\<fqdn_rotate\>"
|
||||
syn match puppetStdLibFunction "\<get_module_path\>"
|
||||
syn match puppetStdLibFunction "\<getparam\>"
|
||||
syn match puppetStdLibFunction "\<getvar\>"
|
||||
syn match puppetStdLibFunction "\<grep\>"
|
||||
syn match puppetStdLibFunction "\<has_interface_with\>"
|
||||
syn match puppetStdLibFunction "\<has_ip_address\>"
|
||||
syn match puppetStdLibFunction "\<has_ip_network\>"
|
||||
syn match puppetStdLibFunction "\<has_key\>"
|
||||
syn match puppetStdLibFunction "\<hash\>"
|
||||
syn match puppetStdLibFunction "\<intersection\>"
|
||||
syn match puppetStdLibFunction "\<is_absolute_path\>"
|
||||
syn match puppetStdLibFunction "\<is_array\>"
|
||||
syn match puppetStdLibFunction "\<is_bool\>"
|
||||
syn match puppetStdLibFunction "\<is_domain_name\>"
|
||||
syn match puppetStdLibFunction "\<is_email_address\>"
|
||||
syn match puppetStdLibFunction "\<is_float\>"
|
||||
syn match puppetStdLibFunction "\<is_function_available\>"
|
||||
syn match puppetStdLibFunction "\<is_hash\>"
|
||||
syn match puppetStdLibFunction "\<is_integer\>"
|
||||
syn match puppetStdLibFunction "\<is_ip_address\>"
|
||||
syn match puppetStdLibFunction "\<is_ipv4_address\>"
|
||||
syn match puppetStdLibFunction "\<is_ipv6_address\>"
|
||||
syn match puppetStdLibFunction "\<is_mac_address\>"
|
||||
syn match puppetStdLibFunction "\<is_numeric\>"
|
||||
syn match puppetStdLibFunction "\<is_string\>"
|
||||
syn match puppetStdLibFunction "\<join\>"
|
||||
syn match puppetStdLibFunction "\<join_keys_to_values\>"
|
||||
syn match puppetStdLibFunction "\<keys\>"
|
||||
syn match puppetStdLibFunction "\<load_module_metadata\>"
|
||||
syn match puppetStdLibFunction "\<loadjson\>"
|
||||
syn match puppetStdLibFunction "\<loadyaml\>"
|
||||
syn match puppetStdLibFunction "\<lstrip\>"
|
||||
syn match puppetStdLibFunction "\<max\>"
|
||||
syn match puppetStdLibFunction "\<member\>"
|
||||
syn match puppetStdLibFunction "\<merge\>"
|
||||
syn match puppetStdLibFunction "\<min\>"
|
||||
syn match puppetStdLibFunction "\<num2bool\>"
|
||||
syn match puppetStdLibFunction "\<parsejson\>"
|
||||
syn match puppetStdLibFunction "\<parseyaml\>"
|
||||
syn match puppetStdLibFunction "\<pick\>"
|
||||
syn match puppetStdLibFunction "\<pick_default\>"
|
||||
syn match puppetStdLibFunction "\<prefix\>"
|
||||
syn match puppetStdLibFunction "\<private\>"
|
||||
syn match puppetStdLibFunction "\<pw_hash\>"
|
||||
syn match puppetStdLibFunction "\<range\>"
|
||||
syn match puppetStdLibFunction "\<regexpescape\>"
|
||||
syn match puppetStdLibFunction "\<reject\>"
|
||||
syn match puppetStdLibFunction "\<reverse\>"
|
||||
syn match puppetStdLibFunction "\<rstrip\>"
|
||||
syn match puppetStdLibFunction "\<seeded_rand\>"
|
||||
syn match puppetStdLibFunction "\<shell_escape\>"
|
||||
syn match puppetStdLibFunction "\<shell_join\>"
|
||||
syn match puppetStdLibFunction "\<shell_split\>"
|
||||
syn match puppetStdLibFunction "\<shuffle\>"
|
||||
syn match puppetStdLibFunction "\<size\>"
|
||||
syn match puppetStdLibFunction "\<sort\>"
|
||||
syn match puppetStdLibFunction "\<squeeze\>"
|
||||
syn match puppetStdLibFunction "\<str2bool\>"
|
||||
syn match puppetStdLibFunction "\<str2saltedsha512\>"
|
||||
syn match puppetStdLibFunction "\<strftime\>"
|
||||
syn match puppetStdLibFunction "\<strip\>"
|
||||
syn match puppetStdLibFunction "\<suffix\>"
|
||||
syn match puppetStdLibFunction "\<swapcase\>"
|
||||
syn match puppetStdLibFunction "\<time\>"
|
||||
syn match puppetStdLibFunction "\<to_bytes\>"
|
||||
syn match puppetStdLibFunction "\<try_get_value\>"
|
||||
syn match puppetStdLibFunction "\<type\>"
|
||||
syn match puppetStdLibFunction "\<type3x\>"
|
||||
syn match puppetStdLibFunction "\<union\>"
|
||||
syn match puppetStdLibFunction "\<unique\>"
|
||||
syn match puppetStdLibFunction "\<unix2dos\>"
|
||||
syn match puppetStdLibFunction "\<upcase\>"
|
||||
syn match puppetStdLibFunction "\<uriescape\>"
|
||||
syn match puppetStdLibFunction "\<validate_absolute_path\>"
|
||||
syn match puppetStdLibFunction "\<validate_array\>"
|
||||
syn match puppetStdLibFunction "\<validate_augeas\>"
|
||||
syn match puppetStdLibFunction "\<validate_bool\>"
|
||||
syn match puppetStdLibFunction "\<validate_cmd\>"
|
||||
syn match puppetStdLibFunction "\<validate_email_address\>"
|
||||
syn match puppetStdLibFunction "\<validate_hash\>"
|
||||
syn match puppetStdLibFunction "\<validate_integer\>"
|
||||
syn match puppetStdLibFunction "\<validate_ip_address\>"
|
||||
syn match puppetStdLibFunction "\<validate_ipv4_address\>"
|
||||
syn match puppetStdLibFunction "\<validate_ipv6_address\>"
|
||||
syn match puppetStdLibFunction "\<validate_numeric\>"
|
||||
syn match puppetStdLibFunction "\<validate_re\>"
|
||||
syn match puppetStdLibFunction "\<validate_slength\>"
|
||||
syn match puppetStdLibFunction "\<validate_string\>"
|
||||
syn match puppetStdLibFunction "\<validate_x509_rsa_key_pair\>"
|
||||
syn match puppetStdLibFunction "\<values\>"
|
||||
syn match puppetStdLibFunction "\<values_at\>"
|
||||
syn match puppetStdLibFunction "\<zip\>"
|
||||
|
||||
syn match puppetType "\<Any\>"
|
||||
syn match puppetType "\<Array\>"
|
||||
syn match puppetType "\<Binary\>"
|
||||
syn match puppetType "\<Boolean\>"
|
||||
syn match puppetType "\<Callable\>"
|
||||
syn match puppetType "\<CatalogEntry\>"
|
||||
syn match puppetType "\<Class\>"
|
||||
syn match puppetType "\<Collection\>"
|
||||
syn match puppetType "\<Data\>"
|
||||
syn match puppetType "\<Default\>"
|
||||
syn match puppetType "\<Enum\>"
|
||||
syn match puppetType "\<Float\>"
|
||||
syn match puppetType "\<Hash\>"
|
||||
syn match puppetType "\<Integer\>"
|
||||
syn match puppetType "\<Iterable\>"
|
||||
syn match puppetType "\<Iterator\>"
|
||||
syn match puppetType "\<NotUndef\>"
|
||||
syn match puppetType "\<Numeric\>"
|
||||
syn match puppetType "\<Object\>"
|
||||
syn match puppetType "\<Optional\>"
|
||||
syn match puppetType "\<Pattern\>"
|
||||
syn match puppetType "\<Regexp\>"
|
||||
syn match puppetType "\<Resource\>"
|
||||
syn match puppetType "\<Runtime\>"
|
||||
syn match puppetType "\<Scalar\>"
|
||||
syn match puppetType "\<ScalarData\>"
|
||||
syn match puppetType "\<SemVer\>"
|
||||
syn match puppetType "\<SemVerRange\>"
|
||||
syn match puppetType "\<Sensitive\>"
|
||||
syn match puppetType "\<String\>"
|
||||
syn match puppetType "\<Struct\>"
|
||||
syn match puppetType "\<TimeSpan\>"
|
||||
syn match puppetType "\<Timestamp\>"
|
||||
syn match puppetType "\<Tuple\>"
|
||||
syn match puppetType "\<Type\>"
|
||||
syn match puppetType "\<TypeAlias\>"
|
||||
syn match puppetType "\<TypeReference\>"
|
||||
syn match puppetType "\<TypeSet\>"
|
||||
syn match puppetType "\<Undef\>"
|
||||
syn match puppetType "\<Unit\>"
|
||||
syn match puppetType "\<Variant\>"
|
||||
|
||||
syn match puppetType "\<augeas\>"
|
||||
syn match puppetType "\<computer\>"
|
||||
syn match puppetType "\<cron\>"
|
||||
syn match puppetType "\<exec\>"
|
||||
syn match puppetType "\<file\>"
|
||||
syn match puppetType "\<filebucket\>"
|
||||
syn match puppetType "\<group\>"
|
||||
syn match puppetType "\<host\>"
|
||||
syn match puppetType "\<interface\>"
|
||||
syn match puppetType "\<k5login\>"
|
||||
syn match puppetType "\<macauthorization\>"
|
||||
syn match puppetType "\<mailalias\>"
|
||||
syn match puppetType "\<maillist\>"
|
||||
syn match puppetType "\<mcx\>"
|
||||
syn match puppetType "\<mount\>"
|
||||
syn match puppetType "\<nagios_command\>"
|
||||
syn match puppetType "\<nagios_contact\>"
|
||||
syn match puppetType "\<nagios_contactgroup\>"
|
||||
syn match puppetType "\<nagios_host\>"
|
||||
syn match puppetType "\<nagios_hostdependency\>"
|
||||
syn match puppetType "\<nagios_hostescalation\>"
|
||||
syn match puppetType "\<nagios_hostextinfo\>"
|
||||
syn match puppetType "\<nagios_hostgroup\>"
|
||||
syn match puppetType "\<nagios_service\>"
|
||||
syn match puppetType "\<nagios_servicedependency\>"
|
||||
syn match puppetType "\<nagios_serviceescalation\>"
|
||||
syn match puppetType "\<nagios_serviceextinfo\>"
|
||||
syn match puppetType "\<nagios_servicegroup\>"
|
||||
syn match puppetType "\<nagios_timeperiod\>"
|
||||
syn match puppetType "\<notify\>"
|
||||
syn match puppetType "\<package\>"
|
||||
syn match puppetType "\<resources\>"
|
||||
syn match puppetType "\<router\>"
|
||||
syn match puppetType "\<schedule\>"
|
||||
syn match puppetType "\<scheduled_task\>"
|
||||
syn match puppetType "\<selboolean\>"
|
||||
syn match puppetType "\<selmodule\>"
|
||||
syn match puppetType "\<service\>"
|
||||
syn match puppetType "\<ssh_authorized_key\>"
|
||||
syn match puppetType "\<sshkey\>"
|
||||
syn match puppetType "\<stage\>"
|
||||
syn match puppetType "\<tidy\>"
|
||||
syn match puppetType "\<user\>"
|
||||
syn match puppetType "\<vlan\>"
|
||||
syn match puppetType "\<whit\>"
|
||||
syn match puppetType "\<yumrepo\>"
|
||||
syn match puppetType "\<zfs\>"
|
||||
syn match puppetType "\<zone\>"
|
||||
syn match puppetType "\<zpool\>"
|
||||
|
||||
" Normal String {{{1
|
||||
syn region puppetString matchgroup=puppetStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@puppetStringSpecial
|
||||
syn region puppetString matchgroup=puppetStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=puppetQuoteEscape
|
||||
|
||||
" Normal Regular Expression {{{1
|
||||
syn region puppetRegexp matchgroup=puppetRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/" skip="\\\\\|\\/" contains=@puppetRegexpSpecial
|
||||
syn region puppetRegexp matchgroup=puppetRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/" skip="\\\\\|\\/" contains=@puppetRegexpSpecial
|
||||
|
||||
" Here Document {{{1
|
||||
syn region puppetHeredocStart matchgroup=puppetStringDelimiter start=+@(\s*\%("[^"]\+"\|\w\+\)\%(/[nrtsuL$\\]*\)\=)+ end=+$+ oneline contains=ALLBUT,@puppetNotTop
|
||||
|
||||
syn region puppetString start=+@(\s*"\z([^"]\+\)"\%(/[nrtsuL$\\]*\)\=+hs=s+2 matchgroup=puppetStringDelimiter end=+^\s*|\=\s*-\=\s*\zs\z1$+ contains=puppetHeredocStart,@puppetStringSpecial keepend
|
||||
syn region puppetString start=+@(\s*\z(\w\+\)\%(/[nrtsuL$\\]*\)\=+hs=s+2 matchgroup=puppetStringDelimiter end=+^\s*|\=\s*-\=\s*\zs\z1$+ contains=puppetHeredocStart keepend
|
||||
" Match the Regular Expression type
|
||||
" XXX: Puppet does not currently support a few features available in the
|
||||
" full Ruby Regexp class, namely, interpolation, lookbehind and named
|
||||
" sub-expressions. Matches for these features are included in the
|
||||
" commented-out versions of puppetRegexParen and puppetRegexSubName,
|
||||
" plus the supporting groups puppetRegexAngBrack and puppetRegexTick.
|
||||
syn region puppetRegex start="\(?<!/.*\)/" skip="\\/" end="/" contains=puppetRegexParen,puppetRegexBrace,puppetRegexOrpuppetRegexBrack,puppetRegexComment
|
||||
syn match puppetRegexParen "(\(?\([imx]\{0,4}:\|[=!]\)\)\?" contains=puppetRegexSpecChar,puppetRegexSubName contained
|
||||
"syn match puppetRegexParen "(\(?\([imxo]\{0,4}:\|['<][[:alnum:]]\+[>']\|<?[=!]\)\)\?" contains=puppetRegexSpecChar,puppetRegexSubName contained
|
||||
syn match puppetRegexParen ")" contained
|
||||
syn match puppetRegexBrace "{" contained
|
||||
syn match puppetRegexBrace "}" contained
|
||||
syn match puppetRegexBrack "\[" contained
|
||||
syn match puppetRegexBrack "\]" contained
|
||||
"syn match puppetRegexAngBrack "<" contained
|
||||
"syn match puppetRegexAngBrack ">" contained
|
||||
"syn match puppetRegexTick +'+ contained
|
||||
syn match puppetRegexOr "|" contained
|
||||
"syn match puppetRegexSubName "['<][[:alnum:]]\+[>']" contains=puppetRegexAngBrack,puppetRegexTick contained
|
||||
syn match puppetRegexSpecialChar "[?:imx]\|\(<?[=!]\)" contained
|
||||
syn region puppetRegexComment start="(?#" skip="\\)" end=")" contained
|
||||
|
||||
" comments last overriding everything else
|
||||
syn match puppetComment "\s*#.*$" contains=puppetTodo,@Spell
|
||||
syn region puppetComment start="/\*" end="\*/" contains=puppetTodo,@Spell extend
|
||||
syn keyword puppetTodo TODO NOTE FIXME XXX BUG HACK contained
|
||||
syn match puppetComment "\s*#.*$" contains=puppetTodo,@Spell
|
||||
syn region puppetMultilineComment start="/\*" end="\*/" contains=puppetTodo,@Spell
|
||||
syn keyword puppetTodo TODO NOTE FIXME XXX BUG HACK contained
|
||||
syn keyword puppetTodo TODO: NOTE: FIXME: XXX: BUG: HACK: contained
|
||||
|
||||
" Define the default highlighting.
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_puppet_syn_inits")
|
||||
if version < 508
|
||||
let did_puppet_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink puppetRegexp puppetConstant
|
||||
HiLink puppetStdLibFunction puppetFunction
|
||||
HiLink puppetNoInterpolation puppetString
|
||||
HiLink puppetFunction Function
|
||||
HiLink puppetOperator Operator
|
||||
HiLink puppetString String
|
||||
HiLink puppetWord String
|
||||
HiLink puppetFloat Float
|
||||
HiLink puppetInteger Number
|
||||
HiLink puppetBoolean Boolean
|
||||
HiLink puppetName puppetIdentifier
|
||||
HiLink puppetNameBad Error
|
||||
HiLink puppetVariable puppetIdentifier
|
||||
HiLink puppetIdentifier Identifier
|
||||
HiLink puppetType Type
|
||||
HiLink puppetConditional Conditional
|
||||
HiLink puppetConstant Constant
|
||||
HiLink puppetControl Statement
|
||||
HiLink puppetKeyword Keyword
|
||||
HiLink puppetStringDelimiter Delimiter
|
||||
HiLink puppetDelimiter Delimiter
|
||||
HiLink puppetTodo Todo
|
||||
HiLink puppetComment Comment
|
||||
HiLink puppetVariable Identifier
|
||||
HiLink puppetType Type
|
||||
HiLink puppetKeyword Keyword
|
||||
HiLink puppetComment Comment
|
||||
HiLink puppetMultilineComment Comment
|
||||
HiLink puppetString String
|
||||
HiLink puppetRegex Constant
|
||||
HiLink puppetRegexParen Delimiter
|
||||
HiLink puppetRegexBrace Delimiter
|
||||
HiLink puppetRegexBrack Delimiter
|
||||
HiLink puppetRegexAngBrack Delimiter
|
||||
HiLink puppetRegexTick Delimiter
|
||||
HiLink puppetRegexOr Delimiter
|
||||
HiLink puppetRegexSubName Identifier
|
||||
HiLink puppetRegexSpecChar SpecialChar
|
||||
HiLink puppetRegexComment Comment
|
||||
HiLink puppetParamKeyword Keyword
|
||||
HiLink puppetParamDigits String
|
||||
HiLink puppetNotVariable String
|
||||
HiLink puppetParamSpecial Boolean
|
||||
HiLink puppetSpecial Special
|
||||
HiLink puppetTodo Todo
|
||||
HiLink puppetBrack Delimiter
|
||||
HiLink puppetTypeBrack Delimiter
|
||||
HiLink puppetBrace Delimiter
|
||||
HiLink puppetTypeBrace Delimiter
|
||||
HiLink puppetParen Delimiter
|
||||
HiLink puppetDelimiter Delimiter
|
||||
HiLink puppetControl Statement
|
||||
HiLink puppetDefType Define
|
||||
HiLink puppetDefName Type
|
||||
HiLink puppetNodeRe Type
|
||||
HiLink puppetTypeName Statement
|
||||
HiLink puppetTypeDefault Type
|
||||
HiLink puppetParamName Identifier
|
||||
HiLink puppetArgument Identifier
|
||||
HiLink puppetFunction Function
|
||||
HiLink puppetClass Include
|
||||
|
||||
delcommand HiLink
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "puppet"
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'rego') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Rego (http://github.com/open-policy-agent/opa)
|
||||
" Maintainers: Torin Sandall <torinsandall@gmail.com>
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
" language keywords
|
||||
syn keyword regoKeyword package import as not with default else some
|
||||
|
||||
" comments
|
||||
syn match regoComment "#.*$" contains=regoTodo,@Spell
|
||||
syn keyword regoTodo FIXME XXX TODO contained
|
||||
|
||||
" data types
|
||||
syn keyword regoNull null
|
||||
syn keyword regoBoolean true false
|
||||
syn match regoNumber "\<\(0[0-7]*\|0[xx]\x\+\|\d\+\)[ll]\=\>"
|
||||
syn match regoNumber "\(\<\d\+\.\d*\|\.\d\+\)\([ee][-+]\=\d\+\)\=[ffdd]\="
|
||||
syn match regoNumber "\<\d\+[ee][-+]\=\d\+[ffdd]\=\>"
|
||||
syn match regoNumber "\<\d\+\([ee][-+]\=\d\+\)\=[ffdd]\>"
|
||||
syn region regoString start="\"[^"]" skip="\\\"" end="\"" contains=regoStringEscape
|
||||
syn match regoStringEscape "\\u[0-9a-fA-F]\{4}" contained
|
||||
syn match regoStringEscape "\\[nrfvb\\\"]" contained
|
||||
|
||||
" rules
|
||||
syn match regoRuleName "^\(\w\+\)"
|
||||
syn region regoBody start="{" end="}" transparent
|
||||
|
||||
" operators
|
||||
syn match regoEquality "="
|
||||
syn match regoInequality "[<>!]"
|
||||
syn match regoArith "[+-/*&|]"
|
||||
syn match regoBuiltin "\w\+(" nextgroup=regoBuiltinArgs contains=regoBuiltinArgs
|
||||
syn region regoBuiltinArgs start="(" end=")" contained contains=regoNull,regoBoolean,regoNumber,regoString
|
||||
|
||||
" highlighting
|
||||
hi link regoKeyword Keyword
|
||||
hi link regoNull Function
|
||||
hi link regoBoolean Boolean
|
||||
hi link regoNumber Number
|
||||
hi link regoString String
|
||||
|
||||
hi link regoRuleName Function
|
||||
|
||||
hi link regoEquality Keyword
|
||||
hi link regoInequality Keyword
|
||||
hi link regoArith Keyword
|
||||
hi link regoBuiltin Type
|
||||
|
||||
hi link regoComment Comment
|
||||
hi link regoTodo Todo
|
||||
@@ -94,7 +94,14 @@ execute 'syn match rstSubstitutionDefinition contained' .
|
||||
\ ' /|.*|\_s\+/ nextgroup=@rstDirectives'
|
||||
|
||||
function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right)
|
||||
execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.a:start.'+'.' contained'
|
||||
" Only escape the first char of a multichar delimiter (e.g. \* inside **)
|
||||
if a:start[0] == '\'
|
||||
let first = a:start[0:1]
|
||||
else
|
||||
let first = a:start[0]
|
||||
endif
|
||||
|
||||
execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.first.'+'.' contained'
|
||||
|
||||
execute 'syn region rst' . a:name .
|
||||
\ ' start=+' . a:char_left . '\zs' . a:start .
|
||||
@@ -170,7 +177,7 @@ syn match rstStandaloneHyperlink contains=@NoSpell
|
||||
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
|
||||
|
||||
syn region rstCodeBlock contained matchgroup=rstDirective
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+.*\_s*\n\ze\z(\s\+\)+
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s*\n\%(\s*:.*:\s*.*\s*\n\)*\n\ze\z(\s\+\)+
|
||||
\ skip=+^$+
|
||||
\ end=+^\z1\@!+
|
||||
\ contains=@NoSpell
|
||||
|
||||
@@ -467,6 +467,7 @@ 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
|
||||
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1
|
||||
|
||||
" __END__ Directive {{{1
|
||||
SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$"
|
||||
|
||||
@@ -30,7 +30,7 @@ syn match rustExistentialContextual /\<existential\_s\+type/ transparent contain
|
||||
|
||||
syn match rustAssert "\<assert\(\w\)*!" contained
|
||||
syn match rustPanic "\<panic\(\w\)*!" contained
|
||||
syn match rustKeyword "\<async\%(\s\|\n\)\@="
|
||||
syn match rustAsync "\<async\%(\s\|\n\)\@="
|
||||
syn keyword rustKeyword break
|
||||
syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
|
||||
syn keyword rustKeyword continue
|
||||
@@ -49,7 +49,8 @@ syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
||||
" FIXME: Scoped impl's name is also fallen in this category
|
||||
syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipempty
|
||||
syn keyword rustStorage move mut ref static const
|
||||
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
|
||||
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
|
||||
syn keyword rustAwait await
|
||||
|
||||
syn keyword rustPubScopeCrate crate contained
|
||||
syn match rustPubScopeDelim /[()]/ contained
|
||||
@@ -153,7 +154,16 @@ syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustE
|
||||
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
||||
syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
|
||||
|
||||
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError
|
||||
" Match attributes with either arbitrary syntax or special highlighting for
|
||||
" derives. We still highlight strings and comments inside of the attribute.
|
||||
syn region rustAttribute start="#!\?\[" end="\]" contains=@rustAttributeContents,rustAttributeParenthesizedParens,rustAttributeParenthesizedCurly,rustAttributeParenthesizedBrackets,rustDerive
|
||||
syn region rustAttributeParenthesizedParens matchgroup=rustAttribute start="\w\%(\w\)*("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents
|
||||
syn region rustAttributeParenthesizedCurly matchgroup=rustAttribute start="\w\%(\w\)*{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents
|
||||
syn region rustAttributeParenthesizedBrackets matchgroup=rustAttribute start="\w\%(\w\)*\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents
|
||||
syn region rustAttributeBalancedParens matchgroup=rustAttribute start="("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents
|
||||
syn region rustAttributeBalancedCurly matchgroup=rustAttribute start="{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents
|
||||
syn region rustAttributeBalancedBrackets matchgroup=rustAttribute start="\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents
|
||||
syn cluster rustAttributeContents contains=rustString,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError
|
||||
syn region rustDerive start="derive(" end=")" contained contains=rustDeriveTrait
|
||||
" This list comes from src/libsyntax/ext/deriving/mod.rs
|
||||
" Some are deprecated (Encodable, Decodable) or to be removed after a new snapshot (Show).
|
||||
@@ -339,6 +349,8 @@ hi def link rustExternCrate rustKeyword
|
||||
hi def link rustObsoleteExternMod Error
|
||||
hi def link rustBoxPlacementParens Delimiter
|
||||
hi def link rustQuestionMark Special
|
||||
hi def link rustAsync rustKeyword
|
||||
hi def link rustAwait rustKeyword
|
||||
|
||||
" Other Suggestions:
|
||||
" hi rustAttribute ctermfg=cyan
|
||||
|
||||
@@ -50,6 +50,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 scssSemicolon ";" containedin=scssDefinition,scssNestedDefinition
|
||||
|
||||
syn match scssAttributeWithNestedDefinition ": [^#"]*{\@=" nextgroup=scssNestedDefinition contained contains=css.*Attr,cssValue.*,scssVariable
|
||||
syn region scssNestedDefinition matchgroup=cssBraces start="{" end="}" contained contains=@comment,scssProperty,scssNestedProperty
|
||||
@@ -218,6 +219,7 @@ hi def link scssImport Include
|
||||
hi def link scssTodo Todo
|
||||
hi def link scssAtRoot Keyword
|
||||
hi def link scssMapParens Delimiter
|
||||
hi def link scssSemicolon Delimiter
|
||||
|
||||
let b:current_syntax = "scss"
|
||||
if main_syntax == 'scss'
|
||||
|
||||
64
syntax/svelte.vim
Normal file
64
syntax/svelte.vim
Normal file
@@ -0,0 +1,64 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'svelte') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Svelte 3 (HTML/JavaScript)
|
||||
" Author: Evan Lecklider <evan@lecklider.com>
|
||||
" Maintainer: Evan Lecklide <evan@lecklider.com>
|
||||
" Depends: pangloss/vim-javascript
|
||||
" URL: https://github.com/evanleck/vim-svelte
|
||||
"
|
||||
" Like vim-jsx, this depends on the pangloss/vim-javascript syntax package (and
|
||||
" is tested against it exclusively). If you're using vim-polyglot (like I am),
|
||||
" then you're all set.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Read HTML to begin with.
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
" Expand HTML tag names to include mixed case, periods, and colons.
|
||||
syntax match htmlTagName contained "\<[a-zA-Z:\.]*\>"
|
||||
|
||||
" Special attributes that include some kind of binding e.g. "on:click",
|
||||
" "bind:something", etc.
|
||||
syntax match svelteKeyword "\<[a-z]\+:[a-zA-Z|]\+=" contained containedin=htmlTag
|
||||
|
||||
" The "slot" attribute has special meaning.
|
||||
syntax keyword svelteKeyword slot contained containedin=htmlTag
|
||||
|
||||
" According to vim-jsx, you can let jsBlock take care of ending the region.
|
||||
" https://github.com/mxw/vim-jsx/blob/master/after/syntax/jsx.vim
|
||||
"
|
||||
" ALLBUT,htmlSpecialTagName keeps Vim from marking CSS regions as jsBlock.
|
||||
syntax region svelteExpression start="{" end="" contains=jsBlock,javascriptBlock containedin=htmlString,htmlTag,htmlArg,htmlValue,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,htmlHead,htmlTitle,htmlBoldItalicUnderline,htmlUnderlineBold,htmlUnderlineItalicBold,htmlUnderlineBoldItalic,htmlItalicUnderline,htmlItalicBold,htmlItalicBoldUnderline,htmlItalicUnderlineBold,htmlLink,htmlLeadingSpace,htmlBold,htmlBoldUnderline,htmlBoldItalic,htmlBoldUnderlineItalic,htmlUnderline,htmlUnderlineItalic,htmlItalic,htmlStrike,javaScript
|
||||
|
||||
" Block conditionals.
|
||||
syntax match svelteConditional "#if" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteConditional "/if" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteConditional ":else if" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteConditional ":else" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
" Block keywords.
|
||||
syntax match svelteKeyword "#await" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword "/await" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword ":catch" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword ":then" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
" Inline keywords.
|
||||
syntax match svelteKeyword "@html" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword "@debug" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
" Repeat functions.
|
||||
syntax match svelteRepeat "#each" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteRepeat "/each" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
highlight def link svelteConditional Conditional
|
||||
highlight def link svelteKeyword Keyword
|
||||
highlight def link svelteRepeat Repeat
|
||||
|
||||
let b:current_syntax = "svelte"
|
||||
@@ -158,6 +158,7 @@ syntax keyword swiftKeywords
|
||||
\ return
|
||||
\ self
|
||||
\ set
|
||||
\ some
|
||||
\ static
|
||||
\ subscript
|
||||
\ super
|
||||
@@ -186,6 +187,9 @@ syntax match swiftMultiwordKeywords "indirect enum"
|
||||
syntax region swiftEscapedReservedWord start="`" end="`" oneline
|
||||
|
||||
syntax keyword swiftAttributes
|
||||
\ @_exported
|
||||
\ @_functionBuilder
|
||||
\ @_silgen_name
|
||||
\ @assignment
|
||||
\ @autoclosure
|
||||
\ @available
|
||||
@@ -193,6 +197,7 @@ syntax keyword swiftAttributes
|
||||
\ @discardableResult
|
||||
\ @escaping
|
||||
\ @exported
|
||||
\ @frozen
|
||||
\ @IBAction
|
||||
\ @IBDesignable
|
||||
\ @IBInspectable
|
||||
@@ -205,6 +210,7 @@ syntax keyword swiftAttributes
|
||||
\ @NSCopying
|
||||
\ @NSManaged
|
||||
\ @objc
|
||||
\ @propertyWrapper
|
||||
\ @testable
|
||||
\ @UIApplicationMain
|
||||
\ @usableFromInline
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -65,6 +65,10 @@ hi def link tomlTable Title
|
||||
syn region tomlTableArray oneline start=/^\s*\[\[/ end=/\]\]/ contains=tomlKey,tomlKeyDq,tomlKeySq
|
||||
hi def link tomlTableArray Title
|
||||
|
||||
syn cluster tomlValue contains=tomlArray,tomlString,tomlInteger,tomlFloat,tomlBoolean,tomlDate,tomlComment
|
||||
syn region tomlKeyValueArray start=/=\s*\[\zs/ end=/\]/ contains=@tomlValue
|
||||
syn region tomlArray start=/\[/ end=/\]/ contains=@tomlValue contained
|
||||
|
||||
syn keyword tomlTodo TODO FIXME XXX BUG contained
|
||||
hi def link tomlTodo Todo
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ endif
|
||||
|
||||
" vifm syntax file
|
||||
" Maintainer: xaizek <xaizek@posteo.net>
|
||||
" Last Change: June 3, 2019
|
||||
" Last Change: July 12, 2019
|
||||
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
|
||||
|
||||
if exists('b:current_syntax')
|
||||
@@ -17,17 +17,30 @@ let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
" General commands
|
||||
syntax keyword vifmCommand contained alink apropos bmark bmarks bmgo cds change
|
||||
\ chmod chown clone compare cope[n] co[py] cq[uit] d[elete] delbmarks
|
||||
\ delm[arks] di[splay] dirs e[dit] el[se] empty en[dif] exi[t] file fin[d]
|
||||
\ fini[sh] go[to] gr[ep] h[elp] hideui histnext his[tory] histprev jobs
|
||||
\ locate ls lstrash marks media mes[sages] mkdir m[ove] noh[lsearch] on[ly]
|
||||
\ popd pushd pu[t] pw[d] qa[ll] q[uit] redr[aw] reg[isters] regular rename
|
||||
\ restart restore rlink screen sh[ell] siblnext siblprev sor[t] sp[lit]
|
||||
\ s[ubstitute] tabc[lose] tabm[ove] tabname tabnew tabn[ext] tabp[revious]
|
||||
\ touch tr trashes tree sync undol[ist] ve[rsion] vie[w] vifm vs[plit]
|
||||
\ winc[md] w[rite] wq wqa[ll] xa[ll] x[it] y[ank]
|
||||
syntax keyword vifmCommand contained
|
||||
\ alink apropos bmark bmarks bmgo cds change chmod chown clone compare
|
||||
\ cope[n] co[py] cq[uit] d[elete] delbmarks delm[arks] di[splay] dirs e[dit]
|
||||
\ el[se] empty en[dif] exi[t] file fin[d] fini[sh] go[to] gr[ep] h[elp]
|
||||
\ hideui histnext his[tory] histprev jobs locate ls lstrash marks media
|
||||
\ mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd pu[t] pw[d] qa[ll]
|
||||
\ q[uit] redr[aw] reg[isters] regular rename restart restore rlink screen
|
||||
\ sh[ell] siblnext siblprev sor[t] sp[lit] s[ubstitute] tabc[lose] tabm[ove]
|
||||
\ tabname tabnew tabn[ext] tabp[revious] touch tr trashes tree sync
|
||||
\ undol[ist] ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite] wq wqa[ll]
|
||||
\ xa[ll] x[it] y[ank]
|
||||
\ nextgroup=vifmArgs
|
||||
syntax keyword vifmCommandCN contained
|
||||
\ alink apropos bmark bmarks bmgo cds change chmod chown clone compare
|
||||
\ cope[n] co[py] cq[uit] d[elete] delbmarks delm[arks] di[splay] dirs e[dit]
|
||||
\ el[se] empty en[dif] exi[t] file fin[d] fini[sh] go[to] gr[ep] h[elp]
|
||||
\ hideui histnext his[tory] histprev jobs locate ls lstrash marks media
|
||||
\ mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd pu[t] pw[d] qa[ll]
|
||||
\ q[uit] redr[aw] reg[isters] regular rename restart restore rlink screen
|
||||
\ sh[ell] siblnext siblprev sor[t] sp[lit] s[ubstitute] tabc[lose] tabm[ove]
|
||||
\ tabname tabnew tabn[ext] tabp[revious] touch tr trashes tree sync
|
||||
\ undol[ist] ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite] wq wqa[ll]
|
||||
\ xa[ll] x[it] y[ank]
|
||||
\ nextgroup=vifmArgsCN
|
||||
|
||||
" commands that might be prepended to a command without changing everything else
|
||||
syntax keyword vifmPrefixCommands contained windo winrun
|
||||
@@ -67,7 +80,7 @@ syntax case match
|
||||
|
||||
" Builtin functions
|
||||
syntax match vifmBuiltinFunction
|
||||
\ '\(chooseopt\|expand\|executable\|filetype\|fnameescape\|getpanetype\|has\|layoutis\|paneisat\|system\|tabpagenr\|term\)\ze('
|
||||
\ '\(chooseopt\|expand\|executable\|extcached\|filetype\|fnameescape\|getpanetype\|has\|layoutis\|paneisat\|system\|tabpagenr\|term\)\ze('
|
||||
|
||||
" Operators
|
||||
syntax match vifmOperator "\(==\|!=\|>=\?\|<=\?\|\.\|-\|+\|&&\|||\)" skipwhite
|
||||
@@ -167,11 +180,12 @@ syntax region vifmStatement start='^\(\s\|:\)*'
|
||||
" Contained statement with highlighting of angle-brace notation.
|
||||
syntax region vifmStatementCN start='\(\s\|:\)*'
|
||||
\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend contained
|
||||
\ contains=vifmCommand,vifmCmdCommand,vifmCmdCommandSt,vifmMarkCommandSt
|
||||
\ contains=vifmCommandCN,vifmCmdCommand,vifmCmdCommandSt,vifmMarkCommandSt
|
||||
\,vifmFtCommandStN,vifmCMapAbbr,vifmMap,vifmMapSt,vifmCMapSt,vifmExecute
|
||||
\,vifmComment,vifmInlineComment,vifmNotComment,vifmExprCommandSt,vifmNormalCommandSt
|
||||
\,vifmNotation,vifmCdCommandStN,vifmSetN,vifmArgument,vifmSoCommand
|
||||
\,vifmSoCommandStN,vifmInvertCommand,vifmInvertCommandStN,vifmPrefixCommands
|
||||
\,vifmLetCN
|
||||
" Contained statement without highlighting of angle-brace notation.
|
||||
syntax region vifmStatementC start='\(\s\|:\)*'
|
||||
\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$' keepend contained
|
||||
@@ -306,11 +320,18 @@ syntax region vifmFtBeginning contained
|
||||
\ end='\s' keepend
|
||||
\ contains=vifmFtCommand,vifmPattern
|
||||
|
||||
" common highlight for :command arguments
|
||||
" common highlight for :command arguments without highlighting of angle-bracket
|
||||
" notation
|
||||
syntax region vifmArgs start='!\?\zs\(\s*\S\+\|[^a-zA-Z]\)'
|
||||
\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='|\|$'
|
||||
\ contained
|
||||
\ contains=vifmStringInExpr
|
||||
" common highlight for :command arguments with highlighting of angle-bracket
|
||||
" notation
|
||||
syntax region vifmArgsCN start='!\?\zs\(\s*\S\+\|[^a-zA-Z]\)'
|
||||
\ skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='|\|$'
|
||||
\ contained
|
||||
\ contains=vifmStringInExpr,vifmNotation
|
||||
|
||||
syntax region vifmSet
|
||||
\ start='\(\s\|:\)*\<\(se\%[t]\|setg\%[lobal]\|setl\%[ocal]\)\>'
|
||||
@@ -352,16 +373,24 @@ syntax region vifmSetAssignNSN contained
|
||||
\ extend
|
||||
\ contains=vifmNumber,vifmComment,vifmInlineComment,vifmNotation
|
||||
|
||||
" :let command with highlighting of angle-brace notation.
|
||||
syntax region vifmLet
|
||||
\ start='^\(\s\|:\)*\<let\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
|
||||
\ keepend
|
||||
\ contains=vifmLetCommand,vifmEnvVar,vifmString,vifmStringInExpr,vifmComment
|
||||
\,vifmInlineComment,vifmNotComment
|
||||
" Contained :let command without highlighting of angle-brace notation.
|
||||
syntax region vifmLetC
|
||||
\ start='\<let\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$\||'
|
||||
\ keepend
|
||||
\ contains=vifmLetCommand,vifmEnvVar,vifmString,vifmStringInExpr,vifmComment
|
||||
\,vifmInlineComment,vifmNotComment,vifmBuiltinFunction
|
||||
" Contained :let command with highlighting of angle-brace notation.
|
||||
syntax region vifmLetCN
|
||||
\ start='\<let\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$\||'
|
||||
\ keepend
|
||||
\ contains=vifmLetCommand,vifmEnvVar,vifmString,vifmStringInExpr,vifmComment
|
||||
\,vifmInlineComment,vifmNotComment,vifmBuiltinFunction,vifmNotation
|
||||
syntax region vifmUnlet
|
||||
\ start='^\(\s\|:\)*\<unl\%[et]\>' skip='\(\n\s*\\\)\|\(\n\s*".*$\)' end='$'
|
||||
\ keepend
|
||||
@@ -416,6 +445,7 @@ highlight link vifmPatternCommands Statement
|
||||
highlight link vifmComment Comment
|
||||
highlight link vifmInlineComment Comment
|
||||
highlight link vifmCommand Statement
|
||||
highlight link vifmCommandCN Statement
|
||||
highlight link vifmPrefixCommands Statement
|
||||
highlight link vifmCdCommand Statement
|
||||
highlight link vifmCmdCommand Statement
|
||||
|
||||
@@ -10,6 +10,11 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Convert deprecated variable to new one
|
||||
if exists('g:vue_disable_pre_processors') && g:vue_disable_pre_processors
|
||||
let g:vue_pre_processors = []
|
||||
endif
|
||||
|
||||
runtime! syntax/html.vim
|
||||
syntax clear htmlTagName
|
||||
syntax match htmlTagName contained "\<[a-zA-Z0-9:-]*\>"
|
||||
@@ -21,47 +26,57 @@ function! s:attr(name, value)
|
||||
return a:name . '=\("\|''\)[^\1]*' . a:value . '[^\1]*\1'
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Check whether a syntax file for a given {language} exists.
|
||||
function! s:syntax_available(language)
|
||||
return !empty(globpath(&runtimepath, 'syntax/' . a:language . '.vim'))
|
||||
function! s:should_register(language, start_pattern)
|
||||
" Check whether a syntax file for {language} exists
|
||||
if empty(globpath(&runtimepath, 'syntax/' . a:language . '.vim'))
|
||||
return 0
|
||||
endif
|
||||
|
||||
if exists('g:vue_pre_processors')
|
||||
if type(g:vue_pre_processors) == v:t_list
|
||||
return index(g:vue_pre_processors, s:language.name) != -1
|
||||
elseif g:vue_pre_processors is# 'detect_on_enter'
|
||||
return search(a:start_pattern, 'n') != 0
|
||||
endif
|
||||
endif
|
||||
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Register {language} for a given {tag}. If [attr_override] is given and not
|
||||
" empty, it will be used for the attribute pattern.
|
||||
function! s:register_language(language, tag, ...)
|
||||
let attr_override = a:0 ? a:1 : ''
|
||||
let attr = !empty(attr_override) ? attr_override : s:attr('lang', a:language)
|
||||
let s:languages = [
|
||||
\ {'name': 'less', 'tag': 'style'},
|
||||
\ {'name': 'pug', 'tag': 'template', 'attr_pattern': s:attr('lang', '\%(pug\|jade\)')},
|
||||
\ {'name': 'slm', 'tag': 'template'},
|
||||
\ {'name': 'handlebars', 'tag': 'template'},
|
||||
\ {'name': 'haml', 'tag': 'template'},
|
||||
\ {'name': 'typescript', 'tag': 'script', 'attr_pattern': '\%(lang=\("\|''\)[^\1]*\(ts\|typescript\)[^\1]*\1\|ts\)'},
|
||||
\ {'name': 'coffee', 'tag': 'script'},
|
||||
\ {'name': 'stylus', 'tag': 'style'},
|
||||
\ {'name': 'sass', 'tag': 'style'},
|
||||
\ {'name': 'scss', 'tag': 'style'},
|
||||
\ ]
|
||||
|
||||
if s:syntax_available(a:language)
|
||||
execute 'syntax include @' . a:language . ' syntax/' . a:language . '.vim'
|
||||
for s:language in s:languages
|
||||
let s:attr_pattern = has_key(s:language, 'attr_pattern') ? s:language.attr_pattern : s:attr('lang', s:language.name)
|
||||
let s:start_pattern = '<' . s:language.tag . '\>\_[^>]*' . s:attr_pattern . '\_[^>]*>'
|
||||
|
||||
if s:should_register(s:language.name, s:start_pattern)
|
||||
execute 'syntax include @' . s:language.name . ' syntax/' . s:language.name . '.vim'
|
||||
unlet! b:current_syntax
|
||||
execute 'syntax region vue_' . a:language
|
||||
execute 'syntax region vue_' . s:language.name
|
||||
\ 'keepend'
|
||||
\ 'start=/<' . a:tag . '\>\_[^>]*' . attr . '\_[^>]*>/'
|
||||
\ 'end="</' . a:tag . '>"me=s-1'
|
||||
\ 'contains=@' . a:language . ',vueSurroundingTag'
|
||||
\ 'start=/' . s:start_pattern . '/'
|
||||
\ 'end="</' . s:language.tag . '>"me=s-1'
|
||||
\ 'contains=@' . s:language.name . ',vueSurroundingTag'
|
||||
\ 'fold'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
if !exists("g:vue_disable_pre_processors") || !g:vue_disable_pre_processors
|
||||
call s:register_language('less', 'style')
|
||||
call s:register_language('pug', 'template', s:attr('lang', '\%(pug\|jade\)'))
|
||||
call s:register_language('slm', 'template')
|
||||
call s:register_language('handlebars', 'template')
|
||||
call s:register_language('haml', 'template')
|
||||
call s:register_language('typescript', 'script', '\%(lang=\("\|''\)[^\1]*\(ts\|typescript\)[^\1]*\1\|ts\)')
|
||||
call s:register_language('coffee', 'script')
|
||||
call s:register_language('stylus', 'style')
|
||||
call s:register_language('sass', 'style')
|
||||
call s:register_language('scss', 'style')
|
||||
endif
|
||||
endfor
|
||||
|
||||
syn region vueSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
syn keyword htmlSpecialTagName contained template
|
||||
syn keyword htmlArg contained scoped ts
|
||||
syn match htmlArg "[@v:][-:.0-9_a-z]*\>" contained
|
||||
|
||||
syntax sync fromstart
|
||||
|
||||
let b:current_syntax = "vue"
|
||||
|
||||
137
syntax/zephir.vim
Normal file
137
syntax/zephir.vim
Normal file
@@ -0,0 +1,137 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'zephir') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright 2009 The Go Authors. All rights reserved.
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
" Comments; their contents
|
||||
syn keyword zepTodo contained TODO FIXME XXX
|
||||
syn cluster zepCommentGroup contains=zepTodo
|
||||
syn region zepComment start="/\*" end="\*/" contains=@zepCommentGroup,@Spell
|
||||
syn region zepComment start="//" end="$" contains=@zepCommentGroup,@Spell
|
||||
|
||||
hi def link zepComment Comment
|
||||
hi def link zepTodo Todo
|
||||
|
||||
syn keyword zepDirective namespace extends implements return
|
||||
syn keyword zepDeclaration var let new const
|
||||
syn keyword zepDeclType abstract class interface
|
||||
syn keyword zepDeclFun function
|
||||
syn keyword zepDeclMore public private protected static final
|
||||
syn keyword zepExceptionOperator throw try catch
|
||||
|
||||
hi def link zepDirective Statement
|
||||
hi def link zepDeclaration Keyword
|
||||
hi def link zepDeclFun Keyword
|
||||
hi def link zepDeclType Keyword
|
||||
hi def link zepDeclMore Keyword
|
||||
hi def link zepExceptionOperator Keyword
|
||||
|
||||
syn keyword zepCond if else elseif switch
|
||||
syn keyword zepRepeat for in while loop
|
||||
syn keyword zepLabel case default continue require this parent self
|
||||
syn match zepTypeHits "\<\w+\>"me=e+1,me=e-1 contained display
|
||||
|
||||
hi def link zepCond Conditional
|
||||
hi def link zepRepeat Repeat
|
||||
hi def link zepLabel Label
|
||||
|
||||
syn match zepOperator "[-=+%^&|*!.~?:]" contained display
|
||||
syn match zepOperator "[-+*/%^&|.]=" contained display
|
||||
syn match zepOperator "/[^*/]"me=e-1 contained display
|
||||
syn match zepOperator "\$" contained display
|
||||
syn match zepOperator "&&\|\<and\>" contained display
|
||||
syn match zepOperator "||\|\<x\=or\>" contained display
|
||||
syn match zepRelation "[!=<>]=" contained display
|
||||
syn match zepRelation "[<>]" contained display
|
||||
syn match zepMemberSelector "->" contained display
|
||||
|
||||
hi def link zepOperator Operator
|
||||
hi def link zepRelation Operator
|
||||
hi def link zepMemberSelector Operator
|
||||
|
||||
syn keyword zepType array string char void void
|
||||
syn keyword zepType bool[ean] true false
|
||||
syn keyword zepType unsigned int uint long ulong
|
||||
|
||||
hi def link zepType Type
|
||||
|
||||
syn match zepGlobalVar "_(SERVER|POST|GET|COOKIE|SESSION)\["me=e-1 contained display
|
||||
|
||||
hi def link zepGlobalVar Statement
|
||||
|
||||
syn keyword zepSpecialOperator empty isset fetch
|
||||
syn keyword zepBuildIns global_set global_get
|
||||
syn keyword zepBuildIns echo count typeof range reverse
|
||||
syn keyword zepBuildIns set get toString
|
||||
"for string
|
||||
syn keyword zepBuildIns length trim trimleft trimright index lower upper lowerfirst upperfirst format
|
||||
"for array
|
||||
syn keyword zepBuildIns join reverse
|
||||
"for char
|
||||
syn keyword zepBuildIns toHex
|
||||
"for integer
|
||||
syn keyword zepBuildIns abs
|
||||
|
||||
hi def link zepSpecialOperator Function
|
||||
hi def link zepBuildIns Function
|
||||
|
||||
" zep escapes
|
||||
syn match zepEscapeOctal display contained "\\[0-7]\{3}"
|
||||
syn match zepEscapeC display contained +\\[abfnrtv\\'"]+
|
||||
syn match zepEscapeX display contained "\\x\x\{2}"
|
||||
syn match zepEscapeU display contained "\\u\x\{4}"
|
||||
syn match zepEscapeBigU display contained "\\U\x\{8}"
|
||||
syn match zepEscapeError display contained +\\[^0-7xuUabfnrtv\\'"]+
|
||||
|
||||
hi def link zepEscapeOctal zepSpecialString
|
||||
hi def link zepEscapeC zepSpecialString
|
||||
hi def link zepEscapeX zepSpecialString
|
||||
hi def link zepEscapeU zepSpecialString
|
||||
hi def link zepEscapeBigU zepSpecialString
|
||||
hi def link zepSpecialString Special
|
||||
hi def link zepEscapeError Error
|
||||
|
||||
" Strings and their contents
|
||||
syn cluster zepStringGroup contains=zepEscapeOctal,zepEscapeC,zepEscapeX,zepEscapeU,zepEscapeBigU,zepEscapeError
|
||||
syn region zepString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@zepStringGroup
|
||||
syn region zepString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@zepStringGroup
|
||||
|
||||
hi def link zepString String
|
||||
|
||||
" Integers
|
||||
syn match zepDecimalInt "\<\d\+\([Ee]\d\+\)\?\>"
|
||||
syn match zepHexadecimalInt "\<0x\x\+\>"
|
||||
syn match zepOctalInt "\<0\o\+\>"
|
||||
syn match zepOctalError "\<0\o*[89]\d*\>"
|
||||
|
||||
hi def link zepDecimalInt Integer
|
||||
hi def link zepHexadecimalInt Integer
|
||||
hi def link zepOctalInt Integer
|
||||
hi def link Integer Number
|
||||
|
||||
" Floating point
|
||||
syn match zepFloat "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
|
||||
syn match zepFloat "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
|
||||
syn match zepFloat "\<\d\+[Ee][-+]\d\+\>"
|
||||
|
||||
hi def link zepFloat Float
|
||||
|
||||
" Imaginary literals
|
||||
syn match zepImaginary "\<\d\+i\>"
|
||||
syn match zepImaginary "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match zepImaginary "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match zepImaginary "\<\d\+[Ee][-+]\d\+i\>"
|
||||
|
||||
hi def link zepImaginary Number
|
||||
|
||||
|
||||
syn sync minlines=500
|
||||
|
||||
let b:current_syntax = "zephir"
|
||||
syn match zepTypeHits "<\w+>" contained display
|
||||
@@ -14,13 +14,13 @@ let b:current_syntax = "zig"
|
||||
|
||||
syn keyword zigStorage const var extern packed export pub noalias inline comptime nakedcc stdcallcc volatile allowzero align linksection threadlocal
|
||||
syn keyword zigStructure struct enum union error
|
||||
syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async await suspend resume cancel
|
||||
syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async await suspend resume
|
||||
syn keyword zigConditional if else switch and or orelse
|
||||
syn keyword zigRepeat while for
|
||||
|
||||
syn keyword zigConstant null undefined
|
||||
syn keyword zigKeyword fn usingnamespace test
|
||||
syn keyword zigType bool f16 f32 f64 f128 void noreturn type anyerror promise
|
||||
syn keyword zigType bool f16 f32 f64 f128 void noreturn type anyerror anyframe
|
||||
syn keyword zigType i0 u0 isize usize comptime_int comptime_float
|
||||
syn keyword zigType c_short c_ushort c_int c_uint c_long c_ulong c_longlong c_ulonglong c_longdouble c_void
|
||||
|
||||
@@ -36,17 +36,18 @@ syn match zigBuiltinFn "\v\@(alignCast|alignOf|cDefine|cImport|cInclude)>"
|
||||
syn match zigBuiltinFn "\v\@(cUndef|canImplicitCast|clz|cmpxchgWeak|cmpxchgStrong|compileError)>"
|
||||
syn match zigBuiltinFn "\v\@(compileLog|ctz|popCount|divExact|divFloor|divTrunc)>"
|
||||
syn match zigBuiltinFn "\v\@(embedFile|export|tagName|TagType|errorName)>"
|
||||
syn match zigBuiltinFn "\v\@(errorReturnTrace|fence|fieldParentPtr|field)>"
|
||||
syn match zigBuiltinFn "\v\@(frameAddress|import|inlineCall|newStackCall|intToPtr|IntType)>"
|
||||
syn match zigBuiltinFn "\v\@(errorReturnTrace|fence|fieldParentPtr|field|unionInit)>"
|
||||
syn match zigBuiltinFn "\v\@(frameAddress|import|inlineCall|newStackCall|asyncCall|intToPtr|IntType)>"
|
||||
syn match zigBuiltinFn "\v\@(maxValue|memberCount|memberName|memberType)>"
|
||||
syn match zigBuiltinFn "\v\@(memcpy|memset|minValue|mod|mulWithOverflow)>"
|
||||
syn match zigBuiltinFn "\v\@(noInlineCall|bitOffsetOf|byteOffsetOf|OpaqueType|panic|ptrCast)>"
|
||||
syn match zigBuiltinFn "\v\@(ptrToInt|rem|returnAddress|setCold)>"
|
||||
syn match zigBuiltinFn "\v\@(setRuntimeSafety|setEvalBranchQuota|setFloatMode)>"
|
||||
syn match zigBuiltinFn "\v\@(setGlobalLinkage|setGlobalSection|shlExact|This|hasDecl)>"
|
||||
syn match zigBuiltinFn "\v\@(shlWithOverflow|shrExact|sizeOf|sqrt|bswap|subWithOverflow|intCast|floatCast|intToFloat|floatToInt|boolToInt|errSetCast)>"
|
||||
syn match zigBuiltinFn "\v\@(setGlobalLinkage|setGlobalSection|shlExact|This|hasDecl|hasField)>"
|
||||
syn match zigBuiltinFn "\v\@(shlWithOverflow|shrExact|sizeOf|sqrt|byteSwap|subWithOverflow|intCast|floatCast|intToFloat|floatToInt|boolToInt|errSetCast)>"
|
||||
syn match zigBuiltinFn "\v\@(truncate|typeId|typeInfo|typeName|typeOf|atomicRmw|bytesToSlice|sliceToBytes)>"
|
||||
syn match zigBuiltinFn "\v\@(intToError|errorToInt|intToEnum|enumToInt|setAlignStack|handle|bitreverse|Vector)>"
|
||||
syn match zigBuiltinFn "\v\@(intToError|errorToInt|intToEnum|enumToInt|setAlignStack|frame|Frame|frameSize|bitReverse|Vector)>"
|
||||
syn match zigBuiltinFn "\v\@(sin|cos|exp|exp2|ln|log2|log10|fabs|floor|ceil|trunc|round)>"
|
||||
|
||||
syn match zigDecNumber display "\<[0-9]\+\%(.[0-9]\+\)\=\%([eE][+-]\?[0-9]\+\)\="
|
||||
syn match zigHexNumber display "\<0x[a-fA-F0-9]\+\%([a-fA-F0-9]\+\%([pP][+-]\?[0-9]\+\)\?\)\="
|
||||
|
||||
Reference in New Issue
Block a user