summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-09-09 12:05:33 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2021-09-09 12:05:33 +0200
commit7f98e949d4922ba2109304bd4cabe9578a8062fb (patch)
treee1b08f862397c14ab799e8f277c6fc39ec48b3b6
parentce31cd1d2f4e8eee9fd91325e4599f15cb9566fd (diff)
downloadvim-polyglot-7f98e949d4922ba2109304bd4cabe9578a8062fb.tar.gz
vim-polyglot-7f98e949d4922ba2109304bd4cabe9578a8062fb.zip
Update
-rw-r--r--autoload/dart.vim24
-rw-r--r--autoload/elixir/indent.vim110
-rw-r--r--autoload/fsharp.vim102
-rw-r--r--autoload/polyglot/ft.vim19
-rw-r--r--autoload/polyglot/init.vim2
-rw-r--r--autoload/polyglot/sleuth.vim2
-rw-r--r--extras/filetype.vim27
-rw-r--r--ftplugin/eelixir.vim5
-rw-r--r--ftplugin/elixir.vim2
-rw-r--r--ftplugin/julia.vim3
-rw-r--r--ftplugin/juliadoc.vim2
-rw-r--r--ftplugin/ocaml.vim8
-rw-r--r--ftplugin/puppet.vim4
-rw-r--r--ftplugin/scheme.vim5
-rw-r--r--ftplugin/toml.vim25
-rw-r--r--ftplugin/typescript.vim2
-rw-r--r--indent/bzl.vim41
-rw-r--r--indent/elixir.vim2
-rw-r--r--indent/erlang.vim8
-rw-r--r--indent/ruby.vim2
-rw-r--r--indent/scala.vim30
-rw-r--r--syntax/aptconf.vim13
-rw-r--r--syntax/c.vim5
-rw-r--r--syntax/cpp.vim43
-rw-r--r--syntax/debchangelog.vim6
-rw-r--r--syntax/debsources.vim6
-rw-r--r--syntax/eelixir.vim5
-rw-r--r--syntax/git.vim65
-rw-r--r--syntax/julia.vim42
-rw-r--r--syntax/juliadoc.vim6
-rw-r--r--syntax/meson.vim3
-rw-r--r--syntax/pascal.vim2
-rw-r--r--syntax/plantuml.vim8
-rw-r--r--syntax/scala.vim12
-rw-r--r--syntax/scheme.vim13
-rw-r--r--syntax/tmux.vim6
-rw-r--r--syntax/toml.vim80
37 files changed, 491 insertions, 249 deletions
diff --git a/autoload/dart.vim b/autoload/dart.vim
index 959b67ca..a5733d03 100644
--- a/autoload/dart.vim
+++ b/autoload/dart.vim
@@ -31,9 +31,9 @@ endfunction
function! dart#fmt(...) abort
let l:dartfmt = s:FindDartFmt()
- if type(l:dartfmt) != type('') | return | endif
+ if empty(l:dartfmt) | return | endif
let buffer_content = getline(1, '$')
- let l:cmd = [l:dartfmt, '--stdin-name', shellescape(expand('%'))]
+ let l:cmd = extend(l:dartfmt, ['--stdin-name', shellescape(expand('%'))])
if exists('g:dartfmt_options')
call extend(l:cmd, g:dartfmt_options)
endif
@@ -64,14 +64,30 @@ function! dart#fmt(...) abort
endfunction
function! s:FindDartFmt() abort
- if executable('dartfmt') | return 'dartfmt' | endif
+ if executable('dart')
+ let l:version_text = system('dart --version')
+ let l:match = matchlist(l:version_text,
+ \ '\vDart SDK version: (\d+)\.(\d+)\.\d+.*')
+ if empty(l:match)
+ call s:error('Unable to determine dart version')
+ return []
+ endif
+ let l:major = l:match[1]
+ let l:minor = l:match[2]
+ if l:major > 2 || l:major == 2 && l:minor >= 14
+ return ['dart', 'format']
+ endif
+ endif
+ " Legacy fallback for Dart SDK pre 2.14
+ if executable('dartfmt') | return ['dartfmt'] | endif
if executable('flutter')
let l:flutter_cmd = resolve(exepath('flutter'))
let l:bin = fnamemodify(l:flutter_cmd, ':h')
let l:dartfmt = l:bin.'/cache/dart-sdk/bin/dartfmt'
- if executable(l:dartfmt) | return l:dartfmt | endif
+ if executable(l:dartfmt) | return [l:dartfmt] | endif
endif
call s:error('Cannot find a `dartfmt` command')
+ return []
endfunction
function! dart#analyzer(q_args) abort
diff --git a/autoload/elixir/indent.vim b/autoload/elixir/indent.vim
index c9adcd0a..ccf388b7 100644
--- a/autoload/elixir/indent.vim
+++ b/autoload/elixir/indent.vim
@@ -24,6 +24,7 @@ function! elixir#indent#indent(lnum)
call cursor(lnum, 0)
let handlers = [
+ \'inside_embedded_view',
\'top_of_file',
\'starts_with_string_continuation',
\'following_trailing_binary_operator',
@@ -69,6 +70,17 @@ function! s:prev_starts_with(context, expr)
return s:_starts_with(a:context.prev_nb_text, a:expr, a:context.prev_nb_lnum)
endfunction
+function! s:in_embedded_view()
+ let groups = map(synstack(line('.'), col('.')), "synIDattr(v:val, 'name')")
+ for group in ['elixirPhoenixESigil', 'elixirLiveViewSigil', 'elixirSurfaceSigil']
+ if index(groups, group) >= 0
+ return 1
+ endif
+ endfor
+
+ return 0
+endfunction
+
" Returns 0 or 1 based on whether or not the text starts with the given
" expression and is not a string or comment
function! s:_starts_with(text, expr, lnum)
@@ -160,6 +172,104 @@ function! s:find_last_pos(lnum, text, match)
return -1
endfunction
+function! elixir#indent#handle_inside_embedded_view(context)
+ if !s:in_embedded_view()
+ return -1
+ endif
+
+ " Multi-line Surface data delimiters
+ let pair_lnum = searchpair('{{', '', '}}', 'bW', "line('.') == ".a:context.lnum." || s:is_string_or_comment(line('.'), col('.'))", max([0, a:context.lnum - g:elixir_indent_max_lookbehind]))
+ if pair_lnum
+ if a:context.text =~ '}}$'
+ return indent(pair_lnum)
+ elseif a:context.text =~ '}}*>$'
+ return -1
+ elseif s:prev_ends_with(a:context, '[\|%{')
+ return indent(a:context.prev_nb_lnum) + s:sw()
+ elseif a:context.prev_nb_text =~ ',$'
+ return indent(a:context.prev_nb_lnum)
+ else
+ return indent(pair_lnum) + s:sw()
+ endif
+ endif
+
+ " Multi-line opening tag -- >, />, or %> are on a different line that their opening <
+ let pair_lnum = searchpair('^\s\+<.*[^>]$', '', '^[^<]*[/%}]\?>$', 'bW', "line('.') == ".a:context.lnum." || s:is_string_or_comment(line('.'), col('.'))", max([0, a:context.lnum - g:elixir_indent_max_lookbehind]))
+ if pair_lnum
+ if a:context.text =~ '^\s\+\%\(>\|\/>\|%>\|}}>\)$'
+ call s:debug("current line is a lone >, />, or %>")
+ return indent(pair_lnum)
+ elseif a:context.text =~ '\%\(>\|\/>\|%>\|}}>\)$'
+ call s:debug("current line ends in >, />, or %>")
+ if s:prev_ends_with(a:context, ',')
+ return indent(a:context.prev_nb_lnum)
+ else
+ return -1
+ endif
+ else
+ call s:debug("in the body of a multi-line opening tag")
+ return indent(pair_lnum) + s:sw()
+ endif
+ endif
+
+ " Special cases
+ if s:prev_ends_with(a:context, '^[^<]*do\s%>')
+ call s:debug("prev line closes a multi-line do block")
+ return indent(a:context.prev_nb_lnum)
+ elseif a:context.prev_nb_text =~ 'do\s*%>$'
+ call s:debug("prev line opens a do block")
+ return indent(a:context.prev_nb_lnum) + s:sw()
+ elseif a:context.text =~ '^\s\+<\/[a-zA-Z0-9\.\-_]\+>\|<% end %>'
+ call s:debug("a single closing tag")
+ if a:context.prev_nb_text =~ '^\s\+<[^%\/]*[^/]>.*<\/[a-zA-Z0-9\.\-_]\+>$'
+ call s:debug("opening and closing tags are on the same line")
+ return indent(a:context.prev_nb_lnum) - s:sw()
+ elseif a:context.prev_nb_text =~ '^\s\+<[^%\/]*[^/]>\|\s\+>'
+ call s:debug("prev line is opening html tag or single >")
+ return indent(a:context.prev_nb_lnum)
+ elseif s:prev_ends_with(a:context, '^[^<]*\%\(do\s\)\@<!%>')
+ call s:debug("prev line closes a multi-line eex tag")
+ return indent(a:context.prev_nb_lnum) - 2 * s:sw()
+ else
+ return indent(a:context.prev_nb_lnum) - s:sw()
+ endif
+ elseif a:context.text =~ '^\s*<%\s*\%(end\|else\|catch\|rescue\)\>.*%>'
+ call s:debug("eex middle or closing eex tag")
+ return indent(a:context.prev_nb_lnum) - s:sw()
+ elseif a:context.prev_nb_text =~ '\s*<\/\|<% end %>$'
+ call s:debug("prev is closing tag")
+ return indent(a:context.prev_nb_lnum)
+ elseif a:context.prev_nb_text =~ '^\s\+<[^%\/]*[^/]>.*<\/[a-zA-Z0-9\.\-_]\+>$'
+ call s:debug("opening and closing tags are on the same line")
+ return indent(a:context.prev_nb_lnum)
+ elseif s:prev_ends_with(a:context, '\s\+\/>')
+ call s:debug("prev ends with a single \>")
+ return indent(a:context.prev_nb_lnum)
+ elseif s:prev_ends_with(a:context, '^[^<]*\/>')
+ call s:debug("prev line is closing a multi-line self-closing tag")
+ return indent(a:context.prev_nb_lnum) - s:sw()
+ elseif s:prev_ends_with(a:context, '^\s\+<.*\/>')
+ call s:debug("prev line is closing self-closing tag")
+ return indent(a:context.prev_nb_lnum)
+ elseif a:context.prev_nb_text =~ '^\s\+%\?>$'
+ call s:debug("prev line is a single > or %>")
+ return indent(a:context.prev_nb_lnum) + s:sw()
+ endif
+
+ " Simple HTML (ie, opening tag is not split across lines)
+ let pair_lnum = searchpair('^\s\+<[^%\/].*[^\/>]>$', '', '^\s\+<\/\w\+>$', 'bW', "line('.') == ".a:context.lnum." || s:is_string_or_comment(line('.'), col('.'))", max([0, a:context.lnum - g:elixir_indent_max_lookbehind]))
+ if pair_lnum
+ call s:debug("simple HTML")
+ if a:context.text =~ '^\s\+<\/\w\+>$'
+ return indent(pair_lnum)
+ else
+ return indent(pair_lnum) + s:sw()
+ endif
+ endif
+
+ return -1
+endfunction
+
function! elixir#indent#handle_top_of_file(context)
if a:context.prev_nb_lnum == 0
return 0
diff --git a/autoload/fsharp.vim b/autoload/fsharp.vim
index 8567a037..d18f2bbc 100644
--- a/autoload/fsharp.vim
+++ b/autoload/fsharp.vim
@@ -233,6 +233,107 @@ function! fsharp#updateServerConfig()
call s:notify('workspace/didChangeConfiguration', settings)
endfunction
+function! fsharp#loadConfig()
+ if exists('s:config_is_loaded')
+ return
+ endif
+
+ if !exists('g:fsharp#fsautocomplete_command')
+ let s:fsac = fnamemodify(s:script_root_dir . "fsac/fsautocomplete.dll", ":p")
+
+ " check if FSAC exists
+ if empty(glob(s:fsac))
+ echoerr "FSAC not found. :FSharpUpdateFSAC to download."
+ let &cpo = s:cpo_save
+ finish
+ endif
+
+ let g:fsharp#fsautocomplete_command =
+ \ ['dotnet', s:fsac,
+ \ '--background-service-enabled'
+ \ ]
+ endif
+ if !exists('g:fsharp#use_recommended_server_config')
+ let g:fsharp#use_recommended_server_config = 1
+ endif
+ call fsharp#getServerConfig()
+ if !exists('g:fsharp#automatic_workspace_init')
+ let g:fsharp#automatic_workspace_init = 1
+ endif
+ if !exists('g:fsharp#automatic_reload_workspace')
+ let g:fsharp#automatic_reload_workspace = 1
+ endif
+ if !exists('g:fsharp#show_signature_on_cursor_move')
+ let g:fsharp#show_signature_on_cursor_move = 1
+ endif
+ if !exists('g:fsharp#fsi_command')
+ let g:fsharp#fsi_command = "dotnet fsi"
+ endif
+ if !exists('g:fsharp#fsi_keymap')
+ let g:fsharp#fsi_keymap = "vscode"
+ endif
+ if !exists('g:fsharp#fsi_window_command')
+ let g:fsharp#fsi_window_command = "botright 10new"
+ endif
+ if !exists('g:fsharp#fsi_focus_on_send')
+ let g:fsharp#fsi_focus_on_send = 0
+ endif
+ if !exists('g:fsharp#backend')
+ if has('nvim-0.5')
+ if exists('g:LanguageClient_loaded')
+ let g:fsharp#backend = "languageclient-neovim"
+ else
+ let g:fsharp#backend = "nvim"
+ endif
+ else
+ let g:fsharp#backend = "languageclient-neovim"
+ endif
+ endif
+
+ " backend configuration
+ if g:fsharp#backend == 'languageclient-neovim'
+ if !exists('g:LanguageClient_serverCommands')
+ let g:LanguageClient_serverCommands = {}
+ endif
+ if !has_key(g:LanguageClient_serverCommands, 'fsharp')
+ let g:LanguageClient_serverCommands.fsharp = {
+ \ 'name': 'fsautocomplete',
+ \ 'command': g:fsharp#fsautocomplete_command,
+ \ 'initializationOptions': {},
+ \}
+ if g:fsharp#automatic_workspace_init
+ let g:LanguageClient_serverCommands.fsharp.initializationOptions = {
+ \ 'AutomaticWorkspaceInit': v:true,
+ \}
+ endif
+ endif
+
+ if !exists('g:LanguageClient_rootMarkers')
+ let g:LanguageClient_rootMarkers = {}
+ endif
+ if !has_key(g:LanguageClient_rootMarkers, 'fsharp')
+ let g:LanguageClient_rootMarkers.fsharp = ['*.sln', '*.fsproj', '.git']
+ endif
+ elseif g:fsharp#backend == 'nvim'
+ if !exists('g:fsharp#lsp_auto_setup')
+ let g:fsharp#lsp_auto_setup = 1
+ endif
+ if !exists('g:fsharp#lsp_recommended_colorscheme')
+ let g:fsharp#lsp_recommended_colorscheme = 1
+ endif
+ if !exists('g:fsharp#lsp_codelens')
+ let g:fsharp#lsp_codelens = 1
+ endif
+
+ else
+ if g:fsharp#backend != 'disable'
+ echoerr "[FSAC] Invalid backend: " . g:fsharp#backend
+ endif
+ endif
+
+ let s:config_is_loaded = 1
+endfunction
+
" handlers for notifications
@@ -617,7 +718,6 @@ function! fsharp#sendAllToFsi()
return fsharp#sendFsi(text)
endfunction
-
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/autoload/polyglot/ft.vim b/autoload/polyglot/ft.vim
index 2e4c1f69..e4c32415 100644
--- a/autoload/polyglot/ft.vim
+++ b/autoload/polyglot/ft.vim
@@ -264,6 +264,13 @@ func polyglot#ft#ProtoCheck(default)
endfunc
func polyglot#ft#FTm()
+ if exists("g:filetype_m")
+ exe "setf " . g:filetype_m
+ return
+ endif
+
+ let octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|for\|function\|if\|methods\|parfor\|properties\|switch\|while\)\>'
+
let n = 1
let saw_comment = 0 " Whether we've seen a multiline comment leader.
while n < 100
@@ -278,6 +285,13 @@ func polyglot#ft#FTm()
setf objc
return
endif
+ if line =~ '^\s*\%(#\|%!\|[#%]{\=\s*$\)' ||
+ \ line =~ '^\s*unwind_protect\>' ||
+ \ line =~ '\%(^\|;\)\s*' .. octave_block_terminators
+ setf octave
+ return
+ endif
+ " TODO: could be Matlab or Octave
if line =~ '^\s*%'
setf matlab
return
@@ -298,11 +312,8 @@ func polyglot#ft#FTm()
" or Murphi based on the comment leader. Assume the former as it is more
" common.
setf objc
- elseif exists("g:filetype_m")
- " Use user specified default filetype for .m
- exe "setf " . g:filetype_m
else
- " Default is matlab
+ " Default is Matlab
setf matlab
endif
endfunc
diff --git a/autoload/polyglot/init.vim b/autoload/polyglot/init.vim
index 04353964..d739ae7b 100644
--- a/autoload/polyglot/init.vim
+++ b/autoload/polyglot/init.vim
@@ -2265,7 +2265,7 @@ if !has_key(g:polyglot_is_disabled, 'jsonnet')
endif
if !has_key(g:polyglot_is_disabled, 'json')
- au BufNewFile,BufRead *.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}htmlhintrc,{.,}imgbotconfig,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json
+ au BufNewFile,BufRead *.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}auto-changelog,{.,}c8rc,{.,}htmlhintrc,{.,}imgbotconfig,{.,}nycrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json
endif
if !has_key(g:polyglot_is_disabled, 'json5')
diff --git a/autoload/polyglot/sleuth.vim b/autoload/polyglot/sleuth.vim
index bf3166a4..a7a5b86a 100644
--- a/autoload/polyglot/sleuth.vim
+++ b/autoload/polyglot/sleuth.vim
@@ -264,7 +264,7 @@ let s:globs = {
\ 'jovial': '*.jov,*.j73,*.jovial',
\ 'jproperties': '*.properties,*.properties_??,*.properties_??_??,*.properties_??_??_*',
\ 'jq': '*.jq,.jqrc,.jqrc*',
- \ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.htmlhintrc,.imgbotconfig,.tern-config,.tern-project,.watchmanconfig,Pipfile.lock,composer.lock,mcmod.info',
+ \ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.auto-changelog,.c8rc,.htmlhintrc,.imgbotconfig,.nycrc,.tern-config,.tern-project,.watchmanconfig,Pipfile.lock,composer.lock,mcmod.info',
\ 'json5': '*.json5',
\ 'jsonc': '*.cjson,*.jsonc,coc-settings.json,.eslintrc.json,.babelrc,.jshintrc,.jslintrc,.mocharc.json,coffeelint.json,tsconfig.json,jsconfig.json',
\ 'jsonnet': '*.jsonnet,*.libsonnet',
diff --git a/extras/filetype.vim b/extras/filetype.vim
index 19f4a4ed..6ef1fa21 100644
--- a/extras/filetype.vim
+++ b/extras/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2021 Jul 03
+" Last Change: 2021 Aug 23
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -537,8 +537,13 @@ au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula
" Datascript
au BufNewFile,BufRead *.ds setf datascript
-" dsl
-au BufNewFile,BufRead *.dsl setf dsl
+" dsl: DSSSL or Structurizr
+au BufNewFile,BufRead *.dsl
+ \ if getline(1) =~ '^\s*<\!' |
+ \ setf dsl |
+ \ else |
+ \ setf structurizr |
+ \ endif
" DTD (Document Type Definition for XML)
au BufNewFile,BufRead *.dtd setf dtd
@@ -874,6 +879,9 @@ au BufNewFile,BufRead *.ipynb setf json
" JSONC
au BufNewFile,BufRead *.jsonc setf jsonc
+" Julia
+au BufNewFile,BufRead *.jl setf julia
+
" Kixtart
au BufNewFile,BufRead *.kix setf kix
@@ -1021,7 +1029,7 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown
" Mason
au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
-" Mathematica, Matlab, Murphi or Objective C
+" Mathematica, Matlab, Murphi, Objective C or Octave
au BufNewFile,BufRead *.m call polyglot#ft#FTm()
" Mathematica notebook
@@ -1167,6 +1175,9 @@ au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli
" Occam
au BufNewFile,BufRead *.occ setf occam
+" Octave
+au BufNewFile,BufRead octave.conf,.octaverc,octaverc setf octave
+
" Omnimark
au BufNewFile,BufRead *.xom,*.xin setf omnimark
@@ -1375,6 +1386,9 @@ au BufNewFile,BufRead *.pk setf poke
" Protocols
au BufNewFile,BufRead */etc/protocols setf protocols
+" Pyret
+au BufNewFile,BufRead *.arr setf pyret
+
" Pyrex
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
@@ -1523,6 +1537,9 @@ au BufNewFile,BufRead *.sbt setf sbt
" Scilab
au BufNewFile,BufRead *.sci,*.sce setf scilab
+" scdoc
+au BufNewFile,BufRead *.scd setf scdoc
+
" SCSS
au BufNewFile,BufRead *.scss setf scss
@@ -1612,7 +1629,7 @@ au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
au BufNewFile,BufRead *.zsh setf zsh
" Scheme
-au BufNewFile,BufRead *.scm,*.ss,*.rkt setf scheme
+au BufNewFile,BufRead *.scm,*.ss,*.rkt,*.rktd,*.rktl setf scheme
" Screen RC
au BufNewFile,BufRead .screenrc,screenrc setf screen
diff --git a/ftplugin/eelixir.vim b/ftplugin/eelixir.vim
index 6e1d13fd..d8fb2631 100644
--- a/ftplugin/eelixir.vim
+++ b/ftplugin/eelixir.vim
@@ -24,13 +24,16 @@ if !exists("b:eelixir_subtype")
let b:eelixir_subtype = matchstr(&filetype,'^eex\.\zs\w\+')
endif
if b:eelixir_subtype == ''
+ let b:eelixir_subtype = matchstr(&filetype,'^heex\.\zs\w\+')
+ endif
+ if b:eelixir_subtype == ''
let b:eelixir_subtype = matchstr(&filetype,'^leex\.\zs\w\+')
endif
if b:eelixir_subtype == ''
let b:eelixir_subtype = matchstr(&filetype,'^sface\.\zs\w\+')
endif
if b:eelixir_subtype == ''
- let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.sface\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
+ let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.heex\|\.leex\|\.sface\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
endif
if b:eelixir_subtype == 'ex'
let b:eelixir_subtype = 'elixir'
diff --git a/ftplugin/elixir.vim b/ftplugin/elixir.vim
index cd25464a..253d522e 100644
--- a/ftplugin/elixir.vim
+++ b/ftplugin/elixir.vim
@@ -33,7 +33,7 @@ let &l:path =
\ &g:path
\ ], ',')
setlocal includeexpr=elixir#util#get_filename(v:fname)
-setlocal suffixesadd=.ex,.exs,.eex,.leex,.sface,.erl,.xrl,.yrl,.hrl
+setlocal suffixesadd=.ex,.exs,.eex,.heex,.leex,.sface,.erl,.xrl,.yrl,.hrl
let &l:define = 'def\(macro\|guard\|delegate\)\=p\='
diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim
index 39126598..dd84aa70 100644
--- a/ftplugin/julia.vim
+++ b/ftplugin/julia.vim
@@ -13,7 +13,7 @@ endif
let b:did_ftplugin = 1
let s:save_cpo = &cpo
-set cpo-=C
+set cpo&vim
setlocal include=^\\s*\\%(reload\\\|include\\)\\>
setlocal suffixesadd=.jl
@@ -89,7 +89,6 @@ if exists("loaded_matchit")
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"
\ . " | unlet! b:julia_begin_keywords b:julia_end_keywords"
\ . " | delfunction JuliaGetMatchWords"
- \ . " | call julia_blocks#remove_mappings()"
if get(g:, "julia_blocks", 1)
call julia_blocks#init_mappings()
diff --git a/ftplugin/juliadoc.vim b/ftplugin/juliadoc.vim
index 5b80149c..161545d1 100644
--- a/ftplugin/juliadoc.vim
+++ b/ftplugin/juliadoc.vim
@@ -11,7 +11,7 @@ endif
let b:did_ftplugin = 1
let s:save_cpo = &cpo
-set cpo-=C
+set cpo&vim
setlocal conceallevel=2
setlocal concealcursor=nc
diff --git a/ftplugin/ocaml.vim b/ftplugin/ocaml.vim
index 6babcef8..6ce2adcb 100644
--- a/ftplugin/ocaml.vim
+++ b/ftplugin/ocaml.vim
@@ -373,7 +373,7 @@ endfunction
endif
else
let annot_file_name = ''
- "(Pierre Vittet: I have commented 4b because this was chrashing
+ "(Pierre Vittet: I have commented 4b because this was crashing
"my vim (it produced infinite loop))
"
" 4b. anarchy : the renamed _build directory may be higher in the hierarchy
@@ -464,8 +464,8 @@ endfunction
"b. 'search' and 'match' work to find the type information
- "In: - lin1,col1: postion of expression first char
- " - lin2,col2: postion of expression last char
+ "In: - lin1,col1: position of expression first char
+ " - lin2,col2: position of expression last char
"Out: - the pattern to be looked for to find the block
" Must be called in the source buffer (use of line2byte)
function! s:Block_pattern(lin1,lin2,col1,col2)
@@ -583,7 +583,7 @@ endfunction
let res = substitute (a:res, "\n", "", "g" )
"remove double space
let res =substitute(res , " ", " ", "g")
- "remove space at begining of string.
+ "remove space at beginning of string.
let res = substitute(res, "^ *", "", "g")
return res
endfunction
diff --git a/ftplugin/puppet.vim b/ftplugin/puppet.vim
index 5316cf5e..a57fe491 100644
--- a/ftplugin/puppet.vim
+++ b/ftplugin/puppet.vim
@@ -18,9 +18,11 @@ setlocal softtabstop=2
setlocal shiftwidth=2
setlocal expandtab
setlocal keywordprg=puppet\ describe\ --providers
-setlocal iskeyword=:,@,48-57,_,192-255
setlocal comments=sr:/*,mb:*,ex:*/,b:#
setlocal commentstring=#\ %s
+" adding : to iskeyword is tempting in order to make word movements skip over a
+" full resource name, however since : is used in many non-keyword contexts it
+" is a bad idea to add it to the option.
setlocal formatoptions-=t formatoptions+=croql
setlocal formatexpr=puppet#format#Format()
diff --git a/ftplugin/scheme.vim b/ftplugin/scheme.vim
index a5506d3a..a2e8345c 100644
--- a/ftplugin/scheme.vim
+++ b/ftplugin/scheme.vim
@@ -4,10 +4,11 @@ endif
" Vim filetype plugin file
" Language: Scheme (R7RS)
-" Last Change: 2019 Nov 18
+" Last Change: 2019-11-19
" Author: Evan Hanson <evhan@foldling.org>
" Maintainer: Evan Hanson <evhan@foldling.org>
" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
+" Repository: https://git.foldling.org/vim-scheme.git
" URL: https://foldling.org/vim/ftplugin/scheme.vim
if exists('b:did_ftplugin')
@@ -52,7 +53,7 @@ let b:undo_ftplugin = b:undo_ftplugin . ' lispwords<'
let b:did_scheme_ftplugin = 1
if exists('b:is_chicken') || exists('g:is_chicken')
- exe 'ru! ftplugin/chicken.vim'
+ runtime! ftplugin/chicken.vim
endif
unlet b:did_scheme_ftplugin
diff --git a/ftplugin/toml.vim b/ftplugin/toml.vim
deleted file mode 100644
index 8d45ea77..00000000
--- a/ftplugin/toml.vim
+++ /dev/null
@@ -1,25 +0,0 @@
-if polyglot#init#is_disabled(expand('<sfile>:p'), 'toml', 'ftplugin/toml.vim')
- finish
-endif
-
-" File: ftplugin/toml.vim
-" Author: Kevin Ballard <kevin@sb.org>
-" Description: FileType Plugin for Toml
-" Last Change: Feb 12, 2019
-
-if exists('b:did_ftplugin')
- finish
-endif
-let b:did_ftplugin = 1
-
-let s:save_cpo = &cpo
-set cpo&vim
-let b:undo_ftplugin = 'setlocal commentstring< comments<'
-
-setlocal commentstring=#\ %s
-setlocal comments=:#
-
-let &cpo = s:save_cpo
-unlet s:save_cpo
-
-" vim: set et sw=4 ts=4:
diff --git a/ftplugin/typescript.vim b/ftplugin/typescript.vim
index fe0c7b8d..ce1de1d9 100644
--- a/ftplugin/typescript.vim
+++ b/ftplugin/typescript.vim
@@ -47,7 +47,7 @@ function! Fixedgq(lnum, count)
return 1
endif
- " Put all the lines on one line and do normal spliting after that
+ " Put all the lines on one line and do normal splitting after that
if l:count > 1
while l:count > 1
let l:count -= 1
diff --git a/indent/bzl.vim b/indent/bzl.vim
index 8780cc54..6a6ccb61 100644
--- a/indent/bzl.vim
+++ b/indent/bzl.vim
@@ -5,7 +5,7 @@ endif
" Vim indent file
" Language: Bazel (http://bazel.io)
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
-" Last Change: 2017 Jun 13
+" Last Change: 2021 Jul 08
if exists('b:did_indent')
finish
@@ -45,30 +45,41 @@ function GetBzlIndent(lnum) abort
if exists('g:pyindent_open_paren')
let l:pyindent_open_paren = g:pyindent_open_paren
endif
- let g:pyindent_nested_paren = 'shiftwidth() * 2'
- let g:pyindent_open_paren = 'shiftwidth() * 2'
+ let g:pyindent_nested_paren = 'shiftwidth()'
+ let g:pyindent_open_paren = 'shiftwidth()'
endif
let l:indent = -1
- " Indent inside parens.
- " Align with the open paren unless it is at the end of the line.
- " E.g.
- " open_paren_not_at_EOL(100,
- " (200,
- " 300),
- " 400)
- " open_paren_at_EOL(
- " 100, 200, 300, 400)
call cursor(a:lnum, 1)
let [l:par_line, l:par_col] = searchpairpos('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" .
\ " synIDattr(synID(line('.'), col('.'), 1), 'name')" .
\ " =~ '\\(Comment\\|String\\)$'")
if l:par_line > 0
- call cursor(l:par_line, 1)
- if l:par_col != col('$') - 1
- let l:indent = l:par_col
+ " Indent inside parens.
+ if searchpair('(\|{\|\[', '', ')\|}\|\]', 'W',
+ \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" .
+ \ " synIDattr(synID(line('.'), col('.'), 1), 'name')" .
+ \ " =~ '\\(Comment\\|String\\)$'") && line('.') == a:lnum
+ " If cursor is at close parens, match indent with open parens.
+ " E.g.
+ " foo(
+ " )
+ let l:indent = indent(l:par_line)
+ else
+ " Align with the open paren unless it is at the end of the line.
+ " E.g.
+ " open_paren_not_at_EOL(100,
+ " (200,
+ " 300),
+ " 400)
+ " open_paren_at_EOL(
+ " 100, 200, 300, 400)
+ call cursor(l:par_line, 1)
+ if l:par_col != col('$') - 1
+ let l:indent = l:par_col
+ endif
endif
endif
diff --git a/indent/elixir.vim b/indent/elixir.vim
index 4ff1257a..d342e82d 100644
--- a/indent/elixir.vim
+++ b/indent/elixir.vim
@@ -10,7 +10,7 @@ let b:did_indent = 1
setlocal indentexpr=elixir#indent(v:lnum)
setlocal indentkeys+==after,=catch,=do,=else,=end,=rescue,
-setlocal indentkeys+=*<Return>,=->,=\|>,=<>,0},0],0)
+setlocal indentkeys+=*<Return>,=->,=\|>,=<>,0},0],0),>
" TODO: @jbodah 2017-02-27: all operators should cause reindent when typed
diff --git a/indent/erlang.vim b/indent/erlang.vim
index 1636cc57..5a5637a7 100644
--- a/indent/erlang.vim
+++ b/indent/erlang.vim
@@ -61,7 +61,7 @@ endfunction
" ======================
" Indtokens are "indentation tokens". See their exact format in the
-" documentaiton of the s:GetTokensFromLine function.
+" documentation of the s:GetTokensFromLine function.
" Purpose:
" Calculate the new virtual column after the given segment of a line.
@@ -79,7 +79,7 @@ endfunction
" s:CalcVCol("\t'\tx', b", 1, 4, 4) -> 10
function! s:CalcVCol(line, first_index, last_index, vcol, tabstop)
- " We copy the relevent segment of the line, otherwise if the line were
+ " We copy the relevant segment of the line, otherwise if the line were
" e.g. `"\t", term` then the else branch below would consume the `", term`
" part at once.
let line = a:line[a:first_index : a:last_index]
@@ -608,7 +608,7 @@ endfunction
function! s:BeginElementFoundIfEmpty(stack, token, curr_vcol, stored_vcol, sw)
if empty(a:stack)
if a:stored_vcol ==# -1
- call s:Log(' "' . a:token . '" directly preceeds LTI -> return')
+ call s:Log(' "' . a:token . '" directly precedes LTI -> return')
return [1, a:curr_vcol + a:sw]
else
call s:Log(' "' . a:token .
@@ -829,7 +829,7 @@ function! s:ErlangCalcIndent2(lnum, stack)
if ret | return res | endif
if stored_vcol ==# -1
- call s:Log(' End of clause directly preceeds LTI -> return')
+ call s:Log(' End of clause directly precedes LTI -> return')
return 0
else
call s:Log(' End of clause (but not end of line) -> return')
diff --git a/indent/ruby.vim b/indent/ruby.vim
index e4a295fd..a2d8814e 100644
--- a/indent/ruby.vim
+++ b/indent/ruby.vim
@@ -287,7 +287,7 @@ function! GetRubyIndent(...) abort
\ ]
" Most Significant line based on the previous one -- in case it's a
- " contination of something above
+ " continuation of something above
let indent_info.plnum_msl = s:GetMSL(indent_info.plnum)
for callback_name in indent_callback_names
diff --git a/indent/scala.vim b/indent/scala.vim
index 4ff04daa..cba01f40 100644
--- a/indent/scala.vim
+++ b/indent/scala.vim
@@ -416,19 +416,19 @@ function! GetScalaIndent()
if prevline =~ '^\s*\.'
return ind
else
- return ind + &shiftwidth
+ return ind + shiftwidth()
endif
endif
" Indent html literals
if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$'
call scala#ConditionalConfirm("3")
- return ind + &shiftwidth
+ return ind + shiftwidth()
endif
" assumes curly braces around try-block
if curline =~ '^\s*}\s*\<catch\>'
- return ind - &shiftwidth
+ return ind - shiftwidth()
elseif curline =~ '^\s*\<catch\>'
return ind
endif
@@ -442,7 +442,7 @@ function! GetScalaIndent()
\ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$'
\ || prevline =~ '=\s*$'
call scala#ConditionalConfirm("4")
- let ind = ind + &shiftwidth
+ let ind = ind + shiftwidth()
elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>'
return ind
endif
@@ -451,7 +451,7 @@ function! GetScalaIndent()
let bracketCount = scala#CountBrackets(prevline, '{', '}')
if bracketCount > 0 || prevline =~ '.*{\s*$'
call scala#ConditionalConfirm("5b")
- let ind = ind + &shiftwidth
+ let ind = ind + shiftwidth()
elseif bracketCount < 0
call scala#ConditionalConfirm("6b")
" if the closing brace actually completes the braces entirely, then we
@@ -479,7 +479,7 @@ function! GetScalaIndent()
let bracketCount = scala#CountBrackets(prevline, '(', ')')
if bracketCount > 0 || prevline =~ '.*(\s*$'
call scala#ConditionalConfirm("5a")
- let ind = ind + &shiftwidth
+ let ind = ind + shiftwidth()
elseif bracketCount < 0
call scala#ConditionalConfirm("6a")
" if the closing brace actually completes the braces entirely, then we
@@ -501,7 +501,7 @@ function! GetScalaIndent()
else
" This is the only part that's different from from the '{', '}' one below
" Yup... some refactoring is necessary at some point.
- let ind = ind + (bracketCount * &shiftwidth)
+ let ind = ind + (bracketCount * shiftwidth())
let lineCompletedBrackets = 1
endif
endif
@@ -510,7 +510,7 @@ function! GetScalaIndent()
if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' &&
\ ! scala#LineIsCompleteIf(prevline) &&
\ prevline !~ '^.*}\s*$'
- let ind = ind - &shiftwidth
+ let ind = ind - shiftwidth()
endif
" Subtract a 'shiftwidth' on '}' or html
@@ -521,7 +521,7 @@ function! GetScalaIndent()
return indent(matchline)
elseif curline =~ '^\s*</[a-zA-Z][^>]*>'
call scala#ConditionalConfirm("14c")
- return ind - &shiftwidth
+ return ind - shiftwidth()
endif
let prevParenCount = scala#CountParens(prevline)
@@ -533,7 +533,7 @@ function! GetScalaIndent()
let prevCurlyCount = scala#CountCurlies(prevline)
if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>'
call scala#ConditionalConfirm("16")
- let ind = ind + &shiftwidth
+ let ind = ind + shiftwidth()
endif
if ind == originalIndentValue && curline =~ '^\s*\<case\>'
@@ -559,7 +559,7 @@ function! GetScalaIndent()
if scala#LineIsAClosingXML(prevline)
if scala#LineCompletesXML(prevlnum, prevline)
call scala#ConditionalConfirm("20a")
- return ind - &shiftwidth
+ return ind - shiftwidth()
else
call scala#ConditionalConfirm("20b")
return ind
@@ -570,7 +570,7 @@ function! GetScalaIndent()
"let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline)
"if indentMultiplier != 0
" call scala#ConditionalConfirm("19a")
- " let ind = ind - (indentMultiplier * &shiftwidth)
+ " let ind = ind - (indentMultiplier * shiftwidth())
let defValrLine = scala#Test(prevlnum, prevline, '{', '}')
if defValrLine != -1
call scala#ConditionalConfirm("21a")
@@ -579,10 +579,10 @@ function! GetScalaIndent()
call scala#ConditionalConfirm("21b")
if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\<else\>\s*\%(//.*\)\?$'
call scala#ConditionalConfirm("21c")
- let ind = ind - &shiftwidth
+ let ind = ind - shiftwidth()
elseif scala#LineCompletesIfElse(prevlnum, prevline)
call scala#ConditionalConfirm("21d")
- let ind = ind - &shiftwidth
+ let ind = ind - shiftwidth()
elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$'
" Handles situations that look like this:
"
@@ -596,7 +596,7 @@ function! GetScalaIndent()
" 10
" ).somethingHere()
call scala#ConditionalConfirm("21e")
- let ind = ind - &shiftwidth
+ let ind = ind - shiftwidth()
endif
endif
endif
diff --git a/syntax/aptconf.vim b/syntax/aptconf.vim
index 309b8faa..70f9d1c9 100644
--- a/syntax/aptconf.vim
+++ b/syntax/aptconf.vim
@@ -5,7 +5,7 @@ endif
" Vim syntax file
" Language: APT config file
" Maintainer: Yann Amar <quidame@poivron.org>
-" Last Change: 2015 Dec 22
+" Last Change: 2021 Jul 12
" quit when a syntax file was already loaded
if !exists("main_syntax")
@@ -400,10 +400,13 @@ syn cluster aptconfSynaptic_ contains=aptconfSynaptic,
" }}}
" Unattended Upgrade: {{{
syn keyword aptconfUnattendedUpgrade contained
- \ AutoFixInterruptedDpkg Automatic-Reboot Automatic-Reboot-Time
- \ Automatic-Reboot-WithUsers InstallOnShutdown Mail MailOnlyOnError
- \ MinimalSteps Origins-Pattern Package-Blacklist
- \ Remove-Unused-Dependencies
+ \ Allow-APT-Mark-Fallback Allow-downgrade AutoFixInterruptedDpkg
+ \ Automatic-Reboot Automatic-Reboot-Time Automatic-Reboot-WithUsers
+ \ Debug InstallOnShutdown Mail MailOnlyOnError MailReport MinimalSteps
+ \ OnlyOnACPower Origins-Pattern Package-Blacklist
+ \ Remove-New-Unused-Dependencies Remove-Unused-Dependencies
+ \ Remove-Unused-Kernel-Packages Skip-Updates-On-Metered-Connections
+ \ SyslogEnable SyslogFacility Verbose
syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade
" }}}
diff --git a/syntax/c.vim b/syntax/c.vim
index a11a95a2..71474600 100644
--- a/syntax/c.vim
+++ b/syntax/c.vim
@@ -5,7 +5,7 @@ endif
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2021 Jan 11
+" Last Change: 2021 May 24
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -418,6 +418,9 @@ if exists("c_autodoc")
syn cluster cPreProcGroup add=cAutodocReal
endif
+" be able to fold #pragma regions
+syn region cPragma start="^\s*#pragma\s\+region\>" end="^\s*#pragma\s\+endregion\>" transparent keepend extend fold
+
" Highlight User Labels
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
if s:ft ==# 'c' || exists("cpp_no_cpp11")
diff --git a/syntax/cpp.vim b/syntax/cpp.vim
index 95a56d36..db95a78d 100644
--- a/syntax/cpp.vim
+++ b/syntax/cpp.vim
@@ -64,7 +64,7 @@ if !exists("cpp_no_cpp14")
syn match cppFloat display contained "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
syn match cppFloat display contained "\<\.\d\+\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
- syn region cppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell
+ syn region cppString start=+\(L\|u\|u8\|U\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell
endif
" C++ 17 extensions
@@ -73,6 +73,20 @@ if !exists("cpp_no_cpp17")
syn match cppCast "\<reinterpret_pointer_cast\s*$"
syn match cppFloat display contained "\<0x\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
syn match cppFloat display contained "\<0x\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
+
+ " TODO: push this up to c.vim if/when supported in C23
+ syn match cppCharacter "u8'[^\\]'"
+ syn match cppCharacter "u8'[^']*'" contains=cSpecial
+ if exists("c_gnu")
+ syn match cppSpecialError "u8'\\[^'\"?\\abefnrtv]'"
+ syn match cppSpecialCharacter "u8'\\['\"?\\abefnrtv]'"
+ else
+ syn match cppSpecialError "u8'\\[^'\"?\\abfnrtv]'"
+ syn match cppSpecialCharacter "u8'\\['\"?\\abfnrtv]'"
+ endif
+ syn match cppSpecialCharacter display "u8'\\\o\{1,3}'"
+ syn match cppSpecialCharacter display "u8'\\x\x\+'"
+
endif
" C++ 20 extensions
@@ -93,23 +107,26 @@ endif
syn match cppMinMax "[<>]?"
" Default highlighting
-hi def link cppAccess cppStatement
-hi def link cppCast cppStatement
+hi def link cppAccess cppStatement
+hi def link cppCast cppStatement
hi def link cppExceptions Exception
-hi def link cppOperator Operator
+hi def link cppOperator Operator
hi def link cppStatement Statement
-hi def link cppModifier Type
-hi def link cppType Type
-hi def link cppStorageClass StorageClass
+hi def link cppModifier Type
+hi def link cppType Type
+hi def link cppStorageClass StorageClass
hi def link cppStructure Structure
-hi def link cppBoolean Boolean
-hi def link cppConstant Constant
+hi def link cppBoolean Boolean
+hi def link cppCharacter cCharacter
+hi def link cppSpecialCharacter cSpecialCharacter
+hi def link cppSpecialError cSpecialError
+hi def link cppConstant Constant
hi def link cppRawStringDelimiter Delimiter
hi def link cppRawString String
-hi def link cppString String
-hi def link cppNumber Number
-hi def link cppFloat Number
-hi def link cppModule Include
+hi def link cppString String
+hi def link cppNumber Number
+hi def link cppFloat Number
+hi def link cppModule Include
let b:current_syntax = "cpp"
diff --git a/syntax/debchangelog.vim b/syntax/debchangelog.vim
index 174d86d7..a6b5c871 100644
--- a/syntax/debchangelog.vim
+++ b/syntax/debchangelog.vim
@@ -7,7 +7,7 @@ endif
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2020 Nov 28
+" Last Change: 2021 Aug 03
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@@ -28,7 +28,7 @@ let s:supported = [
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\
- \ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hirsute', 'devel'
+ \ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'devel'
\ ]
let s:unsupported = [
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@@ -38,7 +38,7 @@ let s:unsupported = [
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
- \ 'disco', 'eoan'
+ \ 'disco', 'eoan', 'groovy'
\ ]
let &cpo=s:cpo
diff --git a/syntax/debsources.vim b/syntax/debsources.vim
index 6ea0bcb1..f8ed8d99 100644
--- a/syntax/debsources.vim
+++ b/syntax/debsources.vim
@@ -6,7 +6,7 @@ endif
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2020 Nov 28
+" Last Change: 2021 Aug 03
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@@ -30,7 +30,7 @@ let s:supported = [
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\
- \ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hirsute', 'devel'
+ \ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@@ -40,7 +40,7 @@ let s:unsupported = [
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
- \ 'disco', 'eoan'
+ \ 'disco', 'eoan', 'groovy'
\ ]
let &cpo=s:cpo
diff --git a/syntax/eelixir.vim b/syntax/eelixir.vim
index e30a51c9..8fbe92a7 100644
--- a/syntax/eelixir.vim
+++ b/syntax/eelixir.vim
@@ -24,13 +24,16 @@ if !exists("b:eelixir_subtype")
let b:eelixir_subtype = matchstr(&filetype,'^eex\.\zs\w\+')
endif
if b:eelixir_subtype == ''
+ let b:eelixir_subtype = matchstr(&filetype,'^heex\.\zs\w\+')
+ endif
+ if b:eelixir_subtype == ''
let b:eelixir_subtype = matchstr(&filetype,'^leex\.\zs\w\+')
endif
if b:eelixir_subtype == ''
let b:eelixir_subtype = matchstr(&filetype,'^sface\.\zs\w\+')
endif
if b:eelixir_subtype == ''
- let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.sface\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
+ let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.heex\|\.leex\|\.sface\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
endif
if b:eelixir_subtype == 'ex'
let b:eelixir_subtype = 'elixir'
diff --git a/syntax/git.vim b/syntax/git.vim
index 9d8efc69..16a86a6a 100644
--- a/syntax/git.vim
+++ b/syntax/git.vim
@@ -16,12 +16,28 @@ syn sync minlines=50
syn include @gitDiff syntax/diff.vim
-syn region gitHead start=/\%^/ end=/^$/ contains=@NoSpell
-syn region gitHead start=/\%(^commit\%( \x\{40\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/ contains=@NoSpell
-
-" For git reflog and git show ...^{tree}, avoid sync issues
-syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/ contains=@NoSpell
-syn match gitHead /^\x\{40\} \x\{40}\t.*/ contains=@NoSpell
+syn region gitHead start=/\%^\%(tag \|tree \|object \)\@=/ end=/^$/ contains=@NoSpell
+syn region gitHead start=/\%(^commit\%( \x\{4,\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/ contains=@NoSpell
+" git log --oneline
+" minimize false positives by verifying contents of buffer
+if getline(1) =~# '^\x\{7,\} ' && getline('$') =~# '^\x\{7,\} '
+ syn match gitHashAbbrev /^\x\{7,\} \@=/ contains=@NoSpell
+elseif getline(1) =~# '^[|\/\\_ ]\{-\}\*[|\/\\_ ]\{-\} \x\{7,\} '
+ syn match gitHashAbbrev /^[|\/\\_ ]\{-\}\*[|\/\\_ ]\{-\} \zs\x\{7,\} \@=/ contains=@NoSpell
+endif
+" git log --graph
+syn region gitGraph start=/\%(^[|\/\\_ ]*\*[|\/\\_ ]\{-\} commit\%( \x\{4,\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^\%([|\/\\_ ]*$\)\@=/ contains=@NoSpell
+" git blame --porcelain
+syn region gitHead start=/\%(^\x\{40,\} \d\+ \d\+\%( \d\+\)\=$\)\@=/ end=/^\t\@=/ contains=@NoSpell
+" git ls-tree
+syn match gitMode /^\d\{6\}\%( \%(blob\|tree\) \x\{4,\}\t\)\@=/ nextgroup=gitType skipwhite contains=@NoSpell
+" git ls-files --stage
+syn match gitMode /^\d\{6\}\%( \x\{4,\} [0-3]\t\)\@=/ nextgroup=gitHashStage skipwhite contains=@NoSpell
+" .git/HEAD, .git/refs/
+syn match gitKeyword /\%^ref: \@=/ nextgroup=gitReference skipwhite contains=@NoSpell
+syn match gitHash /\%^\x\{40,}\%$/ skipwhite contains=@NoSpell
+" .git/logs/
+syn match gitReflog /^\x\{40,\} \x\{40,\} .\{-\}\d\+\s-\d\{4\}\t.*/ skipwhite contains=@NoSpell,gitReflogOld
syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold
syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\) \|$\)\@=/ contains=@gitDiff
@@ -33,31 +49,43 @@ syn match gitDiffAdded "{+[^}]*+}" contained containedin=gitDiff
syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge
syn match gitDiffRemoved "\[-[^]]*-\]" contained containedin=gitDiff
-syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\|gpgsig\%(-\w\+\)\=\|summary\|boundary\|filename\|previous\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite contains=@NoSpell
-syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite contains=@NoSpell
+syn match gitKeyword /^commit \@=/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
+syn match gitKeyword /^\%(object\|tree\|parent\|encoding\|gpgsig\%(-\w\+\)\=\|previous\) \@=/ contained containedin=gitHead nextgroup=gitHash skipwhite contains=@NoSpell
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
-syn match gitMode /^\d\{6\}\>/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
-syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\%(-mail\|-time\|-tz\)\=\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
+syn match gitIdentityKeyword /^\%(author\|committer\|tagger\) \@=/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite
+syn match gitKeyword /^[*|\/\\_ ]\+\zscommit \@=/ contained containedin=gitGraph nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
+syn match gitKeyword /^[|\/\\_ ]\+\zs\%(object\|tree\|parent\|encoding\|gpgsig\%(-\w\+\)\=\|previous\) \@=/ contained containedin=gitGraph nextgroup=gitHash skipwhite contains=@NoSpell
+syn match gitKeyword /^[|\/\\_ ]\+\zsMerge:/ contained containedin=gitGraph nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
+syn match gitIdentityKeyword /^[|\/\\_ ]\+\zs\%(author\|committer\|tagger\) \@=/ contained containedin=gitGraph nextgroup=gitIdentity skipwhite
+syn match gitIdentityHeader /^[|\/\\_ ]\+\zs\%(Author\|Commit\|Tagger\):/ contained containedin=gitGraph nextgroup=gitIdentity skipwhite
+syn match gitDateHeader /^[|\/\\_ ]\+\zs\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitGraph nextgroup=gitDate skipwhite
+
+syn match gitKeyword /^type \@=/ contained containedin=gitHead nextgroup=gitType skipwhite contains=@NoSpell
+syn match gitKeyword /^\%(summary\|boundary\|filename\|\%(author\|committer\)-\%(time\|tz\)\) \@=/ contained containedin=gitHead skipwhite contains=@NoSpell
+syn match gitKeyword /^tag \@=/ contained containedin=gitHead nextgroup=gitReference skipwhite contains=@NoSpell
+syn match gitIdentityKeyword /^\%(author\|committer\)-mail \@=/ contained containedin=gitHead nextgroup=gitEmail skipwhite
syn match gitReflogHeader /^Reflog:/ contained containedin=gitHead nextgroup=gitReflogMiddle skipwhite
syn match gitReflogHeader /^Reflog message:/ contained containedin=gitHead skipwhite
syn match gitReflogMiddle /\S\+@{\d\+} (/he=e-2 nextgroup=gitIdentity
+syn match gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite
+syn region gitEmail matchgroup=gitEmailDelimiter start=/</ end=/>/ keepend oneline contained containedin=gitIdentity
syn match gitDate /\<\u\l\l \u\l\l \d\=\d \d\d:\d\d:\d\d \d\d\d\d [+-]\d\d\d\d/ contained
syn match gitDate /-\=\d\+ [+-]\d\d\d\d\>/ contained
syn match gitDate /\<\d\+ \l\+ ago\>/ contained
-syn match gitType /\<\%(tag\|commit\|tree\|blob\)\>/ contained nextgroup=gitHash skipwhite
-syn match gitStage /\<\d\t\@=/ contained
+syn match gitType /\<\%(tag\|commit\|tree\|blob\)\>/ contained nextgroup=gitHashAbbrev skipwhite
syn match gitReference /\S\+\S\@!/ contained
-syn match gitHash /\<\x\{40\}\>/ contained nextgroup=gitIdentity,gitStage,gitHash skipwhite contains=@NoSpell
-syn match gitHash /^\<\x\{40\}\>/ containedin=gitHead contained nextgroup=gitHash skipwhite contains=@NoSpell
-syn match gitHashAbbrev /\<\x\{4,40\}\>/ contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
+syn match gitHash /\<\x\{40,\}\>/ contained nextgroup=gitIdentity,gitHash skipwhite contains=@NoSpell
+syn match gitReflogOld /^\x\{40,\} \@=/ contained nextgroup=gitReflogNew skipwhite contains=@NoSpell
+syn match gitReflogNew /\<\x\{40,\} \@=/ contained nextgroup=gitIdentity skipwhite contains=@NoSpell
+syn match gitHashAbbrev /\<\x\{4,\}\>/ contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
syn match gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
+syn match gitHashStage /\<\x\{4,\}\>/ contained nextgroup=gitStage skipwhite contains=@NoSpell
+syn match gitStage /\<\d\t\@=/ contained
-syn match gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite
-syn region gitEmail matchgroup=gitEmailDelimiter start=/</ end=/>/ keepend oneline contained containedin=gitIdentity
syn match gitNotesHeader /^Notes:\ze\n /
@@ -72,7 +100,10 @@ hi def link gitEmailDelimiter Delimiter
hi def link gitEmail Special
hi def link gitDate Number
hi def link gitMode Number
+hi def link gitHashStage gitHash
hi def link gitHashAbbrev gitHash
+hi def link gitReflogOld gitHash
+hi def link gitReflogNew gitHash
hi def link gitHash Identifier
hi def link gitReflogMiddle gitReference
hi def link gitReference Function
diff --git a/syntax/julia.vim b/syntax/julia.vim
index 88aa464e..bafae9b4 100644
--- a/syntax/julia.vim
+++ b/syntax/julia.vim
@@ -13,6 +13,9 @@ elseif exists("b:current_syntax")
finish
endif
+let s:cpo_save = &cpo
+set cpo&vim
+
if version < 704
" this is used to disable regex syntax like `\@3<='
" on older vim versions
@@ -40,9 +43,9 @@ let s:julia_highlight_operators = get(g:, "julia_highlight_operators", 1)
" It doesn't include a few characters (spaces and all closing parentheses)
" because those may or may not be valid in the lookbehind on a case-by-case
" basis.
-let s:nonid_chars = '\U00-\U08' . '\U0A-\U1F' .
- \ '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B-\U5E' . '\U60' . '\U7B\U7C' .
- \ '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
+let s:nonid_chars = '\U00-\U08' . '\U0A-\U1F'
+ \ . '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B-\U5E' . '\U60' . '\U7B\U7C'
+ \ . '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
" The complete list
let s:nonidS_chars = '[:space:])\U5D}' . s:nonid_chars
@@ -60,10 +63,10 @@ let s:op_chars = '\U25\U26\U2A\U2B\U2D\U2F\U3C-\U3E\U5C\U5E\U7C\U7E\UAC\UB1\UD7\
let s:op_chars_wc = '\U2026\U205D\U214B\U2190-\U2194\U219A-\U219E\U21A0\U21A2-\U21A4\U21A6\U21A9-\U21AC\U21AE\U21B6\U21B7\U21BA-\U21BD\U21C0\U21C1\U21C4\U21C6\U21C7\U21C9\U21CB-\U21D0\U21D2\U21D4\U21DA-\U21DD\U21E0\U21E2\U21F4-\U21FF\U2208-\U220D\U2213\U2214\U2217-\U221D\U2224-\U222A\U2237\U2238\U223A\U223B\U223D\U223E\U2240-\U228B\U228D-\U229C\U229E-\U22A3\U22A9\U22AC\U22AE\U22B0-\U22B7\U22BB-\U22BD\U22C4-\U22C7\U22C9-\U22D3\U22D5-\U22FF\U233F\U25B7\U27C2\U27C8\U27C9\U27D1\U27D2\U27D5-\U27D7\U27F0\U27F1\U27F5-\U27F7\U27F9-\U27FF\U2900-\U2918\U291D-\U2920\U2944-\U2970\U29B7\U29B8\U29BC\U29BE-\U29C1\U29E1\U29E3-\U29E5\U29F4\U29F6\U29F7\U29FA\U29FB\U2A07\U2A08\U2A1D\U2A1F\U2A22-\U2A2E\U2A30-\U2A3D\U2A40-\U2A45\U2A4A-\U2A58\U2A5A-\U2A63\U2A66\U2A67\U2A6A-\U2AD9\U2ADB\U2AF7-\U2AFA\U2B30-\U2B44\U2B47-\U2B4C\UFFE9-\UFFEC'
" Full operators regex
-let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?=' .
- \ '\|' . '[:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?' .
- \ '\|' . '\.\?[!' . s:op_chars . s:op_chars_wc . ']' .
- \ '\)'
+let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?='
+ \ . '\|' . '[:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?'
+ \ . '\|' . '\.\?[!' . s:op_chars . s:op_chars_wc . ']'
+ \ . '\)'
" Characters that can be used to start an identifier. Above \UBF we don't
@@ -247,11 +250,11 @@ let s:hex_regex = '0x\x\%(_\?\x\)*\%(\>\|im\>\|\ze\X\)'
let s:bin_regex = '0b[01]\%(_\?[01]\)*\%(\>\|im\>\|\ze[^01]\)'
let s:oct_regex = '0o\o\%(_\?\o\)*\%(\>\|im\>\|\ze\O\)'
-let s:int_regex = '\%(' . s:hex_regex .
- \ '\|' . s:bin_regex .
- \ '\|' . s:oct_regex .
- \ '\|' . s:dec_regex .
- \ '\)'
+let s:int_regex = '\%(' . s:hex_regex
+ \ . '\|' . s:bin_regex
+ \ . '\|' . s:oct_regex
+ \ . '\|' . s:dec_regex
+ \ . '\)'
"floating point regexes
" starting with a dot, optional exponent
@@ -267,12 +270,12 @@ let s:hexfloat_regex1 = '0x\.\%\(\x\%(_\?\x\)*\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze
" starting with a digit
let s:hexfloat_regex2 = '0x\x\%(_\?\x\)*\%\(\.\%\(\x\%(_\?\x\)*\)\?\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze\X\)'
-let s:float_regex = '\%(' . s:float_regex3 .
- \ '\|' . s:float_regex2 .
- \ '\|' . s:float_regex1 .
- \ '\|' . s:hexfloat_regex2 .
- \ '\|' . s:hexfloat_regex1 .
- \ '\)'
+let s:float_regex = '\%(' . s:float_regex3
+ \ . '\|' . s:float_regex2
+ \ . '\|' . s:float_regex1
+ \ . '\|' . s:hexfloat_regex2
+ \ . '\|' . s:hexfloat_regex1
+ \ . '\)'
exec 'syntax match juliaNumber contained "' . s:int_regex . '" contains=juliaComplexUnit'
exec 'syntax match juliaFloat contained "' . s:float_regex . '" contains=juliaComplexUnit'
@@ -545,3 +548,6 @@ hi def link juliaError Error
syntax sync fromstart
let b:current_syntax = "julia"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/syntax/juliadoc.vim b/syntax/juliadoc.vim
index c4dbfdbd..41626d03 100644
--- a/syntax/juliadoc.vim
+++ b/syntax/juliadoc.vim
@@ -9,6 +9,9 @@ if exists('b:current_syntax')
finish
endif
+let s:cpo_save = &cpo
+set cpo&vim
+
syntax sync fromstart
syntax region juliadocCode matchgroup=juliadocCodeDelimiter start="`" end="`" concealends display oneline
@@ -67,3 +70,6 @@ highlight default link juliadocAdmonitionsType Todo
highlight default link juliadocAdmonitionsTitle Title
let b:current_syntax = "juliadoc"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/syntax/meson.vim b/syntax/meson.vim
index 1a6cda37..8e151a7e 100644
--- a/syntax/meson.vim
+++ b/syntax/meson.vim
@@ -7,7 +7,7 @@ endif
" License: VIM License
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
" Liam Beguin <liambeguin@gmail.com>
-" Last Change: 2016 Dec 7
+" Last Change: 2021 Aug 16
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
" Neil Schemenauer <nas@meson.ca>
" Dmitry Vasiliev
@@ -122,6 +122,7 @@ syn keyword mesonBuiltin
\ summary
\ target_machine
\ test
+ \ unset_variable
\ vcs_tag
\ warning
\ range
diff --git a/syntax/pascal.vim b/syntax/pascal.vim
index 3080352e..d75f3354 100644
--- a/syntax/pascal.vim
+++ b/syntax/pascal.vim
@@ -7,7 +7,7 @@ endif
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainers: Xavier Crégut <xavier.cregut@enseeiht.fr>
" Mario Eusebio <bio@dq.fct.unl.pt>
-" Last Change: 2021 Apr 23
+" Last Change: 2021 May 20
" Contributors: Tim Chase <tchase@csc.com>,
" Stas Grabois <stsi@vtrails.com>,
diff --git a/syntax/plantuml.vim b/syntax/plantuml.vim
index 9b235afb..538ef1e1 100644
--- a/syntax/plantuml.vim
+++ b/syntax/plantuml.vim
@@ -49,9 +49,11 @@ syntax keyword plantumlKeyword split start stereotype stop title top up while
" Not in 'java - jar plantuml.jar - language' results
syntax keyword plantumlKeyword endlegend sprite then
" gantt
-syntax keyword plantumlTypeKeyword project monday tuesday wednesday thursday friday saturday sunday
-syntax keyword plantumlKeyword starts ends start end closed day after colored lasts happens in at are to the and
-
+syntax keyword plantumlTypeKeyword monday tuesday wednesday thursday friday saturday sunday today
+syntax keyword plantumlTypeKeyword project Project labels Labels last first column
+syntax keyword plantumlKeyword starts ends start end closed after colored lasts happens in at are to the and
+syntax keyword plantumlKeyword printscale ganttscale projectscale daily weekly monthly quarterly yearly zoom
+syntax keyword plantumlKeyword day days week weeks today then complete displays same row pauses
syntax keyword plantumlCommentTODO XXX TODO FIXME NOTE contained
syntax match plantumlColor /#[0-9A-Fa-f]\{6\}\>/
diff --git a/syntax/scala.vim b/syntax/scala.vim
index 6f802f3c..decceba4 100644
--- a/syntax/scala.vim
+++ b/syntax/scala.vim
@@ -70,11 +70,13 @@ syn match scalaChar /'\\u[A-Fa-f0-9]\{4}'/ contains=scalaUnicodeChar
syn match scalaEscapedChar /\\[\\"'ntbrf]/
syn match scalaUnicodeChar /\\u[A-Fa-f0-9]\{4}/
hi link scalaChar Character
-hi link scalaEscapedChar Function
+hi link scalaEscapedChar Special
hi link scalaUnicodeChar Special
syn match scalaOperator "||"
syn match scalaOperator "&&"
+syn match scalaOperator "|"
+syn match scalaOperator "&"
hi link scalaOperator Special
syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList
@@ -122,7 +124,7 @@ hi link scalaTypePostExtension Keyword
syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets
syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration
-hi link scalaTypeAnnotation Normal
+hi clear scalaTypeAnnotation
syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained contains=scalaCapitalWord
syn match scalaCaseFollowing /`[^`]\+`/ contained contains=scalaCapitalWord
@@ -148,21 +150,21 @@ hi link scalaString String
hi link scalaStringEmbeddedQuote String
syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
-syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
+syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\ze\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
hi link scalaIString String
hi link scalaTripleIString String
syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained
exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup()
hi link scalaInterpolation Function
-hi link scalaInterpolationB Normal
+hi clear scalaInterpolationB
syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained
exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup()
hi link scalaFString String
hi link scalaFInterpolation Function
-hi link scalaFInterpolationB Normal
+hi clear scalaFInterpolationB
syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar
syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
diff --git a/syntax/scheme.vim b/syntax/scheme.vim
index 8e991aa9..2db92bcd 100644
--- a/syntax/scheme.vim
+++ b/syntax/scheme.vim
@@ -4,11 +4,12 @@ endif
" Vim syntax file
" Language: Scheme (R7RS)
-" Last Change: 2018-01-06
+" Last Change: 2021-01-03
" Author: Evan Hanson <evhan@foldling.org>
" Maintainer: Evan Hanson <evhan@foldling.org>
" Previous Author: Dirk van Deun <dirk@igwe.vub.ac.be>
" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
+" Repository: https://git.foldling.org/vim-scheme.git
" URL: https://foldling.org/vim/syntax/scheme.vim
if exists('b:current_syntax')
@@ -18,6 +19,8 @@ endif
let s:cpo = &cpo
set cpo&vim
+syn spell notoplevel
+
syn match schemeParentheses "[^ '`\t\n()\[\]";]\+"
syn match schemeParentheses "[)\]]"
@@ -39,7 +42,7 @@ syn region schemeUnquote matchgroup=schemeParentheses start=/,@(/ end=/)/ contai
syn region schemeQuoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
syn region schemeQuasiquoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
-syn region schemeString start=/\(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/
+syn region schemeString start=/\(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/ contains=@Spell
syn region schemeSymbol start=/\(\\\)\@<!|/ skip=/\\[\\|]/ end=/|/
syn match schemeNumber /\(#[dbeio]\)*[+\-]*\([0-9]\+\|inf.0\|nan.0\)\(\/\|\.\)\?[0-9+\-@\ilns]*\>/
@@ -51,9 +54,9 @@ syn match schemeBoolean /#f\(alse\)\?/
syn match schemeCharacter /#\\.[^ `'\t\n\[\]()]*/
syn match schemeCharacter /#\\x[0-9a-fA-F]\+/
-syn match schemeComment /;.*$/
+syn match schemeComment /;.*$/ contains=@Spell
-syn region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment
+syn region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment,@Spell
syn region schemeForm matchgroup=schemeParentheses start="(" end=")" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster
syn region schemeForm matchgroup=schemeParentheses start="\[" end="\]" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster
@@ -67,7 +70,7 @@ else
syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\)\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment
endif
-syn match schemeImportKeyword "\(([ \t\n]*\)\@<=\(except\|only\|prefix\|rename\|srfi\)\>"
+syn match schemeImportKeyword "\(([ \t\n]*\)\@<=\(except\|only\|prefix\|rename\)\>"
syn region schemeImportForm matchgroup=schemeParentheses start="(" end=")" contained contains=schemeIdentifier,schemeComment,schemeDatumComment,@schemeImportCluster
syn cluster schemeImportCluster contains=schemeImportForm,schemeImportKeyword
diff --git a/syntax/tmux.vim b/syntax/tmux.vim
index e04ee988..340b00fd 100644
--- a/syntax/tmux.vim
+++ b/syntax/tmux.vim
@@ -3,7 +3,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'tmux', 'syntax/tmux.vim')
endif
" Language: tmux(1) configuration file
-" Version: to_merge (git-c03b5746)
+" Version: 3.2a (git-44ada9cd)
" URL: https://github.com/ericpruitt/tmux.vim/
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
@@ -84,8 +84,8 @@ syn keyword tmuxOptions
\ main-pane-width mode-keys mode-style monitor-activity monitor-bell
\ monitor-silence mouse other-pane-height other-pane-width
\ pane-active-border-style pane-base-index pane-border-format
-\ pane-border-lines pane-border-status pane-border-style prefix prefix2
-\ prompt-history-limit remain-on-exit renumber-windows repeat-time
+\ pane-border-lines pane-border-status pane-border-style pane-colours prefix
+\ prefix2 prompt-history-limit remain-on-exit renumber-windows repeat-time
\ set-clipboard set-titles set-titles-string silence-action status status-bg
\ status-fg status-format status-interval status-justify status-keys
\ status-left status-left-length status-left-style status-position
diff --git a/syntax/toml.vim b/syntax/toml.vim
deleted file mode 100644
index 9540d2c5..00000000
--- a/syntax/toml.vim
+++ /dev/null
@@ -1,80 +0,0 @@
-if polyglot#init#is_disabled(expand('<sfile>:p'), 'toml', 'syntax/toml.vim')
- finish
-endif
-
-" Language: TOML
-" Maintainer: Caleb Spare <cespare@gmail.com>
-" URL: https://github.com/cespare/vim-toml
-" LICENSE: MIT
-
-if exists('b:current_syntax')
- finish
-endif
-
-syn match tomlEscape /\\[btnfr"/\\]/ display contained
-syn match tomlEscape /\\u\x\{4}/ contained
-syn match tomlEscape /\\U\x\{8}/ contained
-hi def link tomlEscape SpecialChar
-
-syn match tomlLineEscape /\\$/ contained
-hi def link tomlLineEscape SpecialChar
-
-" Basic strings
-syn region tomlString oneline start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=tomlEscape
-" Multi-line basic strings
-syn region tomlString start=/"""/ end=/"""/ contains=tomlEscape,tomlLineEscape
-" Literal strings
-syn region tomlString oneline start=/'/ end=/'/
-" Multi-line literal strings
-syn region tomlString start=/'''/ end=/'''/
-hi def link tomlString String
-
-syn match tomlInteger /[+-]\=\<[1-9]\(_\=\d\)*\>/ display
-syn match tomlInteger /[+-]\=\<0\>/ display
-syn match tomlInteger /[+-]\=\<0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*\>/ display
-syn match tomlInteger /[+-]\=\<0o[0-7]\(_\=[0-7]\)*\>/ display
-syn match tomlInteger /[+-]\=\<0b[01]\(_\=[01]\)*\>/ display
-syn match tomlInteger /[+-]\=\<\(inf\|nan\)\>/ display
-hi def link tomlInteger Number
-
-syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\.\d\+\>/ display
-syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*\>/ display
-hi def link tomlFloat Float
-
-syn match tomlBoolean /\<\%(true\|false\)\>/ display
-hi def link tomlBoolean Boolean
-
-" https://tools.ietf.org/html/rfc3339
-syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}/ display
-syn match tomlDate /\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?/ display
-syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}[T ]\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?\%(Z\|[+-]\d\{2\}:\d\{2\}\)\?/ display
-hi def link tomlDate Constant
-
-syn match tomlKey /\v(^|[{,])\s*\zs[[:alnum:]._-]+\ze\s*\=/ display
-hi def link tomlKey Identifier
-
-syn region tomlKeyDq oneline start=/\v(^|[{,])\s*\zs"/ end=/"\ze\s*=/ contains=tomlEscape
-hi def link tomlKeyDq Identifier
-
-syn region tomlKeySq oneline start=/\v(^|[{,])\s*\zs'/ end=/'\ze\s*=/
-hi def link tomlKeySq Identifier
-
-syn region tomlTable oneline start=/^\s*\[[^\[]/ end=/\]/ contains=tomlKey,tomlKeyDq,tomlKeySq
-hi def link tomlTable Title
-
-syn region tomlTableArray oneline start=/^\s*\[\[/ end=/\]\]/ contains=tomlKey,tomlKeyDq,tomlKeySq
-hi def link tomlTableArray Title
-
-syn cluster tomlValue contains=tomlArray,tomlString,tomlInteger,tomlFloat,tomlBoolean,tomlDate,tomlComment
-syn region tomlKeyValueArray start=/=\s*\[\zs/ end=/\]/ contains=@tomlValue
-syn region tomlArray start=/\[/ end=/\]/ contains=@tomlValue contained
-
-syn keyword tomlTodo TODO FIXME XXX BUG contained
-hi def link tomlTodo Todo
-
-syn match tomlComment /#.*/ contains=@Spell,tomlTodo
-hi def link tomlComment Comment
-
-syn sync minlines=500
-
-let b:current_syntax = 'toml'