mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -178,7 +178,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [tptp](https://github.com/c-cube/vim-tptp) (syntax)
|
||||
- [twig](https://github.com/lumiliet/vim-twig) (syntax, indent, ftplugin)
|
||||
- [typescript](https://github.com/HerringtonDarkholme/yats.vim) (syntax, indent, compiler, ftplugin)
|
||||
- [vala](https://github.com/arrufat/vala.vim) (syntax, indent)
|
||||
- [vala](https://github.com/arrufat/vala.vim) (syntax, indent, ftplugin)
|
||||
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
||||
- [vcl](https://github.com/smerrill/vcl-vim-plugin) (syntax)
|
||||
- [vifm](https://github.com/vifm/vifm.vim) (syntax, autoload, ftplugin)
|
||||
|
||||
5
after/ftplugin/javascriptreact.vim
Normal file
5
after/ftplugin/javascriptreact.vim
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)
|
||||
|
||||
source <sfile>:h/javascript.vim
|
||||
|
||||
endif
|
||||
5
after/ftplugin/typescriptreact.vim
Normal file
5
after/ftplugin/typescriptreact.vim
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)
|
||||
|
||||
source <sfile>:h/typescript.vim
|
||||
|
||||
endif
|
||||
@@ -21,7 +21,7 @@ if exists('s:did_indent')
|
||||
endif
|
||||
|
||||
setlocal indentexpr=GetJsxIndent()
|
||||
setlocal indentkeys=0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
|
||||
setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
|
||||
|
||||
function! GetJsxIndent()
|
||||
return jsx_pretty#indent#get(function('GetJavascriptIndent'))
|
||||
|
||||
5
after/indent/javascriptreact.vim
Normal file
5
after/indent/javascriptreact.vim
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)
|
||||
|
||||
source <sfile>:h/javascript.vim
|
||||
|
||||
endif
|
||||
@@ -26,7 +26,7 @@ if exists('s:did_indent')
|
||||
endif
|
||||
|
||||
setlocal indentexpr=GetJsxIndent()
|
||||
setlocal indentkeys=0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
|
||||
setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
|
||||
|
||||
function! GetJsxIndent()
|
||||
return jsx_pretty#indent#get(function('GetTypescriptIndent'))
|
||||
|
||||
5
after/indent/typescriptreact.vim
Normal file
5
after/indent/typescriptreact.vim
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)
|
||||
|
||||
source <sfile>:h/typescript.vim
|
||||
|
||||
endif
|
||||
5
after/syntax/javascriptreact.vim
Normal file
5
after/syntax/javascriptreact.vim
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)
|
||||
|
||||
source <sfile>:h/javascript.vim
|
||||
|
||||
endif
|
||||
28
after/syntax/tsx.vim
Normal file
28
after/syntax/tsx.vim
Normal file
@@ -0,0 +1,28 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||
|
||||
" GraphQL Support
|
||||
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
|
||||
|
||||
|
||||
endif
|
||||
@@ -30,6 +30,12 @@ endif
|
||||
" refine the typescript line comment
|
||||
syntax region typescriptLineComment start=+//+ end=/$/ contains=@Spell,typescriptCommentTodo,typescriptRef extend keepend
|
||||
|
||||
for syntax_name in ['tsxRegion', 'tsxFragment']
|
||||
if hlexists(syntax_name)
|
||||
exe 'syntax clear ' . syntax_name
|
||||
endif
|
||||
endfor
|
||||
|
||||
if !hlexists('typescriptTypeCast')
|
||||
" add a typescriptBlock group for typescript
|
||||
syntax region typescriptBlock
|
||||
|
||||
5
after/syntax/typescriptreact.vim
Normal file
5
after/syntax/typescriptreact.vim
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)
|
||||
|
||||
source <sfile>:h/typescript.vim
|
||||
|
||||
endif
|
||||
@@ -5,7 +5,17 @@ function! cargo#Load()
|
||||
endfunction
|
||||
|
||||
function! cargo#cmd(args)
|
||||
execute "! cargo" a:args
|
||||
" Trim trailing spaces. This is necessary since :terminal command parses
|
||||
" trailing spaces as an empty argument.
|
||||
let args = substitute(a:args, '\s\+$', '', '')
|
||||
if has('terminal')
|
||||
let cmd = 'terminal'
|
||||
elseif has('nvim')
|
||||
let cmd = 'noautocmd new | terminal'
|
||||
else
|
||||
let cmd = '!'
|
||||
endif
|
||||
execute cmd 'cargo' args
|
||||
endfunction
|
||||
|
||||
function! s:nearest_cargo(...) abort
|
||||
|
||||
@@ -520,6 +520,10 @@ function! go#config#GoplsUsePlaceholders() abort
|
||||
return get(g:, 'go_gopls_use_placeholders', 0)
|
||||
endfunction
|
||||
|
||||
function! go#config#GoplsEnabled() abort
|
||||
return get(g:, 'go_gopls_enabled', 1)
|
||||
endfunction
|
||||
|
||||
" Set the default value. A value of "1" is a shortcut for this, for
|
||||
" compatibility reasons.
|
||||
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
||||
|
||||
" Author: Kevin Ballard
|
||||
" Description: Helper functions for Rust commands/mappings
|
||||
" Last Modified: May 27, 2014
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
@@ -510,16 +509,23 @@ function! s:SearchTestFunctionNameUnderCursor() abort
|
||||
return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*')
|
||||
endfunction
|
||||
|
||||
function! rust#Test(all, options) abort
|
||||
function! rust#Test(mods, winsize, all, options) abort
|
||||
let manifest = findfile('Cargo.toml', expand('%:p:h') . ';')
|
||||
if manifest ==# ''
|
||||
return rust#Run(1, '--test ' . a:options)
|
||||
endif
|
||||
|
||||
" <count> defaults to 0, but we prefer an empty string
|
||||
let winsize = a:winsize ? a:winsize : ''
|
||||
|
||||
if has('terminal')
|
||||
let cmd = 'terminal '
|
||||
if has('patch-8.0.910')
|
||||
let cmd = printf('%s noautocmd %snew | terminal ++curwin ', a:mods, winsize)
|
||||
else
|
||||
let cmd = printf('%s terminal ', a:mods)
|
||||
endif
|
||||
elseif has('nvim')
|
||||
let cmd = 'noautocmd new | terminal '
|
||||
let cmd = printf('%s noautocmd %snew | terminal ', a:mods, winsize)
|
||||
else
|
||||
let cmd = '!'
|
||||
let manifest = shellescape(manifest)
|
||||
|
||||
@@ -746,6 +746,10 @@ let g:xmldata_html5 = {
|
||||
\ [],
|
||||
\ global_attributes
|
||||
\ ],
|
||||
\ 'slot': [
|
||||
\ [],
|
||||
\ extend(copy(global_attributes), {'name': []})
|
||||
\ ],
|
||||
\ 'small': [
|
||||
\ phrasing_elements,
|
||||
\ global_attributes
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -
|
||||
" Vim compiler file
|
||||
" Compiler: Cucumber
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 Aug 09
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
|
||||
@@ -1476,7 +1476,6 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1
|
||||
augroup filetypedetect
|
||||
" vala, from vala.vim in arrufat/vala.vim
|
||||
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||
au BufRead,BufNewFile *.vala,*.vapi,*.valadoc setfiletype vala
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
|
||||
|
||||
" Slow yaml highlighting workaround
|
||||
if exists('+regexpengine') && ('®expengine' == 0)
|
||||
setlocal regexpengine=1
|
||||
endif
|
||||
set isfname+=@-@
|
||||
set path+=./../templates,./../files,templates,files
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -
|
||||
" Vim filetype plugin
|
||||
" Language: Cucumber
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2013 Jun 01
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
|
||||
@@ -27,6 +27,7 @@ let &l:errorformat =
|
||||
|
||||
setlocal includeexpr=dart#resolveUri(v:fname)
|
||||
setlocal isfname+=:
|
||||
setlocal iskeyword+=$
|
||||
|
||||
let b:undo_ftplugin = 'setl et< fo< sw< sts< com< cms< inex< isf<'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim filetype plugin
|
||||
" Language: generic git output
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2013 May 30
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim filetype plugin
|
||||
" Language: git commit file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2013 May 30
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim filetype plugin
|
||||
" Language: git rebase --interactive
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 May 21
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
@@ -20,12 +20,15 @@ if !exists("b:undo_ftplugin")
|
||||
endif
|
||||
let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<"
|
||||
|
||||
function! s:choose(word)
|
||||
function! s:choose(word) abort
|
||||
s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
|
||||
endfunction
|
||||
|
||||
function! s:cycle()
|
||||
call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick'))
|
||||
function! s:cycle(count) abort
|
||||
let words = ['pick', 'edit', 'fixup', 'squash', 'reword', 'drop']
|
||||
let index = index(map(copy(words), 'v:val[0]'), getline('.')[0])
|
||||
let index = ((index < 0 ? 0 : index) + 10000 * len(words) + a:count) % len(words)
|
||||
call s:choose(words[index])
|
||||
endfunction
|
||||
|
||||
command! -buffer -bar -range Pick :<line1>,<line2>call s:choose('pick')
|
||||
@@ -34,16 +37,16 @@ command! -buffer -bar -range Edit :<line1>,<line2>call s:choose('edit')
|
||||
command! -buffer -bar -range Reword :<line1>,<line2>call s:choose('reword')
|
||||
command! -buffer -bar -range Fixup :<line1>,<line2>call s:choose('fixup')
|
||||
command! -buffer -bar -range Drop :<line1>,<line2>call s:choose('drop')
|
||||
command! -buffer -bar Cycle :call s:cycle()
|
||||
" The above are more useful when they are mapped; for example:
|
||||
"nnoremap <buffer> <silent> S :Cycle<CR>
|
||||
command! -buffer -count=1 -bar -bang Cycle call s:cycle(<bang>0 ? -<count> : <count>)
|
||||
|
||||
if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
|
||||
finish
|
||||
endif
|
||||
|
||||
nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
|
||||
nnoremap <buffer> <silent> <C-A> :<C-U><C-R>=v:count1<CR>Cycle<CR>
|
||||
nnoremap <buffer> <silent> <C-X> :<C-U><C-R>=v:count1<CR>Cycle!<CR>
|
||||
|
||||
let b:undo_ftplugin = b:undo_ftplugin . "|nunmap <buffer> K"
|
||||
let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> K'|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'"
|
||||
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
||||
" Language: Rust
|
||||
" Description: Vim ftplugin for Rust
|
||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||
" Maintainer: Kevin Ballard <kevin@sb.org>
|
||||
" Last Change: June 08, 2016
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
@@ -139,7 +138,7 @@ command! -bar RustInfoToClipboard call rust#debugging#InfoToClipboard()
|
||||
command! -bar -nargs=1 RustInfoToFile call rust#debugging#InfoToFile(<f-args>)
|
||||
|
||||
" See |:RustTest| for docs
|
||||
command! -buffer -nargs=* -bang RustTest call rust#Test(<bang>0, <q-args>)
|
||||
command! -buffer -nargs=* -count -bang RustTest call rust#Test(<q-mods>, <count>, <bang>0, <q-args>)
|
||||
|
||||
if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args")
|
||||
let b:rust_last_rustc_args = []
|
||||
|
||||
29
ftplugin/vala.vim
Normal file
29
ftplugin/vala.vim
Normal file
@@ -0,0 +1,29 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||
|
||||
" Insert a CCode attribute for the symbol below the cursor
|
||||
" https://wiki.gnome.org/Projects/Vala/LegacyBindings
|
||||
function! CCode() abort
|
||||
normal yiwO[CCode (cname = "pa")]
|
||||
endfunction
|
||||
|
||||
" Set Vala Coding Style
|
||||
" https://wiki.gnome.org/Projects/Vala/Hacking#Coding_Style
|
||||
function! ValaCodingStyle() abort
|
||||
set ts=4 sts=4 sw=4 tw=0 wm=0
|
||||
endfunction
|
||||
|
||||
command! -buffer -bar CCode call CCode()
|
||||
command! -buffer -bar ValaCodingStyle call ValaCodingStyle()
|
||||
|
||||
if get(g:, 'vala_syntax_folding_enabled', 1)
|
||||
setlocal foldmethod=syntax
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -
|
||||
" Vim indent file
|
||||
" Language: Cucumber
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2013 May 30
|
||||
" Last Change: 2017 Jun 13
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -29,7 +29,7 @@ function! GetCucumberIndent()
|
||||
let line = getline(prevnonblank(v:lnum-1))
|
||||
let cline = getline(v:lnum)
|
||||
let nline = getline(nextnonblank(v:lnum+1))
|
||||
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
|
||||
let sw = exists('*shiftwidth') ? shiftwidth() : shiftwidth()
|
||||
let syn = s:syn(prevnonblank(v:lnum-1))
|
||||
let csyn = s:syn(v:lnum)
|
||||
let nsyn = s:syn(nextnonblank(v:lnum+1))
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim indent file
|
||||
" Language: git config file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2013 May 30
|
||||
" Last Change: 2017 Jun 13
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -22,7 +22,7 @@ if exists("*GetGitconfigIndent")
|
||||
endif
|
||||
|
||||
function! GetGitconfigIndent()
|
||||
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
|
||||
let sw = shiftwidth()
|
||||
let line = getline(prevnonblank(v:lnum-1))
|
||||
let cline = getline(v:lnum)
|
||||
if line =~ '\\\@<!\%(\\\\\)*\\$'
|
||||
|
||||
@@ -193,7 +193,12 @@ function GetRustIndent(lnum)
|
||||
" 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()
|
||||
call cursor(a:lnum - 1, 1)
|
||||
let l:scope_start = searchpair('{\|(', '', '}\|)', 'nbW',
|
||||
\ 's:is_string_comment(line("."), col("."))')
|
||||
if l:scope_start != 0 && l:scope_start < a:lnum
|
||||
return indent(l:scope_start) + 4
|
||||
endif
|
||||
endif
|
||||
|
||||
if l:last_prevline_character ==# ","
|
||||
|
||||
@@ -15,7 +15,7 @@ syntax match typescriptClassName contained /\K\k*/
|
||||
|
||||
syntax region typescriptClassTypeParameter
|
||||
\ start=/</ end=/>/
|
||||
\ contains=typescriptTypeParameter
|
||||
\ contains=@typescriptTypeParameterCluster
|
||||
\ nextgroup=typescriptClassBlock,typescriptClassExtends
|
||||
\ contained skipwhite skipnl
|
||||
|
||||
@@ -47,7 +47,7 @@ syntax match typescriptInterfaceName contained /\k\+/
|
||||
\ skipwhite skipnl
|
||||
syntax region typescriptInterfaceTypeParameter
|
||||
\ start=/</ end=/>/
|
||||
\ contains=typescriptTypeParameter
|
||||
\ contains=@typescriptTypeParameterCluster
|
||||
\ nextgroup=typescriptObjectType,typescriptInterfaceExtends
|
||||
\ contained
|
||||
\ skipwhite skipnl
|
||||
|
||||
@@ -16,7 +16,7 @@ syntax region typescriptString
|
||||
\ contains=typescriptSpecial,@Spell
|
||||
\ extend
|
||||
|
||||
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{4,5}})|c\u|.)"
|
||||
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)"
|
||||
|
||||
" From vim runtime
|
||||
" <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48>
|
||||
@@ -24,7 +24,7 @@ syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|
|
||||
|
||||
syntax region typescriptTemplate
|
||||
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
|
||||
\ contains=typescriptTemplateSubstitution
|
||||
\ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell
|
||||
\ nextgroup=@typescriptSymbols
|
||||
\ skipwhite skipempty
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') ==
|
||||
|
||||
syntax region typescriptObjectLiteral matchgroup=typescriptBraces
|
||||
\ start=/{/ end=/}/
|
||||
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName
|
||||
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword
|
||||
\ fold contained
|
||||
|
||||
syntax keyword typescriptObjectAsyncKeyword async contained
|
||||
|
||||
syntax match typescriptObjectLabel contained /\k\+\_s*/
|
||||
\ nextgroup=typescriptObjectColon,@typescriptCallImpl
|
||||
\ skipwhite skipempty
|
||||
|
||||
@@ -3,13 +3,17 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') ==
|
||||
" Types
|
||||
syntax match typescriptOptionalMark /?/ contained
|
||||
|
||||
syntax cluster typescriptTypeParameterCluster contains=
|
||||
\ typescriptTypeParameter,
|
||||
\ typescriptGenericDefault
|
||||
|
||||
syntax region typescriptTypeParameters matchgroup=typescriptTypeBrackets
|
||||
\ start=/</ end=/>/
|
||||
\ contains=typescriptTypeParameter
|
||||
\ contains=@typescriptTypeParameterCluster
|
||||
\ contained
|
||||
|
||||
syntax match typescriptTypeParameter /\K\k*/
|
||||
\ nextgroup=typescriptConstraint,typescriptGenericDefault
|
||||
\ nextgroup=typescriptConstraint
|
||||
\ contained skipwhite skipnl
|
||||
|
||||
syntax keyword typescriptConstraint extends
|
||||
|
||||
@@ -111,6 +111,7 @@ if exists("did_typescript_hilink")
|
||||
HiLink typescriptMethodAccessor Operator
|
||||
|
||||
HiLink typescriptAsyncFuncKeyword Keyword
|
||||
HiLink typescriptObjectAsyncKeyword Keyword
|
||||
HiLink typescriptAsyncFor Keyword
|
||||
HiLink typescriptFuncKeyword Keyword
|
||||
HiLink typescriptAsyncFunc Keyword
|
||||
|
||||
@@ -28,7 +28,7 @@ syntax keyword dartConstant null
|
||||
syntax keyword dartTypedef this super class typedef enum mixin
|
||||
syntax keyword dartOperator new is as in
|
||||
syntax match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:"
|
||||
syntax keyword dartType void var bool int double num dynamic
|
||||
syntax keyword dartCoreType void var dynamic
|
||||
syntax keyword dartStatement return
|
||||
syntax keyword dartStorageClass static abstract final const factory
|
||||
syntax keyword dartExceptions throw rethrow try on catch finally
|
||||
@@ -51,27 +51,26 @@ syntax match dartLibrary "^\(library\|part of\|part\)\>"
|
||||
syntax match dartMetadata "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>"
|
||||
|
||||
" Numbers
|
||||
syntax match dartNumber "\<\d\+\(\.\d\+\)\=\>"
|
||||
syntax match dartNumber "\<\d\+\(\.\d\+\)\=\>"
|
||||
|
||||
" User Types
|
||||
if !exists('dart_highlight_types') || dart_highlight_types
|
||||
syntax match dartTypeName "\<[A-Z]\w*\>\|\<_[A-Z]\w*\>"
|
||||
endif
|
||||
syntax match dartUserType "\<_\?\u[[:alnum:]_\$]*\>"
|
||||
|
||||
" Core libraries
|
||||
if !exists('dart_corelib_highlight') || dart_corelib_highlight
|
||||
syntax keyword dartCoreClasses BidirectionalIterator Comparable DateTime
|
||||
\ Duration Expando Function Invocation Iterable Iterator List Map Match
|
||||
\ Object Pattern RegExp RuneIterator Runes Set StackTrace Stopwatch String
|
||||
\ StringBuffer StringSink Symbol Type
|
||||
syntax keyword dartCoreTypedefs Comparator
|
||||
syntax keyword dartCoreExceptions AbstractClassInstantiationError
|
||||
\ ArgumentError AssertionError CastError ConcurrentModificationError
|
||||
\ Error Exception FallThroughError FormatException
|
||||
\ IntegerDivisionByZeroException NoSuchMethodError NullThrownError
|
||||
\ OutOfMemoryError RangeError RuntimeError StackOverflowError StateError
|
||||
\ TypeError UnimplementedError UnsupportedError
|
||||
endif
|
||||
" Function highlighting
|
||||
syntax match dartFunction "\zs\<\(_\?\l[[:alnum:]_\$]*\)\>*\s*\ze("
|
||||
|
||||
" SDK libraries
|
||||
syntax keyword dartSdkClass BidirectionalIterator Comparable DateTime
|
||||
\ Duration Expando Function Invocation Iterable Iterator List Map Match
|
||||
\ Object Pattern RegExp RuneIterator Runes Set StackTrace Stopwatch String
|
||||
\ StringBuffer StringSink Symbol Type bool int double num
|
||||
syntax keyword dartSdkTypedef Comparator
|
||||
syntax keyword dartSdkException AbstractClassInstantiationError
|
||||
\ ArgumentError AssertionError CastError ConcurrentModificationError
|
||||
\ Error Exception FallThroughError FormatException
|
||||
\ IntegerDivisionByZeroException NoSuchMethodError NullThrownError
|
||||
\ OutOfMemoryError RangeError RuntimeError StackOverflowError StateError
|
||||
\ TypeError UnimplementedError UnsupportedError
|
||||
|
||||
" Comments
|
||||
syntax keyword dartTodo contained TODO FIXME XXX
|
||||
@@ -119,21 +118,23 @@ highlight default link dartLineComment Comment
|
||||
highlight default link dartLineDocComment Comment
|
||||
highlight default link dartShebangLine Comment
|
||||
highlight default link dartConstant Constant
|
||||
highlight default link dartTypedef Typedef
|
||||
highlight default link dartTodo Todo
|
||||
highlight default link dartKeyword Keyword
|
||||
highlight default link dartType Type
|
||||
highlight default link dartTypeName Type
|
||||
highlight default link dartInterpolation PreProc
|
||||
highlight default link dartDocLink SpecialComment
|
||||
highlight default link dartSpecialChar SpecialChar
|
||||
highlight default link dartLibrary Include
|
||||
highlight default link dartUri String
|
||||
highlight default link dartCombinator Keyword
|
||||
highlight default link dartCoreClasses Type
|
||||
highlight default link dartCoreTypedefs Typedef
|
||||
highlight default link dartCoreExceptions Exception
|
||||
highlight default link dartMetadata PreProc
|
||||
highlight default link dartSdkTypedef Typedef
|
||||
highlight default link dartTypedef Typedef
|
||||
highlight default link dartSdkException Exception
|
||||
highlight default link dartSdkClass dartType
|
||||
highlight default link dartCoreType dartType
|
||||
highlight default link dartUserType dartType
|
||||
highlight default link dartType Type
|
||||
highlight default link dartFunction Function
|
||||
|
||||
let b:current_syntax = "dart"
|
||||
let b:spell_options = "contained"
|
||||
|
||||
@@ -6,7 +6,7 @@ if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax match dhallInterpolation "\v\$\{[^\}]*\}"
|
||||
syntax match dhallInterpolation "\v\$\{([^\}]|\\n)*\}"
|
||||
syntax keyword dhallTodo TODO FIXME
|
||||
syntax match dhallBrackets "[<>|]"
|
||||
syntax match dhallOperator "+\|*\|#"
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Language: git commit file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.git/COMMIT_EDITMSG
|
||||
" Last Change: 2013 May 30
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Language: git config file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: gitconfig, .gitconfig, *.git/config
|
||||
" Last Change: 2010 May 21
|
||||
" Last Change: 2019 Sep 27
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -13,7 +13,7 @@ endif
|
||||
syn case ignore
|
||||
syn sync minlines=10
|
||||
|
||||
syn match gitconfigComment "[#;].*"
|
||||
syn match gitconfigComment "[#;].*" contains=@Spell
|
||||
syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
|
||||
syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
|
||||
syn match gitconfigVariable "\%(^\s*\)\@<=\a[a-z0-9-]*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Language: git rebase --interactive
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: git-rebase-todo
|
||||
" Last Change: 2013 May 30
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -12,36 +12,49 @@ endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn match gitrebaseHash "\v<\x{7,40}>" contained
|
||||
syn match gitrebaseCommit "\v<\x{7,40}>" nextgroup=gitrebaseSummary skipwhite
|
||||
syn match gitrebaseHash "\v<\x{7,}>" contained
|
||||
syn match gitrebaseCommit "\v<\x{7,}>" nextgroup=gitrebaseSummary skipwhite
|
||||
syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite
|
||||
syn match gitrebaseBreak "\v^b%(reak)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseBreak "\v^b%(reak)=>"
|
||||
syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseNoop "\v^noop>"
|
||||
syn match gitrebaseMerge "\v^m(erge)=>" nextgroup=gitrebaseMergeOption,gitrebaseName skipwhite
|
||||
syn match gitrebaseLabel "\v^l(abel)=>" nextgroup=gitrebaseName skipwhite
|
||||
syn match gitrebaseReset "\v^r(eset)=>" nextgroup=gitrebaseName skipwhite
|
||||
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
||||
syn match gitrebaseCommand ".*" contained
|
||||
syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash
|
||||
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseMergeOption "\v-[Cc]>" nextgroup=gitrebaseMergeCommit skipwhite contained
|
||||
syn match gitrebaseMergeCommit "\v<\x{7,}>" nextgroup=gitrebaseName skipwhite contained
|
||||
syn match gitrebaseName "\v[^[:space:].*?i:^~/-]\S+" nextgroup=gitrebaseMergeComment skipwhite contained
|
||||
syn match gitrebaseMergeComment "#" nextgroup=gitrebaseSummary skipwhite contained
|
||||
|
||||
hi def link gitrebaseCommit gitrebaseHash
|
||||
hi def link gitrebaseHash Identifier
|
||||
hi def link gitrebasePick Statement
|
||||
hi def link gitrebaseReword Number
|
||||
hi def link gitrebasePick Type
|
||||
hi def link gitrebaseReword Conditional
|
||||
hi def link gitrebaseEdit PreProc
|
||||
hi def link gitrebaseSquash Type
|
||||
hi def link gitrebaseFixup Special
|
||||
hi def link gitrebaseExec Function
|
||||
hi def link gitrebaseSquash Statement
|
||||
hi def link gitrebaseFixup Repeat
|
||||
hi def link gitrebaseExec Operator
|
||||
hi def link gitrebaseBreak Macro
|
||||
hi def link gitrebaseDrop Comment
|
||||
hi def link gitrebaseNoop Comment
|
||||
hi def link gitrebaseMerge Exception
|
||||
hi def link gitrebaseLabel Label
|
||||
hi def link gitrebaseReset Keyword
|
||||
hi def link gitrebaseSummary String
|
||||
hi def link gitrebaseComment Comment
|
||||
hi def link gitrebaseSquashError Error
|
||||
hi def link gitrebaseMergeCommit gitrebaseCommit
|
||||
hi def link gitrebaseMergeComment gitrebaseComment
|
||||
hi def link gitrebaseName Tag
|
||||
|
||||
let b:current_syntax = "gitrebase"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Language: git send-email message
|
||||
" Maintainer: Tim Pope
|
||||
" Filenames: .gitsendemail.*
|
||||
" Last Change: 2010 May 21
|
||||
" Last Change: 2016 Aug 29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
||||
@@ -164,15 +164,17 @@ endif
|
||||
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
|
||||
|
||||
" Integers
|
||||
syn match goDecimalInt "\<-\=\(0\|[1-9]\d*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]\x\+\>"
|
||||
syn match goHexadecimalError "\<-\=0[xX]\x*[^ \t0-9A-Fa-f]\S*\>"
|
||||
syn match goOctalInt "\<-\=0\o\+\>"
|
||||
syn match goOctalError "\<-\=0[XxBb\]]\@!\o*[^ \t0-7]\S*\>"
|
||||
syn match goBinaryInt "\<-\=0[bB][01]\+\>"
|
||||
syn match goBinaryError "\<-\=0[bB][01]*[^ \t01]\S*\>"
|
||||
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
|
||||
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_]\|__\)\S*\|_\)\>"
|
||||
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
|
||||
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
|
||||
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
|
||||
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_]\S*\|__\S*\|_\)\>"
|
||||
|
||||
hi def link goDecimalInt Integer
|
||||
hi def link goDecimalError Error
|
||||
hi def link goHexadecimalInt Integer
|
||||
hi def link goHexadecimalError Error
|
||||
hi def link goOctalInt Integer
|
||||
|
||||
@@ -35,7 +35,7 @@ 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 match graphqlConstant "\<[_A-Z][_A-Z0-9]*\>" display
|
||||
|
||||
syn keyword graphqlMetaFields __schema __type __typename
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ syn keyword htmlTagName contained article aside audio canvas command
|
||||
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
||||
syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output
|
||||
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
|
||||
syn keyword htmlTagName contained template content shadow
|
||||
syn keyword htmlTagName contained template content shadow slot
|
||||
syn keyword htmlTagName contained wbr bdi
|
||||
syn keyword htmlTagName contained picture
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ syn match i3ConfigFontNamespace /\w\+:/ contained contains=i3ConfigFontSeparator
|
||||
syn match i3ConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=i3ConfigFontNamespace,i3ConfigFontSeparator,i3ConfigFontKeyword
|
||||
syn match i3ConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
||||
syn match i3ConfigFont /^\s*font\s\+.*$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
|
||||
" variables
|
||||
syn match i3ConfigString /\(['"]\)\(.\{-}\)\1/ contained
|
||||
@@ -55,8 +55,8 @@ syn keyword i3ConfigInitializeKeyword set contained
|
||||
syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString
|
||||
|
||||
" Gaps
|
||||
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle contained
|
||||
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,number,i3ConfigVariable
|
||||
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained
|
||||
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,i3ConfigNumber,i3ConfigVariable
|
||||
syn keyword i3ConfigSmartGapKeyword on inverse_outer contained
|
||||
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=i3ConfigSmartGapKeyword
|
||||
syn keyword i3ConfigSmartBorderKeyword on no_gaps contained
|
||||
@@ -64,19 +64,21 @@ syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contai
|
||||
|
||||
" Keyboard bindings
|
||||
syn keyword i3ConfigAction toggle fullscreen restart key import kill shrink grow contained
|
||||
syn keyword i3ConfigAction focus move split layout resize restore reload mute unmute exit contained
|
||||
syn keyword i3ConfigAction focus move grow height width split layout resize restore reload mute unmute exit mode workspace container to contained
|
||||
syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3ConfigVariableModifier
|
||||
syn match i3ConfigNumber /\s\d\+/ contained
|
||||
syn match i3ConfigUnit /\sp\(pt\|x\)/ contained
|
||||
syn match i3ConfigUnitOr /\sor/ contained
|
||||
syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps contained
|
||||
syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
||||
syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigBindArgument,i3ConfigNumber,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword
|
||||
syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword
|
||||
|
||||
" Floating
|
||||
syn keyword i3ConfigSizeSpecial x contained
|
||||
syn match i3ConfigNegativeSize /-/ contained
|
||||
syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize
|
||||
syn match i3ConfigFloating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
|
||||
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=Size
|
||||
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=i3ConfigSize
|
||||
|
||||
" Orientation
|
||||
syn keyword i3ConfigOrientationKeyword vertical horizontal auto contained
|
||||
@@ -88,7 +90,7 @@ syn match i3ConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\
|
||||
|
||||
" Border style
|
||||
syn keyword i3ConfigBorderStyleKeyword none normal pixel contained
|
||||
syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,number
|
||||
syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,i3ConfigNumber
|
||||
|
||||
" Hide borders and edges
|
||||
syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
||||
@@ -97,7 +99,7 @@ syn match i3ConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|b
|
||||
" Arbitrary commands for specific windows (for_window)
|
||||
syn keyword i3ConfigCommandKeyword for_window contained
|
||||
syn region i3ConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=i3ConfigString
|
||||
syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=WindowStringSpacial,i3ConfigString
|
||||
syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=i3ConfigWindowStringSpacial,i3ConfigString
|
||||
syn match i3ConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigCommandKeyword,i3ConfigBorderStyleKeyword,i3ConfigLayoutKeyword,i3ConfigOrientationKeyword,Size,i3ConfigNumber
|
||||
|
||||
" Disable focus open opening
|
||||
@@ -127,6 +129,9 @@ syn match i3ConfigWorkspace /^\s*workspace\s\+.*$/ contains=i3ConfigWorkspaceKey
|
||||
syn keyword i3ConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
||||
syn match i3ConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable
|
||||
|
||||
syn keyword i3ConfigTitleAlignKeyword left center right contained
|
||||
syn match i3ConfigTitleAlign /^\s*title_align\s\+.*$/ contains=i3ConfigTitleAlignKeyword
|
||||
|
||||
" Interprocess communication
|
||||
syn match i3ConfigInterprocessKeyword /ipc-socket/ contained
|
||||
syn match i3ConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=i3ConfigInterprocessKeyword
|
||||
@@ -175,10 +180,10 @@ syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3C
|
||||
|
||||
" Group mode/bar
|
||||
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
|
||||
" Line continuation
|
||||
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
|
||||
" Define the highlighting.
|
||||
hi! def link i3ConfigError Error
|
||||
@@ -191,6 +196,7 @@ hi! def link i3ConfigOrientationKeyword Type
|
||||
hi! def link i3ConfigMouseWarpingType Type
|
||||
hi! def link i3ConfigFocusFollowsMouseType Type
|
||||
hi! def link i3ConfigGapStyleKeyword Type
|
||||
hi! def link i3ConfigTitleAlignKeyword Type
|
||||
hi! def link i3ConfigSmartGapKeyword Type
|
||||
hi! def link i3ConfigSmartBorderKeyword Type
|
||||
hi! def link i3ConfigLayoutKeyword Type
|
||||
@@ -201,9 +207,11 @@ hi! def link i3ConfigCommand Type
|
||||
hi! def link i3ConfigOutput Type
|
||||
hi! def link i3ConfigWindowCommandSpecial Type
|
||||
hi! def link i3ConfigFocusWrappingType Type
|
||||
hi! def link i3ConfigUnitOr Type
|
||||
hi! def link i3ConfigFontSize Constant
|
||||
hi! def link i3ConfigColor Constant
|
||||
hi! def link i3ConfigNumber Constant
|
||||
hi! def link i3ConfigUnit Constant
|
||||
hi! def link i3ConfigVariableAndModifier Constant
|
||||
hi! def link i3ConfigTimeUnit Constant
|
||||
hi! def link i3ConfigModifier Constant
|
||||
@@ -221,6 +229,7 @@ hi! def link i3ConfigFontKeyword Identifier
|
||||
hi! def link i3ConfigBindKeyword Identifier
|
||||
hi! def link i3ConfigOrientation Identifier
|
||||
hi! def link i3ConfigGapStyle Identifier
|
||||
hi! def link i3ConfigTitleAlign Identifier
|
||||
hi! def link i3ConfigSmartGap Identifier
|
||||
hi! def link i3ConfigSmartBorder Identifier
|
||||
hi! def link i3ConfigLayout Identifier
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'log') == -1
|
||||
" Vim syntax file
|
||||
" Language: Generic log file
|
||||
" Maintainer: MTDL9 <https://github.com/MTDL9>
|
||||
" Latest Revision: 2019-04-16
|
||||
" Latest Revision: 2019-11-24
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -52,8 +52,8 @@ syn match logDate '\(\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\) \)\?\(Jan\|Feb\|Mar\|
|
||||
syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite
|
||||
|
||||
" Follows logTime, matches UTC or PDT 2019 or 2019 EDT
|
||||
syn match logTimeZone '\(UTC\|PDT\|EDT\|GMT\|EST\|KST\)\( \d\{4}\)\?' contained
|
||||
syn match logTimeZone '\d\{4} \(UTC\|PDT\|EDT\|GMT\|EST\|KST\)' contained
|
||||
syn match logTimeZone '[A-Z]\{2,5}\>\( \d\{4}\)\?' contained
|
||||
syn match logTimeZone '\d\{4} [A-Z]\{2,5}\>' contained
|
||||
|
||||
|
||||
" Entities
|
||||
@@ -66,7 +66,7 @@ syn match logIPV4 '\<\d\{1,3}\(\.\d\{1,3}\)\{3}\>'
|
||||
syn match logIPV6 '\<\x\{1,4}\(:\x\{1,4}\)\{7}\>'
|
||||
syn match logMacAddress '\<\x\{2}\(:\x\{2}\)\{5}'
|
||||
syn match logFilePath '\<\w:\\[^\n|,; ()'"\]{}]\+'
|
||||
syn match logFilePath '\/\w[^\n|,; ()'"\]{}]\+'
|
||||
syn match logFilePath '[^a-zA-Z0-9"']\@<=\/\w[^\n|,; ()'"\]{}]\+'
|
||||
|
||||
|
||||
" Syslog Columns
|
||||
|
||||
@@ -175,7 +175,7 @@ if version >= 508 || !exists("did_ps1_syn_inits")
|
||||
HiLink ps1Comment Comment
|
||||
HiLink ps1CommentTodo Todo
|
||||
HiLink ps1CommentDoc Tag
|
||||
HiLink ps1CDocParam Todo
|
||||
HiLink ps1CDocParam Identifier
|
||||
HiLink ps1Operator Operator
|
||||
HiLink ps1Repeat Repeat
|
||||
HiLink ps1RepeatAndCmdlet Repeat
|
||||
|
||||
@@ -29,7 +29,7 @@ endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn cluster qmlExpr contains=qmlStringD,qmlString,SqmlCharacter,qmlNumber,qmlObjectLiteralType,qmlBoolean,qmlType,qmlJsType,qmlNull,qmlGlobal,qmlFunction
|
||||
syn cluster qmlExpr contains=qmlStringD,qmlStringS,SqmlCharacter,qmlNumber,qmlObjectLiteralType,qmlBoolean,qmlType,qmlJsType,qmlNull,qmlGlobal,qmlFunction
|
||||
syn keyword qmlCommentTodo TODO FIXME XXX TBD contained
|
||||
syn match qmlLineComment "\/\/.*" contains=@Spell,qmlCommentTodo
|
||||
syn match qmlCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
|
||||
|
||||
@@ -175,7 +175,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*\n\%(\s*:.*:\s*.*\s*\n\)*\n\ze\z(\s\+\)+
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s*\(\S*\)\?\s*\n\%(\s*:.*:\s*.*\s*\n\)*\n\ze\z(\s\+\)+
|
||||
\ skip=+^$+
|
||||
\ end=+^\z1\@!+
|
||||
\ contains=@NoSpell
|
||||
|
||||
@@ -55,6 +55,7 @@ syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipe
|
||||
syn keyword rustStorage move mut ref static const
|
||||
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
|
||||
syn keyword rustAwait await
|
||||
syn match rustKeyword /\<try\>!\@!/ display
|
||||
|
||||
syn keyword rustPubScopeCrate crate contained
|
||||
syn match rustPubScopeDelim /[()]/ contained
|
||||
|
||||
@@ -187,6 +187,7 @@ syntax region swiftEscapedReservedWord start="`" end="`" oneline
|
||||
syntax keyword swiftAttributes
|
||||
\ @_exported
|
||||
\ @_functionBuilder
|
||||
\ @_implementationOnly
|
||||
\ @_silgen_name
|
||||
\ @assignment
|
||||
\ @autoclosure
|
||||
|
||||
@@ -4830,10 +4830,9 @@ syn keyword terraSection connection output variable terraform locals
|
||||
syn keyword terraValueBool true false on off yes no
|
||||
|
||||
syn keyword terraTodo contained TODO FIXME XXX BUG
|
||||
syn cluster terraCommentGroup contains=terraTodo
|
||||
syn region terraComment start="/\*" end="\*/" contains=@terraCommentGroup,@Spell
|
||||
syn region terraComment start="#" end="$" contains=@terraCommentGroup,@Spell
|
||||
syn region terraComment start="//" end="$" contains=@terraCommentGroup,@Spell
|
||||
syn region terraComment start="/\*" end="\*/" contains=terraTodo,@Spell
|
||||
syn region terraComment start="#" end="$" contains=terraTodo,@Spell
|
||||
syn region terraComment start="//" end="$" contains=terraTodo,@Spell
|
||||
|
||||
syn keyword terraResource resource nextgroup=terraResourceTypeStr skipwhite
|
||||
syn region terraResourceTypeStr start=/"/ end=/"/ contains=terraResourceTypeBI nextgroup=terraResourceName skipwhite
|
||||
@@ -4867,13 +4866,11 @@ syn match terraBraces "[\[\]]"
|
||||
""" skip \" in strings.
|
||||
""" we may also want to pass \\" into a function to escape quotes.
|
||||
syn region terraValueString start=/"/ skip=/\\\+"/ end=/"/ contains=terraStringInterp
|
||||
syn region terraStringInterp matchgroup=terraBrackets start=/\${/ end=/}/ contains=terraValueFunction,terraValueVarSubscript,terraStringInterp contained
|
||||
syn region terraStringInterp matchgroup=terraBraces start=/\${/ end=/}/ contained contains=ALL
|
||||
syn region terraHereDocText start=/<<-\?\z([a-z0-9A-Z]\+\)/ end=/^\s*\z1/ contains=terraStringInterp
|
||||
|
||||
"" TODO match keywords here, not a-z+
|
||||
syn region terraValueFunction matchgroup=terraBrackets start=/[a-z]\+(/ end=/)/ contains=terraValueString,terraValueFunction,terraValueVarSubscript contained
|
||||
" User variables or module outputs can be lists or maps, and accessed with
|
||||
" var.map["foo"]
|
||||
syn region terraValueVarSubscript start=/\(\<var\|\<module\)\.[a-z0-9_-]\+\[/ end=/\]/ contains=terraValueString,terraValueFunction,terraValueVarSubscript contained
|
||||
syn match terraValueFunction "[a-z]\+(\@="
|
||||
|
||||
""" HCL2
|
||||
syn keyword terraContent content
|
||||
@@ -4892,7 +4889,6 @@ syn region terraBlock matchgroup=terraBraces start="{" end="}" fold transparent
|
||||
|
||||
hi def link terraComment Comment
|
||||
hi def link terraTodo Todo
|
||||
hi def link terraBrackets Operator
|
||||
hi def link terraProvider Structure
|
||||
hi def link terraBraces Delimiter
|
||||
hi def link terraProviderName String
|
||||
@@ -4905,7 +4901,6 @@ hi def link terraDataName String
|
||||
hi def link terraDataTypeBI Tag
|
||||
hi def link terraDataTypeStr String
|
||||
hi def link terraSection Structure
|
||||
hi def link terraStringInterp Identifier
|
||||
hi def link terraValueBool Boolean
|
||||
hi def link terraValueDec Number
|
||||
hi def link terraValueHexaDec Number
|
||||
@@ -4915,8 +4910,7 @@ hi def link terraProvisioner Structure
|
||||
hi def link terraProvisionerName String
|
||||
hi def link terraModule Structure
|
||||
hi def link terraModuleName String
|
||||
hi def link terraValueFunction Identifier
|
||||
hi def link terraValueVarSubscript Identifier
|
||||
hi def link terraValueFunction Function
|
||||
hi def link terraDynamic Structure
|
||||
hi def link terraDynamicName String
|
||||
hi def link terraContent Structure
|
||||
|
||||
@@ -33,12 +33,12 @@ syn match zigBuiltinFn "\v\@(addWithOverflow|ArgType|atomicLoad|bitCast|breakpoi
|
||||
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\@(embedFile|export|tagName|TagType|errorName|call)>"
|
||||
syn match zigBuiltinFn "\v\@(errorReturnTrace|fence|fieldParentPtr|field|unionInit)>"
|
||||
syn match zigBuiltinFn "\v\@(frameAddress|import|inlineCall|newStackCall|asyncCall|intToPtr|IntType)>"
|
||||
syn match zigBuiltinFn "\v\@(frameAddress|import|newStackCall|asyncCall|intToPtr|IntType)>"
|
||||
syn match zigBuiltinFn "\v\@(maxValue|memberCount|memberName|memberType|as)>"
|
||||
syn match zigBuiltinFn "\v\@(memcpy|memset|minValue|mod|mulWithOverflow|splat)>"
|
||||
syn match zigBuiltinFn "\v\@(noInlineCall|bitOffsetOf|byteOffsetOf|OpaqueType|panic|ptrCast)>"
|
||||
syn match zigBuiltinFn "\v\@(bitOffsetOf|byteOffsetOf|OpaqueType|panic|ptrCast)>"
|
||||
syn match zigBuiltinFn "\v\@(ptrToInt|rem|returnAddress|setCold|Type|shuffle)>"
|
||||
syn match zigBuiltinFn "\v\@(setRuntimeSafety|setEvalBranchQuota|setFloatMode)>"
|
||||
syn match zigBuiltinFn "\v\@(setGlobalLinkage|setGlobalSection|shlExact|This|hasDecl|hasField)>"
|
||||
|
||||
Reference in New Issue
Block a user