aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-04-24 22:41:44 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-04-27 09:21:32 -0400
commit841bc219d27a37131cee8b4f36bffbbbda860d9f (patch)
treecf8150553f1b7368bd54beeb103685f503ef4778 /runtime
parent8aa817bbb3e996e4247b0e1a2288b5f2acfc8299 (diff)
downloadrneovim-841bc219d27a37131cee8b4f36bffbbbda860d9f.tar.gz
rneovim-841bc219d27a37131cee8b4f36bffbbbda860d9f.tar.bz2
rneovim-841bc219d27a37131cee8b4f36bffbbbda860d9f.zip
vim-patch:95a9dd1efc5a
Update runtime files. https://github.com/vim/vim/commit/95a9dd1efc5ae3221865f4970053a5708557e682
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/map.txt9
-rw-r--r--runtime/doc/options.txt9
-rw-r--r--runtime/doc/syntax.txt7
-rw-r--r--runtime/makemenu.vim1
-rw-r--r--runtime/syntax/cpp.vim20
-rw-r--r--runtime/syntax/cvs.vim3
-rw-r--r--runtime/syntax/rego.vim89
7 files changed, 127 insertions, 11 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index a7cec66111..9815ba4ce5 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -975,7 +975,8 @@ See |:verbose-cmd| for more information.
See |:map-<buffer>| for the optional <buffer> argument.
*:una* *:unabbreviate*
-:una[bbreviate] {lhs} Remove abbreviation for {lhs} from the list. If none
+:una[bbreviate] [<buffer>] {lhs}
+ Remove abbreviation for {lhs} from the list. If none
is found, remove abbreviations in which {lhs} matches
with the {rhs}. This is done so that you can even
remove abbreviations after expansion. To avoid
@@ -990,7 +991,8 @@ See |:verbose-cmd| for more information.
same as ":ab", but for Command-line mode only.
*:cuna* *:cunabbrev*
-:cuna[bbrev] {lhs} same as ":una", but for Command-line mode only.
+:cuna[bbrev] [<buffer>] {lhs}
+ Same as ":una", but for Command-line mode only.
*:cnorea* *:cnoreabbrev*
:cnorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
@@ -1002,7 +1004,8 @@ See |:verbose-cmd| for more information.
same as ":ab", but for Insert mode only.
*:iuna* *:iunabbrev*
-:iuna[bbrev] {lhs} same as ":una", but for insert mode only.
+:iuna[bbrev] [<buffer>] {lhs}
+ Same as ":una", but for insert mode only.
*:inorea* *:inoreabbrev*
:inorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index a6e3dcd436..c28abd8066 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -475,9 +475,9 @@ If an error is detected the rest of the line is skipped.
If you want to include a ':' in a set command precede it with a '\'. The
backslash in front of the ':' will be removed. Example:
- /* vi:set dir=c\:\tmp: */ ~
-This sets the 'dir' option to "c:\tmp". Only a single backslash before the
-':' is removed. Thus to include "\:" you have to specify "\\:".
+ /* vi:set fillchars=stl\:^,vert\:\|: */ ~
+This sets the 'fillchars' option to "stl:^,vert:\|". Only a single backslash
+before the ':' is removed. Thus to include "\:" you have to specify "\\:".
*E992*
No other commands than "set" are supported, for security reasons (somebody
might create a Trojan horse text file with modelines). And not all options
@@ -5167,8 +5167,7 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'shell'* *'sh'* *E91*
-'shell' 'sh' string (default $SHELL or "sh",
- Windows: "cmd.exe")
+'shell' 'sh' string (default $SHELL or "sh", Win32: "cmd.exe")
global
Name of the shell to use for ! and :! commands. When changing the
value also check these options: 'shellpipe', 'shellslash'
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index c1329e7fdc..d1fcabf9d4 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -2729,6 +2729,13 @@ This will add highlighting for the commands that BASH (version 2.05a and
later, and part earlier) adds.
+REGO *rego.vim* *ft-rego-syntax*
+
+Rego is a query language developed by Styra. It is mostly used as a policy
+language for kubernetes, but can be applied to almost anything. Files with
+the following extensions are recognized as rego files: .rego.
+
+
RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
Syntax highlighting is enabled for code blocks within the document for a
diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim
index 27fa46fe25..6173d8b691 100644
--- a/runtime/makemenu.vim
+++ b/runtime/makemenu.vim
@@ -481,6 +481,7 @@ SynMenu R.RCS.RCS\ file:rcs
SynMenu R.Readline\ config:readline
SynMenu R.Rebol:rebol
SynMenu R.ReDIF:redif
+SynMenu R.Rego:rego
SynMenu R.Relax\ NG:rng
SynMenu R.Remind:remind
SynMenu R.Relax\ NG\ compact:rnc
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim
index 9cb0860e84..53b6a513f2 100644
--- a/runtime/syntax/cpp.vim
+++ b/runtime/syntax/cpp.vim
@@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
-" Last Change: 2017 Jun 05
+" Last Change: 2019 Dec 18
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -42,6 +42,8 @@ if !exists("cpp_no_cpp11")
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
+ syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
+ syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
endif
" C++ 14 extensions
@@ -53,6 +55,21 @@ if !exists("cpp_no_cpp14")
syn case match
endif
+" C++ 20 extensions
+if !exists("cpp_no_cpp20")
+ syn keyword cppStatement co_await co_return co_yield requires
+ syn keyword cppStorageClass consteval constinit
+ syn keyword cppStructure concept
+ syn keyword cppType char8_t
+ syn keyword cppModule import module export
+endif
+
+" C++ 17 extensions
+if !exists("cpp_no_cpp17")
+ syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
+ syn match cppCast "\<reinterpret_pointer_cast\s*$"
+endif
+
" The minimum and maximum operators in GNU C++
syn match cppMinMax "[<>]?"
@@ -71,6 +88,7 @@ hi def link cppConstant Constant
hi def link cppRawStringDelimiter Delimiter
hi def link cppRawString String
hi def link cppNumber Number
+hi def link cppModule Include
let b:current_syntax = "cpp"
diff --git a/runtime/syntax/cvs.vim b/runtime/syntax/cvs.vim
index 3eac191637..e1e413fcf9 100644
--- a/runtime/syntax/cvs.vim
+++ b/runtime/syntax/cvs.vim
@@ -1,7 +1,6 @@
" Vim syntax file
" Language: CVS commit file
-" Maintainer: Matt Dunford (zoot@zotikos.com)
-" URL: http://www.zotikos.com/downloads/cvs.vim
+" Maintainer: Matt Dunford (zenmatic@gmail.com)
" Last Change: Sat Nov 24 23:25:11 CET 2001
" quit when a syntax file was already loaded
diff --git a/runtime/syntax/rego.vim b/runtime/syntax/rego.vim
new file mode 100644
index 0000000000..a04fc7007b
--- /dev/null
+++ b/runtime/syntax/rego.vim
@@ -0,0 +1,89 @@
+" Vim syntax file
+" Language: rego policy language
+" Maintainer: Matt Dunford (zenmatic@gmail.com)
+" URL: https://github.com/zenmatic/vim-syntax-rego
+" Last Change: 2019 Dec 12
+
+" https://www.openpolicyagent.org/docs/latest/policy-language/
+
+" quit when a (custom) syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+syn case match
+
+syn keyword regoDirective package import allow deny
+syn keyword regoKeywords as default else false not null true with some
+
+syn keyword regoFuncAggregates count sum product max min sort all any
+syn match regoFuncArrays "\<array\.\(concat\|slice\)\>"
+syn keyword regoFuncSets intersection union
+
+syn keyword regoFuncStrings concat /\<contains\>/ endswith format_int indexof lower replace split sprintf startswith substring trim trim_left trim_prefix trim_right trim_suffix trim_space upper
+syn match regoFuncStrings2 "\<strings\.replace_n\>"
+syn match regoFuncStrings3 "\<contains\>"
+
+syn keyword regoFuncRegex re_match
+syn match regoFuncRegex2 "\<regex\.\(split\|globs_match\|template_match\|find_n\|find_all_string_submatch_n\)\>"
+
+syn match regoFuncGlob "\<glob\.\(match\|quote_meta\)\>"
+syn match regoFuncUnits "\<units\.parse_bytes\>"
+syn keyword regoFuncTypes is_number is_string is_boolean is_array is_set is_object is_null type_name
+syn match regoFuncEncoding1 "\<\(base64\|base64url\)\.\(encode\|decode\)\>"
+syn match regoFuncEncoding2 "\<urlquery\.\(encode\|decode\|encode_object\)\>"
+syn match regoFuncEncoding3 "\<\(json\|yaml\)\.\(marshal\|unmarshal\)\>"
+syn match regoFuncTokenSigning "\<io\.jwt\.\(encode_sign_raw\|encode_sign\)\>"
+syn match regoFuncTokenVerification "\<io\.jwt\.\(verify_rs256\|verify_ps256\|verify_es256\|verify_hs256\|decode\|decode_verify\)\>"
+syn match regoFuncTime "\<time\.\(now_ns\|parse_ns\|parse_rfc3339_ns\|parse_duration_ns\|date\|clock\|weekday\)\>"
+syn match regoFuncCryptography "\<crypto\.x509\.parse_certificates\>"
+syn keyword regoFuncGraphs walk
+syn match regoFuncHttp "\<http\.send\>"
+syn match regoFuncNet "\<net\.\(cidr_contains\|cidr_intersects\)\>"
+syn match regoFuncRego "\<rego\.parse_module\>"
+syn match regoFuncOpa "\<opa\.runtime\>"
+syn keyword regoFuncDebugging trace
+
+hi def link regoDirective Statement
+hi def link regoKeywords Statement
+hi def link regoFuncAggregates Statement
+hi def link regoFuncArrays Statement
+hi def link regoFuncSets Statement
+hi def link regoFuncStrings Statement
+hi def link regoFuncStrings2 Statement
+hi def link regoFuncStrings3 Statement
+hi def link regoFuncRegex Statement
+hi def link regoFuncRegex2 Statement
+hi def link regoFuncGlob Statement
+hi def link regoFuncUnits Statement
+hi def link regoFuncTypes Statement
+hi def link regoFuncEncoding1 Statement
+hi def link regoFuncEncoding2 Statement
+hi def link regoFuncEncoding3 Statement
+hi def link regoFuncTokenSigning Statement
+hi def link regoFuncTokenVerification Statement
+hi def link regoFuncTime Statement
+hi def link regoFuncCryptography Statement
+hi def link regoFuncGraphs Statement
+hi def link regoFuncHttp Statement
+hi def link regoFuncNet Statement
+hi def link regoFuncRego Statement
+hi def link regoFuncOpa Statement
+hi def link regoFuncDebugging Statement
+
+" https://www.openpolicyagent.org/docs/latest/policy-language/#strings
+syn region regoString start=+"+ skip=+\\\\\|\\"+ end=+"+
+syn region regoRawString start=+`+ end=+`+
+
+hi def link regoString String
+hi def link regoRawString String
+
+" Comments; their contents
+syn keyword regoTodo contained TODO FIXME XXX BUG
+syn cluster regoCommentGroup contains=regoTodo
+syn region regoComment start="#" end="$" contains=@regoCommentGroup,@Spell
+
+hi def link regoComment Comment
+hi def link regoTodo Todo
+
+let b:current_syntax = 'rego'