mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 12:03:53 -05:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8b350432c | ||
|
|
cdb8e233c2 | ||
|
|
ff282f610f | ||
|
|
74cb75bedd | ||
|
|
42529540df | ||
|
|
a688c66a04 | ||
|
|
0a7c62b3b2 | ||
|
|
c7b5826d53 | ||
|
|
1d348d0c2d |
@@ -1,6 +1,6 @@
|
|||||||

|

|
||||||
|
|
||||||
[![Build Status][travis-img-url]][travis-url] []()
|
[![Build Status][travis-img-url]][travis-url] []()
|
||||||
|
|
||||||
[travis-img-url]: https://travis-ci.org/sheerun/vim-polyglot.svg
|
[travis-img-url]: https://travis-ci.org/sheerun/vim-polyglot.svg
|
||||||
[travis-url]: https://travis-ci.org/sheerun/vim-polyglot
|
[travis-url]: https://travis-ci.org/sheerun/vim-polyglot
|
||||||
@@ -148,10 +148,10 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax)
|
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax)
|
||||||
- [racket](https://github.com/wlangstroth/vim-racket) (syntax, indent, ftplugin)
|
- [racket](https://github.com/wlangstroth/vim-racket) (syntax, indent, ftplugin)
|
||||||
- [ragel](https://github.com/jneen/ragel.vim) (syntax)
|
- [ragel](https://github.com/jneen/ragel.vim) (syntax)
|
||||||
|
- [raku](https://github.com/Raku/vim-raku) (syntax, indent, ftplugin)
|
||||||
- [raml](https://github.com/IN3D/vim-raml) (syntax, ftplugin)
|
- [raml](https://github.com/IN3D/vim-raml) (syntax, ftplugin)
|
||||||
- [razor](https://github.com/adamclerk/vim-razor) (syntax, indent, ftplugin)
|
- [razor](https://github.com/adamclerk/vim-razor) (syntax, indent, ftplugin)
|
||||||
- [reason](https://github.com/reasonml-editor/vim-reason-plus) (syntax, indent)
|
- [reason](https://github.com/reasonml-editor/vim-reason-plus) (syntax, indent)
|
||||||
- [rego](https://github.com/tsandall/vim-rego) (syntax)
|
|
||||||
- [rspec](https://github.com/keith/rspec.vim) (syntax)
|
- [rspec](https://github.com/keith/rspec.vim) (syntax)
|
||||||
- [rst](https://github.com/marshallward/vim-restructuredtext) (syntax, indent, autoload, ftplugin)
|
- [rst](https://github.com/marshallward/vim-restructuredtext) (syntax, indent, autoload, ftplugin)
|
||||||
- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin)
|
- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin)
|
||||||
|
|||||||
@@ -762,6 +762,10 @@ fu! csv#CalculateColumnWidth(row, silent) "{{{3
|
|||||||
" does not work with fixed width columns
|
" does not work with fixed width columns
|
||||||
" row for the row for which to calculate the width
|
" row for the row for which to calculate the width
|
||||||
let b:col_width=[]
|
let b:col_width=[]
|
||||||
|
if has( 'vartabs' ) && b:delimiter == "\t"
|
||||||
|
let vts_save=&vts
|
||||||
|
set vts=
|
||||||
|
endif
|
||||||
try
|
try
|
||||||
if exists("b:csv_headerline")
|
if exists("b:csv_headerline")
|
||||||
if line('.') < b:csv_headerline
|
if line('.') < b:csv_headerline
|
||||||
@@ -780,6 +784,9 @@ fu! csv#CalculateColumnWidth(row, silent) "{{{3
|
|||||||
" delete buffer content in variable b:csv_list,
|
" delete buffer content in variable b:csv_list,
|
||||||
" this was only necessary for calculating the max width
|
" this was only necessary for calculating the max width
|
||||||
unlet! b:csv_list s:columnize_count s:decimal_column
|
unlet! b:csv_list s:columnize_count s:decimal_column
|
||||||
|
if has( 'vartabs' ) && b:delimiter == "\t"
|
||||||
|
let &vts=vts_save
|
||||||
|
endif
|
||||||
endfu
|
endfu
|
||||||
fu! csv#Columnize(field) "{{{3
|
fu! csv#Columnize(field) "{{{3
|
||||||
" Internal function, not called from external,
|
" Internal function, not called from external,
|
||||||
@@ -2339,7 +2346,7 @@ fu! csv#ColumnWidth()
|
|||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! csv#Map(map, name, definition, ...) "{{{3
|
fu! csv#Map(map, name, definition, ...) "{{{3
|
||||||
let keyname = substitute(a:name, '[<>]', '', 'g')
|
let keyname = substitute(substitute(a:name, '[<>]', '', 'g'), '-', '_', 'g')
|
||||||
let expr = (exists("a:1") && a:1 == 'expr' ? '<expr>' : '')
|
let expr = (exists("a:1") && a:1 == 'expr' ? '<expr>' : '')
|
||||||
if !get(g:, "csv_nomap_". tolower(keyname), 0)
|
if !get(g:, "csv_nomap_". tolower(keyname), 0)
|
||||||
" All mappings are buffer local
|
" All mappings are buffer local
|
||||||
|
|||||||
@@ -69,12 +69,6 @@ function! s:check_plugin_clash() abort " {{{1
|
|||||||
call health#report_warn('Conflicting plugin detected: LaTeX-Box')
|
call health#report_warn('Conflicting plugin detected: LaTeX-Box')
|
||||||
call health#report_info('vimtex does not work as expected when LaTeX-Box is installed!')
|
call health#report_info('vimtex does not work as expected when LaTeX-Box is installed!')
|
||||||
call health#report_info('Please disable or remove it to use vimtex!')
|
call health#report_info('Please disable or remove it to use vimtex!')
|
||||||
|
|
||||||
let l:polyglot = !empty(filter(copy(l:scriptnames), "v:val =~# 'polyglot'"))
|
|
||||||
if l:polyglot
|
|
||||||
call health#report_info('LaTeX-Box is included with vim-polyglot and may be disabled with:')
|
|
||||||
call health#report_info('let g:polyglot_disabled = [''latex'']')
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ function! vimtex#init_options() abort " {{{1
|
|||||||
\ ],
|
\ ],
|
||||||
\ }
|
\ }
|
||||||
\})
|
\})
|
||||||
|
call s:init_option('vimtex_syntax_autoload_packages', ['amsmath'])
|
||||||
|
|
||||||
call s:init_option('vimtex_texcount_custom_arg', '')
|
call s:init_option('vimtex_texcount_custom_arg', '')
|
||||||
|
|
||||||
@@ -257,7 +258,10 @@ function! vimtex#init_options() abort " {{{1
|
|||||||
call s:init_option('vimtex_toc_enabled', 1)
|
call s:init_option('vimtex_toc_enabled', 1)
|
||||||
call s:init_option('vimtex_toc_custom_matchers', [])
|
call s:init_option('vimtex_toc_custom_matchers', [])
|
||||||
call s:init_option('vimtex_toc_show_preamble', 1)
|
call s:init_option('vimtex_toc_show_preamble', 1)
|
||||||
call s:init_option('vimtex_toc_todo_keywords', ['TODO', 'FIXME'])
|
call s:init_option('vimtex_toc_todo_labels', {
|
||||||
|
\ 'TODO': 'TODO: ',
|
||||||
|
\ 'FIXME': 'FIXME: '
|
||||||
|
\})
|
||||||
call s:init_option('vimtex_toc_config', {
|
call s:init_option('vimtex_toc_config', {
|
||||||
\ 'name' : 'Table of contents (vimtex)',
|
\ 'name' : 'Table of contents (vimtex)',
|
||||||
\ 'mode' : 1,
|
\ 'mode' : 1,
|
||||||
@@ -324,6 +328,7 @@ function! vimtex#init_options() abort " {{{1
|
|||||||
call s:init_option('vimtex_view_skim_activate', 0)
|
call s:init_option('vimtex_view_skim_activate', 0)
|
||||||
call s:init_option('vimtex_view_skim_reading_bar', 1)
|
call s:init_option('vimtex_view_skim_reading_bar', 1)
|
||||||
call s:init_option('vimtex_view_zathura_options', '')
|
call s:init_option('vimtex_view_zathura_options', '')
|
||||||
|
call s:init_option('vimtex_view_zathura_check_libsynctex', 1)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
@@ -332,18 +337,11 @@ function! vimtex#check_plugin_clash() abort " {{{1
|
|||||||
|
|
||||||
let l:latexbox = !empty(filter(copy(l:scriptnames), "v:val =~# 'latex-box'"))
|
let l:latexbox = !empty(filter(copy(l:scriptnames), "v:val =~# 'latex-box'"))
|
||||||
if l:latexbox
|
if l:latexbox
|
||||||
let l:polyglot = !empty(filter(copy(l:scriptnames), "v:val =~# 'polyglot'"))
|
|
||||||
call vimtex#log#warning([
|
call vimtex#log#warning([
|
||||||
\ 'Conflicting plugin detected: LaTeX-Box',
|
\ 'Conflicting plugin detected: LaTeX-Box',
|
||||||
\ 'vimtex does not work as expected when LaTeX-Box is installed!',
|
\ 'vimtex does not work as expected when LaTeX-Box is installed!',
|
||||||
\ 'Please disable or remove it to use vimtex!',
|
\ 'Please disable or remove it to use vimtex!',
|
||||||
\])
|
\])
|
||||||
if l:polyglot
|
|
||||||
call vimtex#log#warning([
|
|
||||||
\ 'LaTeX-Box is included with vim-polyglot and may be disabled with:',
|
|
||||||
\ 'let g:polyglot_disabled = [''latex'']',
|
|
||||||
\])
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ endfunction
|
|||||||
|
|
||||||
function! s:get_frac_cmd() abort " {{{1
|
function! s:get_frac_cmd() abort " {{{1
|
||||||
let l:save_pos = vimtex#pos#get_cursor()
|
let l:save_pos = vimtex#pos#get_cursor()
|
||||||
while v:true
|
while 1
|
||||||
let l:cmd = s:get_cmd('prev')
|
let l:cmd = s:get_cmd('prev')
|
||||||
if empty(l:cmd) || l:cmd.pos_start.lnum < line('.')
|
if empty(l:cmd) || l:cmd.pos_start.lnum < line('.')
|
||||||
call vimtex#pos#set_cursor(l:save_pos)
|
call vimtex#pos#set_cursor(l:save_pos)
|
||||||
@@ -375,7 +375,7 @@ function! s:get_frac_inline() abort " {{{1
|
|||||||
|
|
||||||
let l:pos_after = -1
|
let l:pos_after = -1
|
||||||
let l:pos_before = -1
|
let l:pos_before = -1
|
||||||
while v:true
|
while 1
|
||||||
let l:pos_before = l:pos_after
|
let l:pos_before = l:pos_after
|
||||||
let l:pos_after = match(l:line, '\/', l:pos_after+1)
|
let l:pos_after = match(l:line, '\/', l:pos_after+1)
|
||||||
if l:pos_after < 0 || l:pos_after >= l:col | break | endif
|
if l:pos_after < 0 || l:pos_after >= l:col | break | endif
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ function! s:choose_dict(dict, prompt) abort " {{{1
|
|||||||
return values(a:dict)[0]
|
return values(a:dict)[0]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
while v:true
|
while 1
|
||||||
redraw!
|
redraw!
|
||||||
if !empty(a:prompt)
|
if !empty(a:prompt)
|
||||||
echohl VimtexMsg
|
echohl VimtexMsg
|
||||||
@@ -93,7 +93,7 @@ endfunction
|
|||||||
function! s:choose_list(list, prompt) abort " {{{1
|
function! s:choose_list(list, prompt) abort " {{{1
|
||||||
if len(a:list) == 1 | return a:list[0] | endif
|
if len(a:list) == 1 | return a:list[0] | endif
|
||||||
|
|
||||||
while v:true
|
while 1
|
||||||
redraw!
|
redraw!
|
||||||
if !empty(a:prompt)
|
if !empty(a:prompt)
|
||||||
echohl VimtexMsg
|
echohl VimtexMsg
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'latex') == -1
|
|||||||
function! vimtex#imaps#init_buffer() abort " {{{1
|
function! vimtex#imaps#init_buffer() abort " {{{1
|
||||||
if !g:vimtex_imaps_enabled | return | endif
|
if !g:vimtex_imaps_enabled | return | endif
|
||||||
|
|
||||||
|
" Store mappings in buffer
|
||||||
|
if !exists('b:vimtex_imaps')
|
||||||
|
let b:vimtex_imaps = []
|
||||||
|
endif
|
||||||
|
|
||||||
"
|
"
|
||||||
" Create imaps
|
" Create imaps
|
||||||
"
|
"
|
||||||
@@ -32,16 +37,18 @@ endfunction
|
|||||||
function! vimtex#imaps#add_map(map) abort " {{{1
|
function! vimtex#imaps#add_map(map) abort " {{{1
|
||||||
let s:custom_maps = get(s:, 'custom_maps', []) + [a:map]
|
let s:custom_maps = get(s:, 'custom_maps', []) + [a:map]
|
||||||
|
|
||||||
if exists('s:created_maps')
|
if exists('b:vimtex_imaps')
|
||||||
call s:create_map(a:map)
|
call s:create_map(a:map)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
function! vimtex#imaps#list() abort " {{{1
|
function! vimtex#imaps#list() abort " {{{1
|
||||||
|
let l:maps = b:vimtex_imaps
|
||||||
|
|
||||||
silent new vimtex\ imaps
|
silent new vimtex\ imaps
|
||||||
|
|
||||||
for l:map in s:created_maps
|
for l:map in l:maps
|
||||||
call append('$', printf('%5S -> %-30S %S',
|
call append('$', printf('%5S -> %-30S %S',
|
||||||
\ get(l:map, 'leader', get(g:, 'vimtex_imaps_leader', '`')) . l:map.lhs,
|
\ get(l:map, 'leader', get(g:, 'vimtex_imaps_leader', '`')) . l:map.lhs,
|
||||||
\ l:map.rhs,
|
\ l:map.rhs,
|
||||||
@@ -78,15 +85,16 @@ endfunction
|
|||||||
" The imap generator
|
" The imap generator
|
||||||
"
|
"
|
||||||
function! s:create_map(map) abort " {{{1
|
function! s:create_map(map) abort " {{{1
|
||||||
if index(s:created_maps, a:map) >= 0 | return | endif
|
if index(b:vimtex_imaps, a:map) >= 0 | return | endif
|
||||||
|
let l:map = deepcopy(a:map)
|
||||||
|
|
||||||
let l:leader = get(a:map, 'leader', get(g:, 'vimtex_imaps_leader', '`'))
|
let l:leader = get(l:map, 'leader', get(g:, 'vimtex_imaps_leader', '`'))
|
||||||
if l:leader !=# '' && !hasmapto(l:leader, 'i')
|
if l:leader !=# '' && !hasmapto(l:leader, 'i')
|
||||||
silent execute 'inoremap <silent><nowait><buffer>' l:leader . l:leader l:leader
|
silent execute 'inoremap <silent><nowait><buffer>' l:leader . l:leader l:leader
|
||||||
endif
|
endif
|
||||||
let l:lhs = l:leader . a:map.lhs
|
let l:lhs = l:leader . l:map.lhs
|
||||||
|
|
||||||
let l:wrapper = get(a:map, 'wrapper', 'vimtex#imaps#wrap_math')
|
let l:wrapper = get(l:map, 'wrapper', 'vimtex#imaps#wrap_math')
|
||||||
if ! exists('*' . l:wrapper)
|
if ! exists('*' . l:wrapper)
|
||||||
echoerr 'vimtex error: imaps wrapper does not exist!'
|
echoerr 'vimtex error: imaps wrapper does not exist!'
|
||||||
echoerr ' ' . l:wrapper
|
echoerr ' ' . l:wrapper
|
||||||
@@ -95,25 +103,25 @@ function! s:create_map(map) abort " {{{1
|
|||||||
|
|
||||||
" Some wrappers use a context which must be made available to the wrapper
|
" Some wrappers use a context which must be made available to the wrapper
|
||||||
" function at run time.
|
" function at run time.
|
||||||
if has_key(a:map, 'context')
|
if has_key(l:map, 'context')
|
||||||
execute 'let l:key = "' . escape(l:lhs, '<') . '"'
|
execute 'let l:key = "' . escape(l:lhs, '<') . '"'
|
||||||
let l:key .= a:map.rhs
|
let l:key .= l:map.rhs
|
||||||
if !exists('b:vimtex_context')
|
if !exists('b:vimtex_context')
|
||||||
let b:vimtex_context = {}
|
let b:vimtex_context = {}
|
||||||
endif
|
endif
|
||||||
let b:vimtex_context[l:key] = a:map.context
|
let b:vimtex_context[l:key] = l:map.context
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" The rhs may be evaluated before being passed to wrapper, unless expr is
|
" The rhs may be evaluated before being passed to wrapper, unless expr is
|
||||||
" disabled (which it is by default)
|
" disabled (which it is by default)
|
||||||
if !get(a:map, 'expr')
|
if !get(l:map, 'expr')
|
||||||
let a:map.rhs = string(a:map.rhs)
|
let l:map.rhs = string(l:map.rhs)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
silent execute 'inoremap <expr><silent><nowait><buffer>' l:lhs
|
silent execute 'inoremap <expr><silent><nowait><buffer>' l:lhs
|
||||||
\ l:wrapper . '("' . escape(l:lhs, '\') . '", ' . a:map.rhs . ')'
|
\ l:wrapper . '("' . escape(l:lhs, '\') . '", ' . l:map.rhs . ')'
|
||||||
|
|
||||||
let s:created_maps += [a:map]
|
let b:vimtex_imaps += [l:map]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
@@ -182,11 +190,4 @@ endfunction
|
|||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|
||||||
|
|
||||||
" {{{1 Initialize module
|
|
||||||
|
|
||||||
let s:created_maps = []
|
|
||||||
|
|
||||||
" }}}1
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ function! s:input(fname, type) abort " {{{1
|
|||||||
if l:lnum == 0 | return a:fname | endif
|
if l:lnum == 0 | return a:fname | endif
|
||||||
|
|
||||||
let l:cmd = vimtex#cmd#get_at(l:lnum, l:cnum)
|
let l:cmd = vimtex#cmd#get_at(l:lnum, l:cnum)
|
||||||
|
if empty(l:cmd) | return a:fname | endif
|
||||||
|
|
||||||
let l:file = join(map(
|
let l:file = join(map(
|
||||||
\ get(l:cmd, 'args', [{}]),
|
\ get(l:cmd, 'args', [{}]),
|
||||||
\ "get(v:val, 'text', '')"),
|
\ "get(v:val, 'text', '')"),
|
||||||
@@ -80,7 +82,8 @@ endfunction
|
|||||||
" }}}1
|
" }}}1
|
||||||
function! s:search_candidates_texinputs(fname) abort " {{{1
|
function! s:search_candidates_texinputs(fname) abort " {{{1
|
||||||
for l:suffix in [''] + split(&l:suffixesadd, ',')
|
for l:suffix in [''] + split(&l:suffixesadd, ',')
|
||||||
let l:candidates = glob(b:vimtex.root . '/**/' . a:fname . l:suffix, 0, 1)
|
let l:candidates = glob(b:vimtex.root . '/**/'
|
||||||
|
\ . fnameescape(a:fname) . l:suffix, 0, 1)
|
||||||
if !empty(l:candidates)
|
if !empty(l:candidates)
|
||||||
return l:candidates[0]
|
return l:candidates[0]
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ let s:re_prefilter = '\v%(\\' . join([
|
|||||||
\ 'tableofcontents',
|
\ 'tableofcontents',
|
||||||
\ 'todo',
|
\ 'todo',
|
||||||
\], '|') . ')'
|
\], '|') . ')'
|
||||||
\ . '|\%\s*%(' . join(g:vimtex_toc_todo_keywords, '|') . ')'
|
\ . '|\%\s*%(' . join(keys(g:vimtex_toc_todo_labels), '|') . ')'
|
||||||
\ . '|\%\s*vimtex-include'
|
\ . '|\%\s*vimtex-include'
|
||||||
for s:m in g:vimtex_toc_custom_matchers
|
for s:m in g:vimtex_toc_custom_matchers
|
||||||
if has_key(s:m, 'prefilter')
|
if has_key(s:m, 'prefilter')
|
||||||
@@ -513,14 +513,16 @@ endfunction
|
|||||||
|
|
||||||
let s:matcher_todos = {
|
let s:matcher_todos = {
|
||||||
\ 're' : g:vimtex#re#not_bslash . '\%\s+('
|
\ 're' : g:vimtex#re#not_bslash . '\%\s+('
|
||||||
\ . join(g:vimtex_toc_todo_keywords, '|') . ')[ :]+\s*(.*)',
|
\ . join(keys(g:vimtex_toc_todo_labels), '|') . ')[ :]+\s*(.*)',
|
||||||
\ 'in_preamble' : 1,
|
\ 'in_preamble' : 1,
|
||||||
\ 'priority' : 2,
|
\ 'priority' : 2,
|
||||||
\}
|
\}
|
||||||
function! s:matcher_todos.get_entry(context) abort dict " {{{1
|
function! s:matcher_todos.get_entry(context) abort dict " {{{1
|
||||||
let [l:type, l:text] = matchlist(a:context.line, self.re)[1:2]
|
let [l:type, l:text] = matchlist(a:context.line, self.re)[1:2]
|
||||||
|
let l:label = g:vimtex_toc_todo_labels[toupper(l:type)]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'title' : toupper(l:type) . ': ' . l:text,
|
\ 'title' : l:label . l:text,
|
||||||
\ 'number' : '',
|
\ 'number' : '',
|
||||||
\ 'file' : a:context.file,
|
\ 'file' : a:context.file,
|
||||||
\ 'line' : a:context.lnum,
|
\ 'line' : a:context.lnum,
|
||||||
@@ -547,8 +549,10 @@ function! s:matcher_todonotes.get_entry(context) abort dict " {{{1
|
|||||||
let s:matcher_continue = deepcopy(self)
|
let s:matcher_continue = deepcopy(self)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let l:label = get(g:vimtex_toc_todo_labels, 'TODO', 'TODO: ')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'title' : 'TODO: ' . title,
|
\ 'title' : l:label . title,
|
||||||
\ 'number' : '',
|
\ 'number' : '',
|
||||||
\ 'file' : a:context.file,
|
\ 'file' : a:context.file,
|
||||||
\ 'line' : a:context.lnum,
|
\ 'line' : a:context.lnum,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ let g:vimtex#re#tex_input_import =
|
|||||||
let g:vimtex#re#tex_input_package =
|
let g:vimtex#re#tex_input_package =
|
||||||
\ '\v\\%(usepackage|RequirePackage)%(\s*\[[^]]*\])?\s*\{\zs[^}]*\ze\}'
|
\ '\v\\%(usepackage|RequirePackage)%(\s*\[[^]]*\])?\s*\{\zs[^}]*\ze\}'
|
||||||
|
|
||||||
let g:vimtex#re#tex_input = '\v^\s*%(' . join([
|
let g:vimtex#re#tex_input = '\v^\s*\zs%(' . join([
|
||||||
\ g:vimtex#re#tex_input_latex,
|
\ g:vimtex#re#tex_input_latex,
|
||||||
\ g:vimtex#re#tex_input_import,
|
\ g:vimtex#re#tex_input_import,
|
||||||
\ ], '|') . ')'
|
\ ], '|') . ')'
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'latex') == -1
|
|||||||
"
|
"
|
||||||
|
|
||||||
function! vimtex#syntax#load#general() abort " {{{1
|
function! vimtex#syntax#load#general() abort " {{{1
|
||||||
|
if !exists('b:vimtex_syntax') | return | endif
|
||||||
|
|
||||||
" I don't see why we can't match Math zones in the MatchNMGroup
|
" I don't see why we can't match Math zones in the MatchNMGroup
|
||||||
if !exists('g:tex_no_math')
|
if !exists('g:tex_no_math')
|
||||||
syntax cluster texMatchNMGroup add=@texMathZones
|
syntax cluster texMatchNMGroup add=@texMathZones
|
||||||
@@ -64,6 +66,8 @@ endfunction
|
|||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
function! vimtex#syntax#load#packages() abort " {{{1
|
function! vimtex#syntax#load#packages() abort " {{{1
|
||||||
|
if !exists('b:vimtex_syntax') | return | endif
|
||||||
|
|
||||||
try
|
try
|
||||||
call vimtex#syntax#p#{b:vimtex.documentclass}#load()
|
call vimtex#syntax#p#{b:vimtex.documentclass}#load()
|
||||||
catch /E117:/
|
catch /E117:/
|
||||||
@@ -75,6 +79,15 @@ function! vimtex#syntax#load#packages() abort " {{{1
|
|||||||
catch /E117:/
|
catch /E117:/
|
||||||
endtry
|
endtry
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
for l:pkg in g:vimtex_syntax_autoload_packages
|
||||||
|
try
|
||||||
|
call vimtex#syntax#p#{l:pkg}#load()
|
||||||
|
catch /E117:/
|
||||||
|
call vimtex#log#warning('Syntax package does not exist: ' . l:pkg,
|
||||||
|
\ 'Please see :help g:vimtex_syntax_autoload_packages')
|
||||||
|
endtry
|
||||||
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
|||||||
@@ -385,23 +385,70 @@ endfunction
|
|||||||
" }}}1
|
" }}}1
|
||||||
function! s:get_sel_items(is_inner) abort " {{{1
|
function! s:get_sel_items(is_inner) abort " {{{1
|
||||||
let l:pos_cursor = vimtex#pos#get_cursor()
|
let l:pos_cursor = vimtex#pos#get_cursor()
|
||||||
|
let l:val_cursor = vimtex#pos#val(l:pos_cursor)
|
||||||
|
|
||||||
" Find previous \item
|
" Find previous \item
|
||||||
call vimtex#pos#set_cursor(l:pos_cursor[0], 1)
|
let l:depth = 0
|
||||||
let l:pos_start = searchpos('^\s*\\item\S*', 'bcnWz')
|
let l:pos_cur = vimtex#pos#next(l:pos_cursor)
|
||||||
if l:pos_start == [0, 0] | return [[], []] | endif
|
while 1
|
||||||
|
call vimtex#pos#set_cursor(vimtex#pos#prev(l:pos_cur))
|
||||||
|
if l:depth > 5 | return [[], []] | endif
|
||||||
|
|
||||||
|
let l:pos_start = searchpos(
|
||||||
|
\ l:depth > 0 ? '\\begin{\w\+}' : '^\s*\\item\S*',
|
||||||
|
\ 'bcnW')
|
||||||
|
let l:val_start = vimtex#pos#val(l:pos_start)
|
||||||
|
if l:val_start == 0 | return [[], []] | endif
|
||||||
|
|
||||||
|
let l:pos_endenv = searchpos('\%(^\s*\)\?\\end{\w\+}', 'bcnW')
|
||||||
|
let l:val_endenv = vimtex#pos#val(l:pos_endenv)
|
||||||
|
|
||||||
|
if l:val_endenv == 0 || l:val_start > l:val_endenv
|
||||||
|
if l:depth == 0 | break | endif
|
||||||
|
let l:pos_cur = l:pos_start
|
||||||
|
let l:depth -= 1
|
||||||
|
else
|
||||||
|
let l:pos_cur = l:pos_endenv
|
||||||
|
let l:depth += 1
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
|
||||||
" Find end of current \item
|
" Find end of current \item
|
||||||
call vimtex#pos#set_cursor(l:pos_start)
|
let l:depth = 0
|
||||||
let l:pos_end = searchpos('\ze\n\s*\%(\\item\|\\end{itemize}\)', 'nW')
|
let l:pos_cur = l:pos_start
|
||||||
if l:pos_end == [0, 0]
|
while 1
|
||||||
\ || vimtex#pos#val(l:pos_cursor) > vimtex#pos#val(l:pos_end)
|
call vimtex#pos#set_cursor(vimtex#pos#next(l:pos_cur))
|
||||||
|
|
||||||
|
let l:re = l:depth > 0
|
||||||
|
\ ? '\\end{\w\+}'
|
||||||
|
\ : '\n\s*\%(\\item\|\\end{\(itemize\|enumerate\)}\)'
|
||||||
|
let l:pos_end = searchpos(l:re, 'nW')
|
||||||
|
let l:val_end = vimtex#pos#val(l:pos_end)
|
||||||
|
if l:depth == 0 && l:val_end == 0
|
||||||
|
return [[], []]
|
||||||
|
endif
|
||||||
|
|
||||||
|
let l:pos_beginenv = searchpos('\\begin{\w\+}', 'cnW')
|
||||||
|
let l:val_beginenv = vimtex#pos#val(l:pos_beginenv)
|
||||||
|
|
||||||
|
if l:val_beginenv == 0 || l:val_end < l:val_beginenv
|
||||||
|
if l:depth == 0 | break | endif
|
||||||
|
let l:pos_cur = l:pos_end
|
||||||
|
let l:depth -= 1
|
||||||
|
else
|
||||||
|
let l:pos_cur = l:pos_beginenv
|
||||||
|
let l:depth += 1
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
" The region must include the cursor
|
||||||
|
if l:val_cursor > l:val_end
|
||||||
return [[], []]
|
return [[], []]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Adjust for outer text object
|
" Adjust for outer text object
|
||||||
if a:is_inner
|
if a:is_inner
|
||||||
let l:pos_start[1] = searchpos('^\s*\\item\S*\s\?', 'cne')[1] + 1
|
let l:pos_start[1] = searchpos('^\s*\\item\S*\s', 'cne')[1] + 1
|
||||||
let l:pos_end[1] = col([l:pos_end[0], '$']) - 1
|
let l:pos_end[1] = col([l:pos_end[0], '$']) - 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -354,7 +354,8 @@ function! s:toc.set_syntax() abort dict "{{{1
|
|||||||
|
|
||||||
syntax match VimtexTocNum /\v(([A-Z]+>|\d+)(\.\d+)*)?\s*/ contained
|
syntax match VimtexTocNum /\v(([A-Z]+>|\d+)(\.\d+)*)?\s*/ contained
|
||||||
execute 'syntax match VimtexTocTodo'
|
execute 'syntax match VimtexTocTodo'
|
||||||
\ '/\v\s\zs%(' . toupper(join(g:vimtex_toc_todo_keywords, '|')) . '): /'
|
\ '/\v\s\zs%('
|
||||||
|
\ . toupper(join(keys(g:vimtex_toc_todo_labels), '|')) . '): /'
|
||||||
\ 'contained'
|
\ 'contained'
|
||||||
syntax match VimtexTocHotkey /\[[^]]\+\]/ contained
|
syntax match VimtexTocHotkey /\[[^]]\+\]/ contained
|
||||||
|
|
||||||
@@ -751,7 +752,7 @@ endfunction
|
|||||||
function! s:foldtext() abort " {{{1
|
function! s:foldtext() abort " {{{1
|
||||||
let l:line = getline(v:foldstart)[3:]
|
let l:line = getline(v:foldstart)[3:]
|
||||||
if b:toc.todo_sorted
|
if b:toc.todo_sorted
|
||||||
\ && l:line =~# '\v%(' . join(g:vimtex_toc_todo_keywords, '|') . ')'
|
\ && l:line =~# '\v%(' . join(keys(g:vimtex_toc_todo_labels), '|') . ')'
|
||||||
return substitute(l:line, '\w+\zs:.*', 's', '')
|
return substitute(l:line, '\w+\zs:.*', 's', '')
|
||||||
else
|
else
|
||||||
return l:line
|
return l:line
|
||||||
|
|||||||
@@ -153,9 +153,10 @@ function! s:xwin_template.xwin_exists() dict abort " {{{1
|
|||||||
" If xwin_id is unset, check if matching viewer windows exist
|
" If xwin_id is unset, check if matching viewer windows exist
|
||||||
"
|
"
|
||||||
if self.xwin_id == 0
|
if self.xwin_id == 0
|
||||||
if has_key(self, 'get_pid')
|
let l:pid = has_key(self, 'get_pid') ? self.get_pid() : 0
|
||||||
|
if l:pid > 0
|
||||||
let cmd = 'xdotool search'
|
let cmd = 'xdotool search'
|
||||||
\ . ' --all --pid ' . self.get_pid()
|
\ . ' --all --pid ' . l:pid
|
||||||
\ . ' --name ' . fnamemodify(self.out(), ':t')
|
\ . ' --name ' . fnamemodify(self.out(), ':t')
|
||||||
let self.xwin_id = get(split(system(cmd), '\n'), 0)
|
let self.xwin_id = get(split(system(cmd), '\n'), 0)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ function! vimtex#view#zathura#new() abort " {{{1
|
|||||||
return {}
|
return {}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if executable('ldd')
|
if g:vimtex_view_zathura_check_libsynctex && executable('ldd')
|
||||||
let l:shared = split(system('ldd =zathura'))
|
let l:shared = split(system("sh -c 'ldd $(which zathura)'"))
|
||||||
if v:shell_error == 0
|
if v:shell_error == 0
|
||||||
\ && empty(filter(l:shared, 'v:val =~# ''libsynctex'''))
|
\ && empty(filter(l:shared, 'v:val =~# ''libsynctex'''))
|
||||||
call vimtex#log#warning('Zathura is not linked to libsynctex!')
|
call vimtex#log#warning('Zathura is not linked to libsynctex!')
|
||||||
@@ -90,21 +90,20 @@ function! s:zathura.compiler_callback(status) dict abort " {{{1
|
|||||||
|
|
||||||
if !filereadable(self.out()) | return | endif
|
if !filereadable(self.out()) | return | endif
|
||||||
|
|
||||||
if g:vimtex_view_automatic
|
if g:vimtex_view_automatic && !has_key(self, 'started_through_callback')
|
||||||
"
|
"
|
||||||
" Search for existing window created by latexmk
|
" Search for existing window created by latexmk
|
||||||
" It may be necessary to wait some time before it is opened and
|
" Note: It may be necessary to wait some time before it is opened and
|
||||||
" recognized. Sometimes it is very quick, other times it may take
|
" recognized. Sometimes it is very quick, other times it may take
|
||||||
" a second. This way, we don't block longer than necessary.
|
" a second. This way, we don't block longer than necessary.
|
||||||
"
|
"
|
||||||
if !has_key(self, 'started_through_callback')
|
for l:dummy in range(30)
|
||||||
for l:dummy in range(30)
|
let l:xwin_exists = self.xwin_exists()
|
||||||
sleep 50m
|
if l:xwin_exists | break | endif
|
||||||
if self.xwin_exists() | break | endif
|
sleep 50m
|
||||||
endfor
|
endfor
|
||||||
endif
|
|
||||||
|
|
||||||
if !self.xwin_exists() && !has_key(self, 'started_through_callback')
|
if ! l:xwin_exists
|
||||||
call self.start(self.out())
|
call self.start(self.out())
|
||||||
let self.started_through_callback = 1
|
let self.started_through_callback = 1
|
||||||
endif
|
endif
|
||||||
|
|||||||
28
build
28
build
@@ -37,8 +37,6 @@ download() {
|
|||||||
extract() {
|
extract() {
|
||||||
echo
|
echo
|
||||||
|
|
||||||
cat config.vim >> tmp/polyglot.vim
|
|
||||||
|
|
||||||
for pack in $1; do
|
for pack in $1; do
|
||||||
name="$(cut -d ':' -f 1 <<<"$pack")"
|
name="$(cut -d ':' -f 1 <<<"$pack")"
|
||||||
path="$(cut -d ':' -f 2 <<<"$pack")"
|
path="$(cut -d ':' -f 2 <<<"$pack")"
|
||||||
@@ -66,32 +64,8 @@ extract() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
output "${subdirs##, })"$'\n'
|
output "${subdirs##, })"$'\n'
|
||||||
|
|
||||||
if (echo "julia coffee-script elixir fish git plantuml scala swift jinja" | grep -qF "$name"); then
|
|
||||||
echo "Skipping ftdetect installation of $name" >&2
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
ftdetect=("${dir}${subtree:-/}ftdetect"/*)
|
|
||||||
if [ "$ftdetect" ] && [ "$ftdetect" != "${dir}${subtree:-/}ftdetect/*" ]; then
|
|
||||||
IFS=$'\n' ftdetect=($(sort -V <<< "${ftdetect[*]}")); unset IFS
|
|
||||||
for f in "${ftdetect[@]}"; do
|
|
||||||
cat <<EOF >> tmp/polyglot.vim
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '${pack%%:*}') == -1
|
|
||||||
augroup filetypedetect
|
|
||||||
" ${pack%%:*}, from ${f##*/ftdetect/} in ${pack#*:}
|
|
||||||
$(cat "${f}")
|
|
||||||
augroup end
|
|
||||||
endif
|
|
||||||
|
|
||||||
EOF
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
mv tmp/polyglot.vim ftdetect/
|
|
||||||
|
|
||||||
for pack in $1; do
|
for pack in $1; do
|
||||||
name="$(cut -d ':' -f 1 <<<"$pack")"
|
name="$(cut -d ':' -f 1 <<<"$pack")"
|
||||||
path="$(cut -d ':' -f 2 <<<"$pack")"
|
path="$(cut -d ':' -f 2 <<<"$pack")"
|
||||||
@@ -266,10 +240,10 @@ PACKS="
|
|||||||
r-lang:vim-scripts/R.vim:_BASIC
|
r-lang:vim-scripts/R.vim:_BASIC
|
||||||
racket:wlangstroth/vim-racket
|
racket:wlangstroth/vim-racket
|
||||||
ragel:jneen/ragel.vim
|
ragel:jneen/ragel.vim
|
||||||
|
raku:Raku/vim-raku
|
||||||
raml:IN3D/vim-raml
|
raml:IN3D/vim-raml
|
||||||
razor:adamclerk/vim-razor
|
razor:adamclerk/vim-razor
|
||||||
reason:reasonml-editor/vim-reason-plus
|
reason:reasonml-editor/vim-reason-plus
|
||||||
rego:tsandall/vim-rego
|
|
||||||
rspec:keith/rspec.vim
|
rspec:keith/rspec.vim
|
||||||
rst:marshallward/vim-restructuredtext
|
rst:marshallward/vim-restructuredtext
|
||||||
ruby:vim-ruby/vim-ruby
|
ruby:vim-ruby/vim-ruby
|
||||||
|
|||||||
103
config.vim
103
config.vim
@@ -1,103 +0,0 @@
|
|||||||
function! s:SetDefault(name, value)
|
|
||||||
if !exists(a:name)
|
|
||||||
let {a:name} = a:value
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call s:SetDefault('g:markdown_enable_spell_checking', 0)
|
|
||||||
call s:SetDefault('g:markdown_enable_input_abbreviations', 0)
|
|
||||||
call s:SetDefault('g:markdown_enable_mappings', 0)
|
|
||||||
|
|
||||||
" Enable jsx syntax by default
|
|
||||||
call s:SetDefault('g:jsx_ext_required', 0)
|
|
||||||
|
|
||||||
" Make csv loading faster
|
|
||||||
call s:SetDefault('g:csv_start', 1)
|
|
||||||
call s:SetDefault('g:csv_end', 2)
|
|
||||||
|
|
||||||
" Disable json concealing by default
|
|
||||||
call s:SetDefault('g:vim_json_syntax_conceal', 0)
|
|
||||||
|
|
||||||
call s:SetDefault('g:filetype_euphoria', 'elixir')
|
|
||||||
|
|
||||||
call s:SetDefault('g:python_highlight_builtins', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_builtin_objs', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_builtin_types', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_builtin_funcs', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_builtin_funcs_kwarg', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_exceptions', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_string_formatting', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_string_format', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_string_templates', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_indent_errors', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_space_errors', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_doctests', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_func_calls', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_class_vars', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_operators', 1)
|
|
||||||
call s:SetDefault('g:python_highlight_file_headers_as_comments', 1)
|
|
||||||
call s:SetDefault('g:python_slow_sync', 1)
|
|
||||||
|
|
||||||
augroup filetypedetect
|
|
||||||
autocmd BufNewFile,BufReadPost *.vb setlocal filetype=vbnet
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
augroup filetypedetect
|
|
||||||
if v:version < 704
|
|
||||||
" NOTE: this line fixes an issue with the default system-wide lisp ftplugin
|
|
||||||
" which didn't define b:undo_ftplugin on older Vim versions
|
|
||||||
" (*.jl files are recognized as lisp)
|
|
||||||
autocmd BufRead,BufNewFile *.jl let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp<"
|
|
||||||
endif
|
|
||||||
|
|
||||||
autocmd BufRead,BufNewFile *.jl set filetype=julia
|
|
||||||
|
|
||||||
" coffeescript
|
|
||||||
autocmd BufNewFile,BufRead *.coffee set filetype=coffee
|
|
||||||
autocmd BufNewFile,BufRead *Cakefile set filetype=coffee
|
|
||||||
autocmd BufNewFile,BufRead *.coffeekup,*.ck set filetype=coffee
|
|
||||||
autocmd BufNewFile,BufRead *._coffee set filetype=coffee
|
|
||||||
autocmd BufNewFile,BufRead *.litcoffee set filetype=litcoffee
|
|
||||||
autocmd BufNewFile,BufRead *.coffee.md set filetype=litcoffee
|
|
||||||
|
|
||||||
|
|
||||||
" elixir
|
|
||||||
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
|
|
||||||
autocmd BufRead fish_funced_*_*.fish call search('^$')
|
|
||||||
autocmd BufRead,BufNewFile ~/.config/fish/fish_{read_,}history setfiletype yaml
|
|
||||||
autocmd BufRead,BufNewFile ~/.config/fish/fishd.* setlocal readonly
|
|
||||||
autocmd BufNewFile ~/.config/fish/functions/*.fish
|
|
||||||
\ call append(0, ['function '.expand('%:t:r'),
|
|
||||||
\'',
|
|
||||||
\'end']) |
|
|
||||||
\ 2
|
|
||||||
|
|
||||||
" git
|
|
||||||
autocmd BufNewFile,BufRead *.git/{,modules/**/,worktrees/*/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
|
|
||||||
autocmd BufNewFile,BufRead *.git/config,.gitconfig,gitconfig,.gitmodules set ft=gitconfig
|
|
||||||
autocmd BufNewFile,BufRead */.config/git/config set ft=gitconfig
|
|
||||||
autocmd BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig
|
|
||||||
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
|
|
||||||
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
|
|
||||||
|
|
||||||
" plantuml
|
|
||||||
autocmd BufRead,BufNewFile *.pu,*.uml,*.plantuml,*.puml setfiletype plantuml | set filetype=plantuml
|
|
||||||
|
|
||||||
" scala
|
|
||||||
au BufRead,BufNewFile *.scala,*.sc set filetype=scala
|
|
||||||
au BufRead,BufNewFile *.sbt setfiletype sbt.scala
|
|
||||||
|
|
||||||
" swift
|
|
||||||
autocmd BufNewFile,BufRead *.swift set filetype=swift
|
|
||||||
|
|
||||||
"jinja
|
|
||||||
autocmd BufNewFile,BufRead *.jinja2,*.j2,*.jinja,*.nunjucks,*.nunjs,*.njk set ft=jinja
|
|
||||||
|
|
||||||
"jsx
|
|
||||||
au BufNewFile,BufRead *.jsx setf javascriptreact
|
|
||||||
augroup END
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@ if exists("loaded_matchit")
|
|||||||
" note: the following regex not only recognizes macros, but also local/global keywords.
|
" note: the following regex not only recognizes macros, but also local/global keywords.
|
||||||
" the purpose is recognizing things like `@inline myfunction()`
|
" the purpose is recognizing things like `@inline myfunction()`
|
||||||
" or `global myfunction(...)` etc, for matchit and block movement functionality
|
" or `global myfunction(...)` etc, for matchit and block movement functionality
|
||||||
let s:macro_regex = '\%(@\%(#\@!\S\)\+\|\<\%(local\|global\)\)\s\+'
|
let s:macro_regex = '\%(@\%([#(]\@!\S\)\+\|\<\%(local\|global\)\)\s\+'
|
||||||
let s:nomacro = '\%(' . s:macro_regex . '\)\@<!'
|
let s:nomacro = '\%(' . s:macro_regex . '\)\@<!'
|
||||||
let s:yesmacro = s:nomacro . '\%('. s:macro_regex . '\)\+'
|
let s:yesmacro = s:nomacro . '\%('. s:macro_regex . '\)\+'
|
||||||
let b:julia_begin_keywordsm = '\%(' . s:yesmacro . b:julia_begin_keywords . '\)\|'
|
let b:julia_begin_keywordsm = '\%(' . s:yesmacro . b:julia_begin_keywords . '\)\|'
|
||||||
@@ -76,10 +76,10 @@ if exists("loaded_matchit")
|
|||||||
let b:match_words = 'JuliaGetMatchWords()'
|
let b:match_words = 'JuliaGetMatchWords()'
|
||||||
|
|
||||||
" we need to skip everything within comments, strings and
|
" we need to skip everything within comments, strings and
|
||||||
" the 'end' keyword when it is used as a range rather than as
|
" the 'begin' and 'end' keywords when they are used as a range rather than as
|
||||||
" the end of a block
|
" the delimiter of a block
|
||||||
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ '
|
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ '
|
||||||
\ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|SymbolS\\?\\|Comment[LM]\\|\\%([bv]\\|ip\\|MIME\\|Shell\\|Doc\\)\\?String\\|RegEx\\)\\>"'
|
\ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|SymbolS\\?\\|Comment[LM]\\|\\%([bsvr]\\|ip\\|MIME\\|big\\|raw\\|test\\|html\\|int128\\|Printf\\|Shell\\|Doc\\)\\?String\\|StringPrefixed\\|RegEx\\)\\>"'
|
||||||
|
|
||||||
let b:undo_ftplugin = b:undo_ftplugin
|
let b:undo_ftplugin = b:undo_ftplugin
|
||||||
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"
|
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"
|
||||||
|
|||||||
147
ftplugin/raku.vim
Normal file
147
ftplugin/raku.vim
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raku') == -1
|
||||||
|
|
||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: Raku
|
||||||
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
|
" Homepage: https://github.com/vim-perl/vim-perl6
|
||||||
|
" Bugs/requests: https://github.com/vim-perl/vim-perl6/issues
|
||||||
|
" Last Change: {{LAST_CHANGE}}
|
||||||
|
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||||
|
"
|
||||||
|
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
|
||||||
|
|
||||||
|
if exists("b:did_ftplugin") | finish | endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
" Make sure the continuation lines below do not cause problems in
|
||||||
|
" compatibility mode.
|
||||||
|
let s:save_cpo = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
setlocal formatoptions-=t
|
||||||
|
setlocal formatoptions+=crqol
|
||||||
|
setlocal keywordprg=p6doc
|
||||||
|
|
||||||
|
setlocal comments=:#\|,:#=,:#
|
||||||
|
setlocal commentstring=#%s
|
||||||
|
|
||||||
|
" Provided by Ned Konz <ned at bike-nomad dot com>
|
||||||
|
"---------------------------------------------
|
||||||
|
setlocal include=\\<\\(use\\\|require\\)\\>
|
||||||
|
setlocal includeexpr=substitute(v:fname,'::','/','g')
|
||||||
|
setlocal suffixesadd=.pm6,.pm,.raku,.rakutest,.t6
|
||||||
|
setlocal define=[^A-Za-z_]
|
||||||
|
|
||||||
|
" The following line changes a global variable but is necessary to make
|
||||||
|
" gf and similar commands work. Thanks to Andrew Pimlott for pointing out
|
||||||
|
" the problem. If this causes a " problem for you, add an
|
||||||
|
" after/ftplugin/raku.vim file that contains
|
||||||
|
" set isfname-=:
|
||||||
|
set isfname+=:
|
||||||
|
setlocal iskeyword=@,48-57,_,192-255,-
|
||||||
|
|
||||||
|
" Set this once, globally.
|
||||||
|
if !exists("perlpath")
|
||||||
|
if executable("perl6")
|
||||||
|
try
|
||||||
|
if &shellxquote != '"'
|
||||||
|
let perlpath = system('perl6 -e "@*INC.join(q/,/).say"')
|
||||||
|
else
|
||||||
|
let perlpath = system("perl6 -e '@*INC.join(q/,/).say'")
|
||||||
|
endif
|
||||||
|
let perlpath = substitute(perlpath,',.$',',,','')
|
||||||
|
catch /E145:/
|
||||||
|
let perlpath = ".,,"
|
||||||
|
endtry
|
||||||
|
else
|
||||||
|
" If we can't call perl to get its path, just default to using the
|
||||||
|
" current directory and the directory of the current file.
|
||||||
|
let perlpath = ".,,"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Append perlpath to the existing path value, if it is set. Since we don't
|
||||||
|
" use += to do it because of the commas in perlpath, we have to handle the
|
||||||
|
" global / local settings, too.
|
||||||
|
if &l:path == ""
|
||||||
|
if &g:path == ""
|
||||||
|
let &l:path=perlpath
|
||||||
|
else
|
||||||
|
let &l:path=&g:path.",".perlpath
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let &l:path=&l:path.",".perlpath
|
||||||
|
endif
|
||||||
|
"---------------------------------------------
|
||||||
|
|
||||||
|
" Convert ascii-based ops into their single-character unicode equivalent
|
||||||
|
if get(g:, 'raku_unicode_abbrevs', 0)
|
||||||
|
iabbrev <buffer> !(<) ⊄
|
||||||
|
iabbrev <buffer> !(<=) ⊈
|
||||||
|
iabbrev <buffer> !(>) ⊅
|
||||||
|
iabbrev <buffer> !(>=) ⊉
|
||||||
|
iabbrev <buffer> !(cont) ∌
|
||||||
|
iabbrev <buffer> !(elem) ∉
|
||||||
|
iabbrev <buffer> != ≠
|
||||||
|
iabbrev <buffer> (&) ∩
|
||||||
|
iabbrev <buffer> (+) ⊎
|
||||||
|
iabbrev <buffer> (-) ∖
|
||||||
|
iabbrev <buffer> (.) ⊍
|
||||||
|
iabbrev <buffer> (<) ⊂
|
||||||
|
iabbrev <buffer> (<+) ≼
|
||||||
|
iabbrev <buffer> (<=) ⊆
|
||||||
|
iabbrev <buffer> (>) ⊃
|
||||||
|
iabbrev <buffer> (>+) ≽
|
||||||
|
iabbrev <buffer> (>=) ⊇
|
||||||
|
iabbrev <buffer> (\|) ∪
|
||||||
|
iabbrev <buffer> (^) ⊖
|
||||||
|
iabbrev <buffer> (atomic) ⚛
|
||||||
|
iabbrev <buffer> (cont) ∋
|
||||||
|
iabbrev <buffer> (elem) ∈
|
||||||
|
iabbrev <buffer> * ×
|
||||||
|
iabbrev <buffer> **0 ⁰
|
||||||
|
iabbrev <buffer> **1 ¹
|
||||||
|
iabbrev <buffer> **2 ²
|
||||||
|
iabbrev <buffer> **3 ³
|
||||||
|
iabbrev <buffer> **4 ⁴
|
||||||
|
iabbrev <buffer> **5 ⁵
|
||||||
|
iabbrev <buffer> **6 ⁶
|
||||||
|
iabbrev <buffer> **7 ⁷
|
||||||
|
iabbrev <buffer> **8 ⁸
|
||||||
|
iabbrev <buffer> **9 ⁹
|
||||||
|
iabbrev <buffer> ... …
|
||||||
|
iabbrev <buffer> / ÷
|
||||||
|
iabbrev <buffer> << «
|
||||||
|
iabbrev <buffer> <<[=]<< «=«
|
||||||
|
iabbrev <buffer> <<[=]>> «=»
|
||||||
|
iabbrev <buffer> <= ≤
|
||||||
|
iabbrev <buffer> =~= ≅
|
||||||
|
iabbrev <buffer> >= ≥
|
||||||
|
iabbrev <buffer> >> »
|
||||||
|
iabbrev <buffer> >>[=]<< »=«
|
||||||
|
iabbrev <buffer> >>[=]>> »=»
|
||||||
|
iabbrev <buffer> Inf ∞
|
||||||
|
iabbrev <buffer> atomic-add-fetch ⚛+=
|
||||||
|
iabbrev <buffer> atomic-assign ⚛=
|
||||||
|
iabbrev <buffer> atomic-fetch ⚛
|
||||||
|
iabbrev <buffer> atomic-dec-fetch --⚛
|
||||||
|
iabbrev <buffer> atomic-fetch-dec ⚛--
|
||||||
|
iabbrev <buffer> atomic-fetch-inc ⚛++
|
||||||
|
iabbrev <buffer> atomic-inc-fetch ++⚛
|
||||||
|
iabbrev <buffer> atomic-sub-fetch ⚛−=
|
||||||
|
iabbrev <buffer> e 𝑒
|
||||||
|
iabbrev <buffer> o ∘
|
||||||
|
iabbrev <buffer> pi π
|
||||||
|
iabbrev <buffer> set() ∅
|
||||||
|
iabbrev <buffer> tau τ
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Undo the stuff we changed.
|
||||||
|
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< isk< kp< path<" .
|
||||||
|
\ " | unlet! b:browsefilter"
|
||||||
|
|
||||||
|
" Restore the saved compatibility options.
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -5,7 +5,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1
|
|||||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||||
" Original Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Original Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||||
" Latest Revision: 2018-12-29
|
" Latest Revision: 2020-03-31
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ setlocal tabstop=4
|
|||||||
setlocal shiftwidth=4
|
setlocal shiftwidth=4
|
||||||
|
|
||||||
setlocal suffixesadd=.zig
|
setlocal suffixesadd=.zig
|
||||||
|
setlocal suffixesadd=.zir
|
||||||
setlocal commentstring=//\ %s
|
setlocal commentstring=//\ %s
|
||||||
setlocal makeprg=zig\ build
|
setlocal makeprg=zig\ build
|
||||||
|
|
||||||
|
|||||||
@@ -86,28 +86,20 @@ else
|
|||||||
endfunction
|
endfunction
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Does the given pattern match at the cursor's position?
|
" Does the given pattern match at the given position?
|
||||||
function s:MatchCursor(pattern)
|
function! s:MatchAt(lnum, col, pattern) abort
|
||||||
return searchpos(a:pattern, 'cnz', line('.')) == [line('.'), col('.')]
|
let idx = a:col - 1
|
||||||
|
return match(getline(a:lnum), a:pattern, idx) == idx
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Does the given pattern match at the given position?
|
" Does the given pattern match at the cursor's position?
|
||||||
function s:MatchAt(lnum, col, pattern)
|
function! s:MatchCursor(pattern) abort
|
||||||
let pos = getcurpos()
|
return s:MatchAt(line('.'), col('.'), a:pattern)
|
||||||
|
|
||||||
try
|
|
||||||
call cursor(a:lnum, a:col)
|
|
||||||
let result = s:MatchCursor(a:pattern)
|
|
||||||
finally
|
|
||||||
call setpos('.', pos)
|
|
||||||
endtry
|
|
||||||
|
|
||||||
return result
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Is the cell at the given position part of a tag? If so, return the
|
" Is the cell at the given position part of a tag? If so, return the
|
||||||
" position of the opening delimiter.
|
" position of the opening delimiter.
|
||||||
function s:MatchECR(...)
|
function! s:MatchECR(...) abort
|
||||||
if a:0
|
if a:0
|
||||||
let lnum = a:1
|
let lnum = a:1
|
||||||
let col = a:2
|
let col = a:2
|
||||||
@@ -133,7 +125,7 @@ endfunction
|
|||||||
" If the cell at the given position is part of a control tag, return the
|
" If the cell at the given position is part of a control tag, return the
|
||||||
" respective positions of the opening and closing delimiters for that
|
" respective positions of the opening and closing delimiters for that
|
||||||
" tag.
|
" tag.
|
||||||
function s:MatchECRControl(...)
|
function! s:MatchECRControl(...) abort
|
||||||
let pos = getcurpos()
|
let pos = getcurpos()
|
||||||
|
|
||||||
if a:0
|
if a:0
|
||||||
@@ -175,7 +167,7 @@ endfunction
|
|||||||
|
|
||||||
" Determine whether or not the control tag at the given position starts
|
" Determine whether or not the control tag at the given position starts
|
||||||
" an indent.
|
" an indent.
|
||||||
function s:ECRIndent(...)
|
function! s:ECRIndent(...) abort
|
||||||
if a:0
|
if a:0
|
||||||
if type(a:1) == 0
|
if type(a:1) == 0
|
||||||
let [open, close] = s:MatchECRControl(a:1, a:2)
|
let [open, close] = s:MatchECRControl(a:1, a:2)
|
||||||
@@ -237,7 +229,7 @@ endfunction
|
|||||||
|
|
||||||
" Determine if the control tag at the given position ends an indent or
|
" Determine if the control tag at the given position ends an indent or
|
||||||
" not.
|
" not.
|
||||||
function s:ECRDedent(...)
|
function! s:ECRDedent(...) abort
|
||||||
if a:0
|
if a:0
|
||||||
if type(a:1) == 0
|
if type(a:1) == 0
|
||||||
let [open, close] = s:MatchECRControl(a:1, a:2)
|
let [open, close] = s:MatchECRControl(a:1, a:2)
|
||||||
@@ -297,7 +289,7 @@ function s:ECRDedent(...)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Find and match a control tag in the given line, if one exists.
|
" Find and match a control tag in the given line, if one exists.
|
||||||
function s:FindECRControl(...)
|
function! s:FindECRControl(...) abort
|
||||||
let lnum = a:0 ? a:1 : line('.')
|
let lnum = a:0 ? a:1 : line('.')
|
||||||
|
|
||||||
let open = { 'lnum': 0, 'col': 0 }
|
let open = { 'lnum': 0, 'col': 0 }
|
||||||
@@ -324,7 +316,7 @@ endfunction
|
|||||||
" This takes two arguments: the first is the line to start searching
|
" This takes two arguments: the first is the line to start searching
|
||||||
" from (exclusive); the second is the line to stop searching at
|
" from (exclusive); the second is the line to stop searching at
|
||||||
" (inclusive).
|
" (inclusive).
|
||||||
function s:FindPrevECRControl(...)
|
function! s:FindPrevECRControl(...) abort
|
||||||
if a:0 == 0
|
if a:0 == 0
|
||||||
let start = line('.')
|
let start = line('.')
|
||||||
let stop = 1
|
let stop = 1
|
||||||
@@ -369,7 +361,7 @@ endfunction
|
|||||||
" GetEcrystalIndent {{{1
|
" GetEcrystalIndent {{{1
|
||||||
" =================
|
" =================
|
||||||
|
|
||||||
function GetEcrystalIndent() abort
|
function! GetEcrystalIndent() abort
|
||||||
let prev_lnum = prevnonblank(v:lnum - 1)
|
let prev_lnum = prevnonblank(v:lnum - 1)
|
||||||
|
|
||||||
if b:ecrystal_indent_multiline
|
if b:ecrystal_indent_multiline
|
||||||
@@ -461,7 +453,7 @@ endfunction
|
|||||||
" GetEcrystalFold {{{1
|
" GetEcrystalFold {{{1
|
||||||
" ===============
|
" ===============
|
||||||
|
|
||||||
function GetEcrystalFold() abort
|
function! GetEcrystalFold() abort
|
||||||
let fold = '='
|
let fold = '='
|
||||||
|
|
||||||
let col = crystal#indent#Match(v:lnum, s:ecr_control_open)
|
let col = crystal#indent#Match(v:lnum, s:ecr_control_open)
|
||||||
|
|||||||
131
indent/raku.vim
Normal file
131
indent/raku.vim
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raku') == -1
|
||||||
|
|
||||||
|
" Vim indent file
|
||||||
|
" Language: Raku
|
||||||
|
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||||
|
" Homepage: https://github.com/vim-perl/vim-perl6
|
||||||
|
" Bugs/requests: https://github.com/vim-perl/vim-perl6/issues
|
||||||
|
" Last Change: {{LAST_CHANGE}}
|
||||||
|
" Contributors: Andy Lester <andy@petdance.com>
|
||||||
|
" Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||||
|
"
|
||||||
|
" Adapted from indent/perl.vim by Rafael Garcia-Suarez <rgarciasuarez@free.fr>
|
||||||
|
|
||||||
|
" Suggestions and improvements by :
|
||||||
|
" Aaron J. Sherman (use syntax for hints)
|
||||||
|
" Artem Chuprina (play nice with folding)
|
||||||
|
" TODO:
|
||||||
|
" This file still relies on stuff from the Perl 5 syntax file, which Perl 6
|
||||||
|
" does not use.
|
||||||
|
"
|
||||||
|
" Things that are not or not properly indented (yet) :
|
||||||
|
" - Continued statements
|
||||||
|
" print "foo",
|
||||||
|
" "bar";
|
||||||
|
" print "foo"
|
||||||
|
" if bar();
|
||||||
|
" - Multiline regular expressions (m//x)
|
||||||
|
" (The following probably needs modifying the perl syntax file)
|
||||||
|
" - qw() lists
|
||||||
|
" - Heredocs with terminators that don't match \I\i*
|
||||||
|
|
||||||
|
" Only load this indent file when no other was loaded.
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
" Is syntax highlighting active ?
|
||||||
|
let b:indent_use_syntax = has("syntax")
|
||||||
|
|
||||||
|
setlocal indentexpr=GetRakuIndent()
|
||||||
|
|
||||||
|
" we reset it first because the Perl 5 indent file might have been loaded due
|
||||||
|
" to a .pl/pm file extension, and indent files don't clean up afterwards
|
||||||
|
setlocal indentkeys&
|
||||||
|
|
||||||
|
setlocal indentkeys+=0=,0),0],0>,0»,0=or,0=and
|
||||||
|
if !b:indent_use_syntax
|
||||||
|
setlocal indentkeys+=0=EO
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
function! GetRakuIndent()
|
||||||
|
|
||||||
|
" Get the line to be indented
|
||||||
|
let cline = getline(v:lnum)
|
||||||
|
|
||||||
|
" Indent POD markers to column 0
|
||||||
|
if cline =~ '^\s*=\L\@!'
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Get current syntax item at the line's first char
|
||||||
|
let csynid = ''
|
||||||
|
if b:indent_use_syntax
|
||||||
|
let csynid = synIDattr(synID(v:lnum,1,0),"name")
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Don't reindent POD and heredocs
|
||||||
|
if csynid =~ "^rakuPod"
|
||||||
|
return indent(v:lnum)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
" Now get the indent of the previous perl line.
|
||||||
|
|
||||||
|
" Find a non-blank line above the current line.
|
||||||
|
let lnum = prevnonblank(v:lnum - 1)
|
||||||
|
" Hit the start of the file, use zero indent.
|
||||||
|
if lnum == 0
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
let line = getline(lnum)
|
||||||
|
let ind = indent(lnum)
|
||||||
|
" Skip heredocs, POD, and comments on 1st column
|
||||||
|
if b:indent_use_syntax
|
||||||
|
let skippin = 2
|
||||||
|
while skippin
|
||||||
|
let synid = synIDattr(synID(lnum,1,0),"name")
|
||||||
|
if (synid =~ "^rakuPod" || synid =~ "rakuComment")
|
||||||
|
let lnum = prevnonblank(lnum - 1)
|
||||||
|
if lnum == 0
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
let line = getline(lnum)
|
||||||
|
let ind = indent(lnum)
|
||||||
|
let skippin = 1
|
||||||
|
else
|
||||||
|
let skippin = 0
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
endif
|
||||||
|
|
||||||
|
if line =~ '[<«\[{(]\s*\(#[^)}\]»>]*\)\=$'
|
||||||
|
let ind = ind + &sw
|
||||||
|
endif
|
||||||
|
if cline =~ '^\s*[)}\]»>]'
|
||||||
|
let ind = ind - &sw
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Indent lines that begin with 'or' or 'and'
|
||||||
|
if cline =~ '^\s*\(or\|and\)\>'
|
||||||
|
if line !~ '^\s*\(or\|and\)\>'
|
||||||
|
let ind = ind + &sw
|
||||||
|
endif
|
||||||
|
elseif line =~ '^\s*\(or\|and\)\>'
|
||||||
|
let ind = ind - &sw
|
||||||
|
endif
|
||||||
|
|
||||||
|
return ind
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim:ts=8:sts=4:sw=4:expandtab:ft=vim
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1
|
||||||
|
|
||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: reStructuredText Documentation Format
|
" Vim reST indent file
|
||||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Language: reStructuredText Documentation Format
|
||||||
" Latest Revision: 2011-08-03
|
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||||
|
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
|
" Latest Revision: 2020-03-31
|
||||||
|
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
finish
|
finish
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
autoUpdate:
|
|
||||||
enabled: false
|
|
||||||
schedule: ""
|
|
||||||
cluster:
|
|
||||||
clusterName: ""
|
|
||||||
environmentGitOwner: ""
|
|
||||||
environmentGitPublic: true
|
|
||||||
provider: eks
|
|
||||||
region: ""
|
|
||||||
gitops: true
|
|
||||||
environments:
|
|
||||||
- key: dev
|
|
||||||
- key: staging
|
|
||||||
- key: production
|
|
||||||
ingress:
|
|
||||||
domain: ""
|
|
||||||
ignoreLoadBalancer: true
|
|
||||||
externalDNS: false
|
|
||||||
tls:
|
|
||||||
email: ""
|
|
||||||
enabled: false
|
|
||||||
production: false
|
|
||||||
kaniko: true
|
|
||||||
secretStorage: vault
|
|
||||||
storage:
|
|
||||||
logs:
|
|
||||||
enabled: true
|
|
||||||
url: ""
|
|
||||||
reports:
|
|
||||||
enabled: true
|
|
||||||
url: ""
|
|
||||||
repository:
|
|
||||||
enabled: true
|
|
||||||
url: ""
|
|
||||||
vault:
|
|
||||||
aws:
|
|
||||||
autoCreate: true
|
|
||||||
iamUserName: ""
|
|
||||||
disableURLDiscovery: true
|
|
||||||
versionStream:
|
|
||||||
ref: 2.0.1192+cjxd.7
|
|
||||||
url: https://github.com/cloudbees/cloudbees-jenkins-x-versions.git
|
|
||||||
webhook: prow
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
autoUpdate:
|
|
||||||
enabled: false
|
|
||||||
schedule: ""
|
|
||||||
cluster:
|
|
||||||
clusterName: ""
|
|
||||||
environmentGitOwner: ""
|
|
||||||
environmentGitPublic: true
|
|
||||||
project: ""
|
|
||||||
azure: {}
|
|
||||||
provider: gke
|
|
||||||
zone: ""
|
|
||||||
gitops: true
|
|
||||||
environments:
|
|
||||||
- key: dev
|
|
||||||
- key: staging
|
|
||||||
- key: production
|
|
||||||
ingress:
|
|
||||||
domain: ""
|
|
||||||
externalDNS: false
|
|
||||||
tls:
|
|
||||||
email: ""
|
|
||||||
enabled: false
|
|
||||||
production: false
|
|
||||||
kaniko: true
|
|
||||||
secretStorage: vault
|
|
||||||
storage:
|
|
||||||
logs:
|
|
||||||
enabled: true
|
|
||||||
url: ""
|
|
||||||
reports:
|
|
||||||
enabled: true
|
|
||||||
url: ""
|
|
||||||
repository:
|
|
||||||
enabled: true
|
|
||||||
url: ""
|
|
||||||
versionStream:
|
|
||||||
ref: 2.0.1192+cjxd.7
|
|
||||||
url: https://github.com/cloudbees/cloudbees-jenkins-x-versions.git
|
|
||||||
webhook: prow
|
|
||||||
@@ -39,9 +39,7 @@ syntax region typescriptArray matchgroup=typescriptBraces
|
|||||||
syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
||||||
syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
||||||
syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
|
||||||
syntax match typescriptNumber /\d[0-9_]*\.\d[0-9_]*\|\d[0-9_]*\|\.\d[0-9]*/
|
syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/
|
||||||
\ nextgroup=typescriptExponent,@typescriptSymbols skipwhite skipempty
|
\ nextgroup=typescriptSymbols skipwhite skipempty
|
||||||
syntax match typescriptExponent /[eE][+-]\=\d[0-9]*\>/
|
|
||||||
\ nextgroup=@typescriptSymbols skipwhite skipempty contained
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ if exists("did_typescript_hilink")
|
|||||||
HiLink typescriptType Type
|
HiLink typescriptType Type
|
||||||
HiLink typescriptNull Boolean
|
HiLink typescriptNull Boolean
|
||||||
HiLink typescriptNumber Number
|
HiLink typescriptNumber Number
|
||||||
HiLink typescriptExponent Number
|
|
||||||
HiLink typescriptBoolean Boolean
|
HiLink typescriptBoolean Boolean
|
||||||
HiLink typescriptObjectLabel typescriptLabel
|
HiLink typescriptObjectLabel typescriptLabel
|
||||||
HiLink typescriptLabel Label
|
HiLink typescriptLabel Label
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ syntax keyword jsFrom contained from skipwhite skipempty nextgroup
|
|||||||
syntax match jsModuleComma contained /,/ skipwhite skipempty nextgroup=jsModuleKeyword,jsModuleAsterisk,jsModuleGroup,jsFlowTypeKeyword
|
syntax match jsModuleComma contained /,/ skipwhite skipempty nextgroup=jsModuleKeyword,jsModuleAsterisk,jsModuleGroup,jsFlowTypeKeyword
|
||||||
|
|
||||||
" Strings, Templates, Numbers
|
" Strings, Templates, Numbers
|
||||||
syntax region jsString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ contains=jsSpecial,@Spell extend
|
syntax region jsString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ contains=jsSpecial extend
|
||||||
syntax region jsTemplateString start=+`+ skip=+\\`+ end=+`+ contains=jsTemplateExpression,jsSpecial,@Spell extend
|
syntax region jsTemplateString start=+`+ skip=+\\`+ end=+`+ contains=jsTemplateExpression,jsSpecial extend
|
||||||
syntax match jsTaggedTemplate /\<\K\k*\ze`/ nextgroup=jsTemplateString
|
syntax match jsTaggedTemplate /\<\K\k*\ze`/ nextgroup=jsTemplateString
|
||||||
syntax match jsNumber /\c\<\%(\d\+\%(e[+-]\=\d\+\)\=\|0b[01]\+\|0o\o\+\|0x\x\+\)\>/
|
syntax match jsNumber /\c\<\%(\d\+\%(e[+-]\=\d\+\)\=\|0b[01]\+\|0o\o\+\|0x\x\+\)\>/
|
||||||
syntax keyword jsNumber Infinity
|
syntax keyword jsNumber Infinity
|
||||||
@@ -76,14 +76,14 @@ syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBa
|
|||||||
" Objects
|
" Objects
|
||||||
syntax match jsObjectShorthandProp contained /\<\k*\ze\s*/ skipwhite skipempty nextgroup=jsObjectSeparator
|
syntax match jsObjectShorthandProp contained /\<\k*\ze\s*/ skipwhite skipempty nextgroup=jsObjectSeparator
|
||||||
syntax match jsObjectKey contained /\<\k*\ze\s*:/ contains=jsFunctionKey skipwhite skipempty nextgroup=jsObjectValue
|
syntax match jsObjectKey contained /\<\k*\ze\s*:/ contains=jsFunctionKey skipwhite skipempty nextgroup=jsObjectValue
|
||||||
syntax region jsObjectKeyString contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial,@Spell skipwhite skipempty nextgroup=jsObjectValue
|
syntax region jsObjectKeyString contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial skipwhite skipempty nextgroup=jsObjectValue
|
||||||
syntax region jsObjectKeyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsObjectValue,jsFuncArgs extend
|
syntax region jsObjectKeyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsObjectValue,jsFuncArgs extend
|
||||||
syntax match jsObjectSeparator contained /,/
|
syntax match jsObjectSeparator contained /,/
|
||||||
syntax region jsObjectValue contained matchgroup=jsObjectColon start=/:/ end=/[,}]\@=/ contains=@jsExpression extend
|
syntax region jsObjectValue contained matchgroup=jsObjectColon start=/:/ end=/[,}]\@=/ contains=@jsExpression extend
|
||||||
syntax match jsObjectFuncName contained /\<\K\k*\ze\_s*(/ skipwhite skipempty nextgroup=jsFuncArgs
|
syntax match jsObjectFuncName contained /\<\K\k*\ze\_s*(/ skipwhite skipempty nextgroup=jsFuncArgs
|
||||||
syntax match jsFunctionKey contained /\<\K\k*\ze\s*:\s*function\>/
|
syntax match jsFunctionKey contained /\<\K\k*\ze\s*:\s*function\>/
|
||||||
syntax match jsObjectMethodType contained /\<[gs]et\ze\s\+\K\k*/ skipwhite skipempty nextgroup=jsObjectFuncName
|
syntax match jsObjectMethodType contained /\<[gs]et\ze\s\+\K\k*/ skipwhite skipempty nextgroup=jsObjectFuncName
|
||||||
syntax region jsObjectStringKey contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial,@Spell extend skipwhite skipempty nextgroup=jsFuncArgs,jsObjectValue
|
syntax region jsObjectStringKey contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial extend skipwhite skipempty nextgroup=jsFuncArgs,jsObjectValue
|
||||||
|
|
||||||
exe 'syntax keyword jsNull null '.(exists('g:javascript_conceal_null') ? 'conceal cchar='.g:javascript_conceal_null : '')
|
exe 'syntax keyword jsNull null '.(exists('g:javascript_conceal_null') ? 'conceal cchar='.g:javascript_conceal_null : '')
|
||||||
exe 'syntax keyword jsReturn return contained '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '').' skipwhite nextgroup=@jsExpression'
|
exe 'syntax keyword jsReturn return contained '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '').' skipwhite nextgroup=@jsExpression'
|
||||||
@@ -189,7 +189,7 @@ syntax region jsClassDefinition start=/\<class\>/ end=/\(\<ext
|
|||||||
syntax match jsClassProperty contained /\<\K\k*\ze\s*[=;]/ skipwhite skipempty nextgroup=jsClassValue,jsFlowClassDef
|
syntax match jsClassProperty contained /\<\K\k*\ze\s*[=;]/ skipwhite skipempty nextgroup=jsClassValue,jsFlowClassDef
|
||||||
syntax region jsClassValue contained start=/=/ end=/\_[;}]\@=/ contains=@jsExpression
|
syntax region jsClassValue contained start=/=/ end=/\_[;}]\@=/ contains=@jsExpression
|
||||||
syntax region jsClassPropertyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsFuncArgs,jsClassValue extend
|
syntax region jsClassPropertyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsFuncArgs,jsClassValue extend
|
||||||
syntax region jsClassStringKey contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial,@Spell extend skipwhite skipempty nextgroup=jsFuncArgs
|
syntax region jsClassStringKey contained start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial extend skipwhite skipempty nextgroup=jsFuncArgs
|
||||||
|
|
||||||
" Destructuring
|
" Destructuring
|
||||||
syntax match jsDestructuringPropertyValue contained /\k\+/
|
syntax match jsDestructuringPropertyValue contained /\k\+/
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ syntax region juliatextString matchgroup=juliaStringDelim start=+\<text\z("\("
|
|||||||
syntax region juliahtmlString matchgroup=juliaStringDelim start=+\<html\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
syntax region juliahtmlString matchgroup=juliaStringDelim start=+\<html\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
||||||
syntax region juliaint128String matchgroup=juliaStringDelim start=+\<u\?int128\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
syntax region juliaint128String matchgroup=juliaStringDelim start=+\<u\?int128\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
||||||
|
|
||||||
syntax region juliaDocString matchgroup=juliaStringDelim start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
syntax region juliaDocString matchgroup=juliaDocStringDelim start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
||||||
|
|
||||||
exec 'syntax region juliaPrintfMacro contained transparent start="@s\?printf(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaPrintfParBlock'
|
exec 'syntax region juliaPrintfMacro contained transparent start="@s\?printf(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaPrintfParBlock'
|
||||||
syntax region juliaPrintfMacro contained transparent start="@s\?printf\s\+" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExprsPrintf,juliaMacro,juliaSymbolS,juliaQuotedParBlockS
|
syntax region juliaPrintfMacro contained transparent start="@s\?printf\s\+" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExprsPrintf,juliaMacro,juliaSymbolS,juliaQuotedParBlockS
|
||||||
@@ -416,22 +416,23 @@ hi def link juliaComplexUnit Constant
|
|||||||
hi def link juliaChar Character
|
hi def link juliaChar Character
|
||||||
|
|
||||||
hi def link juliaString String
|
hi def link juliaString String
|
||||||
hi def link juliaStringPrefixed String
|
hi def link juliaStringPrefixed juliaString
|
||||||
hi def link juliabString String
|
hi def link juliabString juliaString
|
||||||
hi def link juliasString String
|
hi def link juliasString juliaString
|
||||||
hi def link juliavString String
|
hi def link juliavString juliaString
|
||||||
hi def link juliarString String
|
hi def link juliarString juliaString
|
||||||
hi def link juliaipString String
|
hi def link juliaipString juliaString
|
||||||
hi def link juliabigString String
|
hi def link juliabigString juliaString
|
||||||
hi def link juliaMIMEString String
|
hi def link juliaMIMEString juliaString
|
||||||
hi def link juliarawString String
|
hi def link juliarawString juliaString
|
||||||
hi def link juliatestString String
|
hi def link juliatestString juliaString
|
||||||
hi def link juliahtmlString String
|
hi def link juliahtmlString juliaString
|
||||||
hi def link juliaint128String String
|
hi def link juliaint128String juliaString
|
||||||
hi def link juliaPrintfString String
|
hi def link juliaPrintfString juliaString
|
||||||
hi def link juliaShellString String
|
hi def link juliaShellString juliaString
|
||||||
hi def link juliaDocString String
|
hi def link juliaDocString juliaString
|
||||||
hi def link juliaStringDelim String
|
hi def link juliaStringDelim juliaString
|
||||||
|
hi def link juliaDocStringDelim juliaDocString
|
||||||
hi def link juliaStringVarsPla Identifier
|
hi def link juliaStringVarsPla Identifier
|
||||||
hi def link juliaStringVarDelim Identifier
|
hi def link juliaStringVarDelim Identifier
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ syn keyword llvmKeyword
|
|||||||
\ externally_initialized
|
\ externally_initialized
|
||||||
\ extern_weak
|
\ extern_weak
|
||||||
\ fastcc
|
\ fastcc
|
||||||
|
\ tailcc
|
||||||
\ filter
|
\ filter
|
||||||
\ from
|
\ from
|
||||||
\ gc
|
\ gc
|
||||||
@@ -91,6 +92,7 @@ syn keyword llvmKeyword
|
|||||||
\ hhvmcc
|
\ hhvmcc
|
||||||
\ hhvm_ccc
|
\ hhvm_ccc
|
||||||
\ hidden
|
\ hidden
|
||||||
|
\ immarg
|
||||||
\ initialexec
|
\ initialexec
|
||||||
\ inlinehint
|
\ inlinehint
|
||||||
\ inreg
|
\ inreg
|
||||||
|
|||||||
@@ -705,6 +705,13 @@ syntax keyword mmaSystemSymbol MixedRadix MixedRadixQuantity MixedUnit MixtureDi
|
|||||||
syntax keyword mmaSystemSymbol Modal Mode Modular ModularInverse ModularLambda Module
|
syntax keyword mmaSystemSymbol Modal Mode Modular ModularInverse ModularLambda Module
|
||||||
syntax keyword mmaSystemSymbol Module Modulus MoebiusMu Moment Momentary MomentConvert
|
syntax keyword mmaSystemSymbol Module Modulus MoebiusMu Moment Momentary MomentConvert
|
||||||
syntax keyword mmaSystemSymbol MomentConvert MomentEvaluate MomentGeneratingFunction MomentOfInertia Monday Monitor
|
syntax keyword mmaSystemSymbol MomentConvert MomentEvaluate MomentGeneratingFunction MomentOfInertia Monday Monitor
|
||||||
|
syntax keyword mmaSystemSymbol MongoConnect MongoGetDatabase MongoGetCollection MongoGetDatabaseNames MongoDatabaseName MongoDatabaseDrop MongoGetCollectionNames
|
||||||
|
syntax keyword mmaSystemSymbol MongoCollectionName MongoCollectionDrop MongoCollectionStats MongoCollectionValidate
|
||||||
|
syntax keyword mmaSystemSymbol MongoCollectionCount MongoCollectionFind MongoCollectionFindOne MongoCollectionAggregate MongoCollectionDistinct
|
||||||
|
syntax keyword mmaSystemSymbol MongoCollectionInsert MongoCollectionUpdateOne MongoCollectionUpdateMany MongoCollectionDeleteOne MongoCollectionDeleteMany MongoCollectionReplaceOne
|
||||||
|
syntax keyword mmaSystemSymbol MongoCursorNext MongoWriteConcernCreate MongoCursorSetBatchSize MongoCursorGetBatchSize MongoCursorToArray
|
||||||
|
syntax keyword mmaSystemSymbol MongoClient MongoDatabase MongoCollection MongoCursor
|
||||||
|
syntax keyword mmaSystemSymbol MongoWriteConcern BSONObjectID MongoInsertResult MongoDriverVersion
|
||||||
syntax keyword mmaSystemSymbol Monitor MonomialList MonomialOrder MonsterGroupM MoonPhase MoonPosition
|
syntax keyword mmaSystemSymbol Monitor MonomialList MonomialOrder MonsterGroupM MoonPhase MoonPosition
|
||||||
syntax keyword mmaSystemSymbol MoonPosition MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber
|
syntax keyword mmaSystemSymbol MoonPosition MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber
|
||||||
syntax keyword mmaSystemSymbol MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform MortalityData Most
|
syntax keyword mmaSystemSymbol MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform MortalityData Most
|
||||||
@@ -1298,7 +1305,7 @@ syntax match mmaOperator "&"
|
|||||||
syntax match mmaOperator "?\{1,2}"
|
syntax match mmaOperator "?\{1,2}"
|
||||||
|
|
||||||
"User Symbols
|
"User Symbols
|
||||||
syntax match mmaSymbol "[^0-9][A-Za-z0-9`$]\+\s*\%([@[]\|/:\|/\=/@\)\@=" contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
syntax match mmaSymbol "[^0-9"][A-Za-z0-9`$]\+\s*\%([@[]\|/:\|/\=/@\)\@=" contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
||||||
syntax match mmaSymbol "\<[^0-9][A-Za-z0-9`$]\+\>" contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
syntax match mmaSymbol "\<[^0-9][A-Za-z0-9`$]\+\>" contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
||||||
syntax match mmaSymbol "\~\s*[^~]\+\s*\~"ms=s+1,me=e-1 contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
syntax match mmaSymbol "\~\s*[^~]\+\s*\~"ms=s+1,me=e-1 contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
||||||
syntax match mmaSymbol "//\s*[A-Za-z0-9`$]\+"ms=s+2 contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
syntax match mmaSymbol "//\s*[A-Za-z0-9`$]\+"ms=s+2 contains=mmaOperator,mmaSystemSymbol,mmaBrackets,mmaError
|
||||||
|
|||||||
@@ -300,12 +300,15 @@ syn keyword ngxDirective large_client_header_buffers
|
|||||||
syn keyword ngxDirective least_conn
|
syn keyword ngxDirective least_conn
|
||||||
syn keyword ngxDirective least_time
|
syn keyword ngxDirective least_time
|
||||||
syn keyword ngxDirective limit_conn
|
syn keyword ngxDirective limit_conn
|
||||||
|
syn keyword ngxDirective limit_conn_dry_run
|
||||||
syn keyword ngxDirective limit_conn_log_level
|
syn keyword ngxDirective limit_conn_log_level
|
||||||
syn keyword ngxDirective limit_conn_status
|
syn keyword ngxDirective limit_conn_status
|
||||||
syn keyword ngxDirective limit_conn_zone
|
syn keyword ngxDirective limit_conn_zone
|
||||||
|
syn keyword ngxDirective limit_except
|
||||||
syn keyword ngxDirective limit_rate
|
syn keyword ngxDirective limit_rate
|
||||||
syn keyword ngxDirective limit_rate_after
|
syn keyword ngxDirective limit_rate_after
|
||||||
syn keyword ngxDirective limit_req
|
syn keyword ngxDirective limit_req
|
||||||
|
syn keyword ngxDirective limit_req_dry_run
|
||||||
syn keyword ngxDirective limit_req_log_level
|
syn keyword ngxDirective limit_req_log_level
|
||||||
syn keyword ngxDirective limit_req_status
|
syn keyword ngxDirective limit_req_status
|
||||||
syn keyword ngxDirective limit_req_zone
|
syn keyword ngxDirective limit_req_zone
|
||||||
|
|||||||
1974
syntax/raku.vim
Normal file
1974
syntax/raku.vim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,61 +0,0 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rego') == -1
|
|
||||||
|
|
||||||
" 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
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim reST syntax file
|
||||||
" Language: reStructuredText documentation format
|
" Language: reStructuredText documentation format
|
||||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Website: https://github.com/marshallward/vim-restructuredtext
|
" Website: https://github.com/marshallward/vim-restructuredtext
|
||||||
" Latest Revision: 2018-12-29
|
" Latest Revision: 2020-03-31
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@@ -99,22 +99,32 @@ function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_righ
|
|||||||
let first = a:start[0]
|
let first = a:start[0]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.first.'+'.' contained'
|
if a:start != '``'
|
||||||
|
let rst_contains=' contains=rstEscape' . a:name
|
||||||
|
execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.first.'+'.' contained'
|
||||||
|
else
|
||||||
|
let rst_contains=''
|
||||||
|
endif
|
||||||
|
|
||||||
execute 'syn region rst' . a:name .
|
execute 'syn region rst' . a:name .
|
||||||
\ ' start=+' . a:char_left . '\zs' . a:start .
|
\ ' start=+' . a:char_left . '\zs' . a:start .
|
||||||
\ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
|
\ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
|
||||||
\ a:middle .
|
\ a:middle .
|
||||||
\ ' end=+' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+' .
|
\ ' end=+' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+' .
|
||||||
\ ' contains=rstEscape' . a:name
|
\ rst_contains
|
||||||
|
|
||||||
execute 'hi def link rstEscape'.a:name.' Special'
|
if a:start != '``'
|
||||||
|
execute 'hi def link rstEscape'.a:name.' Special'
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" TODO: The "middle" argument may no longer be useful here.
|
||||||
function! s:DefineInlineMarkup(name, start, middle, end)
|
function! s:DefineInlineMarkup(name, start, middle, end)
|
||||||
let middle = a:middle != "" ?
|
if a:middle == '`'
|
||||||
\ (' skip=+\\\\\|\\' . a:middle . '\|\s' . a:middle . '+') :
|
let middle = ' skip=+\s'.a:middle.'+'
|
||||||
\ ""
|
else
|
||||||
|
let middle = ' skip=+\\\\\|\\' . a:middle . '\|\s' . a:middle . '+'
|
||||||
|
endif
|
||||||
|
|
||||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
|
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
|
||||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"')
|
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"')
|
||||||
@@ -123,8 +133,8 @@ function! s:DefineInlineMarkup(name, start, middle, end)
|
|||||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
|
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
|
||||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
|
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
|
||||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’')
|
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’')
|
||||||
" TODO: Additional Unicode Pd, Po, Pi, Pf, Ps characters
|
|
||||||
|
|
||||||
|
" TODO: Additional whitespace Unicode characters: Pd, Po, Pi, Pf, Ps
|
||||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|\%ua0\|[/:]\)', '')
|
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|\%ua0\|[/:]\)', '')
|
||||||
|
|
||||||
execute 'syn match rst' . a:name .
|
execute 'syn match rst' . a:name .
|
||||||
@@ -138,7 +148,7 @@ endfunction
|
|||||||
call s:DefineInlineMarkup('Emphasis', '\*', '\*', '\*')
|
call s:DefineInlineMarkup('Emphasis', '\*', '\*', '\*')
|
||||||
call s:DefineInlineMarkup('StrongEmphasis', '\*\*', '\*', '\*\*')
|
call s:DefineInlineMarkup('StrongEmphasis', '\*\*', '\*', '\*\*')
|
||||||
call s:DefineInlineMarkup('InterpretedTextOrHyperlinkReference', '`', '`', '`_\{0,2}')
|
call s:DefineInlineMarkup('InterpretedTextOrHyperlinkReference', '`', '`', '`_\{0,2}')
|
||||||
call s:DefineInlineMarkup('InlineLiteral', '``', "", '``')
|
call s:DefineInlineMarkup('InlineLiteral', '``', '`', '``')
|
||||||
call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}')
|
call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}')
|
||||||
call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`')
|
call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`')
|
||||||
|
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipw
|
|||||||
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||||
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||||
|
|
||||||
syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount
|
syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end="),\=[*+]" contains=TOP
|
||||||
syn match rustMacroRepeatCount ".\?[*+]" contained
|
|
||||||
syn match rustMacroVariable "$\w\+"
|
syn match rustMacroVariable "$\w\+"
|
||||||
|
|
||||||
" Reserved (but not yet used) keywords {{{2
|
" Reserved (but not yet used) keywords {{{2
|
||||||
@@ -280,7 +279,6 @@ hi def link rustIdentifierPrime rustIdentifier
|
|||||||
hi def link rustTrait rustType
|
hi def link rustTrait rustType
|
||||||
hi def link rustDeriveTrait rustTrait
|
hi def link rustDeriveTrait rustTrait
|
||||||
|
|
||||||
hi def link rustMacroRepeatCount rustMacroRepeatDelimiters
|
|
||||||
hi def link rustMacroRepeatDelimiters Macro
|
hi def link rustMacroRepeatDelimiters Macro
|
||||||
hi def link rustMacroVariable Define
|
hi def link rustMacroVariable Define
|
||||||
hi def link rustSigil StorageClass
|
hi def link rustSigil StorageClass
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ syntax keyword svelteKeyword slot contained containedin=htmlTag
|
|||||||
" https://github.com/mxw/vim-jsx/blob/master/after/syntax/jsx.vim
|
" https://github.com/mxw/vim-jsx/blob/master/after/syntax/jsx.vim
|
||||||
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
|
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
|
||||||
|
|
||||||
|
syntax region svelteSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||||
|
|
||||||
" Block conditionals.
|
" Block conditionals.
|
||||||
syntax match svelteConditional "#if" contained containedin=jsBlock,javascriptBlock
|
syntax match svelteConditional "#if" contained containedin=jsBlock,javascriptBlock
|
||||||
syntax match svelteConditional "/if" contained containedin=jsBlock,javascriptBlock
|
syntax match svelteConditional "/if" contained containedin=jsBlock,javascriptBlock
|
||||||
@@ -60,6 +62,59 @@ highlight def link svelteConditional Conditional
|
|||||||
highlight def link svelteKeyword Keyword
|
highlight def link svelteKeyword Keyword
|
||||||
highlight def link svelteRepeat Repeat
|
highlight def link svelteRepeat Repeat
|
||||||
|
|
||||||
|
" Preprocessed languages that aren't supported out of the box by Svelte require
|
||||||
|
" additional syntax files to be pulled in and can slow Vim down a bit. For that
|
||||||
|
" reason, preprocessed languages must be enabled manually. Note that some may
|
||||||
|
" require additional plugins that contain the actual syntax definitions.
|
||||||
|
"
|
||||||
|
" Heavily cribbed from https://github.com/posva/vim-vue and largely completed by
|
||||||
|
" @davidroeca (thank you!).
|
||||||
|
|
||||||
|
" A syntax should be registered if there's a valid syntax definition known to
|
||||||
|
" Vim and it is enabled for the Svelte plugin.
|
||||||
|
function! s:enabled(language)
|
||||||
|
" Check whether a syntax file for {language} exists
|
||||||
|
if empty(globpath(&runtimepath, 'syntax/' . a:language . '.vim'))
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" If g:svelte_preprocessors is set, check for it there, otherwise return 0.
|
||||||
|
if exists('g:svelte_preprocessors') && type(g:svelte_preprocessors) == v:t_list
|
||||||
|
return index(g:svelte_preprocessors, a:language) != -1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let s:languages = [
|
||||||
|
\ { 'name': 'less', 'tag': 'style' },
|
||||||
|
\ { 'name': 'scss', 'tag': 'style' },
|
||||||
|
\ { 'name': 'sass', 'tag': 'style' },
|
||||||
|
\ { 'name': 'stylus', 'tag': 'style' },
|
||||||
|
\ { 'name': 'typescript', 'tag': 'script' },
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
for s:language in s:languages
|
||||||
|
let s:attr = '\(lang\|type\)=\("\|''\)[^\2]*' . s:language.name . '[^\2]*\2'
|
||||||
|
let s:start = '<' . s:language.tag . '\>\_[^>]*' . s:attr . '\_[^>]*>'
|
||||||
|
|
||||||
|
if s:enabled(s:language.name)
|
||||||
|
execute 'syntax include @' . s:language.name . ' syntax/' . s:language.name . '.vim'
|
||||||
|
unlet! b:current_syntax
|
||||||
|
|
||||||
|
execute 'syntax region svelte_' . s:language.name
|
||||||
|
\ 'keepend'
|
||||||
|
\ 'start=/' . s:start . '/'
|
||||||
|
\ 'end="</' . s:language.tag . '>"me=s-1'
|
||||||
|
\ 'contains=@' . s:language.name . ',svelteSurroundingTag'
|
||||||
|
\ 'fold'
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" Cybernetically enhanced web apps.
|
||||||
let b:current_syntax = "svelte"
|
let b:current_syntax = "svelte"
|
||||||
|
|
||||||
|
" Sync from start because of the wacky nesting.
|
||||||
|
syntax sync fromstart
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ syntax sync minlines=100
|
|||||||
|
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
syn keyword tgKeyword def let in code dag field include defm foreach
|
syn keyword tgKeyword def let in code dag field include defm foreach defset defvar if then else
|
||||||
syn keyword tgType class int string list bit bits multiclass
|
syn keyword tgType class int string list bit bits multiclass
|
||||||
|
|
||||||
syn match tgNumber /\<\d\+\>/
|
syn match tgNumber /\<\d\+\>/
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ syn region thriftComment start="/\*" end="\*/" contains=thriftTodo,@Spell
|
|||||||
syn match thriftComment "//.\{-}\(?>\|$\)\@="
|
syn match thriftComment "//.\{-}\(?>\|$\)\@="
|
||||||
|
|
||||||
" String
|
" String
|
||||||
syn region thriftStringDouble matchgroup=None start=+"+ end=+"+
|
syn region thriftString start=+"+ skip=+\\"+ end=+"+
|
||||||
|
syn region thriftString start=+'+ skip=+\\'+ end=+'+
|
||||||
|
|
||||||
" Number
|
" Number
|
||||||
syn match thriftNumber "-\=\<\d\+\>" contained
|
syn match thriftNumber "-\=\<\d\+\>" contained
|
||||||
@@ -55,7 +56,6 @@ syn keyword thriftBasicTypes void bool byte string binary
|
|||||||
syn keyword thriftBasicTypes i16 i32 i64 double
|
syn keyword thriftBasicTypes i16 i32 i64 double
|
||||||
syn keyword thriftType map list set
|
syn keyword thriftType map list set
|
||||||
syn keyword thriftClass union struct exception enum
|
syn keyword thriftClass union struct exception enum
|
||||||
syn region thriftString start=+"+ end=+"+
|
|
||||||
|
|
||||||
" Special
|
" Special
|
||||||
syn match thriftNumber "\d\+:"
|
syn match thriftNumber "\d\+:"
|
||||||
@@ -91,7 +91,6 @@ if version >= 508 || !exists("did_thrift_syn_inits")
|
|||||||
HiLink thriftStatement Statement
|
HiLink thriftStatement Statement
|
||||||
HiLink thriftInclude Include
|
HiLink thriftInclude Include
|
||||||
HiLink thriftClass Type
|
HiLink thriftClass Type
|
||||||
HiLink thriftString String
|
|
||||||
|
|
||||||
delcommand HiLink
|
delcommand HiLink
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1
|
||||||
|
|
||||||
" Language: tmux(1) configuration file
|
" Language: tmux(1) configuration file
|
||||||
" Version: 3.1 (git-f986539e)
|
" Version: before-OpenBSD-lock (git-53c84fd4)
|
||||||
" URL: https://github.com/ericpruitt/tmux.vim/
|
" URL: https://github.com/ericpruitt/tmux.vim/
|
||||||
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
|
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
|
||||||
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
|
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
|
||||||
@@ -66,41 +66,43 @@ for s:i in range(0, 255)
|
|||||||
endfor
|
endfor
|
||||||
|
|
||||||
syn keyword tmuxOptions
|
syn keyword tmuxOptions
|
||||||
\ backspace buffer-limit command-alias default-terminal escape-time
|
\ backspace buffer-limit command-alias copy-command default-terminal editor
|
||||||
\ exit-empty activity-action assume-paste-time base-index bell-action
|
\ escape-time exit-empty activity-action assume-paste-time base-index
|
||||||
\ default-command default-shell default-size destroy-unattached
|
\ bell-action default-command default-shell default-size destroy-unattached
|
||||||
\ detach-on-destroy display-panes-active-colour display-panes-colour
|
\ detach-on-destroy display-panes-active-colour display-panes-colour
|
||||||
\ display-panes-time display-time exit-unattached focus-events history-file
|
\ display-panes-time display-time exit-unattached extended-keys focus-events
|
||||||
\ history-limit key-table lock-after-time lock-command message-command-style
|
\ history-file history-limit key-table lock-after-time lock-command
|
||||||
\ message-limit message-style aggressive-resize allow-rename
|
\ message-command-style message-limit aggressive-resize allow-rename
|
||||||
\ alternate-screen automatic-rename automatic-rename-format
|
\ alternate-screen automatic-rename automatic-rename-format
|
||||||
\ clock-mode-colour clock-mode-style main-pane-height main-pane-width
|
\ clock-mode-colour clock-mode-style copy-mode-current-match-style
|
||||||
\ mode-keys mode-style monitor-activity monitor-bell monitor-silence mouse
|
\ copy-mode-mark-style copy-mode-match-style main-pane-height
|
||||||
\ other-pane-height other-pane-width pane-active-border-style
|
\ main-pane-width message-style mode-keys mode-style monitor-activity
|
||||||
\ pane-base-index pane-border-format pane-border-status pane-border-style
|
\ monitor-bell monitor-silence mouse other-pane-height other-pane-width
|
||||||
\ prefix prefix2 remain-on-exit renumber-windows repeat-time set-clipboard
|
\ pane-active-border-style pane-base-index pane-border-format
|
||||||
\ set-titles set-titles-string silence-action status status-bg status-fg
|
\ pane-border-lines pane-border-status pane-border-style prefix prefix2
|
||||||
\ status-format status-interval status-justify status-keys status-left
|
\ remain-on-exit renumber-windows repeat-time set-clipboard set-titles
|
||||||
\ status-left-length status-left-style status-position status-right
|
\ set-titles-string silence-action status status-bg status-fg status-format
|
||||||
\ status-right-length status-right-style status-style synchronize-panes
|
\ status-interval status-justify status-keys status-left status-left-length
|
||||||
|
\ status-left-style status-position status-right status-right-length
|
||||||
|
\ status-right-style status-style synchronize-panes terminal-features
|
||||||
\ terminal-overrides update-environment user-keys visual-activity
|
\ terminal-overrides update-environment user-keys visual-activity
|
||||||
\ visual-bell visual-silence window-active-style window-size
|
\ visual-bell visual-silence window-active-style window-size
|
||||||
\ window-status-activity-style window-status-bell-style
|
\ window-status-activity-style window-status-bell-style
|
||||||
\ window-status-current-format window-status-current-style
|
\ window-status-current-format window-status-current-style
|
||||||
\ window-status-format window-status-last-style window-status-separator
|
\ window-status-format window-status-last-style window-status-separator
|
||||||
\ window-status-style window-style word-separators wrap-search xterm-keys
|
\ window-status-style window-style word-separators wrap-search
|
||||||
|
|
||||||
syn keyword tmuxCommands
|
syn keyword tmuxCommands
|
||||||
\ attach attach-session bind bind-key break-pane breakp capture-pane
|
\ attach attach-session bind bind-key break-pane breakp capture-pane
|
||||||
\ capturep choose-buffer choose-client choose-tree clear-history clearhist
|
\ capturep choose-buffer choose-client choose-tree clear-history clearhist
|
||||||
\ clock-mode command-prompt confirm confirm-before copy-mode detach
|
\ clock-mode command-prompt confirm confirm-before copy-mode customize-mode
|
||||||
\ detach-client display display-menu display-message display-panes
|
\ detach detach-client display display-menu display-message display-panes
|
||||||
\ display-popup displayp find-window findw if if-shell join-pane joinp
|
\ display-popup displayp find-window findw if if-shell join-pane joinp
|
||||||
\ kill-pane kill-server kill-session kill-window killp has-session has killw
|
\ kill-pane kill-server kill-session kill-window killp has has-session killw
|
||||||
\ link-window linkw list-buffers list-clients list-commands list-keys
|
\ link-window linkw list-buffers list-clients list-commands list-keys
|
||||||
\ list-panes list-sessions list-windows load-buffer loadb lock lock-client
|
\ list-panes list-sessions list-windows load-buffer loadb lock lock-client
|
||||||
\ lock-server lock-session lockc last-pane lastp locks ls last-window last
|
\ lock-server lock-session lockc last-pane lastp locks ls last last-window
|
||||||
\ lsb lsc delete-buffer deleteb lscm lsk lsp lsw menu move-pane move-window
|
\ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window
|
||||||
\ movep movew new new-session new-window neww next next-layout next-window
|
\ movep movew new new-session new-window neww next next-layout next-window
|
||||||
\ nextl paste-buffer pasteb pipe-pane pipep popup prev previous-layout
|
\ nextl paste-buffer pasteb pipe-pane pipep popup prev previous-layout
|
||||||
\ previous-window prevl refresh refresh-client rename rename-session
|
\ previous-window prevl refresh refresh-client rename rename-session
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
|
|||||||
|
|
||||||
" vifm syntax file
|
" vifm syntax file
|
||||||
" Maintainer: xaizek <xaizek@posteo.net>
|
" Maintainer: xaizek <xaizek@posteo.net>
|
||||||
" Last Change: March 7, 2020
|
" Last Change: May 17, 2020
|
||||||
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
|
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
@@ -146,9 +146,9 @@ syntax keyword vifmOption contained aproposprg autochpos caseoptions cdpath cd
|
|||||||
\ numberwidth nuw previewprg quickview relativenumber rnu rulerformat ruf
|
\ numberwidth nuw previewprg quickview relativenumber rnu rulerformat ruf
|
||||||
\ runexec scrollbind scb scrolloff so sort sortgroups sortorder sortnumbers
|
\ runexec scrollbind scb scrolloff so sort sortgroups sortorder sortnumbers
|
||||||
\ shell sh shellflagcmd shcf shortmess shm showtabline stal sizefmt slowfs
|
\ shell sh shellflagcmd shcf shortmess shm showtabline stal sizefmt slowfs
|
||||||
\ smartcase scs statusline stl suggestoptions syncregs syscalls tabscope
|
\ smartcase scs statusline stl suggestoptions syncregs syscalls tablabel
|
||||||
\ tabstop timefmt timeoutlen title tm trash trashdir ts tuioptions to
|
\ tabscope tabstop timefmt timeoutlen title tm trash trashdir ts tuioptions
|
||||||
\ undolevels ul vicmd viewcolumns vifminfo vimhelp vixcmd wildmenu wmnu
|
\ to undolevels ul vicmd viewcolumns vifminfo vimhelp vixcmd wildmenu wmnu
|
||||||
\ wildstyle wordchars wrap wrapscan ws
|
\ wildstyle wordchars wrap wrapscan ws
|
||||||
|
|
||||||
" Disabled boolean options
|
" Disabled boolean options
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ syn match zigBuiltinFn "\v\@(truncate|typeInfo|typeName|TypeOf|atomicRmw|bytesTo
|
|||||||
syn match zigBuiltinFn "\v\@(intToError|errorToInt|intToEnum|enumToInt|setAlignStack|frame|Frame|frameSize|bitReverse|Vector)>"
|
syn match zigBuiltinFn "\v\@(intToError|errorToInt|intToEnum|enumToInt|setAlignStack|frame|Frame|frameSize|bitReverse|Vector)>"
|
||||||
syn match zigBuiltinFn "\v\@(sin|cos|exp|exp2|log|log2|log10|fabs|floor|ceil|trunc|round)>"
|
syn match zigBuiltinFn "\v\@(sin|cos|exp|exp2|log|log2|log10|fabs|floor|ceil|trunc|round)>"
|
||||||
|
|
||||||
syn match zigDecNumber display "\<[0-9]\+\%(.[0-9]\+\)\=\%([eE][+-]\?[0-9]\+\)\="
|
" 12_34 (. but not ..)? (12_34)? (exponent 12_34)?
|
||||||
syn match zigHexNumber display "\<0x[a-fA-F0-9]\+\%([a-fA-F0-9]\+\%([pP][+-]\?[0-9]\+\)\?\)\="
|
syn match zigDecNumber display "\v<\d%(_?\d)*%(\.\.@!)?%(\d%(_?\d)*)?%([eE][+-]?\d%(_?\d)*)?"
|
||||||
syn match zigOctNumber display "\<0o[0-7]\+"
|
syn match zigHexNumber display "\v<0x\x%(_?\x)*%(\.\.@!)?%(\x%(_?\x)*)?%([pP][+-]?\d%(_?\d)*)?"
|
||||||
syn match zigBinNumber display "\<0b[01]\+\%(.[01]\+\%([eE][+-]\?[0-9]\+\)\?\)\="
|
syn match zigOctNumber display "\v<0o\o%(_?\o)*"
|
||||||
|
syn match zigBinNumber display "\v<0b[01]%(_?[01])*"
|
||||||
|
|
||||||
syn match zigCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
syn match zigCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
||||||
syn match zigCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
syn match zigCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
||||||
|
|||||||
54
syntax/zir.vim
Normal file
54
syntax/zir.vim
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1
|
||||||
|
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: Zir
|
||||||
|
" Maintainer: Andrew Kelley
|
||||||
|
" Latest Revision: 00 April 2020
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:current_syntax = "zir"
|
||||||
|
|
||||||
|
syn region zirCommentLine start=";" end="$" contains=zirTodo,@Spell
|
||||||
|
|
||||||
|
syn region zirBlock start="{" end="}" transparent fold
|
||||||
|
|
||||||
|
syn keyword zirKeyword primitive fntype int str as ptrtoint fieldptr deref asm unreachable export ref
|
||||||
|
|
||||||
|
syn keyword zirTodo contained TODO
|
||||||
|
|
||||||
|
syn region zirString start=+c\?"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=zirEscape,zirEscapeUnicode,zirEscapeError,@Spell
|
||||||
|
|
||||||
|
syn match zirEscapeError display contained /\\./
|
||||||
|
syn match zirEscape display contained /\\\([nrt\\'"]\|x\x\{2}\)/
|
||||||
|
syn match zirEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{6}\)/
|
||||||
|
|
||||||
|
syn match zirDecNumber display "\<[0-9]\+\%(.[0-9]\+\)\=\%([eE][+-]\?[0-9]\+\)\="
|
||||||
|
syn match zirHexNumber display "\<0x[a-fA-F0-9]\+\%([a-fA-F0-9]\+\%([pP][+-]\?[0-9]\+\)\?\)\="
|
||||||
|
syn match zirOctNumber display "\<0o[0-7]\+"
|
||||||
|
syn match zirBinNumber display "\<0b[01]\+\%(.[01]\+\%([eE][+-]\?[0-9]\+\)\?\)\="
|
||||||
|
|
||||||
|
syn match zirGlobal display "[^a-zA-Z0-9_]\?\zs@[a-zA-Z0-9_]\+"
|
||||||
|
syn match zirLocal display "[^a-zA-Z0-9_]\?\zs%[a-zA-Z0-9_]\+"
|
||||||
|
|
||||||
|
hi def link zirCommentLine Comment
|
||||||
|
hi def link zirTodo Todo
|
||||||
|
|
||||||
|
hi def link zirKeyword Keyword
|
||||||
|
|
||||||
|
hi def link zirString Constant
|
||||||
|
|
||||||
|
hi def link zirEscape Special
|
||||||
|
hi def link zirEscapeUnicode zirEscape
|
||||||
|
hi def link zirEscapeError Error
|
||||||
|
|
||||||
|
hi def link zirDecNumber Constant
|
||||||
|
hi def link zirHexNumber Constant
|
||||||
|
hi def link zirOctNumber Constant
|
||||||
|
hi def link zirBinNumber Constant
|
||||||
|
|
||||||
|
hi def link zirGlobal Identifier
|
||||||
|
hi def link zirLocal Identifier
|
||||||
|
|
||||||
|
endif
|
||||||
Reference in New Issue
Block a user