summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-03-02 00:34:02 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-03-02 00:34:02 +0100
commit6b540d7db030e4110aa3a31dd06c6c41387444db (patch)
tree1cd1da5b35cf1c34b38d7506ff93aabf861747bf
parent35ea4d2b9072594b6c0ccf87bde7978ed9f94755 (diff)
downloadvim-polyglot-6b540d7db030e4110aa3a31dd06c6c41387444db.tar.gz
vim-polyglot-6b540d7db030e4110aa3a31dd06c6c41387444db.zip
Update
-rw-r--r--README.md4
-rw-r--r--after/syntax/mma.vim8
-rw-r--r--after/syntax/yaml.vim4
-rw-r--r--autoload/LaTeXtoUnicode.vim96
-rw-r--r--autoload/cargo.vim12
-rw-r--r--autoload/crystal_lang.vim36
-rw-r--r--autoload/csv.vim6
-rw-r--r--autoload/go/config.vim53
-rw-r--r--autoload/julia.vim23
-rw-r--r--autoload/julia_latex_symbols.vim4
-rw-r--r--autoload/terraform.vim3
-rw-r--r--compiler/powershell.vim80
-rw-r--r--compiler/swift.vim43
-rw-r--r--ftdetect/polyglot.vim8
-rw-r--r--ftplugin/crystal.vim32
-rw-r--r--ftplugin/dune.vim (renamed from ftplugin/jbuild.vim)2
-rw-r--r--ftplugin/ruby.vim2
-rw-r--r--ftplugin/vala.vim22
-rw-r--r--indent/crystal.vim19
-rw-r--r--indent/julia.vim5
-rw-r--r--indent/reason.vim4
-rw-r--r--syntax/basic/literal.vim2
-rw-r--r--syntax/basic/type.vim2
-rw-r--r--syntax/carp.vim8
-rw-r--r--syntax/crystal.vim550
-rw-r--r--syntax/elixir.vim2
-rw-r--r--syntax/julia.vim153
-rw-r--r--syntax/llvm.vim5
-rw-r--r--syntax/mma.vim16
-rw-r--r--syntax/pgsql.vim4
-rw-r--r--syntax/php.vim190
-rw-r--r--syntax/ps1.vim32
-rw-r--r--syntax/python.vim588
-rw-r--r--syntax/reason.vim294
-rw-r--r--syntax/ruby.vim4
-rw-r--r--syntax/terraform.vim624
-rw-r--r--syntax/vala.vim10
-rw-r--r--syntax/zig.vim4
38 files changed, 1888 insertions, 1066 deletions
diff --git a/README.md b/README.md
index 52e2776b..be4e7a9a 100644
--- a/README.md
+++ b/README.md
@@ -136,7 +136,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
- [plantuml](https://github.com/aklt/plantuml-syntax) (syntax, indent, ftplugin)
- [pony](https://github.com/jakwings/vim-pony) (syntax, indent, autoload, ftplugin)
-- [powershell](https://github.com/PProvost/vim-ps1) (syntax, indent, ftplugin)
+- [powershell](https://github.com/PProvost/vim-ps1) (syntax, indent, compiler, ftplugin)
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, indent)
- [pug](https://github.com/digitaltoad/vim-pug) (syntax, indent, ftplugin)
- [puppet](https://github.com/rodjek/vim-puppet) (syntax, indent, autoload, ftplugin)
@@ -166,7 +166,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [svelte](https://github.com/evanleck/vim-svelte) (syntax, indent)
- [svg-indent](https://github.com/jasonshell/vim-svg-indent) (indent)
- [svg](https://github.com/vim-scripts/svg.vim) (syntax)
-- [swift](https://github.com/keith/swift.vim) (syntax, indent, ftplugin)
+- [swift](https://github.com/keith/swift.vim) (syntax, indent, compiler, ftplugin)
- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (syntax)
- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (syntax, ftplugin)
- [terraform](https://github.com/hashivim/vim-terraform) (syntax, indent, autoload, ftplugin)
diff --git a/after/syntax/mma.vim b/after/syntax/mma.vim
index 45c5c428..c01de4d0 100644
--- a/after/syntax/mma.vim
+++ b/after/syntax/mma.vim
@@ -2,17 +2,13 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') =
"Vim conceal file
" Language: Mathematica
-" Maintainer: Voldikss <dyzplus@gmail.com>
-" Last Change: 2019 Jan 23 by Voldikss
-" Source: https://github.com/voldikss/vim-mma/after/syntax/mma.vim
-" Credits:
-" Rsmenon: https://github.com/rsmenon
+" Maintainer: R. Menon <rsmenon@icloud.com>
+" Last Change: Feb 25, 2013
if (exists('g:mma_candy') && g:mma_candy == 0) || !has('conceal') || &enc != 'utf-8'
finish
endif
-
"These are fairly safe and straightforward conceals
if exists('g:mma_candy') && g:mma_candy > 0
"Rules
diff --git a/after/syntax/yaml.vim b/after/syntax/yaml.vim
index 4dd2c4e9..097d1535 100644
--- a/after/syntax/yaml.vim
+++ b/after/syntax/yaml.vim
@@ -42,8 +42,8 @@ syn keyword yamlConstant NULL Null null NONE None none NIL Nil nil
syn keyword yamlConstant TRUE True true YES Yes yes ON On on
syn keyword yamlConstant FALSE False false NO No no OFF Off off
-syn match yamlKey "^\s*\zs[^ \t\"]\+\ze\s*:"
-syn match yamlKey "^\s*-\s*\zs[^ \t\"\']\+\ze\s*:"
+syn match yamlKey "^\s*\zs[^ \t\"\'#]\+\ze\s*:"
+ syn match yamlKey "^\s*-\s*\zs[^ \t\"\'#]\+\ze\s*:"
syn match yamlAnchor "&\S\+"
syn match yamlAlias "*\S\+"
diff --git a/autoload/LaTeXtoUnicode.vim b/autoload/LaTeXtoUnicode.vim
index 045ebb9c..8e6714dc 100644
--- a/autoload/LaTeXtoUnicode.vim
+++ b/autoload/LaTeXtoUnicode.vim
@@ -13,6 +13,9 @@ function! s:L2U_Setup()
if !has_key(b:, "l2u_enabled")
let b:l2u_enabled = 0
endif
+ if !has_key(b:, "l2u_autodetect_enable")
+ let b:l2u_autodetect_enable = 1
+ endif
" Did we install the L2U tab mappings?
if !has_key(b:, "l2u_tab_set")
@@ -92,34 +95,39 @@ endfunction
" Each time the filetype changes, we may need to enable or
" disable the LaTeX-to-Unicode functionality
function! LaTeXtoUnicode#Refresh()
-
call s:L2U_Setup()
+ " skip if manually overridden
+ if !b:l2u_autodetect_enable
+ return ''
+ endif
+
" by default, LaTeX-to-Unicode is only active on julia files
let file_types = s:L2U_file_type_regex(get(g:, "latex_to_unicode_file_types", "julia"))
let file_types_blacklist = s:L2U_file_type_regex(get(g:, "latex_to_unicode_file_types_blacklist", "$^"))
if match(&filetype, file_types) < 0 || match(&filetype, file_types_blacklist) >= 0
if b:l2u_enabled
- call LaTeXtoUnicode#Disable()
+ call LaTeXtoUnicode#Disable(1)
else
- return
+ return ''
endif
elseif !b:l2u_enabled
- call LaTeXtoUnicode#Enable()
+ call LaTeXtoUnicode#Enable(1)
endif
-
endfunction
-function! LaTeXtoUnicode#Enable()
+function! LaTeXtoUnicode#Enable(...)
+ let auto_set = a:0 > 0 ? a:1 : 0
if b:l2u_enabled
- return
+ return ''
end
call s:L2U_ResetLastCompletionInfo()
let b:l2u_enabled = 1
+ let b:l2u_autodetect_enable = auto_set
" If we're editing the first file upon opening vim, this will only init the
" command line mode mapping, and the full initialization will be performed by
@@ -127,18 +135,18 @@ function! LaTeXtoUnicode#Enable()
" Otherwise, if we're opening a file from within a running vim session, this
" will actually initialize all the LaTeX-to-Unicode substitutions.
call LaTeXtoUnicode#Init()
-
- return
-
+ return ''
endfunction
-function! LaTeXtoUnicode#Disable()
+function! LaTeXtoUnicode#Disable(...)
+ let auto_set = a:0 > 0 ? a:1 : 0
if !b:l2u_enabled
- return
+ return ''
endif
let b:l2u_enabled = 0
+ let b:l2u_autodetect_enable = auto_set
call LaTeXtoUnicode#Init()
- return
+ return ''
endfunction
" Translate old options to their new equivalents
@@ -246,7 +254,6 @@ function! LaTeXtoUnicode#omnifunc(findstart, base)
endif
let b:l2u_in_fallback = 0
" set info for the callback
- let b:l2u_tab_completing = 1
let b:l2u_found_completion = 1
" analyse current line
let col1 = col('.')
@@ -375,6 +382,7 @@ function! LaTeXtoUnicode#Tab()
endif
" reset the in_fallback info
let b:l2u_in_fallback = 0
+ let b:l2u_tab_completing = 1
" temporary change to completeopt to use the `longest` setting, which is
" probably the only one which makes sense given that the goal of the
" completion is to substitute the final string
@@ -383,7 +391,8 @@ function! LaTeXtoUnicode#Tab()
set completeopt-=noinsert
" invoke omnicompletion; failure to perform LaTeX-to-Unicode completion is
" handled by the CompleteDone autocommand.
- return "\<C-X>\<C-O>"
+ call feedkeys("\<C-X>\<C-O>", 'n')
+ return ""
endfunction
" This function is called at every CompleteDone event, and is meant to handle
@@ -409,7 +418,7 @@ function! LaTeXtoUnicode#FallbackCallback()
endfunction
" This is the function that performs the substitution in command-line mode
-function! LaTeXtoUnicode#CmdTab(triggeredbytab)
+function! LaTeXtoUnicode#CmdTab(trigger)
" first stage
" analyse command line
let col1 = getcmdpos() - 1
@@ -418,10 +427,12 @@ function! LaTeXtoUnicode#CmdTab(triggeredbytab)
let b:l2u_singlebslash = (match(l[0:col1-1], '\\$') >= 0)
" completion not found
if col0 == -1
- if a:triggeredbytab
- call feedkeys("\<Tab>", 'nt') " fall-back to the default <Tab>
+ if a:trigger == &wildchar
+ call feedkeys(nr2char(a:trigger), 'nt') " fall-back to the default wildchar
+ elseif a:trigger == char2nr("\<S-Tab>")
+ call feedkeys("\<S-Tab>", 'nt') " fall-back to the default <S-Tab>
endif
- return l
+ return ''
endif
let base = l[col0 : col1-1]
" search for matches
@@ -430,39 +441,28 @@ function! LaTeXtoUnicode#CmdTab(triggeredbytab)
for k in keys(g:l2u_symbols_dict)
if k ==# base
let exact_match = 1
- endif
- if len(k) >= len(base) && k[0 : len(base)-1] ==# base
+ break
+ elseif len(k) >= len(base) && k[0 : len(base)-1] ==# base
call add(partmatches, k)
endif
endfor
- if len(partmatches) == 0
- if a:triggeredbytab
- call feedkeys("\<Tab>", 'nt') " fall-back to the default <Tab>
+ if !exact_match && len(partmatches) == 0
+ " no matches, call fallbacks
+ if a:trigger == &wildchar
+ call feedkeys(nr2char(a:trigger), 'nt') " fall-back to the default wildchar
+ elseif a:trigger == char2nr("\<S-Tab>")
+ call feedkeys("\<S-Tab>", 'nt') " fall-back to the default <S-Tab>
endif
- return l
- endif
- " exact matches are replaced with Unicode
- if exact_match
+ elseif exact_match
+ " exact matches are replaced with Unicode
let unicode = g:l2u_symbols_dict[base]
- if col0 > 0
- let pre = l[0 : col0 - 1]
- else
- let pre = ''
- endif
- let posdiff = col1-col0 - len(unicode)
- call setcmdpos(col1 - posdiff + 1)
- return pre . unicode . l[col1 : -1]
- endif
- " no exact match: complete with the longest common prefix
- let common = s:L2U_longest_common_prefix(partmatches)
- if col0 > 0
- let pre = l[0 : col0 - 1]
+ call feedkeys(repeat("\b", len(base)) . unicode, 'nt')
else
- let pre = ''
+ " no exact match: complete with the longest common prefix
+ let common = s:L2U_longest_common_prefix(partmatches)
+ call feedkeys(common[len(base):], 'nt')
endif
- let posdiff = col1-col0 - len(common)
- call setcmdpos(col1 - posdiff + 1)
- return pre . common . l[col1 : -1]
+ return ''
endfunction
" Setup the L2U tab mapping
@@ -473,7 +473,8 @@ function! s:L2U_SetTab(wait_insert_enter)
let b:l2u_cmdtab_keys = [b:l2u_cmdtab_keys]
endif
for k in b:l2u_cmdtab_keys
- exec 'cnoremap <buffer> '.k.' <C-\>eLaTeXtoUnicode#CmdTab('.(k ==? '<Tab>').')<CR>'
+ exec 'let trigger = char2nr("'.(k[0] == '<' ? '\' : '').k.'")'
+ exec 'cnoremap <buffer><expr> '.k.' LaTeXtoUnicode#CmdTab('.trigger.')'
endfor
let b:l2u_cmdtab_set = 1
endif
@@ -637,6 +638,7 @@ function! LaTeXtoUnicode#Init(...)
call s:L2U_SetTab(wait_insert_enter)
call s:L2U_SetAutoSub(wait_insert_enter)
call s:L2U_SetKeymap()
+ return ''
endfunction
function! LaTeXtoUnicode#Toggle()
@@ -648,7 +650,7 @@ function! LaTeXtoUnicode#Toggle()
call LaTeXtoUnicode#Enable()
echo "LaTeX-to-Unicode enabled"
endif
- return
+ return ''
endfunction
endif
diff --git a/autoload/cargo.vim b/autoload/cargo.vim
index ffa946da..fefd28de 100644
--- a/autoload/cargo.vim
+++ b/autoload/cargo.vim
@@ -1,14 +1,16 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
-function! cargo#Load()
+function! cargo#Load()
" Utility call to get this script loaded, for debugging
endfunction
-function! cargo#cmd(args)
+function! cargo#cmd(args) abort
" Trim trailing spaces. This is necessary since :terminal command parses
" trailing spaces as an empty argument.
let args = substitute(a:args, '\s\+$', '', '')
- if has('terminal')
+ if exists('g:cargo_shell_command_runner')
+ let cmd = g:cargo_shell_command_runner
+ elseif has('terminal')
let cmd = 'terminal'
elseif has('nvim')
let cmd = 'noautocmd new | terminal'
@@ -67,6 +69,10 @@ function! cargo#build(args)
call cargo#cmd("build " . a:args)
endfunction
+function! cargo#check(args)
+ call cargo#cmd("check " . a:args)
+endfunction
+
function! cargo#clean(args)
call cargo#cmd("clean " . a:args)
endfunction
diff --git a/autoload/crystal_lang.vim b/autoload/crystal_lang.vim
index 99d0ca2c..98359a4b 100644
--- a/autoload/crystal_lang.vim
+++ b/autoload/crystal_lang.vim
@@ -7,6 +7,8 @@ let s:V = vital#crystal#new()
let s:P = s:V.import('Process')
let s:C = s:V.import('ColorEcho')
+let s:IS_WINDOWS = has('win32')
+
if exists('*json_decode')
function! s:decode_json(text) abort
return json_decode(a:text)
@@ -299,29 +301,47 @@ function! crystal_lang#run_current_spec(...) abort
endfunction
function! crystal_lang#format_string(code, ...) abort
+ if s:IS_WINDOWS
+ let redirect = '2> nul'
+ else
+ let redirect = '2>/dev/null'
+ endif
let cmd = printf(
- \ '%s tool format --no-color %s -',
+ \ '%s tool format --no-color %s - %s',
\ g:crystal_compiler_command,
- \ get(a:, 1, '')
+ \ get(a:, 1, ''),
+ \ redirect,
\ )
let output = s:P.system(cmd, a:code)
if s:P.get_last_status()
- throw 'vim-crystal: Error on formatting: ' . output
+ throw 'vim-crystal: Error on formatting with command: ' . cmd
endif
return output
endfunction
" crystal_lang#format(option_str [, on_save])
function! crystal_lang#format(option_str, ...) abort
+ let on_save = a:0 > 0 ? a:1 : 0
+
if !executable(g:crystal_compiler_command)
- " Finish command silently
- return
+ if on_save
+ " Finish command silently on save
+ return
+ else
+ throw 'vim-crystal: Command for formatting is not executable: ' . g:crystal_compiler_command
+ endif
endif
- let on_save = a:0 > 0 ? a:1 : 0
-
let before = join(getline(1, '$'), "\n")
- let formatted = crystal_lang#format_string(before, a:option_str)
+ try
+ let formatted = crystal_lang#format_string(before, a:option_str)
+ catch /^vim-crystal: /
+ echohl ErrorMsg
+ echomsg v:exception . ': Your code was not formatted. Exception was thrown at ' . v:throwpoint
+ echohl None
+ return
+ endtry
+
if !on_save
let after = substitute(formatted, '\n$', '', '')
if before ==# after
diff --git a/autoload/csv.vim b/autoload/csv.vim
index 1fbf7c2a..5d63a24d 100644
--- a/autoload/csv.vim
+++ b/autoload/csv.vim
@@ -635,8 +635,12 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3
return
endif
let cur=winsaveview()
+ " be sure, that b:col_width is actually valid
+ if exists("b:col_width") && eval(join(b:col_width, '+')) == 0
+ unlet! b:col_width
+ endif
" Force recalculation of Column width
- let row = exists("a:1") ? a:1 : line('$')
+ let row = exists("a:1") && !empty(a:1) ? a:1 : line('$')
if a:bang || !empty(row)
if a:bang && exists("b:col_width")
" Unarrange, so that if csv_arrange_align has changed
diff --git a/autoload/go/config.vim b/autoload/go/config.vim
index d4ba03e4..9599ebb0 100644
--- a/autoload/go/config.vim
+++ b/autoload/go/config.vim
@@ -60,7 +60,10 @@ function! go#config#SetTermCloseOnExit(value) abort
endfunction
function! go#config#TermEnabled() abort
- return has('nvim') && get(g:, 'go_term_enabled', 0)
+ " nvim always support
+ " vim will support if terminal feature exists
+ let l:support = has('nvim') || has('terminal')
+ return support && get(g:, 'go_term_enabled', 0)
endfunction
function! go#config#SetTermEnabled(value) abort
@@ -162,23 +165,6 @@ function! go#config#SetGuruScope(scope) abort
endif
endfunction
-function! go#config#GocodeUnimportedPackages() abort
- return get(g:, 'go_gocode_unimported_packages', 0)
-endfunction
-
-let s:sock_type = (has('win32') || has('win64')) ? 'tcp' : 'unix'
-function! go#config#GocodeSocketType() abort
- return get(g:, 'go_gocode_socket_type', s:sock_type)
-endfunction
-
-function! go#config#GocodeProposeBuiltins() abort
- return get(g:, 'go_gocode_propose_builtins', 1)
-endfunction
-
-function! go#config#GocodeProposeSource() abort
- return get(g:, 'go_gocode_propose_source', 0)
-endfunction
-
function! go#config#EchoCommandInfo() abort
return get(g:, 'go_echo_command_info', 1)
endfunction
@@ -263,6 +249,10 @@ function! go#config#AddtagsTransform() abort
return get(g:, 'go_addtags_transform', "snakecase")
endfunction
+function! go#config#AddtagsSkipUnexported() abort
+ return get(g:, 'go_addtags_skip_unexported', 0)
+endfunction
+
function! go#config#TemplateAutocreate() abort
return get(g:, "go_template_autocreate", 1)
endfunction
@@ -491,6 +481,10 @@ function! go#config#HighlightDebug() abort
return get(g:, 'go_highlight_debug', 1)
endfunction
+function! go#config#DebugBreakpointSignText() abort
+ return get(g:, 'go_debug_breakpoint_sign_text', '>')
+endfunction
+
function! go#config#FoldEnable(...) abort
if a:0 > 0
return index(go#config#FoldEnable(), a:1) > -1
@@ -516,23 +510,30 @@ function! go#config#ReferrersMode() abort
endfunction
function! go#config#GoplsCompleteUnimported() abort
- return get(g:, 'go_gopls_complete_unimported', 0)
+ return get(g:, 'go_gopls_complete_unimported', v:null)
endfunction
function! go#config#GoplsDeepCompletion() abort
- return get(g:, 'go_gopls_deep_completion', 1)
+ return get(g:, 'go_gopls_deep_completion', v:null)
endfunction
-function! go#config#GoplsFuzzyMatching() abort
- return get(g:, 'go_gopls_fuzzy_matching', 1)
+function! go#config#GoplsMatcher() abort
+ if !exists('g:go_gopls_matcher') && get(g:, 'g:go_gopls_fuzzy_matching', v:null) is 1
+ return 'fuzzy'
+ endif
+ return get(g:, 'go_gopls_matcher', v:null)
endfunction
function! go#config#GoplsStaticCheck() abort
- return get(g:, 'go_gopls_staticcheck', 0)
+ return get(g:, 'go_gopls_staticcheck', v:null)
endfunction
function! go#config#GoplsUsePlaceholders() abort
- return get(g:, 'go_gopls_use_placeholders', 0)
+ return get(g:, 'go_gopls_use_placeholders', v:null)
+endfunction
+
+function! go#config#GoplsTempModfile() abort
+ return get(g:, 'go_gopls_temp_modfile', v:null)
endfunction
function! go#config#GoplsEnabled() abort
@@ -543,6 +544,10 @@ function! go#config#DiagnosticsEnabled() abort
return get(g:, 'go_diagnostics_enabled', 0)
endfunction
+function! go#config#GoplsOptions() abort
+ return get(g:, 'go_gopls_options', [])
+endfunction
+
" Set the default value. A value of "1" is a shortcut for this, for
" compatibility reasons.
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1
diff --git a/autoload/julia.vim b/autoload/julia.vim
index 6bb70dce..9442f611 100644
--- a/autoload/julia.vim
+++ b/autoload/julia.vim
@@ -1,30 +1,11 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
function! julia#set_syntax_version(jvers)
- if &filetype != "julia"
- echo "Not a Julia file"
- return
- endif
- syntax clear
- let b:julia_syntax_version = a:jvers
- set filetype=julia
+ echo "The julia#set_syntax_version function is deprecated"
endfunction
function! julia#toggle_deprecated_syntax()
- if &filetype != "julia"
- echo "Not a Julia file"
- return
- endif
- syntax clear
- let hd = get(b:, "julia_syntax_highlight_deprecated",
- \ get(g:, "julia_syntax_highlight_deprecated", 0))
- let b:julia_syntax_highlight_deprecated = hd ? 0 : 1
- set filetype=julia
- if b:julia_syntax_highlight_deprecated
- echo "Highlighting of deprecated syntax enabled"
- else
- echo "Highlighting of deprecated syntax disabled"
- endif
+ echo "The julia#toggle_deprecated_syntax function is deprecated"
endfunction
if exists("loaded_matchit")
diff --git a/autoload/julia_latex_symbols.vim b/autoload/julia_latex_symbols.vim
index 70d5d3de..3b2bf050 100644
--- a/autoload/julia_latex_symbols.vim
+++ b/autoload/julia_latex_symbols.vim
@@ -1,7 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
" This file is autogenerated from the script 'generate_latex_symbols_table.jl'
-" The symbols are based on Julia version 1.3.0-DEV.263
+" The symbols are based on Julia version 1.5.0-DEV.67
scriptencoding utf-8
@@ -658,7 +658,9 @@ function! julia_latex_symbols#get_dict()
\ '\nequiv': '≢',
\ '\Equiv': '≣',
\ '\le': '≤',
+ \ '\leq': '≤',
\ '\ge': '≥',
+ \ '\geq': '≥',
\ '\leqq': '≦',
\ '\geqq': '≧',
\ '\lneqq': '≨',
diff --git a/autoload/terraform.vim b/autoload/terraform.vim
index dc96ce0a..fcc7ba6e 100644
--- a/autoload/terraform.vim
+++ b/autoload/terraform.vim
@@ -7,9 +7,6 @@ set cpoptions&vim
let $TF_CLI_ARGS_fmt=''
function! terraform#fmt()
- if !filereadable(expand('%:p'))
- return
- endif
let l:curw = winsaveview()
" Make a fake change so that the undo point is right.
normal! ix
diff --git a/compiler/powershell.vim b/compiler/powershell.vim
new file mode 100644
index 00000000..4d9d76b0
--- /dev/null
+++ b/compiler/powershell.vim
@@ -0,0 +1,80 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1
+
+" Compiler: powershell
+" Run ps1 scripts in powershell and process their output. Quickly jump through
+" stack traces and see script output in the quickfix.
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "powershell"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+if !exists("g:ps1_makeprg_cmd")
+ if !has('win32') || executable('pwsh')
+ " pwsh is the future
+ let g:ps1_makeprg_cmd = 'pwsh'
+ else
+ " powershell is Windows-only
+ let g:ps1_makeprg_cmd = 'powershell'
+ endif
+endif
+
+" Show CategoryInfo, FullyQualifiedErrorId, etc?
+let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0)
+
+" Use absolute path because powershell requires explicit relative paths
+" (./file.ps1 is okay, but # expands to file.ps1)
+let &l:makeprg = g:ps1_makeprg_cmd .' %:p'
+
+" Parse file, line, char from callstacks:
+" Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a
+" cmdlet, function, script file, or operable program. Check the spelling
+" of the name, or if a path was included, verify that the path is correct
+" and try again.
+" At C:\script.ps1:11 char:5
+" + Write-Ouput $content
+" + ~~~~~~~~~~~
+" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
+" + FullyQualifiedErrorId : CommandNotFoundException
+
+" Showing error in context with underlining.
+CompilerSet errorformat=%+G+%m
+" Error summary.
+CompilerSet errorformat+=%E%*\\S\ :\ %m
+" Error location.
+CompilerSet errorformat+=%CAt\ %f:%l\ char:%c
+" Errors that span multiple lines (may be wrapped to width of terminal).
+CompilerSet errorformat+=%C%m
+" Ignore blank/whitespace-only lines.
+CompilerSet errorformat+=%Z\\s%#
+
+if g:ps1_efm_show_error_categories
+ CompilerSet errorformat^=%+G\ \ \ \ +\ %.%#\\s%#:\ %m
+else
+ CompilerSet errorformat^=%-G\ \ \ \ +\ %.%#\\s%#:\ %m
+endif
+
+
+" Parse file, line, char from of parse errors:
+" At C:\script.ps1:22 char:16
+" + Stop-Process -Name "invalidprocess
+" + ~~~~~~~~~~~~~~~
+" The string is missing the terminator: ".
+" + CategoryInfo : ParserError: (:) [], ParseException
+" + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
+CompilerSet errorformat+=At\ %f:%l\ char:%c
+
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim:set sw=2 sts=2:
+
+endif
diff --git a/compiler/swift.vim b/compiler/swift.vim
new file mode 100644
index 00000000..5dab34f6
--- /dev/null
+++ b/compiler/swift.vim
@@ -0,0 +1,43 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1
+
+" Vim compiler file
+" Compiler: Swift Compiler
+" Maintainer: Ayman Bagabas <ayman.bagabas@gmail.com>
+" Latest Revision: 2020 Feb 16
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "swiftc"
+
+" vint: -ProhibitAbbreviationOption
+let s:save_cpo = &cpo
+set cpo&vim
+" vint: +ProhibitAbbreviationOption
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+if has('patch-7.4.191')
+ CompilerSet makeprg=swiftc\ \%:S
+else
+ CompilerSet makeprg=swiftc\ \%
+endif
+
+CompilerSet errorformat=
+ \%E%f:%l:%c:\ %trror:\ %m,
+ \%W%f:%l:%c:\ %tarning:\ %m,
+ \%I%f:%l:%c:\ note:\ %m,
+ \%E%f:%l:\ %trror:\ %m,
+ \%W%f:%l:\ %tarning:\ %m,
+ \%I%f:%l:\ note:\ %m,
+
+" vint: -ProhibitAbbreviationOption
+let &cpo = s:save_cpo
+unlet s:save_cpo
+" vint: +ProhibitAbbreviationOption
+
+" vim: set et sw=4 sts=4 ts=8:
+
+endif
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index b3b6ea4c..d896692b 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -831,8 +831,10 @@ endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1
augroup filetypedetect
" mathematica, from mma.vim in voldikss/vim-mma
-autocmd BufNewFile,BufRead *.wl set filetype=mma
-autocmd BufNewFile,BufRead *.wls set filetype=mma
+autocmd BufNewFile,BufRead *.wl setfiletype mma
+autocmd BufNewFile,BufRead *.wls setfiletype mma
+autocmd BufNewFile,BufRead *.nb setfiletype mma
+autocmd BufNewFile,BufRead *.m setfiletype mma
augroup end
endif
@@ -913,7 +915,7 @@ endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
augroup filetypedetect
" ocaml, from dune.vim in rgrinberg/vim-ocaml
-au BufRead,BufNewFile jbuild,dune,dune-project set ft=dune
+au BufRead,BufNewFile jbuild,dune,dune-project,dune-workspace set ft=dune
augroup end
endif
diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim
index c82c3b74..c23d93f6 100644
--- a/ftplugin/crystal.vim
+++ b/ftplugin/crystal.vim
@@ -43,30 +43,30 @@ setlocal errorformat=
let g:crystal_compiler_command = get(g:, 'crystal_compiler_command', 'crystal')
let g:crystal_auto_format = get(g:, 'crystal_auto_format', 0)
-command! -buffer -nargs=* CrystalImpl echo crystal_lang#impl(expand('%'), getpos('.'), <q-args>).output
-command! -buffer -nargs=0 CrystalDef call crystal_lang#jump_to_definition(expand('%'), getpos('.'))
-command! -buffer -nargs=* CrystalContext echo crystal_lang#context(expand('%'), getpos('.'), <q-args>).output
-command! -buffer -nargs=* CrystalHierarchy echo crystal_lang#type_hierarchy(expand('%'), <q-args>)
-command! -buffer -nargs=? CrystalSpecSwitch call crystal_lang#switch_spec_file(<f-args>)
-command! -buffer -nargs=? CrystalSpecRunAll call crystal_lang#run_all_spec(<f-args>)
+command! -buffer -nargs=* CrystalImpl echo crystal_lang#impl(expand('%'), getpos('.'), <q-args>).output
+command! -buffer -nargs=0 CrystalDef call crystal_lang#jump_to_definition(expand('%'), getpos('.'))
+command! -buffer -nargs=* CrystalContext echo crystal_lang#context(expand('%'), getpos('.'), <q-args>).output
+command! -buffer -nargs=* CrystalHierarchy echo crystal_lang#type_hierarchy(expand('%'), <q-args>)
+command! -buffer -nargs=? CrystalSpecSwitch call crystal_lang#switch_spec_file(<f-args>)
+command! -buffer -nargs=? CrystalSpecRunAll call crystal_lang#run_all_spec(<f-args>)
command! -buffer -nargs=? CrystalSpecRunCurrent call crystal_lang#run_current_spec(<f-args>)
-command! -buffer -nargs=* -bar CrystalFormat call crystal_lang#format(<q-args>, 0)
-command! -buffer -nargs=* CrystalExpand echo crystal_lang#expand(expand('%'), getpos('.'), <q-args>).output
+command! -buffer -nargs=* -bar CrystalFormat call crystal_lang#format(<q-args>, 0)
+command! -buffer -nargs=* CrystalExpand echo crystal_lang#expand(expand('%'), getpos('.'), <q-args>).output
nnoremap <buffer><Plug>(crystal-jump-to-definition) :<C-u>CrystalDef<CR>
-nnoremap <buffer><Plug>(crystal-show-context) :<C-u>CrystalContext<CR>
-nnoremap <buffer><Plug>(crystal-spec-switch) :<C-u>CrystalSpecSwitch<CR>
-nnoremap <buffer><Plug>(crystal-spec-run-all) :<C-u>CrystalSpecRunAll<CR>
-nnoremap <buffer><Plug>(crystal-spec-run-current) :<C-u>CrystalSpecRunCurrent<CR>
-nnoremap <buffer><Plug>(crystal-format) :<C-u>CrystalFormat<CR>
+nnoremap <buffer><Plug>(crystal-show-context) :<C-u>CrystalContext<CR>
+nnoremap <buffer><Plug>(crystal-spec-switch) :<C-u>CrystalSpecSwitch<CR>
+nnoremap <buffer><Plug>(crystal-spec-run-all) :<C-u>CrystalSpecRunAll<CR>
+nnoremap <buffer><Plug>(crystal-spec-run-current) :<C-u>CrystalSpecRunCurrent<CR>
+nnoremap <buffer><Plug>(crystal-format) :<C-u>CrystalFormat<CR>
augroup plugin-ft-crystal
- autocmd BufWritePre <buffer> if g:crystal_auto_format | call crystal_lang#format('', 1) | endif
+ autocmd BufWritePre <buffer> if g:crystal_auto_format | call crystal_lang#format('', 1) | endif
augroup END
if get(g:, 'crystal_define_mappings', 1)
- nmap <buffer>gd <Plug>(crystal-jump-to-definition)
- nmap <buffer>gc <Plug>(crystal-show-context)
+ nmap <buffer>gd <Plug>(crystal-jump-to-definition)
+ nmap <buffer>gc <Plug>(crystal-show-context)
nmap <buffer>gss <Plug>(crystal-spec-switch)
nmap <buffer>gsa <Plug>(crystal-spec-run-all)
nmap <buffer>gsc <Plug>(crystal-spec-run-current)
diff --git a/ftplugin/jbuild.vim b/ftplugin/dune.vim
index 2ed1b9cc..cce58e5e 100644
--- a/ftplugin/jbuild.vim
+++ b/ftplugin/dune.vim
@@ -11,6 +11,4 @@ set lisp
setl commentstring=;\ %s
setl comments=:;
-setl iskeyword+=#,?,.,/
-
endif
diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim
index 9c9289b1..edca30dd 100644
--- a/ftplugin/ruby.vim
+++ b/ftplugin/ruby.vim
@@ -113,7 +113,7 @@ else
if !exists('g:ruby_default_path')
if has("ruby") && has("win32")
ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) )
- elseif executable('ruby')
+ elseif executable('ruby') && !empty($HOME)
let g:ruby_default_path = s:query_path($HOME)
else
let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val')
diff --git a/ftplugin/vala.vim b/ftplugin/vala.vim
index e243d674..ef433a26 100644
--- a/ftplugin/vala.vim
+++ b/ftplugin/vala.vim
@@ -5,8 +5,23 @@ if exists('b:did_ftplugin')
endif
let b:did_ftplugin = 1
+" Set 'formatoptions' to break comment lines but not other lines,
+" and insert the comment leader when hitting <CR> or using "o".
+setlocal formatoptions=t formatoptions+=croql
+" j was only added in 7.3.541, so stop complaints about its nonexistence
+" Where it makes sense, remove a comment leader when joining lines.
+silent! setlocal formatoptions+=j
+
setlocal efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:O//
+setlocal commentstring=//%s
+
+" When the matchit plugin is loaded, this makes the % command skip parens and
+" braces in comments.
+let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
+let b:match_skip = 's:comment\|string\|character\|special'
+
" Insert a CCode attribute for the symbol below the cursor
" https://wiki.gnome.org/Projects/Vala/LegacyBindings
function! CCode() abort
@@ -26,4 +41,11 @@ if get(g:, 'vala_syntax_folding_enabled', 1)
setlocal foldmethod=syntax
endif
+" filter files in the browse dialog
+if (has("browsefilter")) && !exists("b:browsefilter")
+ let b:browsefilter = "Vala Source Files (*.vala)\t*.vala\n" .
+ \ "Vala Vapi Files (*.vapi)\t*.vapi\n" .
+ \ "All Files (*.*)\t*.*\n"
+endif
+
endif
diff --git a/indent/crystal.vim b/indent/crystal.vim
index 380b1dbe..94767afe 100644
--- a/indent/crystal.vim
+++ b/indent/crystal.vim
@@ -17,7 +17,7 @@ setlocal nosmartindent
setlocal indentexpr=GetCrystalIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,.
setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end
-setlocal indentkeys+==private,=protected,=public
+setlocal indentkeys+==private,=protected
" Only define the function once.
if exists('*GetCrystalIndent')
@@ -49,12 +49,12 @@ let s:skip_expr =
" Regex used for words that, at the start of a line, add a level of indent.
let s:crystal_indent_keywords =
- \ '^\s*\zs\<\%(module\|\%(private\s\+\)\=\%(abstract\s\+\)\=\%(class\|struct\)\|enum\|if' .
- \ '\|for\|macro\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\|lib' .
- \ '\|\%(protected\|private\)\=\s*def\):\@!\>' .
+ \ '^\s*\zs\<\%(\%(\%(private\|protected\)\s\+\)\=\%(abstract\s\+\)\=\%(class\|struct\)' .
+ \ '\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\|union' .
+ \ '\|\%(private\|protected\)\=\s*\%(def\|class\|struct\|module\|macro\|lib\|enum\)\):\@!\>' .
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
- \ '\|{%\s*\<\%(if\|for\|while\|until\|lib\|case\|unless\|begin\|else\|elsif\|when\)'
+ \ '\|{%\s*\<\%(if\|for\|while\|until\|case\|unless\|begin\|else\|elsif\|when\)'
" Regex used for words that, at the start of a line, remove a level of indent.
let s:crystal_deindent_keywords =
@@ -64,10 +64,11 @@ let s:crystal_deindent_keywords =
" Regex that defines the start-match for the 'end' keyword.
" TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex =
- \ '{%\s*\<\%(if\|for\|while\|until\|unless\|begin\|lib\)\>\|' .
+ \ '{%\s*\<\%(if\|for\|while\|until\|unless\|begin\)\>\|' .
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
- \ '\<\%(module\|\%(private\s\+\)\=\%(abstract\s\+\)\=\%(class\|struct\)\|enum\|macro\|if\|for\|while\|until\|case\|unless\|begin\|lib' .
- \ '\|\%(protected\|private\)\=\s*def\):\@!\>' .
+ \ '\<\%(\%(\%(private\|protected\)\s\+\)\=\%(abstract\s\+\)\=\%(class\|struct\)' .
+ \ '\|if\|for\|while\|until\|case\|unless\|begin\|union' .
+ \ '\|\%(private\|protected\)\=\s*\%(def\|lib\|enum\|macro\|module\)\):\@!\>' .
\ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
" Regex that defines the middle-match for the 'end' keyword.
@@ -122,7 +123,7 @@ let s:block_continuation_regex = '^\s*[^])}\t ].*'.s:block_regex
let s:leading_operator_regex = '^\s*[.]'
" Regex that describes all indent access modifiers
-let s:access_modifier_regex = '\C^\s*\%(public\|protected\|private\)\s*\%(#.*\)\=$'
+let s:access_modifier_regex = '\C^\s*\%(protected\|private\)\s*\%(#.*\)\=$'
" 2. Auxiliary Functions {{{1
" ======================
diff --git a/indent/julia.vim b/indent/julia.vim
index c21548e3..13de44a0 100644
--- a/indent/julia.vim
+++ b/indent/julia.vim
@@ -50,9 +50,8 @@ function GetJuliaNestingStruct(lnum, ...)
let e = a:0 > 1 ? a:2 : -1
let blocks_stack = []
let num_closed_blocks = 0
- let tt = get(b:, 'julia_syntax_version', 10) == 6 ? '\|\%(\%(abstract\|primitive\)\s\+\)\@<!type' : ''
while 1
- let fb = JuliaMatch(a:lnum, line, '@\@<!\<\%(if\|else\%(if\)\?\|while\|for\|try\|catch\|finally\|\%(staged\)\?function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|immutable\|let\|\%(bare\)\?module\|quote\|do'.tt.'\)\>', s, e)
+ let fb = JuliaMatch(a:lnum, line, '@\@<!\<\%(if\|else\%(if\)\?\|while\|for\|try\|catch\|finally\|\%(staged\)\?function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|immutable\|let\|\%(bare\)\?module\|quote\|do\)\>', s, e)
let fe = JuliaMatch(a:lnum, line, '@\@<!\<end\>', s, e)
if fb < 0 && fe < 0
@@ -134,7 +133,7 @@ function GetJuliaNestingStruct(lnum, ...)
continue
endif
- let i = JuliaMatch(a:lnum, line, '@\@<!\<\%(while\|for\|\%(staged\)\?function\|macro\|begin\|\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\|immutable\|let\|quote\|do'.tt.'\)\>', s)
+ let i = JuliaMatch(a:lnum, line, '@\@<!\<\%(while\|for\|\%(staged\)\?function\|macro\|begin\|\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\|immutable\|let\|quote\|do\)\>', s)
if i >= 0 && i == fb
if match(line, '\C\<\%(mutable\|abstract\|primitive\)', i) != -1
let s = i+11
diff --git a/indent/reason.vim b/indent/reason.vim
index 43c6eb7c..7ee5c6db 100644
--- a/indent/reason.vim
+++ b/indent/reason.vim
@@ -78,7 +78,7 @@ function! s:is_string_comment(lnum, col)
if has('syntax_items')
for id in synstack(a:lnum, a:col)
let synname = synIDattr(id, "name")
- if synname == "rustString" || synname =~ "^rustComment"
+ if synname == "reasonString" || synname =~ "^reasonComment"
return 1
endif
endfor
@@ -97,7 +97,7 @@ function GetReasonIndent(lnum)
if has('syntax_items')
let synname = synIDattr(synID(a:lnum, 1, 1), "name")
- if synname == "rustString"
+ if synname == "reasonString"
" If the start of the line is in a string, don't change the indent
return -1
elseif synname =~ '\(Comment\|Todo\)'
diff --git a/syntax/basic/literal.vim b/syntax/basic/literal.vim
index 1f4fb854..eb7dce77 100644
--- a/syntax/basic/literal.vim
+++ b/syntax/basic/literal.vim
@@ -20,7 +20,7 @@ syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x
" From vim runtime
" <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48>
-syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}]+me=e-1 nextgroup=typescriptDotNotation oneline
+syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}:]+me=e-1 nextgroup=typescriptDotNotation oneline
syntax region typescriptTemplate
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim
index 4de74eeb..74942a2d 100644
--- a/syntax/basic/type.vim
+++ b/syntax/basic/type.vim
@@ -86,7 +86,7 @@ syntax region typescriptObjectType matchgroup=typescriptBraces
\ start=/{/ end=/}/
\ contains=@typescriptTypeMember,typescriptEndColons,@typescriptComments,typescriptAccessibilityModifier,typescriptReadonlyModifier
\ nextgroup=@typescriptTypeOperator
- \ contained skipwhite fold
+ \ contained skipwhite skipnl fold
syntax cluster typescriptTypeMember contains=
\ @typescriptCallSignature,
diff --git a/syntax/carp.vim b/syntax/carp.vim
index ad809beb..7266360d 100644
--- a/syntax/carp.vim
+++ b/syntax/carp.vim
@@ -39,7 +39,7 @@ syn keyword carpFunc println print get-line from-string mod random
syn keyword carpFunc random-between str mask delete append length duplicate
syn keyword carpFunc cstr chars from-chars to-int from-int sin cos sqrt acos
syn keyword carpFunc atan2 exit time seed-random for cond floor abs sort-with
-syn keyword carpFunc subarray prefix-array suffix-array reverse sum min max
+syn keyword carpFunc slice prefix suffix reverse sum min max
syn keyword carpFunc first last reduce format zero read-file bit-shift-left
syn keyword carpFunc bit-shift-right bit-and bit-or bit-xor bit-not safe-add
syn keyword carpFunc safe-sub safe-mul even? odd? cmp allocate repeat-indexed
@@ -47,8 +47,8 @@ syn keyword carpFunc sanitize-addresses memory-balance reset-memory-balance!
syn keyword carpFunc log-memory-balance! memory-logged assert-balanced trace
syn keyword carpFunc assert
syn keyword carpFunc pi e swap! update! char-at tail head split-by words lines
-syn keyword carpFunc pad-left pad-right count-char empty? random-sized substring
-syn keyword carpFunc prefix-string suffix-string starts-with? ends-with?
+syn keyword carpFunc pad-left pad-right count-char empty? random-sized
+syn keyword carpFunc starts-with? ends-with?
syn keyword carpFunc string-join free sleep-seconds sleep-micros substitute
syn keyword carpFunc neg to-float match matches? find global-match match-str
syn keyword carpFunc from-float tan asin atan cosh sinh tanh exp frexp ldexp
@@ -111,7 +111,7 @@ syn match carpNumber "\<[-+]\?\d\+/\d\+[lfb]\?\>" contains=carpContainedNumbe
syn keyword carpBoolean true false
-syn match carpChar "\<\\.\w\@!"
+syn match carpChar "\\\(\(newline\)\|\(space\)\|\(tab\)\|\(.\)\)"
syn region carpQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal
syn region carpQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=@carpQuotedStuff,@carpQuotedOrNormal
diff --git a/syntax/crystal.vim b/syntax/crystal.vim
index 8fdd2a6b..ae52cf70 100644
--- a/syntax/crystal.vim
+++ b/syntax/crystal.vim
@@ -1,16 +1,67 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
" Language: Crystal
+" Maintainer: rhysd <https://rhysd.github.io>
+"
" Based on Ruby syntax highlight
" which was made by Mirko Nasato and Doug Kearns
-" ---------------------------------------------
+" ----------------------------------------------
+" Prelude
if exists('b:current_syntax')
finish
endif
+" eCrystal Config
+if exists('g:main_syntax') && g:main_syntax ==# 'ecrystal'
+ let b:crystal_no_expensive = 1
+end
+
+" Folding Config
+if has('folding') && exists('g:crystal_fold')
+ setlocal foldmethod=syntax
+endif
+
+let s:foldable_groups = split(
+ \ get(
+ \ b:,
+ \ 'crystal_foldable_groups',
+ \ get(g:, 'crystal_foldable_groups', 'ALL')
+ \ )
+ \ )
+
+function! s:foldable(...) abort
+ if index(s:foldable_groups, 'NONE') > -1
+ return 0
+ endif
+
+ if index(s:foldable_groups, 'ALL') > -1
+ return 1
+ endif
+
+ for l:i in a:000
+ if index(s:foldable_groups, l:i) > -1
+ return 1
+ endif
+ endfor
+
+ return 0
+endfunction
+
+function! s:run_syntax_fold(args) abort
+ let [_0, _1, groups, cmd; _] = matchlist(a:args, '\(["'']\)\(.\{-}\)\1\s\+\(.*\)')
+ if call('s:foldable', split(groups))
+ let cmd .= ' fold'
+ endif
+ exe cmd
+endfunction
+
+com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
+
+" Not-Top Cluster
syn cluster crystalNotTop contains=@crystalExtendedStringSpecial,@crystalRegexpSpecial,@crystalDeclaration,crystalConditional,crystalExceptional,crystalMethodExceptional,crystalTodo,crystalLinkAttr
+" Whitespace Errors
if exists('g:crystal_space_errors')
if !exists('g:crystal_no_trail_space_error')
syn match crystalSpaceError display excludenl "\s\+$"
@@ -28,91 +79,94 @@ if exists('g:crystal_operators')
endif
" Expression Substitution and Backslash Notation
-syn match crystalStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
+syn match crystalStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
syn match crystalStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
-syn region crystalInterpolation matchgroup=crystalInterpolationDelim start="#{" end="}" contained contains=ALLBUT,@crystalNotTop
-syn match crystalInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=crystalInterpolationDelim,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable,crystalPredefinedVariable
+syn region crystalInterpolation matchgroup=crystalInterpolationDelim start="#{" end="}" contained contains=ALLBUT,@crystalNotTop
+syn match crystalInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=crystalInterpolationDelim,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable,crystalPredefinedVariable
syn match crystalInterpolationDelim "#\ze\%(\$\|@@\=\)\w\+" display contained
-syn match crystalInterpolation "#\$\%(-\w\|\W\)" display contained contains=crystalInterpolationDelim,crystalPredefinedVariable,crystalInvalidVariable
-syn match crystalInterpolationDelim "#\ze\$\%(-\w\|\W\)" display contained
-syn region crystalNoInterpolation start="\\#{" end="}" contained
-syn match crystalNoInterpolation "\\#{" display contained
-syn match crystalNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
-syn match crystalNoInterpolation "\\#\$\W" display contained
+syn match crystalInterpolation "#\$\%(-\w\|\W\)" display contained contains=crystalInterpolationDelim,crystalPredefinedVariable,crystalInvalidVariable
+syn match crystalInterpolationDelim "#\ze\$\%(-\w\|\W\)" display contained
+syn region crystalNoInterpolation start="\\#{" end="}" contained
+syn match crystalNoInterpolation "\\#{" display contained
+syn match crystalNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
+syn match crystalNoInterpolation "\\#\$\W" display contained
-syn match crystalDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE
+syn match crystalDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE
-syn region crystalNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=crystalString end=")" transparent contained
-syn region crystalNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=crystalString end="}" transparent contained
-syn region crystalNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=crystalString end=">" transparent contained
-syn region crystalNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=crystalString end="\]" transparent contained
+syn region crystalNestedParentheses matchgroup=crystalString start="(" skip="\\\\\|\\)" end=")" transparent contained
+syn region crystalNestedCurlyBraces matchgroup=crystalString start="{" skip="\\\\\|\\}" end="}" transparent contained
+syn region crystalNestedAngleBrackets matchgroup=crystalString start="<" skip="\\\\\|\\>" end=">" transparent contained
+syn region crystalNestedSquareBrackets matchgroup=crystalString start="\[" skip="\\\\\|\\\]" end="\]" transparent contained
" These are mostly Oniguruma ready
-syn region crystalRegexpComment matchgroup=crystalRegexpSpecial start="(?#" skip="\\)" end=")" contained
-syn region crystalRegexpParens matchgroup=crystalRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@crystalRegexpSpecial
-syn region crystalRegexpBrackets matchgroup=crystalRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=crystalStringEscape,crystalRegexpEscape,crystalRegexpCharClass oneline
-syn match crystalRegexpCharClass "\\[DdHhSsWw]" contained display
-syn match crystalRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained
-syn match crystalRegexpEscape "\\[].*?+^$|\\/(){}[]" contained
-syn match crystalRegexpQuantifier "[*?+][?+]\=" contained display
-syn match crystalRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
-syn match crystalRegexpAnchor "[$^]\|\\[ABbGZz]" contained display
-syn match crystalRegexpDot "\." contained display
-syn match crystalRegexpSpecial "|" contained display
-syn match crystalRegexpSpecial "\\[1-9]\d\=\d\@!" contained display
-syn match crystalRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display
-syn match crystalRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display
-syn match crystalRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display
-syn match crystalRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display
-
-syn cluster crystalStringSpecial contains=crystalInterpolation,crystalNoInterpolation,crystalStringEscape
-syn cluster crystalExtendedStringSpecial contains=@crystalStringSpecial,crystalNestedParentheses,crystalNestedCurlyBraces,crystalNestedAngleBrackets,crystalNestedSquareBrackets
-syn cluster crystalRegexpSpecial contains=crystalInterpolation,crystalNoInterpolation,crystalStringEscape,crystalRegexpSpecial,crystalRegexpEscape,crystalRegexpBrackets,crystalRegexpCharClass,crystalRegexpDot,crystalRegexpQuantifier,crystalRegexpAnchor,crystalRegexpParens,crystalRegexpComment
+syn region crystalRegexpComment matchgroup=crystalRegexpSpecial start="(?#" skip="\\)" end=")" contained
+syn region crystalRegexpParens matchgroup=crystalRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@crystalRegexpSpecial
+syn region crystalRegexpBrackets matchgroup=crystalRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=crystalStringEscape,crystalRegexpEscape,crystalRegexpCharClass oneline
+syn match crystalRegexpCharClass "\\[DdHhSsWw]" contained display
+syn match crystalRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained
+syn match crystalRegexpEscape "\\[].*?+^$|\\/(){}[]" contained
+syn match crystalRegexpQuantifier "[*?+][?+]\=" contained display
+syn match crystalRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
+syn match crystalRegexpAnchor "[$^]\|\\[ABbGZz]" contained display
+syn match crystalRegexpDot "\." contained display
+syn match crystalRegexpSpecial "|" contained display
+syn match crystalRegexpSpecial "\\[1-9]\d\=\d\@!" contained display
+syn match crystalRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display
+syn match crystalRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display
+syn match crystalRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display
+syn match crystalRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display
+
+syn cluster crystalStringSpecial contains=crystalInterpolation,crystalNoInterpolation,crystalStringEscape
+syn cluster crystalExtendedStringSpecial contains=@crystalStringSpecial,crystalNestedParentheses,crystalNestedCurlyBraces,crystalNestedAngleBrackets,crystalNestedSquareBrackets,crystalNestedRawParentheses,crystalNestedRawCurlyBraces,crystalNestedRawAngleBrackets,crystalNestedRawSquareBrackets
+syn cluster crystalRegexpSpecial contains=crystalInterpolation,crystalNoInterpolation,crystalStringEscape,crystalRegexpSpecial,crystalRegexpEscape,crystalRegexpBrackets,crystalRegexpCharClass,crystalRegexpDot,crystalRegexpQuantifier,crystalRegexpAnchor,crystalRegexpParens,crystalRegexpComment
" Numbers and ASCII Codes
-syn match crystalASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
-syn match crystalInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\%(_*[ufi]\%(32\|64\)\)\=\>" display
-syn match crystalInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(_\x\+\)*\%(_*[ufi]\%(32\|64\)\)\=\>" display
-syn match crystalInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\%(_\x\+\)*\%(_*[ufi]\%(32\|64\)\)\=\>" display
-syn match crystalInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\%(_\x\+\)*\%(_*[ufi]\%(32\|64\)\)\=\>" display
-syn match crystalFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\%(_*f\%(32\|64\)\)\=\>" display
-syn match crystalFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\%(_*f\%(32\|64\)\)\=\>" display
+syn match crystalASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
+syn match crystalInteger "\<0x[[:xdigit:]_]\+\%([ui]\%(8\|16\|32\|64\|128\)\|f\%(32\|64\)\)\=\>" display
+syn match crystalInteger "\<0o[0-7_]\+\%([ui]\%(8\|16\|32\|64\|128\)\)\=\>" display
+syn match crystalInteger "\<0b[01_]\+\%([ui]\%(8\|16\|32\|64\|128\)\)\=\>" display
+syn match crystalInteger "\<\d[[:digit:]_]*\%([ui]\%(8\|16\|32\|64\|128\)\|f\%(32\|64\)\)\=\>" contains=crystalInvalidInteger display
+syn match crystalFloat "\<\d[[:digit:]_]*\.\d[[:digit:]_]*\%(f\%(32\|64\)\)\=\>" contains=crystalInvalidInteger display
+syn match crystalFloat "\<\d[[:digit:]_]*\%(\.\d[[:digit:]_]*\)\=\%([eE][-+]\=[[:digit:]_]\+\)\%(f\%(32\|64\)\)\=\>" contains=crystalInvalidInteger display
+" Note: 042 is invalid but 0, 0_, 0_u8 and 0_1 are valid (#73)
+syn match crystalInvalidInteger "\.\@<!\<0\d\+\>" contained containedin=crystalFloat,crystalInteger display
" Identifiers
syn match crystalLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
-syn match crystalBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
-
-syn match crystalTypeName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
-syn match crystalClassName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
-syn match crystalModuleName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
-syn match crystalStructName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
-syn match crystalLibName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
-syn match crystalEnumName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
-syn match crystalConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@="
-syn match crystalClassVariable "@@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
-syn match crystalInstanceVariable "@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
-syn match crystalGlobalVariable "$\%(\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\|-.\)"
-syn match crystalFreshVariable "\%(\h\|[^\x00-\x7F]\)\@<!%\%(\h\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
-syn match crystalSymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[][=?]\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
-syn match crystalSymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
-syn match crystalSymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*"
-syn match crystalSymbol "[]})\"':]\@<!:\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\="
-syn match crystalSymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
-syn match crystalSymbol "[]})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1
-syn match crystalSymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1
-syn match crystalSymbol "[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="hs=s+1,he=e-1
-syn region crystalSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@crystalStringSpecial fold
-
-syn match crystalBlockParameter "\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" contained
+syn match crystalBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
+
+syn match crystalTypeName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
+syn match crystalClassName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
+syn match crystalModuleName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
+syn match crystalStructName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
+syn match crystalLibName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
+syn match crystalEnumName "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
+syn match crystalConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@="
+syn match crystalClassVariable "@@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
+syn match crystalInstanceVariable "@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
+syn match crystalGlobalVariable "$\%(\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\|-.\)"
+syn match crystalFreshVariable "\%(\h\|[^\x00-\x7F]\)\@<!%\%(\h\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
+syn match crystalSymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[][=?]\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
+syn match crystalSymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
+syn match crystalSymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*"
+syn match crystalSymbol "[]})\"':]\@<!:\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\="
+syn match crystalSymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
+syn match crystalSymbol "[]})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1
+syn match crystalSymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1
+syn match crystalSymbol "[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="hs=s+1,he=e-1
+
+SynFold ':' syn region crystalSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@crystalStringSpecial
+
+syn match crystalBlockParameter "\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" contained
syn region crystalBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=crystalBlockParameter
-syn match crystalInvalidVariable "$[^ %A-Za-z_-]"
+syn match crystalInvalidVariable "$[^ %A-Za-z_-]"
syn match crystalPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]#
-syn match crystalPredefinedVariable "$\d\+" display
-syn match crystalPredefinedVariable "$_\>" display
-syn match crystalPredefinedVariable "$-[0FIKadilpvw]\>" display
-syn match crystalPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
+syn match crystalPredefinedVariable "$\d\+" display
+syn match crystalPredefinedVariable "$_\>" display
+syn match crystalPredefinedVariable "$-[0FIKadilpvw]\>" display
+syn match crystalPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
syn match crystalPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
syn match crystalPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
syn match crystalPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!"
@@ -120,77 +174,82 @@ syn match crystalPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(STDERR\
syn match crystalPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(crystal_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!"
" Normal Regular Expression
-syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|ifdef\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial fold
-syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=/]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial fold
+SynFold '/' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|ifdef\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[imx]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial
+SynFold '/' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=/]\@!" end="/[imx]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial
" Generalized Regular Expression
-syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@crystalRegexpSpecial fold
-syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@crystalRegexpSpecial fold
-syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@crystalRegexpSpecial,crystalNestedAngleBrackets,crystalDelimEscape fold
-syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@crystalRegexpSpecial fold
-syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@crystalRegexpSpecial fold
+SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r{" end="}[imx]*" skip="\\\\\|\\}" contains=@crystalRegexpSpecial
+SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r<" end=">[imx]*" skip="\\\\\|\\>" contains=@crystalRegexpSpecial,crystalNestedAngleBrackets,crystalDelimEscape
+SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r\[" end="\][imx]*" skip="\\\\\|\\\]" contains=@crystalRegexpSpecial
+SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r(" end=")[imx]*" skip="\\\\\|\\)" contains=@crystalRegexpSpecial
+SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r|" end="|[imx]*" skip="\\\\\|\\|" contains=@crystalRegexpSpecial
+
+" Normal String
+let s:spell_cluster = exists('crystal_spellcheck_strings') ? ',@Spell' : ''
+let s:fold_arg = s:foldable('string') ? ' fold' : ''
+exe 'syn region crystalString matchgroup=crystalStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@crystalStringSpecial' . s:spell_cluster . s:fold_arg
+unlet s:spell_cluster s:fold_arg
-" Normal String and Shell Command Output
-syn region crystalString matchgroup=crystalStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@crystalStringSpecial,@Spell fold
-syn region crystalString matchgroup=crystalStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@crystalStringSpecial fold
+" Shell Command Output
+SynFold 'string' syn region crystalString matchgroup=crystalStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@crystalStringSpecial
" Character
syn match crystalCharLiteral "'\%([^\\]\|\\[abefnrstv'\\]\|\\\o\{1,3}\|\\x\x\{1,2}\|\\u\x\{4}\)'" contains=crystalStringEscape display
" Generalized Single Quoted String, Symbol and Array of Strings
-syn region crystalString matchgroup=crystalStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
-syn region crystalString matchgroup=crystalStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=crystalNestedCurlyBraces,crystalDelimEscape
-syn region crystalString matchgroup=crystalStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=crystalNestedAngleBrackets,crystalDelimEscape
-syn region crystalString matchgroup=crystalStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=crystalNestedSquareBrackets,crystalDelimEscape
-syn region crystalString matchgroup=crystalStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=crystalNestedParentheses,crystalDelimEscape
-syn region crystalString matchgroup=crystalStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold
-syn region crystalSymbol matchgroup=crystalSymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1" skip="\\\\\|\\\z1" fold
-syn region crystalSymbol matchgroup=crystalSymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=crystalNestedCurlyBraces,crystalDelimEscape
-syn region crystalSymbol matchgroup=crystalSymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=crystalNestedAngleBrackets,crystalDelimEscape
-syn region crystalSymbol matchgroup=crystalSymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=crystalNestedSquareBrackets,crystalDelimEscape
-syn region crystalSymbol matchgroup=crystalSymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=crystalNestedParentheses,crystalDelimEscape
+syn region crystalNestedRawParentheses matchgroup=crystalString start="(" end=")" transparent contained
+syn region crystalNestedRawCurlyBraces matchgroup=crystalString start="{" end="}" transparent contained
+syn region crystalNestedRawAngleBrackets matchgroup=crystalString start="<" end=">" transparent contained
+syn region crystalNestedRawSquareBrackets matchgroup=crystalString start="\[" end="\]" transparent contained
+
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%q(" end=")" contains=crystalNestedRawParentheses
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%q{" end="}" contains=crystalNestedRawCurlyBraces
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%q<" end=">" contains=crystalNestedRawAngleBrackets
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%q\[" end="\]" contains=crystalNestedRawSquareBrackets
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%q|" end="|"
+
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[wi](" end=")" skip="\\\\\|\\)" contains=crystalNestedParentheses,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[wi]{" end="}" skip="\\\\\|\\}" contains=crystalNestedCurlyBraces,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[wi]<" end=">" skip="\\\\\|\\>" contains=crystalNestedAngleBrackets,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[wi]\[" end="\]" skip="\\\\\|\\\]" contains=crystalNestedSquareBrackets,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[wi]|" end="|" skip="\\\\\|\\|" contains=crystalDelimEscape
" Generalized Double Quoted String and Array of Strings and Shell Command Output
" Note: %= is not matched here as the beginning of a double quoted string
-syn region crystalString matchgroup=crystalStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@crystalStringSpecial fold
-syn region crystalString matchgroup=crystalStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@crystalStringSpecial fold
-syn region crystalString matchgroup=crystalStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@crystalStringSpecial,crystalNestedCurlyBraces,crystalDelimEscape fold
-syn region crystalString matchgroup=crystalStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@crystalStringSpecial,crystalNestedAngleBrackets,crystalDelimEscape fold
-syn region crystalString matchgroup=crystalStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@crystalStringSpecial,crystalNestedSquareBrackets,crystalDelimEscape fold
-syn region crystalString matchgroup=crystalStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@crystalStringSpecial,crystalNestedParentheses,crystalDelimEscape fold
-syn region crystalString matchgroup=crystalStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@crystalStringSpecial fold
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[Qx]\=(" end=")" skip="\\\\\|\\)" contains=@crystalStringSpecial,crystalNestedParentheses,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[Qx]\={" end="}" skip="\\\\\|\\}" contains=@crystalStringSpecial,crystalNestedCurlyBraces,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[Qx]\=<" end=">" skip="\\\\\|\\>" contains=@crystalStringSpecial,crystalNestedAngleBrackets,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[Qx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@crystalStringSpecial,crystalNestedSquareBrackets,crystalDelimEscape
+SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[Qx]\=|" end="|" skip="\\\\\|\\|" contains=@crystalStringSpecial,crystalDelimEscape
" Here Document
-syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@crystalNotTop
+syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@crystalNotTop
syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@crystalNotTop
syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@crystalNotTop
syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@crystalNotTop
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial fold keepend
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial fold keepend
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc fold keepend
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial fold keepend
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial keepend
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial keepend
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc keepend
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial keepend
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial fold keepend
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial fold keepend
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart fold keepend
-syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial fold keepend
-
-if exists('g:main_syntax') && g:main_syntax ==# 'ecrystal'
- let b:crystal_no_expensive = 1
-end
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial keepend
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial keepend
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart keepend
+SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial keepend
+" Module, Class, Method, and Alias Declarations
syn match crystalAliasDeclaration "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable nextgroup=crystalAliasDeclaration2 skipwhite
syn match crystalAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable
-syn match crystalMethodDeclaration "[^[:space:];#(]\+" contained contains=crystalConstant,crystalFunction,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable
-syn match crystalFunctionDeclaration "[^[:space:];#(=]\+" contained contains=crystalFunction
-syn match crystalTypeDeclaration "[^[:space:];#=]\+" contained contains=crystalTypeName
-syn match crystalClassDeclaration "[^[:space:];#<]\+" contained contains=crystalClassName,crystalOperator
-syn match crystalModuleDeclaration "[^[:space:];#]\+" contained contains=crystalModuleName,crystalOperator
-syn match crystalStructDeclaration "[^[:space:];#<]\+" contained contains=crystalStructName,crystalOperator
-syn match crystalLibDeclaration "[^[:space:];#]\+" contained contains=crystalLibName,crystalOperator
-syn match crystalMacroDeclaration "[^[:space:];#(]\+" contained contains=crystalFunction
-syn match crystalEnumDeclaration "[^[:space:];#<\"]\+" contained contains=crystalEnumName
+syn match crystalMethodDeclaration "[^[:space:];#(]\+" contained contains=crystalConstant,crystalFunction,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable
+syn match crystalFunctionDeclaration "[^[:space:];#(=]\+" contained contains=crystalFunction
+syn match crystalTypeDeclaration "[^[:space:];#=]\+" contained contains=crystalTypeName
+syn match crystalClassDeclaration "[^[:space:];#<]\+" contained contains=crystalClassName,crystalOperator
+syn match crystalModuleDeclaration "[^[:space:];#]\+" contained contains=crystalModuleName,crystalOperator
+syn match crystalStructDeclaration "[^[:space:];#<]\+" contained contains=crystalStructName,crystalOperator
+syn match crystalLibDeclaration "[^[:space:];#]\+" contained contains=crystalLibName,crystalOperator
+syn match crystalMacroDeclaration "[^[:space:];#(]\+" contained contains=crystalFunction
+syn match crystalEnumDeclaration "[^[:space:];#<\"]\+" contained contains=crystalEnumName
syn match crystalFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=crystalMethodDeclaration,crystalFunctionDeclaration
syn match crystalFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=crystalAliasDeclaration,crystalAliasDeclaration2
syn match crystalFunction "\%([[:space:].]\|^\)\@<=\%(\[\][=?]\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=crystalAliasDeclaration,crystalAliasDeclaration2,crystalMethodDeclaration,crystalFunctionDeclaration
@@ -200,59 +259,61 @@ syn cluster crystalDeclaration contains=crystalAliasDeclaration,crystalAliasDecl
" Keywords
" Note: the following keywords have already been defined:
" begin case class def do end for if module unless until while
-syn match crystalControl "\<\%(break\|in\|next\|rescue\|return\)\>[?!]\@!"
+syn match crystalControl "\<\%(break\|in\|next\|rescue\|return\)\>[?!]\@!"
syn match crystalOperator "\<defined?" display
-syn match crystalKeyword "\<\%(super\|previous_def\|yield\|of\|with\|uninitialized\|union\)\>[?!]\@!"
-syn match crystalBoolean "\<\%(true\|false\)\>[?!]\@!"
+syn match crystalKeyword "\<\%(super\|previous_def\|yield\|of\|with\|uninitialized\|union\)\>[?!]\@!"
+syn match crystalBoolean "\<\%(true\|false\)\>[?!]\@!"
syn match crystalPseudoVariable "\<\%(nil\|self\|__DIR__\|__FILE__\|__LINE__\|__END_LINE__\)\>[?!]\@!" " TODO: reorganise
" Expensive Mode - match 'end' with the appropriate opening keyword for syntax
" based folding and special highlighting of module/class/method definitions
if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
- syn match crystalDefine "\<alias\>" nextgroup=crystalAliasDeclaration skipwhite skipnl
+ syn match crystalDefine "\<alias\>" nextgroup=crystalAliasDeclaration skipwhite skipnl
syn match crystalDefine "\<def\>" nextgroup=crystalMethodDeclaration skipwhite skipnl
syn match crystalDefine "\<fun\>" nextgroup=crystalFunctionDeclaration skipwhite skipnl
- syn match crystalDefine "\<undef\>" nextgroup=crystalFunction skipwhite skipnl
+ syn match crystalDefine "\<undef\>" nextgroup=crystalFunction skipwhite skipnl
syn match crystalDefine "\<\%(type\|alias\)\>\%(\s*\h\w*\s*=\)\@=" nextgroup=crystalTypeDeclaration skipwhite skipnl
- syn match crystalClass "\<class\>" nextgroup=crystalClassDeclaration skipwhite skipnl
+ syn match crystalClass "\<class\>" nextgroup=crystalClassDeclaration skipwhite skipnl
syn match crystalModule "\<module\>" nextgroup=crystalModuleDeclaration skipwhite skipnl
syn match crystalStruct "\<struct\>" nextgroup=crystalStructDeclaration skipwhite skipnl
- syn match crystalLib "\<lib\>" nextgroup=crystalLibDeclaration skipwhite skipnl
- syn match crystalMacro "\<macro\>" nextgroup=crystalMacroDeclaration skipwhite skipnl
- syn match crystalEnum "\<enum\>" nextgroup=crystalEnumDeclaration skipwhite skipnl
+ syn match crystalLib "\<lib\>" nextgroup=crystalLibDeclaration skipwhite skipnl
+ syn match crystalMacro "\<macro\>" nextgroup=crystalMacroDeclaration skipwhite skipnl
+ syn match crystalEnum "\<enum\>" nextgroup=crystalEnumDeclaration skipwhite skipnl
- syn region crystalMethodBlock start="\<\%(def\|macro\)\>" matchgroup=crystalDefine end="\%(\<\%(def\|macro\)\_s\+\)\@<!\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalBlock start="\<class\>" matchgroup=crystalClass end="\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalBlock start="\<module\>" matchgroup=crystalModule end="\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalBlock start="\<struct\>" matchgroup=crystalStruct end="\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalBlock start="\<lib\>" matchgroup=crystalLib end="\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalBlock start="\<enum\>" matchgroup=crystalEnum end="\<end\>" contains=ALLBUT,@crystalNotTop fold
+ SynFold 'def' syn region crystalMethodBlock start="\<\%(def\|macro\)\>" matchgroup=crystalDefine end="\%(\<\%(def\|macro\)\_s\+\)\@<!\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'class' syn region crystalBlock start="\<class\>" matchgroup=crystalClass end="\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'module' syn region crystalBlock start="\<module\>" matchgroup=crystalModule end="\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'struct' syn region crystalBlock start="\<struct\>" matchgroup=crystalStruct end="\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'lib' syn region crystalBlock start="\<lib\>" matchgroup=crystalLib end="\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'enum' syn region crystalBlock start="\<enum\>" matchgroup=crystalEnum end="\<end\>" contains=ALLBUT,@crystalNotTop
" modifiers
- syn match crystalConditionalModifier "\<\%(if\|unless\|ifdef\)\>" display
- syn match crystalRepeatModifier "\<\%(while\|until\)\>" display
+ syn match crystalConditionalModifier "\<\%(if\|unless\|ifdef\)\>" display
+ syn match crystalRepeatModifier "\<\%(while\|until\)\>" display
+
+ SynFold 'do' syn region crystalDoBlock matchgroup=crystalControl start="\<do\>" end="\<end\>" contains=ALLBUT,@crystalNotTop
- syn region crystalDoBlock matchgroup=crystalControl start="\<do\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
" curly bracket block or hash literal
- syn region crystalCurlyBlock matchgroup=crystalCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@crystalNotTop fold
- syn region crystalArrayLiteral matchgroup=crystalArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@crystalNotTop fold
+ SynFold '{' syn region crystalCurlyBlock matchgroup=crystalCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@crystalNotTop
+ SynFold '[' syn region crystalArrayLiteral matchgroup=crystalArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@crystalNotTop
" statements without 'do'
- syn region crystalBlockExpression matchgroup=crystalControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalCaseExpression matchgroup=crystalConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalSelectExpression matchgroup=crystalConditional start="\<select\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
- syn region crystalConditionalExpression matchgroup=crystalConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|ifdef\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@crystalNotTop fold
+ SynFold 'begin' syn region crystalBlockExpression matchgroup=crystalControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'case' syn region crystalCaseExpression matchgroup=crystalConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'select' syn region crystalSelectExpression matchgroup=crystalConditional start="\<select\>" end="\<end\>" contains=ALLBUT,@crystalNotTop
+ SynFold 'if' syn region crystalConditionalExpression matchgroup=crystalConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|ifdef\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@crystalNotTop
- syn match crystalConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=crystalCaseExpression
- syn match crystalConditional "\<\%(when\|else\)\>[?!]\@!" contained containedin=crystalSelectExpression
+ syn match crystalConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=crystalCaseExpression
+ syn match crystalConditional "\<\%(when\|else\)\>[?!]\@!" contained containedin=crystalSelectExpression
syn match crystalConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=crystalConditionalExpression
- syn match crystalExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=crystalBlockExpression
+ syn match crystalExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=crystalBlockExpression
syn match crystalMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=crystalMethodBlock
" statements with optional 'do'
- syn region crystalOptionalDoLine matchgroup=crystalRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=crystalOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@crystalNotTop
- syn region crystalRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=crystalRepeat end="\<end\>" contains=ALLBUT,@crystalNotTop nextgroup=crystalOptionalDoLine fold
+ syn region crystalOptionalDoLine matchgroup=crystalRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=crystalOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@crystalNotTop
+
+ SynFold 'for' syn region crystalRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=crystalRepeat end="\<end\>" contains=ALLBUT,@crystalNotTop nextgroup=crystalOptionalDoLine
if !exists('g:crystal_minlines')
let g:crystal_minlines = 500
@@ -260,23 +321,24 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
exec 'syn sync minlines=' . g:crystal_minlines
else
+ " Non-expensive mode
syn match crystalControl "\<def\>[?!]\@!" nextgroup=crystalMethodDeclaration skipwhite skipnl
syn match crystalControl "\<fun\>[?!]\@!" nextgroup=crystalFunctionDeclaration skipwhite skipnl
syn match crystalControl "\<class\>[?!]\@!" nextgroup=crystalClassDeclaration skipwhite skipnl
syn match crystalControl "\<module\>[?!]\@!" nextgroup=crystalModuleDeclaration skipwhite skipnl
syn match crystalControl "\<struct\>[?!]\@!" nextgroup=crystalStructDeclaration skipwhite skipnl
syn match crystalControl "\<lib\>[?!]\@!" nextgroup=crystalLibDeclaration skipwhite skipnl
- syn match crystalControl "\<macro\>[?!]\@!" nextgroup=crystalMacroDeclaration skipwhite skipnl
- syn match crystalControl "\<enum\>[?!]\@!" nextgroup=crystalEnumDeclaration skipwhite skipnl
+ syn match crystalControl "\<macro\>[?!]\@!" nextgroup=crystalMacroDeclaration skipwhite skipnl
+ syn match crystalControl "\<enum\>[?!]\@!" nextgroup=crystalEnumDeclaration skipwhite skipnl
syn match crystalControl "\<\%(case\|begin\|do\|for\|if\|ifdef\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|end\)\>[?!]\@!"
syn match crystalKeyword "\<\%(alias\|undef\)\>[?!]\@!"
endif
" Link attribute
-syn region crystalLinkAttrRegion start="@\[" nextgroup=crystalLinkAttrRegionInner end="]" contains=crystalLinkAttr,crystalLinkAttrRegionInner transparent display oneline
+syn region crystalLinkAttrRegion start="@\[" nextgroup=crystalLinkAttrRegionInner end="]" contains=crystalLinkAttr,crystalLinkAttrRegionInner transparent display oneline
syn region crystalLinkAttrRegionInner start="\%(@\[\)\@<=" end="]\@=" contained contains=ALLBUT,@crystalNotTop transparent display oneline
-syn match crystalLinkAttr "@\[" contained containedin=crystalLinkAttrRegion display
-syn match crystalLinkAttr "]" contained containedin=crystalLinkAttrRegion display
+syn match crystalLinkAttr "@\[" contained containedin=crystalLinkAttrRegion display
+syn match crystalLinkAttr "]" contained containedin=crystalLinkAttrRegion display
" Special Methods
if !exists('g:crystal_no_special_methods')
@@ -294,110 +356,112 @@ if !exists('g:crystal_no_special_methods')
endif
" Macro
-syn region crystalMacroRegion start="{%" end="%}" contains=ALLBUT,@crystalNotTop transparent display oneline
-syn region crystalMacroRegion start="{{" end="}}" contains=ALLBUT,@crystalNotTop transparent display oneline
-syn match crystalMacro "\%({%\|%}\|{{\|}}\)" nextgroup=crystalMacroRegion skipwhite display
+" Note: This definition must be put after crystalNestedCurlyBraces to give higher priority
+syn region crystalMacroRegion matchgroup=crystalMacroDelim start="\\\={%" end="%}" oneline display contains=ALLBUT,@crystalNotTop containedin=ALL
+syn region crystalMacroRegion matchgroup=crystalMacroDelim start="\\\={{" end="}}" oneline display contains=ALLBUT,@crystalNotTop containedin=ALL
" Comments and Documentation
syn match crystalSharpBang "\%^#!.*" display
-syn keyword crystalTodo FIXME NOTE TODO OPTIMIZE XXX todo contained
+syn keyword crystalTodo FIXME NOTE TODO OPTIMIZE XXX todo contained
syn match crystalComment "#.*" contains=crystalSharpBang,crystalSpaceError,crystalTodo,@Spell
-if !exists('g:crystal_no_comment_fold')
- syn region crystalMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=crystalComment transparent fold keepend
-endif
+
+SynFold '#' syn region crystalMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=crystalComment transparent keepend
" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\|select\)\>" transparent contains=NONE
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|ifdef\|in\|module\|next\|nil\)\>" transparent contains=NONE
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(rescue\|return\|self\|super\|previous_def\|then\|true\)\>" transparent contains=NONE
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\|select\)\>" transparent contains=NONE
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|ifdef\|in\|module\|next\|nil\)\>" transparent contains=NONE
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(rescue\|return\|self\|super\|previous_def\|then\|true\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE
syn match crystalKeywordAsMethod "\<\%(if\|ifdef\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|caller\|exit\)\>" transparent contains=NONE
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fork\|include\|asm\)\>" transparent contains=NONE
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(loop\|private\|protected\)\>" transparent contains=NONE
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(require\|raise\)\>" transparent contains=NONE
-syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|\)\>" transparent contains=NONE
-
-hi def link crystalClass crystalDefine
-hi def link crystalModule crystalDefine
-hi def link crystalStruct crystalDefine
-hi def link crystalLib crystalDefine
-hi def link crystalMacro crystalDefine
-hi def link crystalEnum crystalDefine
-hi def link crystalMethodExceptional crystalDefine
-hi def link crystalDefine Define
-hi def link crystalFunction Function
-hi def link crystalConditional Conditional
-hi def link crystalConditionalModifier crystalConditional
-hi def link crystalExceptional crystalConditional
-hi def link crystalRepeat Repeat
-hi def link crystalRepeatModifier crystalRepeat
-hi def link crystalOptionalDo crystalRepeat
-hi def link crystalControl Statement
-hi def link crystalInclude Include
-hi def link crystalRecord Statement
-hi def link crystalInteger Number
-hi def link crystalASCIICode Character
-hi def link crystalFloat Float
-hi def link crystalBoolean Boolean
-hi def link crystalException Exception
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|caller\|exit\)\>" transparent contains=NONE
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fork\|include\|asm\)\>" transparent contains=NONE
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(loop\|private\|protected\)\>" transparent contains=NONE
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(require\|raise\)\>" transparent contains=NONE
+syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|\)\>" transparent contains=NONE
+
+hi def link crystalClass crystalDefine
+hi def link crystalModule crystalDefine
+hi def link crystalStruct crystalDefine
+hi def link crystalLib crystalDefine
+hi def link crystalEnum crystalDefine
+hi def link crystalMethodExceptional crystalDefine
+hi def link crystalDefine Define
+hi def link crystalFunction Function
+hi def link crystalConditional Conditional
+hi def link crystalConditionalModifier crystalConditional
+hi def link crystalExceptional crystalConditional
+hi def link crystalRepeat Repeat
+hi def link crystalRepeatModifier crystalRepeat
+hi def link crystalOptionalDo crystalRepeat
+hi def link crystalControl Statement
+hi def link crystalInclude Include
+hi def link crystalRecord Statement
+hi def link crystalInteger Number
+hi def link crystalASCIICode Character
+hi def link crystalFloat Float
+hi def link crystalBoolean Boolean
+hi def link crystalException Exception
if !exists('g:crystal_no_identifiers')
- hi def link crystalIdentifier Identifier
+ hi def link crystalIdentifier Identifier
else
- hi def link crystalIdentifier NONE
+ hi def link crystalIdentifier NONE
endif
-hi def link crystalClassVariable crystalIdentifier
-hi def link crystalConstant Type
-hi def link crystalTypeName crystalConstant
-hi def link crystalClassName crystalConstant
-hi def link crystalModuleName crystalConstant
-hi def link crystalStructName crystalConstant
-hi def link crystalLibName crystalConstant
-hi def link crystalEnumName crystalConstant
-hi def link crystalGlobalVariable crystalIdentifier
-hi def link crystalBlockParameter crystalIdentifier
-hi def link crystalInstanceVariable crystalIdentifier
-hi def link crystalFreshVariable crystalIdentifier
-hi def link crystalPredefinedIdentifier crystalIdentifier
-hi def link crystalPredefinedConstant crystalPredefinedIdentifier
-hi def link crystalPredefinedVariable crystalPredefinedIdentifier
-hi def link crystalSymbol Constant
-hi def link crystalKeyword Keyword
-hi def link crystalOperator Operator
-hi def link crystalAccess Statement
-hi def link crystalAttribute Statement
-hi def link crystalPseudoVariable Constant
-hi def link crystalCharLiteral Character
-hi def link crystalComment Comment
-hi def link crystalTodo Todo
-hi def link crystalStringEscape Special
-hi def link crystalInterpolationDelim Delimiter
-hi def link crystalNoInterpolation crystalString
-hi def link crystalSharpBang PreProc
-hi def link crystalRegexpDelimiter crystalStringDelimiter
-hi def link crystalSymbolDelimiter crystalStringDelimiter
-hi def link crystalStringDelimiter Delimiter
-hi def link crystalString String
-hi def link crystalHeredoc crystalString
-hi def link crystalRegexpEscape crystalRegexpSpecial
-hi def link crystalRegexpQuantifier crystalRegexpSpecial
-hi def link crystalRegexpAnchor crystalRegexpSpecial
-hi def link crystalRegexpDot crystalRegexpCharClass
-hi def link crystalRegexpCharClass crystalRegexpSpecial
-hi def link crystalRegexpSpecial Special
-hi def link crystalRegexpComment Comment
-hi def link crystalRegexp crystalString
-hi def link crystalMacro PreProc
-hi def link crystalLinkAttr crystalMacro
-hi def link crystalError Error
-hi def link crystalInvalidVariable crystalError
-hi def link crystalSpaceError crystalError
+hi def link crystalClassVariable crystalIdentifier
+hi def link crystalConstant Type
+hi def link crystalTypeName crystalConstant
+hi def link crystalClassName crystalConstant
+hi def link crystalModuleName crystalConstant
+hi def link crystalStructName crystalConstant
+hi def link crystalLibName crystalConstant
+hi def link crystalEnumName crystalConstant
+hi def link crystalGlobalVariable crystalIdentifier
+hi def link crystalBlockParameter crystalIdentifier
+hi def link crystalInstanceVariable crystalIdentifier
+hi def link crystalFreshVariable crystalIdentifier
+hi def link crystalPredefinedIdentifier crystalIdentifier
+hi def link crystalPredefinedConstant crystalPredefinedIdentifier
+hi def link crystalPredefinedVariable crystalPredefinedIdentifier
+hi def link crystalSymbol Constant
+hi def link crystalKeyword Keyword
+hi def link crystalOperator Operator
+hi def link crystalAccess Statement
+hi def link crystalAttribute Statement
+hi def link crystalPseudoVariable Constant
+hi def link crystalCharLiteral Character
+hi def link crystalComment Comment
+hi def link crystalTodo Todo
+hi def link crystalStringEscape Special
+hi def link crystalInterpolationDelim Delimiter
+hi def link crystalNoInterpolation crystalString
+hi def link crystalSharpBang PreProc
+hi def link crystalRegexpDelimiter crystalStringDelimiter
+hi def link crystalSymbolDelimiter crystalStringDelimiter
+hi def link crystalStringDelimiter Delimiter
+hi def link crystalString String
+hi def link crystalHeredoc crystalString
+hi def link crystalRegexpEscape crystalRegexpSpecial
+hi def link crystalRegexpQuantifier crystalRegexpSpecial
+hi def link crystalRegexpAnchor crystalRegexpSpecial
+hi def link crystalRegexpDot crystalRegexpCharClass
+hi def link crystalRegexpCharClass crystalRegexpSpecial
+hi def link crystalRegexpSpecial Special
+hi def link crystalRegexpComment Comment
+hi def link crystalRegexp crystalString
+hi def link crystalMacro PreProc
+hi def link crystalMacroDelim crystalMacro
+hi def link crystalLinkAttr crystalMacro
+hi def link crystalError Error
+hi def link crystalInvalidVariable crystalError
+hi def link crystalSpaceError crystalError
+hi def link crystalInvalidInteger crystalError
let b:current_syntax = 'crystal'
-" vim: nowrap sw=2 sts=2 ts=8 noet:
+delc SynFold
+
+" vim: nowrap sw=2 sts=2:
endif
diff --git a/syntax/elixir.vim b/syntax/elixir.vim
index dac6c181..054ddd3e 100644
--- a/syntax/elixir.vim
+++ b/syntax/elixir.vim
@@ -20,7 +20,7 @@ syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' contains=elixirUnusedVariable
-syn match elixirKeyword '\(\.\)\@<!\<\(for\|case\|when\|with\|cond\|if\|unless\|try\|receive\|after\|rescue\|catch\|else\|quote\|unquote\|super\|unquote_splicing\)\>:\@!'
+syn match elixirKeyword '\(\.\)\@<!\<\(for\|case\|when\|with\|cond\|if\|unless\|try\|receive\|after\|raise\|rescue\|catch\|else\|quote\|unquote\|super\|unquote_splicing\)\>:\@!'
syn keyword elixirInclude import require alias use
diff --git a/syntax/julia.vim b/syntax/julia.vim
index 433c6234..52711062 100644
--- a/syntax/julia.vim
+++ b/syntax/julia.vim
@@ -25,24 +25,6 @@ endif
scriptencoding utf-8
-if !exists("b:julia_syntax_version")
- let b:julia_syntax_version = get(g:, "default_julia_version", "current")
-endif
-if !exists("b:julia_syntax_highlight_deprecated")
- let b:julia_syntax_highlight_deprecated = get(g:, "julia_syntax_highlight_deprecated", 0)
-endif
-
-if b:julia_syntax_version =~? '\<\%(curr\%(ent\)\?\|release\|7\|0\.7\|10\|1.0\)\>'
- let b:julia_syntax_version = 10
-elseif b:julia_syntax_version =~? '\<\%(next\|devel\|11\|1\.1\)\>'
- let b:julia_syntax_version = 11
-elseif b:julia_syntax_version =~? '\<\%(prev\%(ious\)\?\|legacy\|6\|0\.6\)\>'
- let b:julia_syntax_version = 6
-else
- echohl WarningMsg | echomsg "Unrecognized or unsupported julia syntax version: " . b:julia_syntax_version | echohl None
- let b:julia_syntax_version = 10
-endif
-
let s:julia_spellcheck_strings = get(g:, "julia_spellcheck_strings", 0)
let s:julia_spellcheck_docstrings = get(g:, "julia_spellcheck_docstrings", 1)
let s:julia_spellcheck_comments = get(g:, "julia_spellcheck_comments", 1)
@@ -96,24 +78,10 @@ syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems
syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaInfixKeyword,juliaRepKeyword,juliaTypedef
-syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
-if b:julia_syntax_version == 6
- syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems06
-else
- syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems06,@juliaTypesItems1011
-endif
-syntax cluster juliaTypesItemsAll contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
-syntax cluster juliaTypesItems06 contains=juliaBaseTypeNum06,juliaBaseTypeRange06,juliaBaseTypeDict06,juliaBaseTypeSet06
-syntax cluster juliaTypesItems1011 contains=juliaBaseTypeBasic1011,juliaBaseTypeNum1011,juliaBaseTypeError1011,juliaBaseTypeIter1011,juliaBaseTypeRange1011,juliaBaseTypeArray1011,juliaBaseTypeDict1011,juliaBaseTypeSet1011,juliaBaseTypeC1011,juliaBaseTypeDisplay1011,juliaBaseTypeIO1011,juliaBaseTypeString1011
-
-syntax cluster juliaConstItemsAll contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric
-syntax cluster juliaConstItems06 contains=juliaConstNum06,juliaConstIO06
-syntax cluster juliaConstItems1011 contains=juliaConstGeneric1011,juliaPossibleEuler,juliaConstEnv1011,juliaConstIO1011
-if b:julia_syntax_version == 6
- syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems06
-else
- syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems06,@juliaConstItems1011
-endif
+syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
+syntax cluster juliaTypesItems contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
+
+syntax cluster juliaConstItems contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric,juliaConstIO,juliaPossibleEuler
syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
@@ -124,18 +92,18 @@ syntax cluster juliaOperatorItems contains=juliaOperator,juliaRangeOperator,juli
syntax cluster juliaCommentItems contains=juliaCommentL,juliaCommentM
syntax cluster juliaErrorItems contains=juliaErrorPar,juliaErrorEnd,juliaErrorElse,juliaErrorCatch,juliaErrorFinally
-syntax cluster juliaSpellcheckStrings contains=@spell
+syntax cluster juliaSpellcheckStrings contains=@spell
syntax cluster juliaSpellcheckDocStrings contains=@spell
-syntax cluster juliaSpellcheckComments contains=@spell
+syntax cluster juliaSpellcheckComments contains=@spell
if !s:julia_spellcheck_docstrings
- syntax cluster juliaSpellcheckDocStrings remove=@spell
+ syntax cluster juliaSpellcheckDocStrings remove=@spell
endif
if !s:julia_spellcheck_strings
- syntax cluster juliaSpellcheckStrings remove=@spell
+ syntax cluster juliaSpellcheckStrings remove=@spell
endif
if !s:julia_spellcheck_comments
- syntax cluster juliaSpellcheckComments remove=@spell
+ syntax cluster juliaSpellcheckComments remove=@spell
endif
syntax match juliaSemicolon display ";"
@@ -172,10 +140,6 @@ exec 'syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="'.s:nodot
exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<function\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<macro\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<quote\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
-if b:julia_syntax_version <= 10
- exec 'syntax region juliaTypeBlock matchgroup=juliaBlKeyword06 start="'.s:nodot.'\<type\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
- exec 'syntax region juliaImmutableBlock matchgroup=juliaBlKeyword06 start="'.s:nodot.'\<immutable\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
-endif
exec 'syntax region juliaStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<mutable struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaLetBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<let\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
@@ -192,64 +156,43 @@ exec 'syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="'.s:no
exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\<for\>" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor'
exec 'syntax match juliaComprehensionIf contained "'.s:nodot.'\<if\>"'
-exec 'syntax match juliaOuter contained "\<outer\ze\s\+' . s:idregex . '\>"'
-
-syntax match juliaBaseTypeBasic display "\<\%(Tuple\|NTuple\|Symbol\|Function\|Union\%(All\)\?\|Type\%(Name\|Var\)\?\|Any\|ANY\|Vararg\|Ptr\|Exception\|Module\|Expr\|DataType\|\%(LineNumber\|Quote\)Node\|\%(Weak\|Global\)\?Ref\|Method\|Pair\|Val\)\>"
-syntax match juliaBaseTypeBasic06 display "\<\%(Void\|\%(Label\|Goto\)Node\|Associative\|MethodTable\|Nullable\|TypeMap\%(Level\|Entry\)\|CodeInfo\)\>"
-syntax match juliaBaseTypeBasic1011 display "\<\%(Nothing\|Some\|Missing\|NamedTuple\)\>"
-syntax match juliaBaseTypeNum display "\<\%(U\?Int\%(8\|16\|32\|64\|128\)\?\|Float\%(16\|32\|64\)\|Complex\|Bool\|Char\|Number\|Signed\|Unsigned\|Integer\|AbstractFloat\|Real\|Rational\|Irrational\|Enum\|BigInt\|BigFloat\|MathConst\)\>"
-syntax match juliaBaseTypeNum06 display "\<Complex\%(32\|64\|128\)\>"
-syntax match juliaBaseTypeNum1011 display "\<\%(AbstractIrrational\|ComplexF\%(16\|32\|64\)\)\>"
-syntax match juliaBaseTypeC display "\<\%(FileOffset\|C\%(u\?\%(char\|short\|int\|long\(long\)\?\|w\?string\)\|float\|double\|\%(ptrdiff\|s\?size\|wchar\|off\|u\?intmax\)_t\)\)\>"
-syntax match juliaBaseTypeC1011 display "\<Cvoid\>"
-syntax match juliaBaseTypeError display "\<\%(\%(Bounds\|Divide\|Domain\|\%(Stack\)\?Overflow\|EOF\|Undef\%(Ref\|Var\)\|System\|Type\|Parse\|Argument\|Key\|Load\|Method\|Inexact\|OutOfMemory\|Init\|Assertion\|Unicode\|ReadOnlyMemory\)Error\|\%(Interrupt\|Error\|ProcessExited\|Captured\|Composite\|InvalidState\|Null\|Remote\)Exception\|DimensionMismatch\|SegmentationFault\)\>"
-syntax match juliaBaseTypeError1011 display "\<\%(StringIndexError\|MissingException\)\>"
-syntax match juliaBaseTypeIter display "\<\%(EachLine\|Enumerate\|Cartesian\%(Index\|Range\)\|LinSpace\)\>"
-syntax match juliaBaseTypeIter1011 display "\<CartesianIndices\>"
-syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abstract\)\?String\>"
-syntax match juliaBaseTypeString1011 display "\<SubstitutionString\>"
-syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|SparseVector\|VecElement\|Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|RowVector\)\>"
-syntax match juliaBaseTypeArray1011 display "\<\%(Broadcasted\|Adjoint\|Transpose\|LinearIndices\)\>"
-syntax match juliaBaseTypeDict display "\<\%(WeakKey\)\?Dict\>"
-syntax match juliaBaseTypeDict06 display "\<ObjectIdDict\>"
-syntax match juliaBaseTypeDict1011 display "\<IdDict\>"
-syntax match juliaBaseTypeSet display "\<\%(Set\|AbstractSet\)\>"
-syntax match juliaBaseTypeSet06 display "\<IntSet\>"
-syntax match juliaBaseTypeSet1011 display "\<\%(BitSet\|AbstractDict\)\>"
-syntax match juliaBaseTypeIO display "\<\%(IO\%(Stream\|Buffer\|Context\)\?\|RawFD\|StatStruct\|FileMonitor\|PollingFileWatcher\|Timer\|Base64\%(Decode\|Encode\)Pipe\|\%(UDP\|TCP\)Socket\|\%(Abstract\)\?Channel\|BufferStream\|ReentrantLock\)\>"
-syntax match juliaBaseTypeIO1011 display "\<GenericIOBuffer\>"
+exec 'syntax match juliaOuter contained "\<outer\ze\s\+' . s:idregex . '\>"'
+
+syntax match juliaBaseTypeBasic display "\<\%(\%(N\|Named\)\?Tuple\|Symbol\|Function\|Union\%(All\)\?\|Type\%(Name\|Var\)\?\|Any\|ANY\|Vararg\|Ptr\|Exception\|Module\|Expr\|DataType\|\%(LineNumber\|Quote\)Node\|\%(Weak\|Global\)\?Ref\|Method\|Pair\|Val\|Nothing\|Some\|Missing\)\>"
+syntax match juliaBaseTypeNum display "\<\%(U\?Int\%(8\|16\|32\|64\|128\)\?\|Float\%(16\|32\|64\)\|Complex\|Bool\|Char\|Number\|Signed\|Unsigned\|Integer\|AbstractFloat\|Real\|Rational\|\%(Abstract\)\?Irrational\|Enum\|BigInt\|BigFloat\|MathConst\|ComplexF\%(16\|32\|64\)\)\>"
+syntax match juliaBaseTypeC display "\<\%(FileOffset\|C\%(u\?\%(char\|short\|int\|long\(long\)\?\|w\?string\)\|float\|double\|\%(ptrdiff\|s\?size\|wchar\|off\|u\?intmax\)_t\|void\)\)\>"
+syntax match juliaBaseTypeError display "\<\%(\%(Bounds\|Divide\|Domain\|\%(Stack\)\?Overflow\|EOF\|Undef\%(Ref\|Var\)\|System\|Type\|Parse\|Argument\|Key\|Load\|Method\|Inexact\|OutOfMemory\|Init\|Assertion\|ReadOnlyMemory\|StringIndex\)Error\|\%(Interrupt\|Error\|ProcessExited\|Captured\|Composite\|InvalidState\|Missing\|\%(Process\|Task\)Failed\)Exception\|DimensionMismatch\|SegmentationFault\)\>"
+syntax match juliaBaseTypeIter display "\<\%(EachLine\|Enumerate\|Cartesian\%(Index\|Range\)\|LinSpace\|CartesianIndices\)\>"
+syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abstract\|Substitution\)\?String\>"
+syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|\%(Sparse\|Row\)Vector\|VecElement\|Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|Broadcasted\|Adjoint\|Transpose\|LinearIndices\)\>"
+syntax match juliaBaseTypeDict display "\<\%(WeakKey\|Id\|Abstract\)\?Dict\>"
+syntax match juliaBaseTypeSet display "\<\%(\%(Abstract\|Bit\)\?Set\)\>"
+syntax match juliaBaseTypeIO display "\<\%(IO\%(Stream\|Buffer\|Context\)\?\|RawFD\|StatStruct\|FileMonitor\|PollingFileWatcher\|Timer\|Base64\%(Decode\|Encode\)Pipe\|\%(UDP\|TCP\)Socket\|\%(Abstract\)\?Channel\|BufferStream\|ReentrantLock\|GenericIOBuffer\)\>"
syntax match juliaBaseTypeProcess display "\<\%(Pipe\|Cmd\|PipeBuffer\)\>"
-syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\|ExponentialBackOff\|StepRangeLen\)\>"
-syntax match juliaBaseTypeRange06 display "\<Range\>"
-syntax match juliaBaseTypeRange1011 display "\<\(Abstract\|Lin\)Range\>"
+syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Abstract\|Lin\|Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\|ExponentialBackOff\|StepRangeLen\)\>"
syntax match juliaBaseTypeRegex display "\<Regex\%(Match\)\?\>"
syntax match juliaBaseTypeFact display "\<\%(Factorization\|BunchKaufman\|\%(Cholesky\|QR\)\%(Pivoted\)\?\|\%(Generalized\)\?\%(Eigen\|SVD\|Schur\)\|Hessenberg\|LDLt\|LQ\|LU\)\>"
syntax match juliaBaseTypeSort display "\<\%(Insertion\|\(Partial\)\?Quick\|Merge\)Sort\>"
syntax match juliaBaseTypeRound display "\<Round\%(ingMode\|FromZero\|Down\|Nearest\%(Ties\%(Away\|Up\)\)\?\|ToZero\|Up\)\>"
syntax match juliaBaseTypeSpecial display "\<\%(LocalProcess\|ClusterManager\)\>"
syntax match juliaBaseTypeRandom display "\<\%(AbstractRNG\|MersenneTwister\|RandomDevice\)\>"
-syntax match juliaBaseTypeDisplay display "\<\%(Text\(Display\)\?\|Display\|MIME\|HTML\)\>"
-syntax match juliaBaseTypeDisplay1011 display "\<AbstractDisplay\>"
+syntax match juliaBaseTypeDisplay display "\<\%(Text\(Display\)\?\|\%(Abstract\)\?Display\|MIME\|HTML\)\>"
syntax match juliaBaseTypeTime display "\<\%(Date\%(Time\)\?\|DateFormat\)\>"
syntax match juliaBaseTypeOther display "\<\%(RemoteRef\|Task\|Condition\|VersionNumber\|IPv[46]\|SerializationState\|WorkerConfig\|Future\|RemoteChannel\|IPAddr\|Stack\%(Trace\|Frame\)\|\(Caching\|Worker\)Pool\|AbstractSerializer\)\>"
syntax match juliaConstNum display "\%(\<\%(\%(NaN\|Inf\)\%(16\|32\|64\)\?\|pi\|π\)\>\)"
-syntax match juliaConstNum06 display "\%(\<\%(eu\?\|eulergamma\|γ\|catalan\|φ\|golden\)\>\)"
" Note: recognition of ℯ, which Vim does not consider a valid identifier, is
" complicated. We detect possible uses by just looking for the character (for
" performance) and then check that it's actually used by its own.
" (This also tries to detect preceding number constants; it does so in a crude
" way.)
syntax match juliaPossibleEuler "ℯ" contains=juliaEuler
-exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . ']\|' . s:operators . '\)\%([.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze\%($\|[' . s:nonidS_chars . ']\|' . s:operators . '\)"'
+exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . ']\|' . s:operators . '\)\%([.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze\%($\|[' . s:nonidS_chars . ']\|' . s:operators . '\)"'
syntax match juliaConstBool display "\<\%(true\|false\)\>"
-syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|OS_NAME\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|JULIA_HOME\|PROGRAM_FILE\)\>"
-syntax match juliaConstEnv1011 display "\<DEPOT_PATH\>"
-syntax match juliaConstIO06 display "\<\%(STD\%(OUT\|IN\|ERR\)\|DevNull\)\>"
-syntax match juliaConstIO1011 display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
-syntax match juliaConstC display "\<\%(WORD_SIZE\|C_NULL\)\>"
-syntax match juliaConstGeneric display "\<\%(nothing\|Main\)\>"
-syntax match juliaConstGeneric1011 display "\<\%(undef\|missing\)\>"
+syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|PROGRAM_FILE\|DEPOT_PATH\)\>"
+syntax match juliaConstIO display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
+syntax match juliaConstC display "\<\%(C_NULL\)\>"
+syntax match juliaConstGeneric display "\<\%(nothing\|Main\|undef\|missing\)\>"
syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro
@@ -301,7 +244,7 @@ syntax match juliaComplexUnit display contained "\<im\>"
exec 'syntax match juliaOperator "' . s:operators . '"'
syntax match juliaRangeOperator display ":"
-exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|^\s*:\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol'
+exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol'
let s:interp_dollar = '\([' . s:nonidS_chars . s:uniop_chars . s:binop_chars . '!?]\|^\)\@'.s:d(1).'<=\$'
@@ -369,7 +312,7 @@ syntax match juliaPrintfFmt display contained "\\%%"hs=s+1
" this is used to restrict the search for Symbols to when colons appear at all
" (for performance reasons)
-syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon
+syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon
let s:quotable = '\%(' . s:idregex . '\|?\|' . s:operators . '\|' . s:float_regex . '\|' . s:int_regex . '\)'
let s:quoting_colon = '\%(\%(^\s*\|\s\{6,\}\|[' . s:nonid_chars . s:uniop_chars . s:binop_chars . '?]\s*\)\@'.s:d(6).'<=\|\%(\<\%(return\|if\|else\%(if\)\?\|while\|try\|begin\)\s*\)\@'.s:d(9).'<=\)\zs:'
@@ -405,7 +348,7 @@ syntax keyword juliaTodo contained TODO FIXME XXX
" :hi link juliaParDelim Delimiter
hi def link juliaParDelim juliaNone
hi def link juliaSemicolon juliaNone
-hi def link juliaComma juliaNone
+hi def link juliaComma juliaNone
hi def link juliaColon juliaOperator
@@ -414,12 +357,11 @@ hi def link juliaKeyword Keyword
hi def link juliaInfixKeyword Keyword
hi def link juliaRepKeyword Keyword
hi def link juliaBlKeyword Keyword
-exec 'hi! def link juliaBlKeyword06 ' . (b:julia_syntax_version == 6 ? 'Keyword' : b:julia_syntax_version == 10 ? 'juliaDeprecated' : 'NONE')
hi def link juliaConditional Conditional
hi def link juliaRepeat Repeat
hi def link juliaException Exception
hi def link juliaTypedef Keyword
-exec 'hi! def link juliaOuter ' . (b:julia_syntax_version >= 10 ? 'Keyword' : 'NONE')
+hi def link juliaOuter Keyword
hi def link juliaBaseTypeBasic Type
hi def link juliaBaseTypeNum Type
hi def link juliaBaseTypeC Type
@@ -441,24 +383,13 @@ hi def link juliaBaseTypeRandom Type
hi def link juliaBaseTypeDisplay Type
hi def link juliaBaseTypeTime Type
hi def link juliaBaseTypeOther Type
-for t in ["Num", "Range", "Dict", "Set"]
- let h = b:julia_syntax_version == 6 ? "Type" : b:julia_syntax_version == 10 ? "juliaDeprecated" : "NONE"
- exec "hi! def link juliaBaseType" . t . "06 " . h
-endfor
-for t in ["Range", "Dict", "Set", "Basic", "C", "Array", "Iter", "Display", "IO", "Num", "Error", "String"]
- let h = b:julia_syntax_version >= 10 ? "Type" : "NONE"
- exec "hi! def link juliaBaseType" . t . "1011 " . h
-endfor
" NOTE: deprecated constants are not highlighted as such. For once,
" one can still legitimately use them by importing Base.MathConstants.
" Plus, one-letter variables like `e` and `γ` can be used with other
" meanings.
hi def link juliaConstNum Constant
-let h = b:julia_syntax_version == 6 ? "Constant" : "NONE"
-exec "hi! def link juliaConstNum06 " . h
-let h = b:julia_syntax_version >= 10 ? "Constant" : "NONE"
-exec "hi! def link juliaEuler " . h
+hi def link juliaEuler Constant
hi def link juliaConstEnv Constant
hi def link juliaConstC Constant
@@ -466,13 +397,7 @@ hi def link juliaConstLimits Constant
hi def link juliaConstGeneric Constant
hi def link juliaRangeEnd Constant
hi def link juliaConstBool Boolean
-
-for t in ["Generic", "IO", "Env"]
- let h = b:julia_syntax_version >= 10 ? "Constant" : "NONE"
- exec "hi! def link juliaConst" . t . "1011 " . h
-endfor
-let h = b:julia_syntax_version == 6 ? "Constant" : b:julia_syntax_version == 10 ? "juliaDeprecated" : "NONE"
-exec "hi! def link juliaConstIO06 " . h
+hi def link juliaConstIO Boolean
hi def link juliaComprehensionFor Keyword
hi def link juliaComprehensionIf Keyword
@@ -485,7 +410,7 @@ hi def link juliaSymbolS Identifier
hi def link juliaQParDelim Identifier
hi def link juliaQuotedQMarkPar Identifier
hi def link juliaQuotedQMarkParS Identifier
-hi def link juliaQuotedQMark juliaOperatorHL
+hi def link juliaQuotedQMark juliaOperatorHL
hi def link juliaNumber Number
hi def link juliaFloat Float
@@ -521,7 +446,7 @@ hi def link juliaHexEscapeChar SpecialChar
hi def link juliaUniCharSmall SpecialChar
hi def link juliaUniCharLarge SpecialChar
hi def link juliaDoubleBackslash SpecialChar
-hi def link juliaEscapedQuote SpecialChar
+hi def link juliaEscapedQuote SpecialChar
hi def link juliaPrintfFmt SpecialChar
@@ -550,12 +475,6 @@ hi def link juliaErrorPrintfFmt juliaError
hi def link juliaError Error
-if b:julia_syntax_highlight_deprecated == 1
- hi! def link juliaDeprecated Todo
-else
- hi! def link juliaDeprecated NONE
-end
-
syntax sync fromstart
let b:current_syntax = "julia"
diff --git a/syntax/llvm.vim b/syntax/llvm.vim
index 31746336..ea9796f1 100644
--- a/syntax/llvm.vim
+++ b/syntax/llvm.vim
@@ -25,10 +25,10 @@ syn match llvmType /\<i\d\+\>/
" The true and false tokens can be used for comparison opcodes, but it's
" much more common for these tokens to be used for boolean constants.
syn keyword llvmStatement add addrspacecast alloca and arcp ashr atomicrmw
-syn keyword llvmStatement bitcast br catchpad catchswitch catchret call
+syn keyword llvmStatement bitcast br catchpad catchswitch catchret call callbr
syn keyword llvmStatement cleanuppad cleanupret cmpxchg eq exact extractelement
syn keyword llvmStatement extractvalue fadd fast fcmp fdiv fence fmul fpext
-syn keyword llvmStatement fptosi fptoui fptrunc free frem fsub getelementptr
+syn keyword llvmStatement fptosi fptoui fptrunc free frem fsub fneg getelementptr
syn keyword llvmStatement icmp inbounds indirectbr insertelement insertvalue
syn keyword llvmStatement inttoptr invoke landingpad load lshr malloc max min
syn keyword llvmStatement mul nand ne ninf nnan nsw nsz nuw oeq oge ogt ole
@@ -150,6 +150,7 @@ syn keyword llvmKeyword
\ sspstrong
\ strictfp
\ swiftcc
+ \ swiftself
\ tail
\ target
\ thread_local
diff --git a/syntax/mma.vim b/syntax/mma.vim
index faae8279..d668ab32 100644
--- a/syntax/mma.vim
+++ b/syntax/mma.vim
@@ -1,18 +1,10 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1
-" Vim syntax file
-" Language: Mathematica
-" Maintainer: Voldikss <dyzplus@gmail.com>
-" Last Change: 2019 Jan 23 by Voldikss
-" Source: https://github.com/voldikss/vim-mma/syntax/mma.vim
-" Credits:
-" Arnoud Buzing: https://github.com/arnoudbuzing
-" Rsmenon: https://github.com/rsmenon
+"Vim syntax file
+" Language: Mathematica
+" Maintainer: R. Menon <rsmenon@icloud.com>
+" Last Change: Feb 25, 2013
-" TODO:
-" Box Forms
-
-" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
diff --git a/syntax/pgsql.vim b/syntax/pgsql.vim
index 88d99064..fa4d7e48 100644
--- a/syntax/pgsql.vim
+++ b/syntax/pgsql.vim
@@ -1943,9 +1943,7 @@ syn match sqlPlpgsqlVariable ".\zs@[A-z0-9_]\+" contained
" PL/pgSQL operators
syn match sqlPlpgsqlOperator ":=" contained
-syn region plpgsql matchgroup=sqlString start=+\$pgsql\$+ end=+\$pgsql\$+ keepend
- \ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo
-syn region plpgsql matchgroup=sqlString start=+\$body\$+ end=+\$body\$+ keepend
+syn region plpgsql matchgroup=sqlString start=+\$\z(pgsql\|body\|function\)\$+ end=+\$\z1\$+ keepend
\ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo
if get(g:, 'pgsql_dollar_strings', 0)
syn region sqlString start=+\$\$+ end=+\$\$+ contains=@Spell
diff --git a/syntax/php.vim b/syntax/php.vim
index e77c415f..c1d8bd42 100644
--- a/syntax/php.vim
+++ b/syntax/php.vim
@@ -187,8 +187,17 @@ if !exists("php_phpdoc_folding")
let php_phpdoc_folding = 0
endif
+" set default global php version
+if !exists('g:php_version_id')
+ let g:php_version_id = 70300
+endif
+
+" set default buffer level php version
+if !exists('b:php_version_id')
+ let b:php_version_id = g:php_version_id
+endif
+
" Folding Support {{{
-"
if php_folding==1 && has("folding")
command! -nargs=+ SynFold <args> fold
else
@@ -673,71 +682,142 @@ syn case match
" HereDoc
if version >= 704
- " @begin phpHereDoc
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@3<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- " including HTML,JavaScript,SQL if enabled via options
- if (exists("php_html_in_heredoc") && php_html_in_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
- if (exists("php_sql_heredoc") && php_sql_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
- if (exists("php_xml_heredoc") && php_xml_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
+ if b:php_version_id >= 70300
+ " @begin phpHereDoc
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@3<="\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_heredoc") && php_html_in_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_heredoc") && php_sql_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_heredoc") && php_xml_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ " @end phpHereDoc
+ else
+ " @begin phpHereDoc
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@3<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_heredoc") && php_html_in_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_heredoc") && php_sql_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_heredoc") && php_xml_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@3<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
" @end phpHereDoc
-else
- " @copy phpHereDoc strip_maximum_size
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- " including HTML,JavaScript,SQL if enabled via options
- if (exists("php_html_in_heredoc") && php_html_in_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
- if (exists("php_sql_heredoc") && php_sql_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
endif
- if (exists("php_xml_heredoc") && php_xml_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+else
+ if b:php_version_id >= 70300
+ " @copy phpHereDoc strip_maximum_size
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_heredoc") && php_html_in_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_heredoc") && php_sql_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_heredoc") && php_xml_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ " @end phpHereDoc
+ else
+ " @copy phpHereDoc strip_maximum_size
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_heredoc") && php_html_in_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_heredoc") && php_sql_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_heredoc") && php_xml_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ " @end phpHereDoc
endif
- " @end phpHereDoc
endif
" NowDoc
if version >= 704
+ if b:php_version_id >= 70300
" @begin phpNowDoc
- SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\I\i*\)'$+ end="^\z1\(;\=$\)\@=" contained keepend extend
- " including HTML,JavaScript,SQL if enabled via options
- if (exists("php_html_in_nowdoc") && php_html_in_nowdoc)
- SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
- if (exists("php_sql_nowdoc") && php_sql_nowdoc)
- SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
- if (exists("php_xml_nowdoc") && php_xml_nowdoc)
- SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\I\i*\)'$+ end="^\s*\z1\>" contained keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_nowdoc") && php_html_in_nowdoc)
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_nowdoc") && php_sql_nowdoc)
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_nowdoc") && php_xml_nowdoc)
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)'$+ end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
" @end phpNowDoc
-else
- " @copy phpHereDoc strip_maximum_size
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- " including HTML,JavaScript,SQL if enabled via options
- if (exists("php_html_in_heredoc") && php_html_in_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
- endif
- if (exists("php_sql_heredoc") && php_sql_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ else
+ " @begin phpNowDoc
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\I\i*\)'$+ end="^\z1\(;\=$\)\@=" contained keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_nowdoc") && php_html_in_nowdoc)
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_nowdoc") && php_sql_nowdoc)
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_nowdoc") && php_xml_nowdoc)
+ SynFold syn region phpNowDoc matchgroup=Delimiter start=+\(<<<\)\@3<='\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)'$+ end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ " @end phpNowDoc
endif
- if (exists("php_xml_heredoc") && php_xml_heredoc)
- SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+else
+ if b:php_version_id >= 70300
+ " @copy phpHereDoc strip_maximum_size
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\s*\z1\>" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_heredoc") && php_html_in_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_heredoc") && php_sql_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_heredoc") && php_xml_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\s*\z1\>" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ " @end phpNowDoc
+ else
+ " @copy phpHereDoc strip_maximum_size
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start=+\(<<<\)\@<="\z(\I\i*\)"$+ end="^\z1\(;\=$\)\@=" contained contains=@Spell,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ " including HTML,JavaScript,SQL if enabled via options
+ if (exists("php_html_in_heredoc") && php_html_in_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_sql_heredoc") && php_sql_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ if (exists("php_xml_heredoc") && php_xml_heredoc)
+ SynFold syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(xml\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@xmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar,phpStrEsc keepend extend
+ endif
+ " @end phpNowDoc
endif
- " @end phpNowDoc
endif
syn case ignore
diff --git a/syntax/ps1.vim b/syntax/ps1.vim
index d3be8a12..4bc74638 100644
--- a/syntax/ps1.vim
+++ b/syntax/ps1.vim
@@ -59,16 +59,24 @@ syn match ps1Constant +\$^+
syn keyword ps1Keyword class define from using var
" Function declarations
-syn keyword ps1Keyword function nextgroup=ps1FunctionDeclaration skipwhite
-syn keyword ps1Keyword filter nextgroup=ps1FunctionDeclaration skipwhite
-syn keyword ps1Keyword workflow nextgroup=ps1FunctionDeclaration skipwhite
-syn keyword ps1Keyword configuration nextgroup=ps1FunctionDeclaration skipwhite
-syn keyword ps1Keyword class nextgroup=ps1FunctionDeclaration skipwhite
-syn keyword ps1Keyword enum nextgroup=ps1FunctionDeclaration skipwhite
-syn match ps1FunctionDeclaration /\w\+\(-\w\+\)*/ contained
-
-" Function invocations
-syn match ps1FunctionInvocation /\w\+\(-\w\+\)\+/
+syn keyword ps1Keyword function nextgroup=ps1Function skipwhite
+syn keyword ps1Keyword filter nextgroup=ps1Function skipwhite
+syn keyword ps1Keyword workflow nextgroup=ps1Function skipwhite
+syn keyword ps1Keyword configuration nextgroup=ps1Function skipwhite
+syn keyword ps1Keyword class nextgroup=ps1Function skipwhite
+syn keyword ps1Keyword enum nextgroup=ps1Function skipwhite
+
+" Function declarations and invocations
+syn match ps1Cmdlet /\v(add|clear|close|copy|enter|exit|find|format|get|hide|join|lock|move|new|open|optimize|pop|push|redo|remove|rename|reset|search|select|Set|show|skip|split|step|switch|undo|unlock|watch)(-\w+)+/ contained
+syn match ps1Cmdlet /\v(connect|disconnect|read|receive|send|write)(-\w+)+/ contained
+syn match ps1Cmdlet /\v(backup|checkpoint|compare|compress|convert|convertfrom|convertto|dismount|edit|expand|export|group|import|initialize|limit|merge|mount|out|publish|restore|save|sync|unpublish|update)(-\w+)+/ contained
+syn match ps1Cmdlet /\v(debug|measure|ping|repair|resolve|test|trace)(-\w+)+/ contained
+syn match ps1Cmdlet /\v(approve|assert|build|complete|confirm|deny|deploy|disable|enable|install|invoke|register|request|restart|resume|start|stop|submit|suspend|uninstall|unregister|wait)(-\w+)+/ contained
+syn match ps1Cmdlet /\v(block|grant|protect|revoke|unblock|unprotect)(-\w+)+/ contained
+syn match ps1Cmdlet /\v(use)(-\w+)+/ contained
+
+" Other functions
+syn match ps1Function /\w\+\(-\w\+\)\+/ contains=ps1Cmdlet
" Type declarations
syn match ps1Type /\[[a-z_][a-z0-9_.,\[\]]\+\]/
@@ -164,8 +172,8 @@ if version >= 508 || !exists("did_ps1_syn_inits")
HiLink ps1Escape SpecialChar
HiLink ps1InterpolationDelimiter Delimiter
HiLink ps1Conditional Conditional
- HiLink ps1FunctionDeclaration Function
- HiLink ps1FunctionInvocation Function
+ HiLink ps1Cmdlet Function
+ HiLink ps1Function Identifier
HiLink ps1Variable Identifier
HiLink ps1Boolean Boolean
HiLink ps1Constant Constant
diff --git a/syntax/python.vim b/syntax/python.vim
index 74c7732c..13b8d74e 100644
--- a/syntax/python.vim
+++ b/syntax/python.vim
@@ -3,9 +3,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python') == -1
" For version 5.x: Clear all syntax items
" For versions greater than 6.x: Quit when a syntax file was already loaded
if v:version < 600
- syntax clear
+ syntax clear
elseif exists('b:current_syntax')
- finish
+ finish
endif
"
@@ -16,22 +16,22 @@ command! -buffer Python3Syntax let b:python_version_2 = 0 | let &syntax=&syntax
" Enable option if it's not defined
function! s:EnableByDefault(name)
- if !exists(a:name)
- let {a:name} = 1
- endif
+ if !exists(a:name)
+ let {a:name} = 1
+ endif
endfunction
" Check if option is enabled
function! s:Enabled(name)
- return exists(a:name) && {a:name}
+ return exists(a:name) && {a:name}
endfunction
" Is it Python 2 syntax?
function! s:Python2Syntax()
- if exists('b:python_version_2')
- return b:python_version_2
- endif
- return s:Enabled('g:python_version_2')
+ if exists('b:python_version_2')
+ return b:python_version_2
+ endif
+ return s:Enabled('g:python_version_2')
endfunction
"
@@ -42,22 +42,31 @@ call s:EnableByDefault('g:python_slow_sync')
call s:EnableByDefault('g:python_highlight_builtin_funcs_kwarg')
if s:Enabled('g:python_highlight_all')
- call s:EnableByDefault('g:python_highlight_builtins')
- if s:Enabled('g:python_highlight_builtins')
- call s:EnableByDefault('g:python_highlight_builtin_objs')
- call s:EnableByDefault('g:python_highlight_builtin_funcs')
- call s:EnableByDefault('g:python_highlight_builtin_types')
- endif
- call s:EnableByDefault('g:python_highlight_exceptions')
- call s:EnableByDefault('g:python_highlight_string_formatting')
- call s:EnableByDefault('g:python_highlight_string_format')
- call s:EnableByDefault('g:python_highlight_string_templates')
- call s:EnableByDefault('g:python_highlight_indent_errors')
- call s:EnableByDefault('g:python_highlight_space_errors')
- call s:EnableByDefault('g:python_highlight_doctests')
- call s:EnableByDefault('g:python_print_as_function')
- call s:EnableByDefault('g:python_highlight_class_vars')
- call s:EnableByDefault('g:python_highlight_operators')
+ call s:EnableByDefault('g:python_highlight_builtins')
+ if s:Enabled('g:python_highlight_builtins')
+ call s:EnableByDefault('g:python_highlight_builtin_objs')
+ call s:EnableByDefault('g:python_highlight_builtin_funcs')
+ call s:EnableByDefault('g:python_highlight_builtin_types')
+ endif
+ call s:EnableByDefault('g:python_highlight_exceptions')
+ call s:EnableByDefault('g:python_highlight_string_formatting')
+ call s:EnableByDefault('g:python_highlight_string_format')
+ call s:EnableByDefault('g:python_highlight_string_templates')
+ call s:EnableByDefault('g:python_highlight_indent_errors')
+ call s:EnableByDefault('g:python_highlight_space_errors')
+ call s:EnableByDefault('g:python_highlight_doctests')
+ call s:EnableByDefault('g:python_print_as_function')
+ call s:EnableByDefault('g:python_highlight_func_calls')
+ call s:EnableByDefault('g:python_highlight_class_vars')
+ call s:EnableByDefault('g:python_highlight_operators')
+endif
+
+"
+" Function calls
+"
+
+if s:Enabled('g:python_highlight_func_calls')
+ syn match pythonFunctionCall '\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\ze\%(\s*(\)'
endif
"
@@ -68,7 +77,7 @@ syn keyword pythonStatement break continue del return pass yield global asse
syn keyword pythonStatement raise nextgroup=pythonExClass skipwhite
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
if s:Enabled('g:python_highlight_class_vars')
- syn keyword pythonClassVar self cls
+ syn keyword pythonClassVar self cls
endif
syn keyword pythonRepeat for while
syn keyword pythonConditional if elif else
@@ -82,20 +91,20 @@ syn match pythonImport '^\s*\zsfrom\>'
if s:Python2Syntax()
- if !s:Enabled('g:python_print_as_function')
- syn keyword pythonStatement print
- endif
- syn keyword pythonStatement exec
- syn keyword pythonImport as
- syn match pythonFunction '[a-zA-Z_][a-zA-Z0-9_]*' display contained
+ if !s:Enabled('g:python_print_as_function')
+ syn keyword pythonStatement print
+ endif
+ syn keyword pythonStatement exec
+ syn keyword pythonImport as
+ syn match pythonFunction '[a-zA-Z_][a-zA-Z0-9_]*' display contained
else
- syn keyword pythonStatement as nonlocal
- syn match pythonStatement '\v\.@<!<await>'
- syn match pythonFunction '\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*' display contained
- syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite
- syn match pythonStatement '\<async\s\+with\>'
- syn match pythonStatement '\<async\s\+for\>'
- syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType
+ syn keyword pythonStatement as nonlocal
+ syn match pythonStatement '\v\.@<!<await>'
+ syn match pythonFunction '\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*' display contained
+ syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite
+ syn match pythonStatement '\<async\s\+with\>'
+ syn match pythonStatement '\<async\s\+for\>'
+ syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType
endif
@@ -114,9 +123,9 @@ syn match pythonError '[$?]\|\([-+@%&|^~]\)\1\{1,}\|\([=*/<>]\)\2\{2,}
syn match pythonDecorator '^\s*\zs@' display nextgroup=pythonDottedName skipwhite
if s:Python2Syntax()
- syn match pythonDottedName '[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*' display contained
+ syn match pythonDottedName '[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*' display contained
else
- syn match pythonDottedName '\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\)*' display contained
+ syn match pythonDottedName '\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\)*' display contained
endif
syn match pythonDot '\.' display containedin=pythonDottedName
@@ -126,8 +135,8 @@ syn match pythonDot '\.' display containedin=pythonDottedName
syn match pythonComment '#.*$' display contains=pythonTodo,@Spell
if !s:Enabled('g:python_highlight_file_headers_as_comments')
- syn match pythonRun '\%^#!.*$'
- syn match pythonCoding '\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$'
+ syn match pythonRun '\%^#!.*$'
+ syn match pythonCoding '\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$'
endif
syn keyword pythonTodo TODO FIXME XXX contained
@@ -140,12 +149,12 @@ syn match pythonError '\<\d\+[^0-9[:space:]]\+\>' display
" Mixing spaces and tabs also may be used for pretty formatting multiline
" statements
if s:Enabled('g:python_highlight_indent_errors')
- syn match pythonIndentError '^\s*\%( \t\|\t \)\s*\S'me=e-1 display
+ syn match pythonIndentError '^\s*\%( \t\|\t \)\s*\S'me=e-1 display
endif
" Trailing space errors
if s:Enabled('g:python_highlight_space_errors')
- syn match pythonSpaceError '\s\+$' display
+ syn match pythonSpaceError '\s\+$' display
endif
"
@@ -153,20 +162,20 @@ endif
"
if s:Python2Syntax()
- " Python 2 strings
- syn region pythonString start=+[bB]\='+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonString start=+[bB]\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonString start=+[bB]\="""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
- syn region pythonString start=+[bB]\='''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
+ " Python 2 strings
+ syn region pythonString start=+[bB]\='+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonString start=+[bB]\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonString start=+[bB]\="""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+ syn region pythonString start=+[bB]\='''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
else
- " Python 3 byte strings
- syn region pythonBytes start=+[bB]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
- syn region pythonBytes start=+[bB]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
- syn region pythonBytes start=+[bB]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest,pythonSpaceError,@Spell
- syn region pythonBytes start=+[bB]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest2,pythonSpaceError,@Spell
-
- syn match pythonBytesError '.\+' display contained
- syn match pythonBytesContent '[\u0000-\u00ff]\+' display contained contains=pythonBytesEscape,pythonBytesEscapeError
+ " Python 3 byte strings
+ syn region pythonBytes start=+[bB]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
+ syn region pythonBytes start=+[bB]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
+ syn region pythonBytes start=+[bB]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonBytes start=+[bB]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest2,pythonSpaceError,@Spell
+
+ syn match pythonBytesError '.\+' display contained
+ syn match pythonBytesContent '[\u0000-\u00ff]\+' display contained contains=pythonBytesEscape,pythonBytesEscapeError
endif
syn match pythonBytesEscape +\\[abfnrtv'"\\]+ display contained
@@ -184,100 +193,100 @@ syn match pythonUniEscape '\\N{[A-Z ]\+}' display contained
syn match pythonUniEscapeError '\\N{[^A-Z ]\+}' display contained
if s:Python2Syntax()
- " Python 2 Unicode strings
- syn region pythonUniString start=+[uU]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonUniString start=+[uU]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonUniString start=+[uU]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
- syn region pythonUniString start=+[uU]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+ " Python 2 Unicode strings
+ syn region pythonUniString start=+[uU]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonUniString start=+[uU]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonUniString start=+[uU]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonUniString start=+[uU]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
else
- " Python 3 strings
- syn region pythonString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonString start=+'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
- syn region pythonString start=+"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
-
- syn region pythonFString start=+[fF]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonFString start=+[fF]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
- syn region pythonFString start=+[fF]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
- syn region pythonFString start=+[fF]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+ " Python 3 strings
+ syn region pythonString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonString start=+'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonString start=+"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+
+ syn region pythonFString start=+[fF]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonFString start=+[fF]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
+ syn region pythonFString start=+[fF]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonFString start=+[fF]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
endif
if s:Python2Syntax()
- " Python 2 Unicode raw strings
- syn region pythonUniRawString start=+[uU][rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
- syn region pythonUniRawString start=+[uU][rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
- syn region pythonUniRawString start=+[uU][rR]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
- syn region pythonUniRawString start=+[uU][rR]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
-
- syn match pythonUniRawEscape '\%([^\\]\%(\\\\\)*\)\@<=\\u\x\{4}' display contained
- syn match pythonUniRawEscapeError '\%([^\\]\%(\\\\\)*\)\@<=\\u\x\{,3}\X' display contained
+ " Python 2 Unicode raw strings
+ syn region pythonUniRawString start=+[uU][rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
+ syn region pythonUniRawString start=+[uU][rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
+ syn region pythonUniRawString start=+[uU][rR]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonUniRawString start=+[uU][rR]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+
+ syn match pythonUniRawEscape '\%([^\\]\%(\\\\\)*\)\@<=\\u\x\{4}' display contained
+ syn match pythonUniRawEscapeError '\%([^\\]\%(\\\\\)*\)\@<=\\u\x\{,3}\X' display contained
endif
" Python 2/3 raw strings
if s:Python2Syntax()
- syn region pythonRawString start=+[bB]\=[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawString start=+[bB]\=[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawString start=+[bB]\=[rR]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
- syn region pythonRawString start=+[bB]\=[rR]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
+ syn region pythonRawString start=+[bB]\=[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawString start=+[bB]\=[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawString start=+[bB]\=[rR]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonRawString start=+[bB]\=[rR]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
else
- syn region pythonRawString start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawString start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawString start=+[rR]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
- syn region pythonRawString start=+[rR]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
-
- syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
- syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
-
- syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
- syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
- syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
+ syn region pythonRawString start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawString start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawString start=+[rR]'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonRawString start=+[rR]"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
+
+ syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonRawFString start=+\%([fF][rR]\|[rR][fF]\)"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
+
+ syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
+ syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)'''+ skip=+\\'+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
+ syn region pythonRawBytes start=+\%([bB][rR]\|[rR][bB]\)"""+ skip=+\\"+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
endif
syn match pythonRawEscape +\\['"]+ display contained
if s:Enabled('g:python_highlight_string_formatting')
- " % operator string formatting
- if s:Python2Syntax()
- syn match pythonStrFormatting '%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString,pythonBytesContent
- syn match pythonStrFormatting '%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString,pythonBytesContent
- else
- syn match pythonStrFormatting '%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonRawString,pythonBytesContent
- syn match pythonStrFormatting '%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonRawString,pythonBytesContent
- endif
+ " % operator string formatting
+ if s:Python2Syntax()
+ syn match pythonStrFormatting '%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString,pythonBytesContent
+ syn match pythonStrFormatting '%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString,pythonBytesContent
+ else
+ syn match pythonStrFormatting '%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonRawString,pythonBytesContent
+ syn match pythonStrFormatting '%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]' contained containedin=pythonString,pythonRawString,pythonBytesContent
+ endif
endif
if s:Enabled('g:python_highlight_string_format')
- " str.format syntax
- if s:Python2Syntax()
- syn match pythonStrFormat '{{\|}}' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
- syn match pythonStrFormat '{\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)\=\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\[\%(\d\+\|[^!:\}]\+\)\]\)*\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
- else
- syn match pythonStrFormat "{\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)\=\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\[\%(\d\+\|[^!:\}]\+\)\]\)*\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}" contained containedin=pythonString,pythonRawString
- syn region pythonStrInterpRegion start="{"he=e+1,rs=e+1 end="\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}"hs=s-1,re=s-1 extend contained containedin=pythonFString,pythonRawFString contains=pythonStrInterpRegion,@pythonExpression
- syn match pythonStrFormat "{{\|}}" contained containedin=pythonString,pythonRawString,pythonFString,pythonRawFString
- endif
+ " str.format syntax
+ if s:Python2Syntax()
+ syn match pythonStrFormat '{{\|}}' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
+ syn match pythonStrFormat '{\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)\=\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\[\%(\d\+\|[^!:\}]\+\)\]\)*\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
+ else
+ syn match pythonStrFormat "{\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)\=\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\[\%(\d\+\|[^!:\}]\+\)\]\)*\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}" contained containedin=pythonString,pythonRawString
+ syn region pythonStrInterpRegion start="{"he=e+1,rs=e+1 end="\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}"hs=s-1,re=s-1 extend contained containedin=pythonFString,pythonRawFString contains=pythonStrInterpRegion,@pythonExpression
+ syn match pythonStrFormat "{{\|}}" contained containedin=pythonString,pythonRawString,pythonFString,pythonRawFString
+ endif
endif
if s:Enabled('g:python_highlight_string_templates')
- " string.Template format
- if s:Python2Syntax()
- syn match pythonStrTemplate '\$\$' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
- syn match pythonStrTemplate '\${[a-zA-Z_][a-zA-Z0-9_]*}' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
- syn match pythonStrTemplate '\$[a-zA-Z_][a-zA-Z0-9_]*' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
- else
- syn match pythonStrTemplate '\$\$' contained containedin=pythonString,pythonRawString
- syn match pythonStrTemplate '\${[a-zA-Z_][a-zA-Z0-9_]*}' contained containedin=pythonString,pythonRawString
- syn match pythonStrTemplate '\$[a-zA-Z_][a-zA-Z0-9_]*' contained containedin=pythonString,pythonRawString
- endif
+ " string.Template format
+ if s:Python2Syntax()
+ syn match pythonStrTemplate '\$\$' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
+ syn match pythonStrTemplate '\${[a-zA-Z_][a-zA-Z0-9_]*}' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
+ syn match pythonStrTemplate '\$[a-zA-Z_][a-zA-Z0-9_]*' contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
+ else
+ syn match pythonStrTemplate '\$\$' contained containedin=pythonString,pythonRawString
+ syn match pythonStrTemplate '\${[a-zA-Z_][a-zA-Z0-9_]*}' contained containedin=pythonString,pythonRawString
+ syn match pythonStrTemplate '\$[a-zA-Z_][a-zA-Z0-9_]*' contained containedin=pythonString,pythonRawString
+ endif
endif
if s:Enabled('g:python_highlight_doctests')
- " DocTests
- syn region pythonDocTest start='^\s*>>>' skip=+\\'+ end=+'''+he=s-1 end='^\s*$' contained
- syn region pythonDocTest2 start='^\s*>>>' skip=+\\"+ end=+"""+he=s-1 end='^\s*$' contained
+ " DocTests
+ syn region pythonDocTest start='^\s*>>>' skip=+\\'+ end=+'''+he=s-1 end='^\s*$' contained
+ syn region pythonDocTest2 start='^\s*>>>' skip=+\\"+ end=+"""+he=s-1 end='^\s*$' contained
endif
"
@@ -285,51 +294,51 @@ endif
"
if s:Python2Syntax()
- syn match pythonHexError '\<0[xX]\x*[g-zG-Z]\+\x*[lL]\=\>' display
- syn match pythonOctError '\<0[oO]\=\o*\D\+\d*[lL]\=\>' display
- syn match pythonBinError '\<0[bB][01]*\D\+\d*[lL]\=\>' display
+ syn match pythonHexError '\<0[xX]\x*[g-zG-Z]\+\x*[lL]\=\>' display
+ syn match pythonOctError '\<0[oO]\=\o*\D\+\d*[lL]\=\>' display
+ syn match pythonBinError '\<0[bB][01]*\D\+\d*[lL]\=\>' display
- syn match pythonHexNumber '\<0[xX]\x\+[lL]\=\>' display
- syn match pythonOctNumber '\<0[oO]\o\+[lL]\=\>' display
- syn match pythonBinNumber '\<0[bB][01]\+[lL]\=\>' display
+ syn match pythonHexNumber '\<0[xX]\x\+[lL]\=\>' display
+ syn match pythonOctNumber '\<0[oO]\o\+[lL]\=\>' display
+ syn match pythonBinNumber '\<0[bB][01]\+[lL]\=\>' display
- syn match pythonNumberError '\<\d\+\D[lL]\=\>' display
- syn match pythonNumber '\<\d[lL]\=\>' display
- syn match pythonNumber '\<[0-9]\d\+[lL]\=\>' display
- syn match pythonNumber '\<\d\+[lLjJ]\>' display
+ syn match pythonNumberError '\<\d\+\D[lL]\=\>' display
+ syn match pythonNumber '\<\d[lL]\=\>' display
+ syn match pythonNumber '\<[0-9]\d\+[lL]\=\>' display
+ syn match pythonNumber '\<\d\+[lLjJ]\>' display
- syn match pythonOctError '\<0[oO]\=\o*[8-9]\d*[lL]\=\>' display
- syn match pythonBinError '\<0[bB][01]*[2-9]\d*[lL]\=\>' display
+ syn match pythonOctError '\<0[oO]\=\o*[8-9]\d*[lL]\=\>' display
+ syn match pythonBinError '\<0[bB][01]*[2-9]\d*[lL]\=\>' display
- syn match pythonFloat '\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>' display
- syn match pythonFloat '\<\d\+[eE][+-]\=\d\+[jJ]\=\>' display
- syn match pythonFloat '\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=' display
+ syn match pythonFloat '\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>' display
+ syn match pythonFloat '\<\d\+[eE][+-]\=\d\+[jJ]\=\>' display
+ syn match pythonFloat '\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=' display
else
- syn match pythonOctError '\<0[oO]\=\o*\D\+\d*\>' display
- " pythonHexError comes after pythonOctError so that 0xffffl is pythonHexError
- syn match pythonHexError '\<0[xX]\x*[g-zG-Z]\x*\>' display
- syn match pythonBinError '\<0[bB][01]*\D\+\d*\>' display
-
- syn match pythonHexNumber '\<0[xX][_0-9a-fA-F]*\x\>' display
- syn match pythonOctNumber '\<0[oO][_0-7]*\o\>' display
- syn match pythonBinNumber '\<0[bB][_01]*[01]\>' display
-
- syn match pythonNumberError '\<\d[_0-9]*\D\>' display
- syn match pythonNumberError '\<0[_0-9]\+\>' display
- syn match pythonNumberError '\<0_x\S*\>' display
- syn match pythonNumberError '\<0[bBxXoO][_0-9a-fA-F]*_\>' display
- syn match pythonNumberError '\<\d[_0-9]*_\>' display
- syn match pythonNumber '\<\d\>' display
- syn match pythonNumber '\<[1-9][_0-9]*\d\>' display
- syn match pythonNumber '\<\d[jJ]\>' display
- syn match pythonNumber '\<[1-9][_0-9]*\d[jJ]\>' display
-
- syn match pythonOctError '\<0[oO]\=\o*[8-9]\d*\>' display
- syn match pythonBinError '\<0[bB][01]*[2-9]\d*\>' display
-
- syn match pythonFloat '\.\d\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=\>' display
- syn match pythonFloat '\<\d\%([_0-9]*\d\)\=[eE][+-]\=\d\%([_0-9]*\d\)\=[jJ]\=\>' display
- syn match pythonFloat '\<\d\%([_0-9]*\d\)\=\.\d\=\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=' display
+ syn match pythonOctError '\<0[oO]\=\o*\D\+\d*\>' display
+ " pythonHexError comes after pythonOctError so that 0xffffl is pythonHexError
+ syn match pythonHexError '\<0[xX]\x*[g-zG-Z]\x*\>' display
+ syn match pythonBinError '\<0[bB][01]*\D\+\d*\>' display
+
+ syn match pythonHexNumber '\<0[xX][_0-9a-fA-F]*\x\>' display
+ syn match pythonOctNumber '\<0[oO][_0-7]*\o\>' display
+ syn match pythonBinNumber '\<0[bB][_01]*[01]\>' display
+
+ syn match pythonNumberError '\<\d[_0-9]*\D\>' display
+ syn match pythonNumberError '\<0[_0-9]\+\>' display
+ syn match pythonNumberError '\<0_x\S*\>' display
+ syn match pythonNumberError '\<0[bBxXoO][_0-9a-fA-F]*_\>' display
+ syn match pythonNumberError '\<\d[_0-9]*_\>' display
+ syn match pythonNumber '\<\d\>' display
+ syn match pythonNumber '\<[1-9][_0-9]*\d\>' display
+ syn match pythonNumber '\<\d[jJ]\>' display
+ syn match pythonNumber '\<[1-9][_0-9]*\d[jJ]\>' display
+
+ syn match pythonOctError '\<0[oO]\=\o*[8-9]\d*\>' display
+ syn match pythonBinError '\<0[bB][01]*[2-9]\d*\>' display
+
+ syn match pythonFloat '\.\d\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=\>' display
+ syn match pythonFloat '\<\d\%([_0-9]*\d\)\=[eE][+-]\=\d\%([_0-9]*\d\)\=[jJ]\=\>' display
+ syn match pythonFloat '\<\d\%([_0-9]*\d\)\=\.\d\=\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=' display
endif
"
@@ -337,11 +346,11 @@ endif
"
if s:Enabled('g:python_highlight_builtin_objs')
- syn keyword pythonNone None
- syn keyword pythonBoolean True False
- syn keyword pythonSingleton Ellipsis NotImplemented
- syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
- syn keyword pythonBuiltinObj __loader__ __spec__ __path__ __cached__
+ syn keyword pythonNone None
+ syn keyword pythonBoolean True False
+ syn keyword pythonSingleton Ellipsis NotImplemented
+ syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
+ syn keyword pythonBuiltinObj __loader__ __spec__ __path__ __cached__
endif
"
@@ -349,25 +358,25 @@ endif
"
if s:Enabled('g:python_highlight_builtin_funcs')
- let s:funcs_re = '__import__|abs|all|any|bin|callable|chr|classmethod|compile|complex|delattr|dir|divmod|enumerate|eval|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|map|max|memoryview|min|next|oct|open|ord|pow|property|range|repr|reversed|round|setattr|slice|sorted|staticmethod|sum|super|type|vars|zip'
-
- if s:Python2Syntax()
- let s:funcs_re .= '|apply|basestring|buffer|cmp|coerce|execfile|file|intern|long|raw_input|reduce|reload|unichr|unicode|xrange'
- if s:Enabled('g:python_print_as_function')
- let s:funcs_re .= '|print'
+ let s:funcs_re = '__import__|abs|all|any|bin|callable|chr|classmethod|compile|complex|delattr|dir|divmod|enumerate|eval|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|map|max|memoryview|min|next|oct|open|ord|pow|property|range|repr|reversed|round|setattr|slice|sorted|staticmethod|sum|super|type|vars|zip'
+
+ if s:Python2Syntax()
+ let s:funcs_re .= '|apply|basestring|buffer|cmp|coerce|execfile|file|intern|long|raw_input|reduce|reload|unichr|unicode|xrange'
+ if s:Enabled('g:python_print_as_function')
+ let s:funcs_re .= '|print'
+ endif
+ else
+ let s:funcs_re .= '|ascii|breakpoint|exec|print'
endif
- else
- let s:funcs_re .= '|ascii|breakpoint|exec|print'
- endif
- let s:funcs_re = 'syn match pythonBuiltinFunc ''\v\.@<!\zs<%(' . s:funcs_re . ')>'
+ let s:funcs_re = 'syn match pythonBuiltinFunc ''\v\.@<!\zs<%(' . s:funcs_re . ')>'
- if !s:Enabled('g:python_highlight_builtin_funcs_kwarg')
- let s:funcs_re .= '\=@!'
- endif
+ if !s:Enabled('g:python_highlight_builtin_funcs_kwarg')
+ let s:funcs_re .= '\=@!'
+ endif
- execute s:funcs_re . ''''
- unlet s:funcs_re
+ execute s:funcs_re . ''''
+ unlet s:funcs_re
endif
"
@@ -375,7 +384,7 @@ endif
"
if s:Enabled('g:python_highlight_builtin_types')
- syn match pythonBuiltinType '\v\.@<!<%(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>'
+ syn match pythonBuiltinType '\v\.@<!<%(object|bool|int|float|tuple|str|list|dict|set|frozenset|bytearray|bytes)>'
endif
@@ -386,110 +395,115 @@ endif
if s:Enabled('g:python_highlight_exceptions')
let s:exs_re = 'BaseException|Exception|ArithmeticError|LookupError|EnvironmentError|AssertionError|AttributeError|BufferError|EOFError|FloatingPointError|GeneratorExit|IOError|ImportError|IndexError|KeyError|KeyboardInterrupt|MemoryError|NameError|NotImplementedError|OSError|OverflowError|ReferenceError|RuntimeError|StopIteration|SyntaxError|IndentationError|TabError|SystemError|SystemExit|TypeError|UnboundLocalError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ValueError|VMSError|WindowsError|ZeroDivisionError|Warning|UserWarning|BytesWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|RuntimeWarning|FutureWarning|ImportWarning|UnicodeWarning'
- if s:Python2Syntax()
- let s:exs_re .= '|StandardError'
- else
- let s:exs_re .= '|BlockingIOError|ChildProcessError|ConnectionError|BrokenPipeError|ConnectionAbortedError|ConnectionRefusedError|ConnectionResetError|FileExistsError|FileNotFoundError|InterruptedError|IsADirectoryError|NotADirectoryError|PermissionError|ProcessLookupError|TimeoutError|StopAsyncIteration|ResourceWarning'
- endif
+ if s:Python2Syntax()
+ let s:exs_re .= '|StandardError'
+ else
+ let s:exs_re .= '|BlockingIOError|ChildProcessError|ConnectionError|BrokenPipeError|ConnectionAbortedError|ConnectionRefusedError|ConnectionResetError|FileExistsError|FileNotFoundError|InterruptedError|IsADirectoryError|NotADirectoryError|PermissionError|ProcessLookupError|TimeoutError|StopAsyncIteration|ResourceWarning'
+ endif
- execute 'syn match pythonExClass ''\v\.@<!\zs<%(' . s:exs_re . ')>'''
- unlet s:exs_re
+ execute 'syn match pythonExClass ''\v\.@<!\zs<%(' . s:exs_re . ')>'''
+ unlet s:exs_re
endif
+"
+" Misc
+"
+
if s:Enabled('g:python_slow_sync')
- syn sync minlines=2000
+ syn sync minlines=2000
else
- " This is fast but code inside triple quoted strings screws it up. It
- " is impossible to fix because the only way to know if you are inside a
- " triple quoted string is to start from the beginning of the file.
- syn sync match pythonSync grouphere NONE '):$'
- syn sync maxlines=200
+ " This is fast but code inside triple quoted strings screws it up. It
+ " is impossible to fix because the only way to know if you are inside a
+ " triple quoted string is to start from the beginning of the file.
+ syn sync match pythonSync grouphere NONE '):$'
+ syn sync maxlines=200
endif
if v:version >= 508 || !exists('did_python_syn_inits')
- if v:version <= 508
- let did_python_syn_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-
- HiLink pythonStatement Statement
- HiLink pythonRaiseFromStatement Statement
- HiLink pythonImport Include
- HiLink pythonFunction Function
- HiLink pythonConditional Conditional
- HiLink pythonRepeat Repeat
- HiLink pythonException Exception
- HiLink pythonOperator Operator
-
- HiLink pythonDecorator Define
- HiLink pythonDottedName Function
-
- HiLink pythonComment Comment
- if !s:Enabled('g:python_highlight_file_headers_as_comments')
- HiLink pythonCoding Special
- HiLink pythonRun Special
- endif
- HiLink pythonTodo Todo
-
- HiLink pythonError Error
- HiLink pythonIndentError Error
- HiLink pythonSpaceError Error
-
- HiLink pythonString String
- HiLink pythonRawString String
- HiLink pythonRawEscape Special
-
- HiLink pythonUniEscape Special
- HiLink pythonUniEscapeError Error
-
- if s:Python2Syntax()
- HiLink pythonUniString String
- HiLink pythonUniRawString String
- HiLink pythonUniRawEscape Special
- HiLink pythonUniRawEscapeError Error
- else
- HiLink pythonBytes String
- HiLink pythonRawBytes String
- HiLink pythonBytesContent String
- HiLink pythonBytesError Error
- HiLink pythonBytesEscape Special
- HiLink pythonBytesEscapeError Error
- HiLink pythonFString String
- HiLink pythonRawFString String
- HiLink pythonStrInterpRegion Special
- endif
-
- HiLink pythonStrFormatting Special
- HiLink pythonStrFormat Special
- HiLink pythonStrTemplate Special
-
- HiLink pythonDocTest Special
- HiLink pythonDocTest2 Special
-
- HiLink pythonNumber Number
- HiLink pythonHexNumber Number
- HiLink pythonOctNumber Number
- HiLink pythonBinNumber Number
- HiLink pythonFloat Float
- HiLink pythonNumberError Error
- HiLink pythonOctError Error
- HiLink pythonHexError Error
- HiLink pythonBinError Error
-
- HiLink pythonBoolean Boolean
- HiLink pythonNone Constant
- HiLink pythonSingleton Constant
-
- HiLink pythonBuiltinObj Identifier
- HiLink pythonBuiltinFunc Function
- HiLink pythonBuiltinType Structure
-
- HiLink pythonExClass Structure
- HiLink pythonClassVar Identifier
-
- delcommand HiLink
+ if v:version <= 508
+ let did_python_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink pythonStatement Statement
+ HiLink pythonRaiseFromStatement Statement
+ HiLink pythonImport Include
+ HiLink pythonFunction Function
+ HiLink pythonFunctionCall Function
+ HiLink pythonConditional Conditional
+ HiLink pythonRepeat Repeat
+ HiLink pythonException Exception
+ HiLink pythonOperator Operator
+
+ HiLink pythonDecorator Define
+ HiLink pythonDottedName Function
+
+ HiLink pythonComment Comment
+ if !s:Enabled('g:python_highlight_file_headers_as_comments')
+ HiLink pythonCoding Special
+ HiLink pythonRun Special
+ endif
+ HiLink pythonTodo Todo
+
+ HiLink pythonError Error
+ HiLink pythonIndentError Error
+ HiLink pythonSpaceError Error
+
+ HiLink pythonString String
+ HiLink pythonRawString String
+ HiLink pythonRawEscape Special
+
+ HiLink pythonUniEscape Special
+ HiLink pythonUniEscapeError Error
+
+ if s:Python2Syntax()
+ HiLink pythonUniString String
+ HiLink pythonUniRawString String
+ HiLink pythonUniRawEscape Special
+ HiLink pythonUniRawEscapeError Error
+ else
+ HiLink pythonBytes String
+ HiLink pythonRawBytes String
+ HiLink pythonBytesContent String
+ HiLink pythonBytesError Error
+ HiLink pythonBytesEscape Special
+ HiLink pythonBytesEscapeError Error
+ HiLink pythonFString String
+ HiLink pythonRawFString String
+ HiLink pythonStrInterpRegion Special
+ endif
+
+ HiLink pythonStrFormatting Special
+ HiLink pythonStrFormat Special
+ HiLink pythonStrTemplate Special
+
+ HiLink pythonDocTest Special
+ HiLink pythonDocTest2 Special
+
+ HiLink pythonNumber Number
+ HiLink pythonHexNumber Number
+ HiLink pythonOctNumber Number
+ HiLink pythonBinNumber Number
+ HiLink pythonFloat Float
+ HiLink pythonNumberError Error
+ HiLink pythonOctError Error
+ HiLink pythonHexError Error
+ HiLink pythonBinError Error
+
+ HiLink pythonBoolean Boolean
+ HiLink pythonNone Constant
+ HiLink pythonSingleton Constant
+
+ HiLink pythonBuiltinObj Identifier
+ HiLink pythonBuiltinFunc Function
+ HiLink pythonBuiltinType Structure
+
+ HiLink pythonExClass Structure
+ HiLink pythonClassVar Identifier
+
+ delcommand HiLink
endif
let b:current_syntax = 'python'
diff --git a/syntax/reason.vim b/syntax/reason.vim
index 19e8590b..f7188c68 100644
--- a/syntax/reason.vim
+++ b/syntax/reason.vim
@@ -16,154 +16,154 @@ endif
" Syntax definitions {{{1
" Basic keywords {{{2
-syn keyword rustConditional switch match if else for in when fun
-syn keyword rustOperator as
-
-syn match rustAssert "\<assert\(\w\)*!" contained
-syn match rustPanic "\<panic\(\w\)*!" contained
-syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
-syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
-" syn keyword rustKeyword fun nextgroup=rustFuncName skipwhite skipempty
-syn keyword rustKeyword unsafe where while lazy
-syn keyword rustStorage and class constraint exception external include inherit let method module nonrec open private rec type val with
+syn keyword reasonConditional switch match if else for in when fun
+syn keyword reasonOperator as
+
+syn match reasonAssert "\<assert\(\w\)*!" contained
+syn match reasonPanic "\<panic\(\w\)*!" contained
+syn keyword reasonKeyword box nextgroup=reasonBoxPlacement skipwhite skipempty
+syn keyword reasonKeyword extern nextgroup=reasonExternCrate,reasonObsoleteExternMod skipwhite skipempty
+" syn keyword reasonKeyword fun nextgroup=reasonFuncName skipwhite skipempty
+syn keyword reasonKeyword unsafe where while lazy
+syn keyword reasonStorage and class constraint exception external include inherit let method module nonrec open private rec type val with
" FIXME: Scoped impl's name is also fallen in this category
-" syn keyword rustStorageIdent let and module type nextgroup=rustIdentifier skipwhite skipempty
+" syn keyword reasonStorageIdent let and module type nextgroup=reasonIdentifier skipwhite skipempty
-syn keyword rustExternCrate crate contained nextgroup=rustIdentifier,rustExternCrateString skipwhite skipempty
+syn keyword reasonExternCrate crate contained nextgroup=reasonIdentifier,reasonExternCrateString skipwhite skipempty
" This is to get the `bar` part of `extern crate "foo" as bar;` highlighting.
-syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifier skipwhite transparent skipempty contains=rustString,rustOperator
-syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty
+syn match reasonExternCrateString /".*"\_s*as/ contained nextgroup=reasonIdentifier skipwhite transparent skipempty contains=reasonString,reasonOperator
+syn keyword reasonObsoleteExternMod mod contained nextgroup=reasonIdentifier skipwhite skipempty
-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 reasonIdentifier contains=reasonIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
+syn match reasonFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
"
syn match labelArgument "\(\l\|_\)\(\w\|'\)*::\(?\)\?"lc=0 "Allows any space between label name and ::
syn match labelArgumentPunned "::\(?\)\?\(\l\|_\)\(\w\|'\)*"lc=0 "Allows any space between label name and ::
-syn match rustEnumVariant "\<\u\(\w\|'\)*\>[^\.]"me=e-1
+syn match reasonEnumVariant "\<\u\(\w\|'\)*\>[^\.]"me=e-1
" Polymorphic variants
-syn match rustEnumVariant "`\w\(\w\|'\)*\>"
+syn match reasonEnumVariant "`\w\(\w\|'\)*\>"
-syn match rustModPath "\<\u\w*\."
+syn match reasonModPath "\<\u\w*\."
-syn region rustBoxPlacement matchgroup=rustBoxPlacementParens start="(" end=")" contains=TOP contained
+syn region reasonBoxPlacement matchgroup=reasonBoxPlacementParens start="(" end=")" contains=TOP contained
" Ideally we'd have syntax rules set up to match arbitrary expressions. Since
" we don't, we'll just define temporary contained rules to handle balancing
" delimiters.
-syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlacement transparent
-syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
-" {} are handled by rustFoldBraces
+syn region reasonBoxPlacementBalance start="(" end=")" containedin=reasonBoxPlacement transparent
+syn region reasonBoxPlacementBalance start="\[" end="\]" containedin=reasonBoxPlacement transparent
+" {} are handled by reasonFoldBraces
-syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount
-syn match rustMacroRepeatCount ".\?[*+]" contained
-syn match rustMacroVariable "$\w\+"
+syn region reasonMacroRepeat matchgroup=reasonMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=reasonMacroRepeatCount
+syn match reasonMacroRepeatCount ".\?[*+]" contained
+syn match reasonMacroVariable "$\w\+"
" Reserved (but not yet used) keywords {{{2
-syn keyword rustReservedKeyword alignof become do offsetof priv pure sizeof typeof unsized yield abstract virtual final override macro
+syn keyword reasonReservedKeyword alignof become do offsetof priv pure sizeof typeof unsized yield abstract virtual final override macro
" Built-in types {{{2
-syn keyword rustType int float option list array unit ref bool string
+syn keyword reasonType int float option list array unit ref bool string
" Things from the libstd v1 prelude (src/libstd/prelude/v1.rs) {{{2
" This section is just straight transformation of the contents of the prelude,
" to make it easy to update.
" Reexported core operators {{{3
-syn keyword rustTrait Copy Send Sized Sync
-syn keyword rustTrait Drop Fn FnMut FnOnce
+syn keyword reasonTrait Copy Send Sized Sync
+syn keyword reasonTrait Drop Fn FnMut FnOnce
" Reexported functions {{{3
" There’s no point in highlighting these; when one writes drop( or drop::< it
" gets the same highlighting anyway, and if someone writes `let drop = …;` we
" don’t really want *that* drop to be highlighted.
-"syn keyword rustFunction drop
+"syn keyword reasonFunction drop
" Reexported types and traits {{{3
-syn keyword rustTrait Box
-syn keyword rustTrait ToOwned
-syn keyword rustTrait Clone
-syn keyword rustTrait PartialEq PartialOrd Eq Ord
-syn keyword rustTrait AsRef AsMut Into From
-syn keyword rustTrait Default
-syn keyword rustTrait Iterator Extend IntoIterator
-syn keyword rustTrait DoubleEndedIterator ExactSizeIterator
-syn keyword rustEnum Option
-syn keyword rustEnumVariant Some None
-syn keyword rustEnum Result
-syn keyword rustEnumVariant Ok Err
-syn keyword rustTrait SliceConcatExt
-syn keyword rustTrait String ToString
-syn keyword rustTrait Vec
+syn keyword reasonTrait Box
+syn keyword reasonTrait ToOwned
+syn keyword reasonTrait Clone
+syn keyword reasonTrait PartialEq PartialOrd Eq Ord
+syn keyword reasonTrait AsRef AsMut Into From
+syn keyword reasonTrait Default
+syn keyword reasonTrait Iterator Extend IntoIterator
+syn keyword reasonTrait DoubleEndedIterator ExactSizeIterator
+syn keyword reasonEnum Option
+syn keyword reasonEnumVariant Some None
+syn keyword reasonEnum Result
+syn keyword reasonEnumVariant Ok Err
+syn keyword reasonTrait SliceConcatExt
+syn keyword reasonTrait String ToString
+syn keyword reasonTrait Vec
" Other syntax {{{2
-syn keyword rustSelf self
-syn keyword rustBoolean true false
+syn keyword reasonSelf self
+syn keyword reasonBoolean true false
" This is merely a convention; note also the use of [A-Z], restricting it to
" latin identifiers rather than the full Unicode uppercase. I have not used
" [:upper:] as it depends upon 'noignorecase'
-"syn match rustCapsIdent display "[A-Z]\w\(\w\)*"
+"syn match reasonCapsIdent display "[A-Z]\w\(\w\)*"
-syn match rustOperator display "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\|>\|<\|%\)=\?"
+syn match reasonOperator display "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\|>\|<\|%\)=\?"
" This one isn't *quite* right, as we could have binary-& with a reference
" This isn't actually correct; a closure with no arguments can be `|| { }`.
" Last, because the & in && isn't a sigil
-syn match rustOperator display "&&\|||"
-" This is rustArrowCharacter rather than rustArrow for the sake of matchparen,
+syn match reasonOperator display "&&\|||"
+" This is reasonArrowCharacter rather than reasonArrow for the sake of matchparen,
" so it skips the ->; see http://stackoverflow.com/a/30309949 for details.
-syn match rustArrowCharacter display "=>"
-
-syn match rustEscapeError display contained /\\./
-syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
-syn match rustEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{8}\)/
-syn match rustEscapeUnicode display contained /\\u{\x\{1,6}}/
-syn match rustStringContinuation display contained /\\\n\s*/
-syn region rustString start='{j|' end='|j}' contains=rustMacroVariable,@Spell
-syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
-syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
-syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
-
-syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive
-syn region rustDerive start="derive(" end=")" contained contains=rustDeriveTrait
+syn match reasonArrowCharacter display "=>"
+
+syn match reasonEscapeError display contained /\\./
+syn match reasonEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
+syn match reasonEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{8}\)/
+syn match reasonEscapeUnicode display contained /\\u{\x\{1,6}}/
+syn match reasonStringContinuation display contained /\\\n\s*/
+syn region reasonString start='{j|' end='|j}' contains=reasonMacroVariable,@Spell
+syn region reasonString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=reasonEscape,reasonEscapeError,reasonStringContinuation
+syn region reasonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=reasonEscape,reasonEscapeUnicode,reasonEscapeError,reasonStringContinuation,@Spell
+syn region reasonString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
+
+syn region reasonAttribute start="#!\?\[" end="\]" contains=reasonString,reasonDerive
+syn region reasonDerive start="derive(" end=")" contained contains=reasonDeriveTrait
" This list comes from src/libsyntax/ext/deriving/mod.rs
" Some are deprecated (Encodable, Decodable) or to be removed after a new snapshot (Show).
-syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy
+syn keyword reasonDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy
" Number literals
-syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\)\)\="
-syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
-syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
-syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
+syn match reasonDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\)\)\="
+syn match reasonHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
+syn match reasonOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
+syn match reasonBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
" Special case for numbers of the form "1." which are float literals, unless followed by
" an identifier, which makes them integer literals with a method call or field access,
" or by another ".", which makes them integer literals followed by the ".." token.
" (This must go first so the others take precedence.)
-syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!"
+syn match reasonFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!"
" To mark a number as a normal float, it must have at least one of the three things integral values don't have:
" a decimal point and more numbers; an exponent; and a type suffix.
-syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
-syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\(f32\|f64\)\="
-syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)"
+syn match reasonFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
+syn match reasonFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\(f32\|f64\)\="
+syn match reasonFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)"
" For the benefit of delimitMate
-syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
+syn match reasonCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
-syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
-syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
-syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\|u{\x\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
-
-syn match rustShebang /\%^#![^[].*/
-syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
-syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
-syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell
-syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell
-syn region rustCommentBlockNest matchgroup=rustCommentBlock start="/\*" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell contained transparent
-syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell contained transparent
+syn match reasonCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
+syn match reasonCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=reasonEscape,reasonEscapeError,reasonCharacterInvalid,reasonCharacterInvalidUnicode
+syn match reasonCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\|u{\x\{1,6}}\)\)'/ contains=reasonEscape,reasonEscapeUnicode,reasonEscapeError,reasonCharacterInvalid
+
+syn match reasonShebang /\%^#![^[].*/
+syn region reasonCommentLine start="//" end="$" contains=reasonTodo,@Spell
+syn region reasonCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=reasonTodo,@Spell
+syn region reasonCommentBlock matchgroup=reasonCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=reasonTodo,reasonCommentBlockNest,@Spell
+syn region reasonCommentBlockDoc matchgroup=reasonCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=reasonTodo,reasonCommentBlockDocNest,@Spell
+syn region reasonCommentBlockNest matchgroup=reasonCommentBlock start="/\*" end="\*/" contains=reasonTodo,reasonCommentBlockNest,@Spell contained transparent
+syn region reasonCommentBlockDocNest matchgroup=reasonCommentBlockDoc start="/\*" end="\*/" contains=reasonTodo,reasonCommentBlockDocNest,@Spell contained transparent
" FIXME: this is a really ugly and not fully correct implementation. Most
" importantly, a case like ``/* */*`` should have the final ``*`` not being in
" a comment, but in practice at present it leaves comments open two levels
@@ -176,79 +176,79 @@ syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*"
" then you must deal with cases like ``/*/**/*/``. And don't try making it
" worse with ``\%(/\@<!\*\)\@<!``, either...
-syn keyword rustTodo contained TODO FIXME XXX NB NOTE
+syn keyword reasonTodo contained TODO FIXME XXX NB NOTE
" Folding rules {{{2
" Trivial folding rules to begin with.
" FIXME: use the AST to make really good folding
-syn region rustFoldBraces start="{" end="}" transparent fold
+syn region reasonFoldBraces start="{" end="}" transparent fold
" Default highlighting {{{1
hi def link labelArgument Special
hi def link labelArgumentPunned Special
-hi def link rustDecNumber rustNumber
-hi def link rustHexNumber rustNumber
-hi def link rustOctNumber rustNumber
-hi def link rustBinNumber rustNumber
-hi def link rustIdentifierPrime rustIdentifier
-hi def link rustTrait rustType
-hi def link rustDeriveTrait rustTrait
-
-hi def link rustMacroRepeatCount rustMacroRepeatDelimiters
-hi def link rustMacroRepeatDelimiters Macro
-hi def link rustMacroVariable Define
-hi def link rustEscape Special
-hi def link rustEscapeUnicode rustEscape
-hi def link rustEscapeError Error
-hi def link rustStringContinuation Special
-hi def link rustString String
-hi def link rustCharacterInvalid Error
-hi def link rustCharacterInvalidUnicode rustCharacterInvalid
-hi def link rustCharacter Character
-hi def link rustNumber Number
-hi def link rustBoolean Boolean
-hi def link rustEnum rustType
-hi def link rustEnumVariant Function
-hi def link rustModPath Macro
-hi def link rustConstant Constant
-hi def link rustSelf Constant
-hi def link rustFloat Float
-hi def link rustArrowCharacter rustOperator
-hi def link rustOperator Keyword
-hi def link rustKeyword Keyword
-hi def link rustReservedKeyword Error
-hi def link rustConditional StorageClass
-hi def link rustIdentifier Identifier
-hi def link rustCapsIdent rustIdentifier
-hi def link rustFunction Function
-hi def link rustFuncName Function
-hi def link rustShebang Comment
-hi def link rustCommentLine Comment
-hi def link rustCommentLineDoc Comment
-hi def link rustCommentBlock rustCommentLine
-hi def link rustCommentBlockDoc rustCommentLineDoc
-hi def link rustAssert PreCondit
-hi def link rustPanic PreCondit
-hi def link rustType Type
-hi def link rustTodo Todo
-hi def link rustAttribute PreProc
-hi def link rustDerive PreProc
-hi def link rustStorage Conditional
-hi def link rustStorageIdent StorageClass
-hi def link rustObsoleteStorage Error
-hi def link rustExternCrate rustKeyword
-hi def link rustObsoleteExternMod Error
-hi def link rustBoxPlacementParens Delimiter
+hi def link reasonDecNumber reasonNumber
+hi def link reasonHexNumber reasonNumber
+hi def link reasonOctNumber reasonNumber
+hi def link reasonBinNumber reasonNumber
+hi def link reasonIdentifierPrime reasonIdentifier
+hi def link reasonTrait reasonType
+hi def link reasonDeriveTrait reasonTrait
+
+hi def link reasonMacroRepeatCount reasonMacroRepeatDelimiters
+hi def link reasonMacroRepeatDelimiters Macro
+hi def link reasonMacroVariable Define
+hi def link reasonEscape Special
+hi def link reasonEscapeUnicode reasonEscape
+hi def link reasonEscapeError Error
+hi def link reasonStringContinuation Special
+hi def link reasonString String
+hi def link reasonCharacterInvalid Error
+hi def link reasonCharacterInvalidUnicode reasonCharacterInvalid
+hi def link reasonCharacter Character
+hi def link reasonNumber Number
+hi def link reasonBoolean Boolean
+hi def link reasonEnum reasonType
+hi def link reasonEnumVariant Function
+hi def link reasonModPath Macro
+hi def link reasonConstant Constant
+hi def link reasonSelf Constant
+hi def link reasonFloat Float
+hi def link reasonArrowCharacter reasonOperator
+hi def link reasonOperator Keyword
+hi def link reasonKeyword Keyword
+hi def link reasonReservedKeyword Error
+hi def link reasonConditional StorageClass
+hi def link reasonIdentifier Identifier
+hi def link reasonCapsIdent reasonIdentifier
+hi def link reasonFunction Function
+hi def link reasonFuncName Function
+hi def link reasonShebang Comment
+hi def link reasonCommentLine Comment
+hi def link reasonCommentLineDoc Comment
+hi def link reasonCommentBlock reasonCommentLine
+hi def link reasonCommentBlockDoc reasonCommentLineDoc
+hi def link reasonAssert PreCondit
+hi def link reasonPanic PreCondit
+hi def link reasonType Type
+hi def link reasonTodo Todo
+hi def link reasonAttribute PreProc
+hi def link reasonDerive PreProc
+hi def link reasonStorage Conditional
+hi def link reasonStorageIdent StorageClass
+hi def link reasonObsoleteStorage Error
+hi def link reasonExternCrate reasonKeyword
+hi def link reasonObsoleteExternMod Error
+hi def link reasonBoxPlacementParens Delimiter
" Other Suggestions:
-" hi rustAttribute ctermfg=cyan
-" hi rustDerive ctermfg=cyan
-" hi rustAssert ctermfg=yellow
-" hi rustPanic ctermfg=red
+" hi reasonAttribute ctermfg=cyan
+" hi reasonDerive ctermfg=cyan
+" hi reasonAssert ctermfg=yellow
+" hi reasonPanic ctermfg=red
syn sync minlines=200
syn sync maxlines=500
-let b:current_syntax = "rust"
+let b:current_syntax = "reason"
endif
diff --git a/syntax/ruby.vim b/syntax/ruby.vim
index 90f1ceba..5821749c 100644
--- a/syntax/ruby.vim
+++ b/syntax/ruby.vim
@@ -93,7 +93,7 @@ if exists("ruby_operators") || exists("ruby_pseudo_operators")
syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||"
syn match rubyRangeOperator "\.\.\.\="
syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^="
- syn match rubyAssignmentOperator "=>\@!" containedin=rubyBlockParameterList " TODO: this is inelegant
+ syn match rubyAssignmentOperator "=>\@!" contained containedin=rubyBlockParameterList " TODO: this is inelegant
syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~"
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop
@@ -194,7 +194,7 @@ SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"':
syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@="
-syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop containedin=rubyBlockParameterList
+syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop contained containedin=rubyBlockParameterList
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" contains=ALLBUT,@rubyNotTop,@rubyProperOperator
if exists('ruby_global_variable_error')
diff --git a/syntax/terraform.vim b/syntax/terraform.vim
index 03b20c2c..d72c7857 100644
--- a/syntax/terraform.vim
+++ b/syntax/terraform.vim
@@ -75,10 +75,13 @@ syn keyword terraDataTypeBI
\ alicloud_actiontrails
\ alicloud_alikafka_consumer_groups
\ alicloud_alikafka_instances
+ \ alicloud_alikafka_sasl_acls
+ \ alicloud_alikafka_sasl_users
\ alicloud_alikafka_topics
\ alicloud_api_gateway_apis
\ alicloud_api_gateway_apps
\ alicloud_api_gateway_groups
+ \ alicloud_caller_identity
\ alicloud_cas_certificates
\ alicloud_cen_bandwidth_limits
\ alicloud_cen_bandwidth_packages
@@ -119,15 +122,20 @@ syn keyword terraDataTypeBI
\ alicloud_file_crc64_checksum
\ alicloud_forward_entries
\ alicloud_gpdb_instances
+ \ alicloud_hbase_instances
\ alicloud_images
\ alicloud_instance_type_families
\ alicloud_instance_types
\ alicloud_instances
\ alicloud_key_pairs
+ \ alicloud_kms_ciphertext
\ alicloud_kms_keys
+ \ alicloud_kms_plaintext
\ alicloud_kvstore_instance_classes
\ alicloud_kvstore_instance_engines
\ alicloud_kvstore_instances
+ \ alicloud_market_product
+ \ alicloud_market_products
\ alicloud_mns_queues
\ alicloud_mns_topic_subscriptions
\ alicloud_mns_topics
@@ -148,6 +156,10 @@ syn keyword terraDataTypeBI
\ alicloud_ots_instance_attachments
\ alicloud_ots_instances
\ alicloud_ots_tables
+ \ alicloud_polardb_accounts
+ \ alicloud_polardb_clusters
+ \ alicloud_polardb_databases
+ \ alicloud_polardb_endpoints
\ alicloud_pvtz_zone_records
\ alicloud_pvtz_zones
\ alicloud_ram_account_alias
@@ -183,9 +195,10 @@ syn keyword terraDataTypeBI
\ alicloud_vpn_customer_gateways
\ alicloud_vpn_gateways
\ alicloud_vswitches
+ \ alicloud_yundun_bastionhost_instances
+ \ alicloud_yundun_dbaudit_instance
\ alicloud_zones
\ archive_file
- \ atlas_artifact
\ avi_actiongroupconfig
\ avi_alertconfig
\ avi_alertemailconfig
@@ -229,6 +242,7 @@ syn keyword terraDataTypeBI
\ avi_networkprofile
\ avi_networksecuritypolicy
\ avi_networkservice
+ \ avi_objectaccesspolicy
\ avi_pingaccessagent
\ avi_pkiprofile
\ avi_pool
@@ -270,8 +284,11 @@ syn keyword terraDataTypeBI
\ avi_webhook
\ aviatrix_account
\ aviatrix_caller_identity
+ \ aviatrix_firenet
\ aviatrix_firenet_vendor_integration
\ aviatrix_gateway
+ \ aviatrix_spoke_gateway
+ \ aviatrix_transit_gateway
\ aws_acm_certificate
\ aws_acmpca_certificate_authority
\ aws_alb
@@ -307,6 +324,7 @@ syn keyword terraDataTypeBI
\ aws_db_event_categories
\ aws_db_instance
\ aws_db_snapshot
+ \ aws_directory_service_directory
\ aws_dx_gateway
\ aws_dynamodb_table
\ aws_ebs_default_kms_key
@@ -340,6 +358,7 @@ syn keyword terraDataTypeBI
\ aws_elb_hosted_zone_id
\ aws_elb_service_account
\ aws_glue_script
+ \ aws_guardduty_detector
\ aws_iam_account_alias
\ aws_iam_group
\ aws_iam_instance_profile
@@ -376,6 +395,7 @@ syn keyword terraDataTypeBI
\ aws_network_interface
\ aws_network_interfaces
\ aws_organizations_organization
+ \ aws_organizations_organizational_units
\ aws_partition
\ aws_prefix_list
\ aws_pricing_product
@@ -405,6 +425,7 @@ syn keyword terraDataTypeBI
\ aws_sqs_queue
\ aws_ssm_document
\ aws_ssm_parameter
+ \ aws_ssm_patch_baseline
\ aws_storagegateway_local_disk
\ aws_subnet
\ aws_subnet_ids
@@ -427,6 +448,7 @@ syn keyword terraDataTypeBI
\ aws_workspaces_bundle
\ azurerm_api_management
\ azurerm_api_management_api
+ \ azurerm_api_management_api_version_set
\ azurerm_api_management_group
\ azurerm_api_management_product
\ azurerm_api_management_user
@@ -443,7 +465,6 @@ syn keyword terraDataTypeBI
\ azurerm_automation_variable_string
\ azurerm_availability_set
\ azurerm_azuread_application
- \ azurerm_azuread_service_principal
\ azurerm_batch_account
\ azurerm_batch_certificate
\ azurerm_batch_pool
@@ -453,16 +474,21 @@ syn keyword terraDataTypeBI
\ azurerm_container_registry
\ azurerm_cosmosdb_account
\ azurerm_data_factory
- \ azurerm_data_lake_store
+ \ azurerm_dedicated_host
+ \ azurerm_dedicated_host_group
\ azurerm_dev_test_lab
- \ azurerm_dev_test_virtual_network
+ \ azurerm_disk_encryption_set
\ azurerm_dns_zone
+ \ azurerm_eventgrid_topic
\ azurerm_eventhub_namespace
+ \ azurerm_eventhub_namespace_authorization_rule
\ azurerm_express_route_circuit
\ azurerm_firewall
\ azurerm_hdinsight_cluster
\ azurerm_healthcare_service
\ azurerm_image
+ \ azurerm_iothub_dps
+ \ azurerm_iothub_shared_access_policy
\ azurerm_key_vault
\ azurerm_key_vault_access_policy
\ azurerm_key_vault_key
@@ -471,15 +497,18 @@ syn keyword terraDataTypeBI
\ azurerm_kubernetes_service_versions
\ azurerm_lb
\ azurerm_lb_backend_address_pool
- \ azurerm_log_analytics_workspace
\ azurerm_logic_app_workflow
\ azurerm_managed_disk
\ azurerm_management_group
\ azurerm_maps_account
+ \ azurerm_mariadb_server
\ azurerm_monitor_action_group
\ azurerm_monitor_diagnostic_categories
- \ azurerm_monitor_log_profile
\ azurerm_mssql_elasticpool
+ \ azurerm_nat_gateway
+ \ azurerm_netapp_account
+ \ azurerm_netapp_pool
+ \ azurerm_netapp_volume
\ azurerm_network_ddos_protection_plan
\ azurerm_network_interface
\ azurerm_network_security_group
@@ -489,6 +518,10 @@ syn keyword terraDataTypeBI
\ azurerm_platform_image
\ azurerm_policy_definition
\ azurerm_postgresql_server
+ \ azurerm_private_endpoint_connection
+ \ azurerm_private_link_endpoint_connection
+ \ azurerm_private_link_service
+ \ azurerm_private_link_service_endpoint_connections
\ azurerm_proximity_placement_group
\ azurerm_public_ip
\ azurerm_public_ip_prefix
@@ -506,12 +539,14 @@ syn keyword terraDataTypeBI
\ azurerm_shared_image
\ azurerm_shared_image_gallery
\ azurerm_shared_image_version
+ \ azurerm_signalr_service
\ azurerm_snapshot
\ azurerm_sql_database
\ azurerm_sql_server
\ azurerm_storage_account
\ azurerm_storage_account_blob_container_sas
\ azurerm_storage_account_sas
+ \ azurerm_storage_container
\ azurerm_storage_management_policy
\ azurerm_stream_analytics_job
\ azurerm_subnet
@@ -519,6 +554,7 @@ syn keyword terraDataTypeBI
\ azurerm_subscriptions
\ azurerm_traffic_manager_geographical_location
\ azurerm_user_assigned_identity
+ \ azurerm_virtual_hub
\ azurerm_virtual_machine
\ azurerm_virtual_network
\ azurerm_virtual_network_gateway
@@ -572,6 +608,7 @@ syn keyword terraDataTypeBI
\ digitalocean_floating_ip
\ digitalocean_image
\ digitalocean_kubernetes_cluster
+ \ digitalocean_kubernetes_versions
\ digitalocean_loadbalancer
\ digitalocean_record
\ digitalocean_sizes
@@ -589,7 +626,11 @@ syn keyword terraDataTypeBI
\ dns_txt_record_set
\ docker_network
\ docker_registry_image
+ \ exoscale_compute
+ \ exoscale_compute_ipaddress
\ exoscale_compute_template
+ \ exoscale_domain
+ \ exoscale_domain_record
\ external
\ fastly_ip_ranges
\ filter
@@ -612,6 +653,7 @@ syn keyword terraDataTypeBI
\ flexibleengine_images_image_v2
\ flexibleengine_kms_data_key_v1
\ flexibleengine_kms_key_v1
+ \ flexibleengine_lb_certificate_v2
\ flexibleengine_networking_network_v2
\ flexibleengine_networking_secgroup_v2
\ flexibleengine_rds_flavors_v1
@@ -620,6 +662,7 @@ syn keyword terraDataTypeBI
\ flexibleengine_rts_stack_resource_v1
\ flexibleengine_rts_stack_v1
\ flexibleengine_s3_bucket_object
+ \ flexibleengine_sdrs_domain_v1
\ flexibleengine_sfs_file_system_v2
\ flexibleengine_vbs_backup_policy_v2
\ flexibleengine_vbs_backup_v2
@@ -640,6 +683,7 @@ syn keyword terraDataTypeBI
\ gitlab_user
\ gitlab_users
\ google_active_folder
+ \ google_bigquery_default_service_account
\ google_billing_account
\ google_client_config
\ google_client_openid_userinfo
@@ -660,6 +704,7 @@ syn keyword terraDataTypeBI
\ google_compute_region_instance_group
\ google_compute_regions
\ google_compute_resource_policy
+ \ google_compute_router
\ google_compute_ssl_certificate
\ google_compute_ssl_policy
\ google_compute_subnetwork
@@ -679,25 +724,37 @@ syn keyword terraDataTypeBI
\ google_kms_key_ring
\ google_kms_secret
\ google_kms_secret_ciphertext
+ \ google_monitoring_notification_channel
\ google_netblock_ip_ranges
\ google_organization
\ google_project
\ google_project_organization_policy
\ google_project_services
\ google_projects
+ \ google_secret_manager_secret_version
\ google_service_account
\ google_service_account_access_token
\ google_service_account_key
+ \ google_sql_ca_certs
\ google_storage_bucket_object
\ google_storage_object_signed_url
\ google_storage_project_service_account
\ google_storage_transfer_project_service_account
\ google_tpu_tensorflow_versions
\ grafana_data_source
+ \ gridscale_firewall
\ gridscale_ipv4
\ gridscale_ipv6
+ \ gridscale_isoimage
\ gridscale_loadbalancer
\ gridscale_network
+ \ gridscale_object_storage_accesskey
+ \ gridscale_paas
+ \ gridscale_paas_securityzone
+ \ gridscale_public_network
+ \ gridscale_server
+ \ gridscale_snapshot
+ \ gridscale_snapshotschedule
\ gridscale_sshkey
\ gridscale_storage
\ gridscale_template
@@ -722,6 +779,7 @@ syn keyword terraDataTypeBI
\ huaweicloud_cce_cluster_v3
\ huaweicloud_cce_node_v3
\ huaweicloud_cdm_flavors_v1
+ \ huaweicloud_compute_availability_zones_v2
\ huaweicloud_csbs_backup_policy_v1
\ huaweicloud_csbs_backup_v1
\ huaweicloud_cts_tracker_v1
@@ -742,6 +800,7 @@ syn keyword terraDataTypeBI
\ huaweicloud_networking_secgroup_v2
\ huaweicloud_networking_subnet_v2
\ huaweicloud_rds_flavors_v1
+ \ huaweicloud_rds_flavors_v3
\ huaweicloud_rts_software_config_v1
\ huaweicloud_rts_stack_resource_v1
\ huaweicloud_rts_stack_v1
@@ -749,12 +808,18 @@ syn keyword terraDataTypeBI
\ huaweicloud_sfs_file_system_v2
\ huaweicloud_vbs_backup_policy_v2
\ huaweicloud_vbs_backup_v2
+ \ huaweicloud_vpc_ids_v1
\ huaweicloud_vpc_peering_connection_v2
\ huaweicloud_vpc_route_ids_v2
\ huaweicloud_vpc_route_v2
\ huaweicloud_vpc_subnet_ids_v1
\ huaweicloud_vpc_subnet_v1
\ huaweicloud_vpc_v1
+ \ huaweicloudstack_images_image_v2
+ \ huaweicloudstack_networking_network_v2
+ \ huaweicloudstack_networking_port_v2
+ \ huaweicloudstack_networking_secgroup_v2
+ \ huaweicloudstack_networking_subnet_v2
\ ignition_config
\ ignition_directory
\ ignition_disk
@@ -780,24 +845,39 @@ syn keyword terraDataTypeBI
\ linode_region
\ linode_sshkey
\ linode_user
+ \ linode_volume
\ local_file
\ logentries_logset
\ logicmonitor_collectors
+ \ logicmonitor_dashboard
+ \ logicmonitor_dashboard_group
\ logicmonitor_device_group
+ \ metalcloud_volume_template
+ \ mongodbatlas_alert_configuration
+ \ mongodbatlas_auditing
\ mongodbatlas_cloud_provider_snapshot
\ mongodbatlas_cloud_provider_snapshot_restore_job
\ mongodbatlas_cloud_provider_snapshot_restore_jobs
\ mongodbatlas_cloud_provider_snapshots
\ mongodbatlas_cluster
\ mongodbatlas_clusters
+ \ mongodbatlas_custom_db_role
+ \ mongodbatlas_custom_db_roles
\ mongodbatlas_database_user
\ mongodbatlas_database_users
+ \ mongodbatlas_global_cluster_config
+ \ mongodbatlas_maintenance_window
\ mongodbatlas_network_container
\ mongodbatlas_network_containers
\ mongodbatlas_network_peering
\ mongodbatlas_network_peerings
+ \ mongodbatlas_private_endpoint
+ \ mongodbatlas_private_endpoint_interface_link
\ mongodbatlas_project
\ mongodbatlas_projects
+ \ mongodbatlas_team
+ \ mongodbatlas_teams
+ \ mongodbatlas_x509_authentication_database_user
\ ncloud_access_control_group
\ ncloud_access_control_groups
\ ncloud_access_control_rule
@@ -820,6 +900,8 @@ syn keyword terraDataTypeBI
\ newrelic_alert_policy
\ newrelic_application
\ newrelic_key_transaction
+ \ newrelic_plugin
+ \ newrelic_plugin_component
\ newrelic_synthetics_monitor
\ nomad_acl_policy
\ nomad_acl_token
@@ -832,12 +914,35 @@ syn keyword terraDataTypeBI
\ ns1_zone
\ nsxt_certificate
\ nsxt_edge_cluster
+ \ nsxt_firewall_section
\ nsxt_ip_pool
\ nsxt_logical_tier0_router
\ nsxt_logical_tier1_router
\ nsxt_mac_pool
\ nsxt_ns_group
\ nsxt_ns_service
+ \ nsxt_policy_certificate
+ \ nsxt_policy_edge_cluster
+ \ nsxt_policy_edge_node
+ \ nsxt_policy_ip_discovery_profile
+ \ nsxt_policy_ipv6_dad_profile
+ \ nsxt_policy_ipv6_ndra_profile
+ \ nsxt_policy_lb_app_profile
+ \ nsxt_policy_lb_client_ssl_profile
+ \ nsxt_policy_lb_monitor
+ \ nsxt_policy_lb_persistence_profile
+ \ nsxt_policy_lb_server_ssl_profile
+ \ nsxt_policy_mac_discovery_profile
+ \ nsxt_policy_qos_profile
+ \ nsxt_policy_realization_info
+ \ nsxt_policy_segment_security_profile
+ \ nsxt_policy_service
+ \ nsxt_policy_spoofguard_profile
+ \ nsxt_policy_tier0_gateway
+ \ nsxt_policy_tier1_gateway
+ \ nsxt_policy_transport_zone
+ \ nsxt_policy_vm
+ \ nsxt_policy_vni_pool
\ nsxt_switching_profile
\ nsxt_transport_zone
\ null_data_source
@@ -850,6 +955,12 @@ syn keyword terraDataTypeBI
\ nutanix_virtual_machine
\ nutanix_volume_group
\ nutanix_volume_groups
+ \ oci_analytics_analytics_instance
+ \ oci_analytics_analytics_instances
+ \ oci_apigateway_deployment
+ \ oci_apigateway_deployments
+ \ oci_apigateway_gateway
+ \ oci_apigateway_gateways
\ oci_audit_configuration
\ oci_audit_events
\ oci_autoscaling_auto_scaling_configuration
@@ -975,6 +1086,7 @@ syn keyword terraDataTypeBI
\ oci_database_autonomous_databases
\ oci_database_autonomous_db_preview_versions
\ oci_database_autonomous_exadata_infrastructure
+ \ oci_database_autonomous_exadata_infrastructure_ocpu
\ oci_database_autonomous_exadata_infrastructure_shapes
\ oci_database_autonomous_exadata_infrastructures
\ oci_database_backup_destination
@@ -1008,11 +1120,35 @@ syn keyword terraDataTypeBI
\ oci_database_vm_cluster_networks
\ oci_database_vm_cluster_recommended_network
\ oci_database_vm_clusters
+ \ oci_datacatalog_catalog
+ \ oci_datacatalog_catalog_type
+ \ oci_datacatalog_catalog_types
+ \ oci_datacatalog_catalogs
+ \ oci_datacatalog_connection
+ \ oci_datacatalog_connections
+ \ oci_datacatalog_data_asset
+ \ oci_datacatalog_data_assets
+ \ oci_dataflow_application
+ \ oci_dataflow_applications
+ \ oci_dataflow_invoke_run
+ \ oci_dataflow_invoke_runs
+ \ oci_dataflow_run_log
+ \ oci_dataflow_run_logs
+ \ oci_datascience_model
+ \ oci_datascience_model_provenance
+ \ oci_datascience_models
+ \ oci_datascience_notebook_session
+ \ oci_datascience_notebook_session_shapes
+ \ oci_datascience_notebook_sessions
+ \ oci_datascience_project
+ \ oci_datascience_projects
\ oci_dns_records
\ oci_dns_steering_policies
\ oci_dns_steering_policy
\ oci_dns_steering_policy_attachment
\ oci_dns_steering_policy_attachments
+ \ oci_dns_tsig_key
+ \ oci_dns_tsig_keys
\ oci_dns_zones
\ oci_email_sender
\ oci_email_senders
@@ -1067,6 +1203,8 @@ syn keyword terraDataTypeBI
\ oci_identity_user
\ oci_identity_user_group_memberships
\ oci_identity_users
+ \ oci_integration_integration_instance
+ \ oci_integration_integration_instances
\ oci_kms_decrypted_data
\ oci_kms_encrypted_data
\ oci_kms_key
@@ -1098,6 +1236,15 @@ syn keyword terraDataTypeBI
\ oci_load_balancer_rule_sets
\ oci_load_balancer_shapes
\ oci_load_balancers
+ \ oci_marketplace_accepted_agreement
+ \ oci_marketplace_accepted_agreements
+ \ oci_marketplace_categories
+ \ oci_marketplace_listing
+ \ oci_marketplace_listing_package
+ \ oci_marketplace_listing_package_agreements
+ \ oci_marketplace_listing_packages
+ \ oci_marketplace_listings
+ \ oci_marketplace_publishers
\ oci_monitoring_alarm
\ oci_monitoring_alarm_history_collection
\ oci_monitoring_alarm_statuses
@@ -1122,8 +1269,21 @@ syn keyword terraDataTypeBI
\ oci_ons_notification_topics
\ oci_ons_subscription
\ oci_ons_subscriptions
+ \ oci_osmanagement_managed_instance
+ \ oci_osmanagement_managed_instance_group
+ \ oci_osmanagement_managed_instance_groups
+ \ oci_osmanagement_managed_instances
+ \ oci_osmanagement_software_source
+ \ oci_osmanagement_software_sources
+ \ oci_resourcemanager_stack
+ \ oci_resourcemanager_stack_tf_state
+ \ oci_resourcemanager_stacks
+ \ oci_streaming_connect_harness
+ \ oci_streaming_connect_harnesses
\ oci_streaming_stream
\ oci_streaming_stream_archiver
+ \ oci_streaming_stream_pool
+ \ oci_streaming_stream_pools
\ oci_streaming_streams
\ oci_waas_address_list
\ oci_waas_address_lists
@@ -1159,6 +1319,8 @@ syn keyword terraDataTypeBI
\ openstack_blockstorage_availability_zones_v3
\ openstack_blockstorage_snapshot_v2
\ openstack_blockstorage_snapshot_v3
+ \ openstack_blockstorage_volume_v2
+ \ openstack_blockstorage_volume_v3
\ openstack_compute_availability_zones_v2
\ openstack_compute_flavor_v2
\ openstack_compute_keypair_v2
@@ -1245,12 +1407,23 @@ syn keyword terraDataTypeBI
\ oraclepaas_database_service_instance
\ ovh_cloud_region
\ ovh_cloud_regions
+ \ ovh_dedicated_installation_templates
+ \ ovh_dedicated_server
+ \ ovh_dedicated_server_boots
+ \ ovh_dedicated_servers
\ ovh_domain_zone
\ ovh_iploadbalancing
+ \ ovh_iploadbalancing_vrack_network
+ \ ovh_iploadbalancing_vrack_networks
+ \ ovh_me_installation_template
+ \ ovh_me_installation_templates
\ ovh_me_paymentmean_bankaccount
\ ovh_me_paymentmean_creditcard
+ \ ovh_me_ssh_key
+ \ ovh_me_ssh_keys
\ ovh_publiccloud_region
\ ovh_publiccloud_regions
+ \ ovh_vracks
\ packet_device
\ packet_ip_block_ranges
\ packet_operating_system
@@ -1342,8 +1515,14 @@ syn keyword terraDataTypeBI
\ runscope_integrations
\ scaffolding_data_source
\ scaleway_account_ssh_key
+ \ scaleway_baremetal_offer_beta
\ scaleway_bootscript
\ scaleway_image
+ \ scaleway_instance_image
+ \ scaleway_instance_security_group
+ \ scaleway_instance_server
+ \ scaleway_instance_volume
+ \ scaleway_marketplace_image_beta
\ scaleway_security_group
\ scaleway_volume
\ skytap_project
@@ -1384,6 +1563,7 @@ syn keyword terraDataTypeBI
\ tencentcloud_cam_saml_providers
\ tencentcloud_cam_user_policy_attachments
\ tencentcloud_cam_users
+ \ tencentcloud_cbs_snapshot_policies
\ tencentcloud_cbs_snapshots
\ tencentcloud_cbs_storages
\ tencentcloud_ccn_bandwidth_limits
@@ -1400,6 +1580,13 @@ syn keyword terraDataTypeBI
\ tencentcloud_container_clusters
\ tencentcloud_cos_bucket_object
\ tencentcloud_cos_buckets
+ \ tencentcloud_dayu_cc_http_policies
+ \ tencentcloud_dayu_cc_https_policies
+ \ tencentcloud_dayu_ddos_policies
+ \ tencentcloud_dayu_ddos_policy_attachments
+ \ tencentcloud_dayu_ddos_policy_cases
+ \ tencentcloud_dayu_l4_rules
+ \ tencentcloud_dayu_l7_rules
\ tencentcloud_dc_gateway_ccn_routes
\ tencentcloud_dc_gateway_instances
\ tencentcloud_dc_instances
@@ -1409,6 +1596,7 @@ syn keyword terraDataTypeBI
\ tencentcloud_eips
\ tencentcloud_enis
\ tencentcloud_gaap_certificates
+ \ tencentcloud_gaap_domain_error_pages
\ tencentcloud_gaap_http_domains
\ tencentcloud_gaap_http_rules
\ tencentcloud_gaap_layer4_listeners
@@ -1417,7 +1605,10 @@ syn keyword terraDataTypeBI
\ tencentcloud_gaap_realservers
\ tencentcloud_gaap_security_policies
\ tencentcloud_gaap_security_rules
+ \ tencentcloud_ha_vip_eip_attachments
+ \ tencentcloud_ha_vips
\ tencentcloud_image
+ \ tencentcloud_images
\ tencentcloud_instance_types
\ tencentcloud_instances
\ tencentcloud_key_pairs
@@ -1443,11 +1634,20 @@ syn keyword terraDataTypeBI
\ tencentcloud_security_groups
\ tencentcloud_ssl_certificates
\ tencentcloud_subnet
+ \ tencentcloud_tcaplus_applications
+ \ tencentcloud_tcaplus_idls
+ \ tencentcloud_tcaplus_tables
+ \ tencentcloud_tcaplus_zones
\ tencentcloud_vpc
\ tencentcloud_vpc_instances
\ tencentcloud_vpc_route_tables
\ tencentcloud_vpc_subnets
+ \ tencentcloud_vpn_connections
+ \ tencentcloud_vpn_customer_gateways
+ \ tencentcloud_vpn_gateways
\ terraform_remote_state
+ \ test_data_source
+ \ test_provider_label
\ tfe_ssh_key
\ tfe_team
\ tfe_team_access
@@ -1486,6 +1686,7 @@ syn keyword terraDataTypeBI
\ vsphere_host
\ vsphere_network
\ vsphere_resource_pool
+ \ vsphere_storage_policy
\ vsphere_tag
\ vsphere_tag_category
\ vsphere_vapp_container
@@ -1518,6 +1719,7 @@ syn keyword terraDataTypeBI
\ yandex_compute_instance_group
\ yandex_compute_snapshot
\ yandex_container_registry
+ \ yandex_dataproc_cluster
\ yandex_iam_policy
\ yandex_iam_role
\ yandex_iam_service_account
@@ -1526,6 +1728,10 @@ syn keyword terraDataTypeBI
\ yandex_kubernetes_node_group
\ yandex_lb_network_load_balancer
\ yandex_lb_target_group
+ \ yandex_mdb_clickhouse_cluster
+ \ yandex_mdb_mongodb_cluster
+ \ yandex_mdb_mysql_cluster
+ \ yandex_mdb_postgresql_cluster
\ yandex_mdb_redis_cluster
\ yandex_resourcemanager_cloud
\ yandex_resourcemanager_folder
@@ -1596,6 +1802,8 @@ syn keyword terraResourceTypeBI
\ alicloud_actiontrail
\ alicloud_alikafka_consumer_group
\ alicloud_alikafka_instance
+ \ alicloud_alikafka_sasl_acl
+ \ alicloud_alikafka_sasl_user
\ alicloud_alikafka_topic
\ alicloud_api_gateway_api
\ alicloud_api_gateway_app
@@ -1614,14 +1822,18 @@ syn keyword terraResourceTypeBI
\ alicloud_cen_instance_grant
\ alicloud_cen_route_entry
\ alicloud_cloud_connect_network
+ \ alicloud_cloud_connect_network_attachment
+ \ alicloud_cloud_connect_network_grant
\ alicloud_cms_alarm
\ alicloud_common_bandwidth_package
\ alicloud_common_bandwidth_package_attachment
\ alicloud_container_cluster
+ \ alicloud_copy_image
\ alicloud_cr_namespace
\ alicloud_cr_repo
\ alicloud_cs_application
\ alicloud_cs_kubernetes
+ \ alicloud_cs_kubernetes_autoscaler
\ alicloud_cs_managed_kubernetes
\ alicloud_cs_serverless_kubernetes
\ alicloud_cs_swarm
@@ -1666,10 +1878,18 @@ syn keyword terraResourceTypeBI
\ alicloud_gpdb_instance
\ alicloud_havip
\ alicloud_havip_attachment
+ \ alicloud_hbase_instance
+ \ alicloud_image
+ \ alicloud_image_copy
+ \ alicloud_image_export
+ \ alicloud_image_import
+ \ alicloud_image_share_permission
\ alicloud_instance
\ alicloud_key_pair
\ alicloud_key_pair_attachment
+ \ alicloud_kms_ciphertext
\ alicloud_kms_key
+ \ alicloud_kvstore_account
\ alicloud_kvstore_backup_policy
\ alicloud_kvstore_instance
\ alicloud_launch_template
@@ -1679,6 +1899,7 @@ syn keyword terraResourceTypeBI
\ alicloud_log_store_index
\ alicloud_logtail_attachment
\ alicloud_logtail_config
+ \ alicloud_market_order
\ alicloud_mns_queue
\ alicloud_mns_topic
\ alicloud_mns_topic_subscription
@@ -1702,6 +1923,12 @@ syn keyword terraResourceTypeBI
\ alicloud_ots_instance
\ alicloud_ots_instance_attachment
\ alicloud_ots_table
+ \ alicloud_polardb_account
+ \ alicloud_polardb_account_privilege
+ \ alicloud_polardb_backup_policy
+ \ alicloud_polardb_cluster
+ \ alicloud_polardb_database
+ \ alicloud_polardb_endpoint_address
\ alicloud_pvtz_zone
\ alicloud_pvtz_zone_attachment
\ alicloud_pvtz_zone_record
@@ -1719,6 +1946,7 @@ syn keyword terraResourceTypeBI
\ alicloud_ram_role_policy_attachment
\ alicloud_ram_user
\ alicloud_ram_user_policy_attachment
+ \ alicloud_reserved_instance
\ alicloud_route_entry
\ alicloud_route_table
\ alicloud_route_table_attachment
@@ -1726,6 +1954,8 @@ syn keyword terraResourceTypeBI
\ alicloud_router_interface_connection
\ alicloud_sag_acl
\ alicloud_sag_acl_rule
+ \ alicloud_sag_client_user
+ \ alicloud_sag_dnat_entry
\ alicloud_sag_qos
\ alicloud_sag_qos_car
\ alicloud_sag_qos_policy
@@ -1755,8 +1985,10 @@ syn keyword terraResourceTypeBI
\ alicloud_vpn_gateway
\ alicloud_vpn_route_entry
\ alicloud_vswitch
+ \ alicloud_yundun_bastionhost_instance
+ \ alicloud_yundun_dbaudit_instance
\ arukas_container
- \ atlas_artifact
+ \ auth0_resource_server
\ avi_actiongroupconfig
\ avi_alertconfig
\ avi_alertemailconfig
@@ -1800,6 +2032,7 @@ syn keyword terraResourceTypeBI
\ avi_networkprofile
\ avi_networksecuritypolicy
\ avi_networkservice
+ \ avi_objectaccesspolicy
\ avi_pingaccessagent
\ avi_pkiprofile
\ avi_pool
@@ -1845,6 +2078,7 @@ syn keyword terraResourceTypeBI
\ aviatrix_arm_peer
\ aviatrix_aws_peer
\ aviatrix_aws_tgw
+ \ aviatrix_aws_tgw_directconnect
\ aviatrix_aws_tgw_vpc_attachment
\ aviatrix_aws_tgw_vpn_conn
\ aviatrix_controller_config
@@ -1854,6 +2088,9 @@ syn keyword terraResourceTypeBI
\ aviatrix_firewall_tag
\ aviatrix_fqdn
\ aviatrix_gateway
+ \ aviatrix_gateway_dnat
+ \ aviatrix_gateway_snat
+ \ aviatrix_geo_vpn
\ aviatrix_saml_endpoint
\ aviatrix_site2cloud
\ aviatrix_spoke_gateway
@@ -1868,6 +2105,7 @@ syn keyword terraResourceTypeBI
\ aviatrix_vpn_profile
\ aviatrix_vpn_user
\ aviatrix_vpn_user_accelerator
+ \ aws_accessanalyzer_analyzer
\ aws_acm_certificate
\ aws_acm_certificate_validation
\ aws_acmpca_certificate_authority
@@ -1989,6 +2227,7 @@ syn keyword terraResourceTypeBI
\ aws_datasync_location_efs
\ aws_datasync_location_nfs
\ aws_datasync_location_s3
+ \ aws_datasync_location_smb
\ aws_datasync_task
\ aws_dax_cluster
\ aws_dax_parameter_group
@@ -2033,6 +2272,8 @@ syn keyword terraResourceTypeBI
\ aws_dx_hosted_private_virtual_interface_accepter
\ aws_dx_hosted_public_virtual_interface
\ aws_dx_hosted_public_virtual_interface_accepter
+ \ aws_dx_hosted_transit_virtual_interface
+ \ aws_dx_hosted_transit_virtual_interface_accepter
\ aws_dx_lag
\ aws_dx_private_virtual_interface
\ aws_dx_public_virtual_interface
@@ -2059,6 +2300,7 @@ syn keyword terraResourceTypeBI
\ aws_ecr_lifecycle_policy
\ aws_ecr_repository
\ aws_ecr_repository_policy
+ \ aws_ecs_capacity_provider
\ aws_ecs_cluster
\ aws_ecs_service
\ aws_ecs_task_definition
@@ -2068,6 +2310,8 @@ syn keyword terraResourceTypeBI
\ aws_eip
\ aws_eip_association
\ aws_eks_cluster
+ \ aws_eks_fargate_profile
+ \ aws_eks_node_group
\ aws_elastic_beanstalk_application
\ aws_elastic_beanstalk_application_version
\ aws_elastic_beanstalk_configuration_template
@@ -2107,6 +2351,7 @@ syn keyword terraResourceTypeBI
\ aws_glue_job
\ aws_glue_security_configuration
\ aws_glue_trigger
+ \ aws_glue_workflow
\ aws_guardduty_detector
\ aws_guardduty_invite_accepter
\ aws_guardduty_ipset
@@ -2160,8 +2405,10 @@ syn keyword terraResourceTypeBI
\ aws_lambda_alias
\ aws_lambda_event_source_mapping
\ aws_lambda_function
+ \ aws_lambda_function_event_invoke_config
\ aws_lambda_layer_version
\ aws_lambda_permission
+ \ aws_lambda_provisioned_concurrency_config
\ aws_launch_configuration
\ aws_launch_template
\ aws_lb
@@ -2185,6 +2432,7 @@ syn keyword terraResourceTypeBI
\ aws_macie_member_account_association
\ aws_macie_s3_bucket_association
\ aws_main_route_table_association
+ \ aws_media_convert_queue
\ aws_media_package_channel
\ aws_media_store_container
\ aws_media_store_container_policy
@@ -2395,6 +2643,8 @@ syn keyword terraResourceTypeBI
\ aws_wafregional_xss_match_set
\ aws_worklink_fleet
\ aws_worklink_website_certificate_authority_association
+ \ aws_workspaces_directory
+ \ aws_workspaces_ip_group
\ aws_xray_sampling_rule
\ azure_affinity_group
\ azure_data_disk
@@ -2419,6 +2669,7 @@ syn keyword terraResourceTypeBI
\ azuread_service_principal
\ azuread_service_principal_password
\ azuread_user
+ \ azurerm_advanced_threat_protection
\ azurerm_analysis_services_server
\ azurerm_api_management
\ azurerm_api_management_api
@@ -2430,8 +2681,14 @@ syn keyword terraResourceTypeBI
\ azurerm_api_management_authorization_server
\ azurerm_api_management_backend
\ azurerm_api_management_certificate
+ \ azurerm_api_management_diagnostic
\ azurerm_api_management_group
\ azurerm_api_management_group_user
+ \ azurerm_api_management_identity_provider_aad
+ \ azurerm_api_management_identity_provider_facebook
+ \ azurerm_api_management_identity_provider_google
+ \ azurerm_api_management_identity_provider_microsoft
+ \ azurerm_api_management_identity_provider_twitter
\ azurerm_api_management_logger
\ azurerm_api_management_openid_connect_provider
\ azurerm_api_management_product
@@ -2441,6 +2698,7 @@ syn keyword terraResourceTypeBI
\ azurerm_api_management_property
\ azurerm_api_management_subscription
\ azurerm_api_management_user
+ \ azurerm_app_configuration
\ azurerm_app_service
\ azurerm_app_service_active_slot
\ azurerm_app_service_certificate
@@ -2449,6 +2707,7 @@ syn keyword terraResourceTypeBI
\ azurerm_app_service_plan
\ azurerm_app_service_slot
\ azurerm_app_service_source_control_token
+ \ azurerm_app_service_virtual_network_swift_connection
\ azurerm_application_gateway
\ azurerm_application_insights
\ azurerm_application_insights_analytics_item
@@ -2456,6 +2715,7 @@ syn keyword terraResourceTypeBI
\ azurerm_application_insights_web_test
\ azurerm_application_security_group
\ azurerm_automation_account
+ \ azurerm_automation_certificate
\ azurerm_automation_credential
\ azurerm_automation_dsc_configuration
\ azurerm_automation_dsc_nodeconfiguration
@@ -2470,14 +2730,19 @@ syn keyword terraResourceTypeBI
\ azurerm_autoscale_setting
\ azurerm_availability_set
\ azurerm_azuread_application
- \ azurerm_azuread_service_principal
\ azurerm_azuread_service_principal_password
+ \ azurerm_backup_container_storage_account
+ \ azurerm_backup_policy_file_share
+ \ azurerm_backup_policy_vm
+ \ azurerm_backup_protected_file_share
+ \ azurerm_backup_protected_vm
\ azurerm_bastion_host
\ azurerm_batch_account
\ azurerm_batch_application
\ azurerm_batch_certificate
\ azurerm_batch_pool
\ azurerm_bot_channel_email
+ \ azurerm_bot_channel_ms_teams
\ azurerm_bot_channel_slack
\ azurerm_bot_channels_registration
\ azurerm_bot_connection
@@ -2492,11 +2757,12 @@ syn keyword terraResourceTypeBI
\ azurerm_container_service
\ azurerm_cosmosdb_account
\ azurerm_cosmosdb_cassandra_keyspace
+ \ azurerm_cosmosdb_gremlin_database
+ \ azurerm_cosmosdb_gremlin_graph
\ azurerm_cosmosdb_mongo_collection
\ azurerm_cosmosdb_mongo_database
\ azurerm_cosmosdb_sql_container
\ azurerm_cosmosdb_sql_database
- \ azurerm_cosmosdb_table
\ azurerm_dashboard
\ azurerm_data_factory
\ azurerm_data_factory_dataset_mysql
@@ -2508,20 +2774,22 @@ syn keyword terraResourceTypeBI
\ azurerm_data_factory_linked_service_postgresql
\ azurerm_data_factory_linked_service_sql_server
\ azurerm_data_factory_pipeline
+ \ azurerm_data_factory_trigger_schedule
\ azurerm_data_lake_analytics_account
\ azurerm_data_lake_analytics_firewall_rule
- \ azurerm_data_lake_store
\ azurerm_data_lake_store_file
\ azurerm_data_lake_store_firewall_rule
\ azurerm_databricks_workspace
\ azurerm_ddos_protection_plan
+ \ azurerm_dedicated_host
+ \ azurerm_dedicated_host_group
\ azurerm_dev_test_lab
\ azurerm_dev_test_linux_virtual_machine
\ azurerm_dev_test_policy
\ azurerm_dev_test_schedule
\ azurerm_dev_test_virtual_network
- \ azurerm_dev_test_windows_virtual_machine
\ azurerm_devspace_controller
+ \ azurerm_disk_encryption_set
\ azurerm_dns_a_record
\ azurerm_dns_aaaa_record
\ azurerm_dns_caa_record
@@ -2531,11 +2799,9 @@ syn keyword terraResourceTypeBI
\ azurerm_dns_ptr_record
\ azurerm_dns_srv_record
\ azurerm_dns_txt_record
- \ azurerm_dns_zone
\ azurerm_eventgrid_domain
\ azurerm_eventgrid_event_subscription
\ azurerm_eventgrid_topic
- \ azurerm_eventhub
\ azurerm_eventhub_authorization_rule
\ azurerm_eventhub_consumer_group
\ azurerm_eventhub_namespace
@@ -2549,7 +2815,6 @@ syn keyword terraResourceTypeBI
\ azurerm_firewall_nat_rule_collection
\ azurerm_firewall_network_rule_collection
\ azurerm_frontdoor
- \ azurerm_frontdoor_firewall_policy
\ azurerm_function_app
\ azurerm_hdinsight_hadoop_cluster
\ azurerm_hdinsight_hbase_cluster
@@ -2558,22 +2823,31 @@ syn keyword terraResourceTypeBI
\ azurerm_hdinsight_ml_services_cluster
\ azurerm_hdinsight_rserver_cluster
\ azurerm_hdinsight_spark_cluster
- \ azurerm_hdinsight_storm_cluster
\ azurerm_healthcare_service
\ azurerm_image
\ azurerm_iot_dps
\ azurerm_iot_dps_certificate
\ azurerm_iothub
\ azurerm_iothub_consumer_group
- \ azurerm_iothub_shared_access_policy
+ \ azurerm_iothub_dps
+ \ azurerm_iothub_dps_certificate
+ \ azurerm_iothub_dps_shared_access_policy
+ \ azurerm_iothub_endpoint_eventhub
+ \ azurerm_iothub_endpoint_servicebus_queue
+ \ azurerm_iothub_endpoint_servicebus_topic
+ \ azurerm_iothub_endpoint_storage_container
+ \ azurerm_iothub_fallback_route
+ \ azurerm_iothub_route
\ azurerm_key_vault
\ azurerm_key_vault_access_policy
\ azurerm_key_vault_certificate
\ azurerm_key_vault_key
\ azurerm_key_vault_secret
\ azurerm_kubernetes_cluster
+ \ azurerm_kubernetes_cluster_node_pool
\ azurerm_kusto_cluster
\ azurerm_kusto_database
+ \ azurerm_kusto_database_principal
\ azurerm_kusto_eventhub_data_connection
\ azurerm_lb
\ azurerm_lb_backend_address_pool
@@ -2585,14 +2859,12 @@ syn keyword terraResourceTypeBI
\ azurerm_local_network_gateway
\ azurerm_log_analytics_linked_service
\ azurerm_log_analytics_solution
- \ azurerm_log_analytics_workspace
\ azurerm_log_analytics_workspace_linked_service
\ azurerm_logic_app_action_custom
\ azurerm_logic_app_action_http
\ azurerm_logic_app_trigger_custom
\ azurerm_logic_app_trigger_http_request
\ azurerm_logic_app_trigger_recurrence
- \ azurerm_logic_app_workflow
\ azurerm_managed_disk
\ azurerm_management_group
\ azurerm_management_lock
@@ -2601,7 +2873,6 @@ syn keyword terraResourceTypeBI
\ azurerm_mariadb_database
\ azurerm_mariadb_firewall_rule
\ azurerm_mariadb_server
- \ azurerm_mariadb_virtual_network_rule
\ azurerm_marketplace_agreement
\ azurerm_media_services_account
\ azurerm_metric_alertrule
@@ -2611,13 +2882,18 @@ syn keyword terraResourceTypeBI
\ azurerm_monitor_diagnostic_setting
\ azurerm_monitor_log_profile
\ azurerm_monitor_metric_alert
- \ azurerm_monitor_metric_alertrule
+ \ azurerm_mssql_database_vulnerability_assessment_rule_baseline
\ azurerm_mssql_elasticpool
+ \ azurerm_mssql_server_security_alert_policy
+ \ azurerm_mssql_server_vulnerability_assessment
\ azurerm_mysql_configuration
\ azurerm_mysql_database
\ azurerm_mysql_firewall_rule
\ azurerm_mysql_server
- \ azurerm_mysql_virtual_network_rule
+ \ azurerm_nat_gateway
+ \ azurerm_netapp_account
+ \ azurerm_netapp_pool
+ \ azurerm_netapp_volume
\ azurerm_network_connection_monitor
\ azurerm_network_ddos_protection_plan
\ azurerm_network_interface
@@ -2630,10 +2906,12 @@ syn keyword terraResourceTypeBI
\ azurerm_network_security_group
\ azurerm_network_security_rule
\ azurerm_network_watcher
+ \ azurerm_network_watcher_flow_log
\ azurerm_notification_hub
\ azurerm_notification_hub_authorization_rule
\ azurerm_notification_hub_namespace
\ azurerm_packet_capture
+ \ azurerm_point_to_site_vpn_gateway
\ azurerm_policy_assignment
\ azurerm_policy_definition
\ azurerm_policy_set_definition
@@ -2643,10 +2921,16 @@ syn keyword terraResourceTypeBI
\ azurerm_postgresql_server
\ azurerm_postgresql_virtual_network_rule
\ azurerm_private_dns_a_record
+ \ azurerm_private_dns_aaaa_record
\ azurerm_private_dns_cname_record
+ \ azurerm_private_dns_mx_record
\ azurerm_private_dns_ptr_record
+ \ azurerm_private_dns_srv_record
\ azurerm_private_dns_zone
\ azurerm_private_dns_zone_virtual_network_link
+ \ azurerm_private_endpoint
+ \ azurerm_private_link_endpoint
+ \ azurerm_private_link_service
\ azurerm_proximity_placement_group
\ azurerm_public_ip
\ azurerm_public_ip_prefix
@@ -2661,6 +2945,7 @@ syn keyword terraResourceTypeBI
\ azurerm_recovery_services_vault
\ azurerm_redis_cache
\ azurerm_redis_firewall_rule
+ \ azurerm_relay_hybrid_connection
\ azurerm_relay_namespace
\ azurerm_resource_group
\ azurerm_resources
@@ -2687,6 +2972,12 @@ syn keyword terraResourceTypeBI
\ azurerm_shared_image_gallery
\ azurerm_shared_image_version
\ azurerm_signalr_service
+ \ azurerm_site_recovery_fabric
+ \ azurerm_site_recovery_network_mapping
+ \ azurerm_site_recovery_protection_container
+ \ azurerm_site_recovery_protection_container_mapping
+ \ azurerm_site_recovery_replicated_vm
+ \ azurerm_site_recovery_replication_policy
\ azurerm_snapshot
\ azurerm_sql_active_directory_administrator
\ azurerm_sql_database
@@ -2696,6 +2987,7 @@ syn keyword terraResourceTypeBI
\ azurerm_sql_server
\ azurerm_sql_virtual_network_rule
\ azurerm_storage_account
+ \ azurerm_storage_account_network_rules
\ azurerm_storage_blob
\ azurerm_storage_container
\ azurerm_storage_data_lake_gen2_filesystem
@@ -2712,16 +3004,19 @@ syn keyword terraResourceTypeBI
\ azurerm_stream_analytics_output_mssql
\ azurerm_stream_analytics_output_servicebus_queue
\ azurerm_stream_analytics_output_servicebus_topic
+ \ azurerm_stream_analytics_reference_input_blob
\ azurerm_stream_analytics_stream_input_blob
\ azurerm_stream_analytics_stream_input_eventhub
\ azurerm_stream_analytics_stream_input_iothub
\ azurerm_subnet
+ \ azurerm_subnet_nat_gateway_association
\ azurerm_subnet_network_security_group_association
\ azurerm_subnet_route_table_association
\ azurerm_template_deployment
\ azurerm_traffic_manager_endpoint
\ azurerm_traffic_manager_profile
\ azurerm_user_assigned_identity
+ \ azurerm_virtual_hub
\ azurerm_virtual_machine
\ azurerm_virtual_machine_data_disk_attachment
\ azurerm_virtual_machine_extension
@@ -2731,6 +3026,8 @@ syn keyword terraResourceTypeBI
\ azurerm_virtual_network_gateway_connection
\ azurerm_virtual_network_peering
\ azurerm_virtual_wan
+ \ azurerm_vpn_gateway
+ \ azurerm_vpn_server_configuration
\ azurerm_web_application_firewall_policy
\ azurestack_availability_set
\ azurestack_dns_a_record
@@ -2764,6 +3061,7 @@ syn keyword terraResourceTypeBI
\ bigip_as3
\ bigip_cm_device
\ bigip_cm_devicegroup
+ \ bigip_do
\ bigip_ltm_datagroup
\ bigip_ltm_irule
\ bigip_ltm_monitor
@@ -2800,9 +3098,12 @@ syn keyword terraResourceTypeBI
\ bigip_sys_provision
\ bigip_sys_snmp
\ bigip_sys_snmp_traps
+ \ bitbucket_branch_restriction
\ bitbucket_default_reviewers
\ bitbucket_hook
+ \ bitbucket_project
\ bitbucket_repository
+ \ bitbucket_repository_variable
\ brightbox_api_client
\ brightbox_cloudip
\ brightbox_database_server
@@ -2812,6 +3113,24 @@ syn keyword terraResourceTypeBI
\ brightbox_orbit_container
\ brightbox_server
\ brightbox_server_group
+ \ checkpoint_hostname
+ \ checkpoint_management_access_rule
+ \ checkpoint_management_address_range
+ \ checkpoint_management_group
+ \ checkpoint_management_host
+ \ checkpoint_management_install_policy
+ \ checkpoint_management_login
+ \ checkpoint_management_logout
+ \ checkpoint_management_network
+ \ checkpoint_management_package
+ \ checkpoint_management_publish
+ \ checkpoint_management_run_ips_update
+ \ checkpoint_management_service_group
+ \ checkpoint_management_service_tcp
+ \ checkpoint_management_service_udp
+ \ checkpoint_management_threat_indicator
+ \ checkpoint_physical_interface
+ \ checkpoint_put_file
\ chef_acl
\ chef_client
\ chef_cookbook
@@ -2826,10 +3145,14 @@ syn keyword terraResourceTypeBI
\ cherryservers_ssh
\ circonus_check
\ circonus_contact_group
+ \ circonus_dashboard
\ circonus_graph
+ \ circonus_maintenance
\ circonus_metric
\ circonus_metric_cluster
+ \ circonus_overlay_set
\ circonus_rule_set
+ \ circonus_rule_set_group
\ circonus_worksheet
\ ciscoasa_access_in_rules
\ ciscoasa_access_out_rules
@@ -2844,6 +3167,7 @@ syn keyword terraResourceTypeBI
\ clc_public_ip
\ clc_server
\ cloudflare_access_application
+ \ cloudflare_access_group
\ cloudflare_access_policy
\ cloudflare_access_rule
\ cloudflare_access_service_token
@@ -2857,6 +3181,7 @@ syn keyword terraResourceTypeBI
\ cloudflare_load_balancer_monitor
\ cloudflare_load_balancer_pool
\ cloudflare_logpush_job
+ \ cloudflare_origin_ca_certificate
\ cloudflare_page_rule
\ cloudflare_rate_limit
\ cloudflare_record
@@ -2866,10 +3191,12 @@ syn keyword terraResourceTypeBI
\ cloudflare_waf_rule
\ cloudflare_worker_route
\ cloudflare_worker_script
+ \ cloudflare_workers_kv_namespace
\ cloudflare_zone
\ cloudflare_zone_lockdown
\ cloudflare_zone_settings_override
\ cloudscale_floating_ip
+ \ cloudscale_network
\ cloudscale_server
\ cloudscale_server_group
\ cloudscale_volume
@@ -2917,6 +3244,7 @@ syn keyword terraResourceTypeBI
\ consul_intention
\ consul_key_prefix
\ consul_keys
+ \ consul_license
\ consul_node
\ consul_prepared_query
\ consul_service
@@ -2942,7 +3270,9 @@ syn keyword terraResourceTypeBI
\ digitalocean_cdn
\ digitalocean_certificate
\ digitalocean_database_cluster
+ \ digitalocean_database_connection_pool
\ digitalocean_database_db
+ \ digitalocean_database_firewall
\ digitalocean_database_replica
\ digitalocean_database_user
\ digitalocean_domain
@@ -2984,6 +3314,7 @@ syn keyword terraResourceTypeBI
\ exoscale_compute
\ exoscale_domain
\ exoscale_domain_record
+ \ exoscale_instance_pool
\ exoscale_ipaddress
\ exoscale_network
\ exoscale_nic
@@ -3067,6 +3398,11 @@ syn keyword terraResourceTypeBI
\ flexibleengine_s3_bucket
\ flexibleengine_s3_bucket_object
\ flexibleengine_s3_bucket_policy
+ \ flexibleengine_sdrs_drill_v1
+ \ flexibleengine_sdrs_protectedinstance_v1
+ \ flexibleengine_sdrs_protectiongroup_v1
+ \ flexibleengine_sdrs_replication_attach_v1
+ \ flexibleengine_sdrs_replication_pair_v1
\ flexibleengine_sfs_file_system_v2
\ flexibleengine_smn_subscription_v2
\ flexibleengine_smn_topic_v2
@@ -3127,11 +3463,13 @@ syn keyword terraResourceTypeBI
\ gitlab_deploy_key
\ gitlab_deploy_key_enable
\ gitlab_group
+ \ gitlab_group_cluster
\ gitlab_group_label
\ gitlab_group_membership
\ gitlab_group_variable
\ gitlab_label
\ gitlab_pipeline_schedule
+ \ gitlab_pipeline_schedule_variable
\ gitlab_pipeline_trigger
\ gitlab_project
\ gitlab_project_cluster
@@ -3147,6 +3485,7 @@ syn keyword terraResourceTypeBI
\ google_access_context_manager_access_level
\ google_access_context_manager_access_policy
\ google_access_context_manager_service_perimeter
+ \ google_access_context_manager_service_perimeter_resource
\ google_app_engine_application
\ google_app_engine_application_url_dispatch_rules
\ google_app_engine_domain_mapping
@@ -3165,6 +3504,7 @@ syn keyword terraResourceTypeBI
\ google_billing_account_iam_binding
\ google_billing_account_iam_member
\ google_billing_account_iam_policy
+ \ google_billing_budget
\ google_binary_authorization_attestor
\ google_binary_authorization_attestor_iam_binding
\ google_binary_authorization_attestor_iam_member
@@ -3172,7 +3512,11 @@ syn keyword terraResourceTypeBI
\ google_binary_authorization_policy
\ google_cloud_run_domain_mapping
\ google_cloud_run_service
+ \ google_cloud_run_service_iam_binding
+ \ google_cloud_run_service_iam_member
+ \ google_cloud_run_service_iam_policy
\ google_cloud_scheduler_job
+ \ google_cloud_tasks_queue
\ google_cloudbuild_trigger
\ google_cloudfunctions_function
\ google_cloudfunctions_function_iam_binding
@@ -3213,6 +3557,7 @@ syn keyword terraResourceTypeBI
\ google_compute_network_endpoint
\ google_compute_network_endpoint_group
\ google_compute_network_peering
+ \ google_compute_network_peering_routes_config
\ google_compute_node_group
\ google_compute_node_template
\ google_compute_project_default_network_tier
@@ -3256,6 +3601,8 @@ syn keyword terraResourceTypeBI
\ google_container_analysis_note
\ google_container_cluster
\ google_container_node_pool
+ \ google_container_registry
+ \ google_data_fusion_instance
\ google_dataflow_job
\ google_dataproc_autoscaling_policy
\ google_dataproc_cluster
@@ -3266,6 +3613,8 @@ syn keyword terraResourceTypeBI
\ google_dataproc_job_iam_binding
\ google_dataproc_job_iam_member
\ google_dataproc_job_iam_policy
+ \ google_deployment_manager_deployment
+ \ google_dialogflow_agent
\ google_dns_managed_zone
\ google_dns_policy
\ google_dns_record_set
@@ -3314,13 +3663,22 @@ syn keyword terraResourceTypeBI
\ google_iap_web_type_compute_iam_binding
\ google_iap_web_type_compute_iam_member
\ google_iap_web_type_compute_iam_policy
+ \ google_identity_platform_default_supported_idp_config
+ \ google_identity_platform_inbound_saml_config
+ \ google_identity_platform_oauth_idp_config
+ \ google_identity_platform_tenant
+ \ google_identity_platform_tenant_default_supported_idp_config
+ \ google_identity_platform_tenant_inbound_saml_config
+ \ google_identity_platform_tenant_oauth_idp_config
\ google_kms_crypto_key
\ google_kms_crypto_key_iam_binding
\ google_kms_crypto_key_iam_member
+ \ google_kms_crypto_key_iam_policy
\ google_kms_key_ring
\ google_kms_key_ring_iam_binding
\ google_kms_key_ring_iam_member
\ google_kms_key_ring_iam_policy
+ \ google_kms_secret_ciphertext
\ google_logging_billing_account_exclusion
\ google_logging_billing_account_sink
\ google_logging_folder_exclusion
@@ -3335,6 +3693,7 @@ syn keyword terraResourceTypeBI
\ google_monitoring_group
\ google_monitoring_notification_channel
\ google_monitoring_uptime_check_config
+ \ google_organization_iam_audit_config
\ google_organization_iam_binding
\ google_organization_iam_custom_role
\ google_organization_iam_member
@@ -3366,6 +3725,11 @@ syn keyword terraResourceTypeBI
\ google_runtimeconfig_config_iam_policy
\ google_runtimeconfig_variable
\ google_scc_source
+ \ google_secret_manager_secret
+ \ google_secret_manager_secret_iam_binding
+ \ google_secret_manager_secret_iam_member
+ \ google_secret_manager_secret_iam_policy
+ \ google_secret_manager_secret_version
\ google_security_scanner_scan_config
\ google_service_account
\ google_service_account_iam_binding
@@ -3409,13 +3773,21 @@ syn keyword terraResourceTypeBI
\ grafana_data_source
\ grafana_folder
\ grafana_organization
+ \ gridscale_firewall
\ gridscale_ipv4
\ gridscale_ipv6
+ \ gridscale_isoimage
\ gridscale_loadbalancer
\ gridscale_network
+ \ gridscale_object_storage_accesskey
+ \ gridscale_paas
+ \ gridscale_paas_securityzone
\ gridscale_server
+ \ gridscale_snapshot
+ \ gridscale_snapshotschedule
\ gridscale_sshkey
\ gridscale_storage
+ \ gridscale_template
\ hcloud_floating_ip
\ hcloud_floating_ip_assignment
\ hcloud_network
@@ -3517,10 +3889,12 @@ syn keyword terraResourceTypeBI
\ huaweicloud_lb_member_v2
\ huaweicloud_lb_monitor_v2
\ huaweicloud_lb_pool_v2
+ \ huaweicloud_lb_whitelist_v2
\ huaweicloud_maas_task_v1
\ huaweicloud_mls_instance
\ huaweicloud_mrs_cluster_v1
\ huaweicloud_mrs_job_v1
+ \ huaweicloud_nat_dnat_rule_v2
\ huaweicloud_nat_gateway_v2
\ huaweicloud_nat_snat_rule_v2
\ huaweicloud_networking_floatingip_associate_v2
@@ -3536,6 +3910,8 @@ syn keyword terraResourceTypeBI
\ huaweicloud_networking_vip_associate_v2
\ huaweicloud_networking_vip_v2
\ huaweicloud_rds_instance_v1
+ \ huaweicloud_rds_instance_v3
+ \ huaweicloud_rds_parametergroup_v3
\ huaweicloud_rts_software_config_v1
\ huaweicloud_rts_stack_resource_v1
\ huaweicloud_rts_stack_v1
@@ -3559,12 +3935,51 @@ syn keyword terraResourceTypeBI
\ huaweicloud_vpnaas_ipsec_policy_v2
\ huaweicloud_vpnaas_service_v2
\ huaweicloud_vpnaas_site_connection_v2
+ \ huaweicloudstack_as_configuration_v1
+ \ huaweicloudstack_as_group_v1
+ \ huaweicloudstack_as_policy_v1
+ \ huaweicloudstack_blockstorage_volume_v2
+ \ huaweicloudstack_compute_floatingip_associate_v2
+ \ huaweicloudstack_compute_instance_v2
+ \ huaweicloudstack_compute_interface_attach_v2
+ \ huaweicloudstack_compute_keypair_v2
+ \ huaweicloudstack_compute_servergroup_v2
+ \ huaweicloudstack_compute_volume_attach_v2
+ \ huaweicloudstack_lb_certificate_v2
+ \ huaweicloudstack_lb_l7policy_v2
+ \ huaweicloudstack_lb_l7rule_v2
+ \ huaweicloudstack_lb_listener_v2
+ \ huaweicloudstack_lb_loadbalancer_v2
+ \ huaweicloudstack_lb_member_v2
+ \ huaweicloudstack_lb_monitor_v2
+ \ huaweicloudstack_lb_pool_v2
+ \ huaweicloudstack_lb_whitelist_v2
+ \ huaweicloudstack_networking_floatingip_associate_v2
+ \ huaweicloudstack_networking_floatingip_v2
+ \ huaweicloudstack_networking_network_v2
+ \ huaweicloudstack_networking_port_v2
+ \ huaweicloudstack_networking_router_interface_v2
+ \ huaweicloudstack_networking_router_route_v2
+ \ huaweicloudstack_networking_router_v2
+ \ huaweicloudstack_networking_secgroup_rule_v2
+ \ huaweicloudstack_networking_secgroup_v2
+ \ huaweicloudstack_networking_subnet_v2
+ \ huaweicloudstack_networking_vip_associate_v2
+ \ huaweicloudstack_networking_vip_v2
\ icinga2_checkcommand
\ icinga2_host
\ icinga2_hostgroup
\ icinga2_notification
\ icinga2_service
\ icinga2_user
+ \ incapsula_acl_security_rule
+ \ incapsula_custom_certificate
+ \ incapsula_data_center
+ \ incapsula_data_center_server
+ \ incapsula_incap_rule
+ \ incapsula_security_rule_exception
+ \ incapsula_site
+ \ incapsula_waf_security_rule
\ influxdb_continuous_query
\ influxdb_database
\ influxdb_user
@@ -3610,6 +4025,7 @@ syn keyword terraResourceTypeBI
\ kubernetes_persistent_volume
\ kubernetes_persistent_volume_claim
\ kubernetes_pod
+ \ kubernetes_pod_disruption_budget
\ kubernetes_priority_class
\ kubernetes_replication_controller
\ kubernetes_resource_quota
@@ -3652,20 +4068,33 @@ syn keyword terraResourceTypeBI
\ logentries_logset
\ logicmonitor_collector
\ logicmonitor_collector_group
+ \ logicmonitor_dashboard
+ \ logicmonitor_dashboard_group
\ logicmonitor_device
\ logicmonitor_device_group
\ mailgun_domain
\ mailgun_route
+ \ metalcloud_infrastructure
+ \ mongodbatlas_alert_configuration
+ \ mongodbatlas_auditing
\ mongodbatlas_cloud_provider_snapshot
\ mongodbatlas_cloud_provider_snapshot_restore_job
\ mongodbatlas_cluster
+ \ mongodbatlas_custom_db_role
\ mongodbatlas_database_user
\ mongodbatlas_encryption_at_rest
+ \ mongodbatlas_global_cluster_config
+ \ mongodbatlas_maintenance_window
\ mongodbatlas_network_container
\ mongodbatlas_network_peering
+ \ mongodbatlas_private_endpoint
+ \ mongodbatlas_private_endpoint_interface_link
\ mongodbatlas_private_ip_mode
\ mongodbatlas_project
\ mongodbatlas_project_ip_whitelist
+ \ mongodbatlas_team
+ \ mongodbatlas_teams
+ \ mongodbatlas_x509_authentication_database_user
\ mysql_database
\ mysql_grant
\ mysql_role
@@ -3690,7 +4119,9 @@ syn keyword terraResourceTypeBI
\ newrelic_alert_policy_channel
\ newrelic_dashboard
\ newrelic_infra_alert_condition
+ \ newrelic_insights_event
\ newrelic_nrql_alert_condition
+ \ newrelic_plugins_alert_condition
\ newrelic_synthetics_alert_condition
\ newrelic_synthetics_monitor
\ newrelic_synthetics_monitor_script
@@ -3761,6 +4192,30 @@ syn keyword terraResourceTypeBI
\ nsxt_nat_rule
\ nsxt_ns_group
\ nsxt_ns_service_group
+ \ nsxt_policy_bgp_neighbor
+ \ nsxt_policy_dhcp_relay
+ \ nsxt_policy_dhcp_server
+ \ nsxt_policy_gateway_policy
+ \ nsxt_policy_group
+ \ nsxt_policy_ip_address_allocation
+ \ nsxt_policy_ip_block
+ \ nsxt_policy_ip_pool
+ \ nsxt_policy_ip_pool_block_subnet
+ \ nsxt_policy_ip_pool_static_subnet
+ \ nsxt_policy_lb_pool
+ \ nsxt_policy_lb_service
+ \ nsxt_policy_lb_virtual_server
+ \ nsxt_policy_nat_rule
+ \ nsxt_policy_security_policy
+ \ nsxt_policy_segment
+ \ nsxt_policy_service
+ \ nsxt_policy_static_route
+ \ nsxt_policy_tier0_gateway
+ \ nsxt_policy_tier0_gateway_interface
+ \ nsxt_policy_tier1_gateway
+ \ nsxt_policy_tier1_gateway_interface
+ \ nsxt_policy_vlan_segment
+ \ nsxt_policy_vm_tags
\ nsxt_qos_switching_profile
\ nsxt_spoofguard_switching_profile
\ nsxt_static_route
@@ -3775,6 +4230,9 @@ syn keyword terraResourceTypeBI
\ nutanix_subnet
\ nutanix_virtual_machine
\ nutanix_volume_group
+ \ oci_analytics_analytics_instance
+ \ oci_apigateway_deployment
+ \ oci_apigateway_gateway
\ oci_audit_configuration
\ oci_autoscaling_auto_scaling_configuration
\ oci_budget_alert_rule
@@ -3844,6 +4302,7 @@ syn keyword terraResourceTypeBI
\ oci_database_backup
\ oci_database_backup_destination
\ oci_database_data_guard_association
+ \ oci_database_database
\ oci_database_db_home
\ oci_database_db_system
\ oci_database_exadata_infrastructure
@@ -3851,9 +4310,19 @@ syn keyword terraResourceTypeBI
\ oci_database_maintenance_run
\ oci_database_vm_cluster
\ oci_database_vm_cluster_network
+ \ oci_datacatalog_catalog
+ \ oci_datacatalog_connection
+ \ oci_datacatalog_data_asset
+ \ oci_dataflow_application
+ \ oci_dataflow_invoke_run
+ \ oci_datascience_model
+ \ oci_datascience_model_provenance
+ \ oci_datascience_notebook_session
+ \ oci_datascience_project
\ oci_dns_record
\ oci_dns_steering_policy
\ oci_dns_steering_policy_attachment
+ \ oci_dns_tsig_key
\ oci_dns_zone
\ oci_email_sender
\ oci_email_suppression
@@ -3889,6 +4358,7 @@ syn keyword terraResourceTypeBI
\ oci_identity_user
\ oci_identity_user_capabilities_management
\ oci_identity_user_group_membership
+ \ oci_integration_integration_instance
\ oci_kms_encrypted_data
\ oci_kms_generated_key
\ oci_kms_key
@@ -3906,6 +4376,8 @@ syn keyword terraResourceTypeBI
\ oci_load_balancer_load_balancer
\ oci_load_balancer_path_route_set
\ oci_load_balancer_rule_set
+ \ oci_marketplace_accepted_agreement
+ \ oci_marketplace_listing_package_agreement
\ oci_monitoring_alarm
\ oci_objectstorage_bucket
\ oci_objectstorage_namespace_metadata
@@ -3916,8 +4388,17 @@ syn keyword terraResourceTypeBI
\ oci_oda_oda_instance
\ oci_ons_notification_topic
\ oci_ons_subscription
+ \ oci_osmanagement_managed_instance_group
+ \ oci_osmanagement_managed_instance_management
+ \ oci_osmanagement_software_source
+ \ oci_osmanagement_software_sources
+ \ oci_resourcemanager_stack
+ \ oci_resourcemanager_stack_tf_state
+ \ oci_resourcemanager_stacks
+ \ oci_streaming_connect_harness
\ oci_streaming_stream
\ oci_streaming_stream_archiver
+ \ oci_streaming_stream_pool
\ oci_waas_address_list
\ oci_waas_certificate
\ oci_waas_custom_protection_rule
@@ -3989,6 +4470,14 @@ syn keyword terraResourceTypeBI
\ opc_lbaas_server_pool
\ opc_storage_container
\ opc_storage_object
+ \ opennebula_group
+ \ opennebula_image
+ \ opennebula_security_group
+ \ opennebula_template
+ \ opennebula_virtual_data_center
+ \ opennebula_virtual_machine
+ \ opennebula_virtual_machine_group
+ \ opennebula_virtual_network
\ openstack_blockstorage_quotaset_v2
\ openstack_blockstorage_quotaset_v3
\ openstack_blockstorage_volume_attach_v2
@@ -4065,6 +4554,7 @@ syn keyword terraResourceTypeBI
\ openstack_objectstorage_container_v1
\ openstack_objectstorage_object_v1
\ openstack_objectstorage_tempurl_v1
+ \ openstack_orchestration_stack_v1
\ openstack_sharedfilesystem_securityservice_v2
\ openstack_sharedfilesystem_share_access_v2
\ openstack_sharedfilesystem_share_v2
@@ -4121,12 +4611,17 @@ syn keyword terraResourceTypeBI
\ opentelekomcloud_ims_data_image_v2
\ opentelekomcloud_ims_image_v2
\ opentelekomcloud_kms_key_v1
+ \ opentelekomcloud_lb_certificate_v2
+ \ opentelekomcloud_lb_l7policy_v2
+ \ opentelekomcloud_lb_l7rule_v2
\ opentelekomcloud_lb_listener_v2
\ opentelekomcloud_lb_loadbalancer_v2
\ opentelekomcloud_lb_member_v2
\ opentelekomcloud_lb_monitor_v2
\ opentelekomcloud_lb_pool_v2
\ opentelekomcloud_lb_whitelist_v2
+ \ opentelekomcloud_logtank_group_v2
+ \ opentelekomcloud_logtank_topic_v2
\ opentelekomcloud_maas_task_v1
\ opentelekomcloud_mrs_cluster_v1
\ opentelekomcloud_mrs_job_v1
@@ -4162,11 +4657,17 @@ syn keyword terraResourceTypeBI
\ opentelekomcloud_vbs_backup_share_v2
\ opentelekomcloud_vbs_backup_v2
\ opentelekomcloud_vpc_eip_v1
+ \ opentelekomcloud_vpc_flow_log_v1
\ opentelekomcloud_vpc_peering_connection_accepter_v2
\ opentelekomcloud_vpc_peering_connection_v2
\ opentelekomcloud_vpc_route_v2
\ opentelekomcloud_vpc_subnet_v1
\ opentelekomcloud_vpc_v1
+ \ opentelekomcloud_vpnaas_endpoint_group_v2
+ \ opentelekomcloud_vpnaas_ike_policy_v2
+ \ opentelekomcloud_vpnaas_ipsec_policy_v2
+ \ opentelekomcloud_vpnaas_service_v2
+ \ opentelekomcloud_vpnaas_site_connection_v2
\ opentelekomcloud_waf_ccattackprotection_rule_v1
\ opentelekomcloud_waf_certificate_v1
\ opentelekomcloud_waf_datamasking_rule_v1
@@ -4181,9 +4682,11 @@ syn keyword terraResourceTypeBI
\ opsgenie_escalation
\ opsgenie_heartbeat
\ opsgenie_maintenance
+ \ opsgenie_notification_policy
\ opsgenie_schedule
\ opsgenie_schedule_rotation
\ opsgenie_team
+ \ opsgenie_team_routing_rule
\ opsgenie_user
\ opsgenie_user_contact
\ oraclepaas_application_container
@@ -4196,22 +4699,36 @@ syn keyword terraResourceTypeBI
\ ovh_cloud_network_private
\ ovh_cloud_network_private_subnet
\ ovh_cloud_user
+ \ ovh_dedicated_server_install_task
+ \ ovh_dedicated_server_reboot_task
+ \ ovh_dedicated_server_update
\ ovh_domain_zone_record
\ ovh_domain_zone_redirection
\ ovh_ip_reverse
+ \ ovh_iploadbalancing_http_farm
+ \ ovh_iploadbalancing_http_farm_server
+ \ ovh_iploadbalancing_http_frontend
\ ovh_iploadbalancing_http_route
\ ovh_iploadbalancing_http_route_rule
\ ovh_iploadbalancing_refresh
\ ovh_iploadbalancing_tcp_farm
\ ovh_iploadbalancing_tcp_farm_server
\ ovh_iploadbalancing_tcp_frontend
+ \ ovh_iploadbalancing_vrack_network
+ \ ovh_me_installation_template
+ \ ovh_me_installation_template_partition_scheme
+ \ ovh_me_installation_template_partition_scheme_hardware_raid
+ \ ovh_me_installation_template_partition_scheme_partition
+ \ ovh_me_ssh_key
\ ovh_publiccloud_private_network
\ ovh_publiccloud_private_network_subnet
\ ovh_publiccloud_user
\ ovh_vrack_cloudproject
+ \ ovh_vrack_dedicated_server
+ \ ovh_vrack_dedicated_server_interface
+ \ ovh_vrack_iploadbalancing
\ ovh_vrack_publiccloud_attachment
\ packet_bgp_session
- \ packet_connect
\ packet_device
\ packet_ip_attachment
\ packet_organization
@@ -4403,6 +4920,7 @@ syn keyword terraResourceTypeBI
\ rabbitmq_permissions
\ rabbitmq_policy
\ rabbitmq_queue
+ \ rabbitmq_topic_permissions
\ rabbitmq_user
\ rabbitmq_vhost
\ rancher2_app
@@ -4444,6 +4962,7 @@ syn keyword terraResourceTypeBI
\ rancher2_role_template
\ rancher2_secret
\ rancher2_setting
+ \ rancher2_token
\ rancher2_user
\ rancher_certificate
\ rancher_environment
@@ -4491,6 +5010,7 @@ syn keyword terraResourceTypeBI
\ scaleway_baremetal_server_beta
\ scaleway_bucket
\ scaleway_instance_ip
+ \ scaleway_instance_ip_reverse_dns
\ scaleway_instance_placement_group
\ scaleway_instance_security_group
\ scaleway_instance_server
@@ -4503,6 +5023,8 @@ syn keyword terraResourceTypeBI
\ scaleway_lb_beta
\ scaleway_lb_frontend_beta
\ scaleway_object_bucket
+ \ scaleway_rdb_instance_beta
+ \ scaleway_registry_namespace_beta
\ scaleway_security_group
\ scaleway_security_group_rule
\ scaleway_server
@@ -4521,12 +5043,14 @@ syn keyword terraResourceTypeBI
\ selectel_vpc_token_v2
\ selectel_vpc_user_v2
\ selectel_vpc_vrrp_subnet_v2
+ \ signalfx_alert_muting_rule
\ signalfx_aws_external_integration
\ signalfx_aws_integration
\ signalfx_aws_token_integration
\ signalfx_azure_integration
\ signalfx_dashboard
\ signalfx_dashboard_group
+ \ signalfx_data_link
\ signalfx_detector
\ signalfx_event_feed_chart
\ signalfx_gcp_integration
@@ -4543,11 +5067,15 @@ syn keyword terraResourceTypeBI
\ signalfx_time_chart
\ signalfx_victor_ops_integration
\ skytap_environment
+ \ skytap_icnr_tunnel
+ \ skytap_label_category
\ skytap_network
\ skytap_project
\ skytap_vm
\ softlayer_ssh_key
\ softlayer_virtual_guest
+ \ stackpath_compute_network_policy
+ \ stackpath_compute_workload
\ statuscake_test
\ telefonicaopencloud_antiddos_v1
\ telefonicaopencloud_as_configuration_v1
@@ -4627,6 +5155,7 @@ syn keyword terraResourceTypeBI
\ tencentcloud_cam_user_policy_attachment
\ tencentcloud_cbs_snapshot
\ tencentcloud_cbs_snapshot_policy
+ \ tencentcloud_cbs_snapshot_policy_attachment
\ tencentcloud_cbs_storage
\ tencentcloud_cbs_storage_attachment
\ tencentcloud_ccn
@@ -4644,6 +5173,13 @@ syn keyword terraResourceTypeBI
\ tencentcloud_container_cluster_instance
\ tencentcloud_cos_bucket
\ tencentcloud_cos_bucket_object
+ \ tencentcloud_dayu_cc_http_policy
+ \ tencentcloud_dayu_cc_https_policy
+ \ tencentcloud_dayu_ddos_policy
+ \ tencentcloud_dayu_ddos_policy_attachment
+ \ tencentcloud_dayu_ddos_policy_case
+ \ tencentcloud_dayu_l4_rule
+ \ tencentcloud_dayu_l7_rule
\ tencentcloud_dc_gateway
\ tencentcloud_dc_gateway_ccn_route
\ tencentcloud_dcx
@@ -4653,6 +5189,7 @@ syn keyword terraResourceTypeBI
\ tencentcloud_eni
\ tencentcloud_eni_attachment
\ tencentcloud_gaap_certificate
+ \ tencentcloud_gaap_domain_error_page
\ tencentcloud_gaap_http_domain
\ tencentcloud_gaap_http_rule
\ tencentcloud_gaap_layer4_listener
@@ -4661,8 +5198,11 @@ syn keyword terraResourceTypeBI
\ tencentcloud_gaap_realserver
\ tencentcloud_gaap_security_policy
\ tencentcloud_gaap_security_rule
+ \ tencentcloud_ha_vip
+ \ tencentcloud_ha_vip_eip_attachment
\ tencentcloud_instance
\ tencentcloud_key_pair
+ \ tencentcloud_kubernetes_as_scaling_group
\ tencentcloud_kubernetes_cluster
\ tencentcloud_kubernetes_scale_worker
\ tencentcloud_lb
@@ -4672,6 +5212,7 @@ syn keyword terraResourceTypeBI
\ tencentcloud_mysql_account_privilege
\ tencentcloud_mysql_backup_policy
\ tencentcloud_mysql_instance
+ \ tencentcloud_mysql_privilege
\ tencentcloud_mysql_readonly_instance
\ tencentcloud_nat_gateway
\ tencentcloud_placement_group
@@ -4688,7 +5229,34 @@ syn keyword terraResourceTypeBI
\ tencentcloud_security_group_rule
\ tencentcloud_ssl_certificate
\ tencentcloud_subnet
+ \ tencentcloud_tcaplus_application
+ \ tencentcloud_tcaplus_idl
+ \ tencentcloud_tcaplus_table
+ \ tencentcloud_tcaplus_zone
\ tencentcloud_vpc
+ \ tencentcloud_vpn_connection
+ \ tencentcloud_vpn_customer_gateway
+ \ tencentcloud_vpn_gateway
+ \ test_resource
+ \ test_resource_computed_set
+ \ test_resource_config_mode
+ \ test_resource_defaults
+ \ test_resource_deprecated
+ \ test_resource_diff_suppress
+ \ test_resource_force_new
+ \ test_resource_gh12183
+ \ test_resource_import_other
+ \ test_resource_import_removed
+ \ test_resource_list
+ \ test_resource_list_set
+ \ test_resource_map
+ \ test_resource_nested
+ \ test_resource_nested_id
+ \ test_resource_nested_set
+ \ test_resource_state_func
+ \ test_resource_timeout
+ \ test_resource_with_custom_diff
+ \ test_undeleteable
\ tfe_notification_configuration
\ tfe_oauth_client
\ tfe_organization
@@ -4782,6 +5350,12 @@ syn keyword terraResourceTypeBI
\ vsphere_virtual_machine
\ vsphere_virtual_machine_snapshot
\ vsphere_vmfs_datastore
+ \ vsphere_vnic
+ \ vthunder_ethernet
+ \ vthunder_rib_route
+ \ vthunder_server
+ \ vthunder_service_group
+ \ vthunder_virtual_server
\ vultr_bare_metal_server
\ vultr_block_storage
\ vultr_dns_domain
@@ -4803,6 +5377,7 @@ syn keyword terraResourceTypeBI
\ yandex_compute_instance_group
\ yandex_compute_snapshot
\ yandex_container_registry
+ \ yandex_dataproc_cluster
\ yandex_iam_service_account
\ yandex_iam_service_account_api_key
\ yandex_iam_service_account_iam_binding
@@ -4810,10 +5385,15 @@ syn keyword terraResourceTypeBI
\ yandex_iam_service_account_iam_policy
\ yandex_iam_service_account_key
\ yandex_iam_service_account_static_access_key
+ \ yandex_kms_symmetric_key
\ yandex_kubernetes_cluster
\ yandex_kubernetes_node_group
\ yandex_lb_network_load_balancer
\ yandex_lb_target_group
+ \ yandex_mdb_clickhouse_cluster
+ \ yandex_mdb_mongodb_cluster
+ \ yandex_mdb_mysql_cluster
+ \ yandex_mdb_postgresql_cluster
\ yandex_mdb_redis_cluster
\ yandex_resourcemanager_cloud
\ yandex_resourcemanager_cloud_iam_binding
diff --git a/syntax/vala.vim b/syntax/vala.vim
index 8ad21785..1cf68e0a 100644
--- a/syntax/vala.vim
+++ b/syntax/vala.vim
@@ -48,7 +48,9 @@ syn keyword valaConstant false null true
" Exceptions
syn keyword valaException try catch finally throw
" Unspecified Statements
-syn keyword valaUnspecifiedStatement as base construct delete get in is lock new out params ref sizeof set this throws typeof using value var yield
+syn keyword valaUnspecifiedStatement as base construct delete get in is lock new out params ref sizeof set this throws typeof value var yield
+" Includes
+syn match valaInclude "^\s*\zs\<using\>\ze\s\w"
" Arrays and Lists
syn match valaArray "\(\w\(\w\)*\(\s\+\)\?<\)\+\(\(\s\+\)\?\w\(\w\)*\(?\|\*\)\?\(\,\)\?\)\+>\+"
" Methods
@@ -141,6 +143,10 @@ syn match valaNumber display "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fF
syn match valaNumber display "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
syn match valaNumber display "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
+" Lambda definitions (ported from java.vim)
+" needs to be defined after the parenthesis error catcher to work
+syn match valaLambdaDef "([a-zA-Z0-9_<>\[\], \t]*)\s*=>"
+
" when wanted, highlight trailing white space
if exists("vala_space_errors")
if !exists("vala_no_trail_space_error")
@@ -172,10 +178,12 @@ hi def link valaModifier StorageClass
hi def link valaConstant Constant
hi def link valaException Exception
hi def link valaUnspecifiedStatement Statement
+hi def link valaInclude Include
hi def link valaUnspecifiedKeyword Keyword
hi def link valaContextualStatement Statement
hi def link valaArray StorageClass
hi def link valaMethod Function
+hi def link valaLambdaDef Function
hi def link valaOperator Operator
hi def link valaDelimiter Delimiter
hi def link valaEnumField Constant
diff --git a/syntax/zig.vim b/syntax/zig.vim
index bdb9ac27..2ee57a1b 100644
--- a/syntax/zig.vim
+++ b/syntax/zig.vim
@@ -36,8 +36,8 @@ syn match zigBuiltinFn "\v\@(compileLog|ctz|popCount|divExact|divFloor|divTrunc)
syn match zigBuiltinFn "\v\@(embedFile|export|tagName|TagType|errorName|call)>"
syn match zigBuiltinFn "\v\@(errorReturnTrace|fence|fieldParentPtr|field|unionInit)>"
syn match zigBuiltinFn "\v\@(frameAddress|import|newStackCall|asyncCall|intToPtr|IntType)>"
-syn match zigBuiltinFn "\v\@(maxValue|memberCount|memberName|memberType|as)>"
-syn match zigBuiltinFn "\v\@(memcpy|memset|minValue|mod|mulWithOverflow|splat)>"
+syn match zigBuiltinFn "\v\@(memberCount|memberName|memberType|as)>"
+syn match zigBuiltinFn "\v\@(memcpy|memset|mod|mulWithOverflow|splat)>"
syn match zigBuiltinFn "\v\@(bitOffsetOf|byteOffsetOf|OpaqueType|panic|ptrCast)>"
syn match zigBuiltinFn "\v\@(ptrToInt|rem|returnAddress|setCold|Type|shuffle)>"
syn match zigBuiltinFn "\v\@(setRuntimeSafety|setEvalBranchQuota|setFloatMode)>"