summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS4
-rw-r--r--runtime/doc/change.txt18
-rw-r--r--runtime/doc/eval.txt51
-rw-r--r--runtime/doc/netbeans.txt2
-rw-r--r--runtime/doc/sign.txt16
-rw-r--r--runtime/doc/todo.txt14
-rw-r--r--runtime/doc/vim.13
-rw-r--r--runtime/doc/vim.man3
-rw-r--r--runtime/ftplugin/awk.vim7
-rw-r--r--runtime/optwin.vim6
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim4
-rw-r--r--runtime/syntax/asm.vim100
-rw-r--r--runtime/syntax/asmh8300.vim48
-rw-r--r--runtime/syntax/awk.vim7
-rw-r--r--runtime/syntax/debchangelog.vim10
-rw-r--r--runtime/syntax/debcontrol.vim16
-rw-r--r--runtime/syntax/debsources.vim10
-rw-r--r--runtime/syntax/proto.vim60
-rw-r--r--runtime/syntax/typescriptcommon.vim225
19 files changed, 351 insertions, 253 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index caf44b56e..929447d77 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -63,6 +63,7 @@ runtime/doc/pi_netrw.txt @cecamp
runtime/doc/pi_tar.txt @cecamp
runtime/doc/pi_vimball.txt @cecamp
runtime/doc/pi_zip.txt @cecamp
+runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/bst.vim @tpope
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
@@ -107,6 +108,9 @@ runtime/plugin/tarPlugin.vim @cecamp
runtime/plugin/vimballPlugin.vim @cecamp
runtime/plugin/zipPlugin.vim @cecamp
runtime/syntax/amiga.vim @cecamp
+runtime/syntax/asm.vim @dkearns
+runtime/syntax/asmh8300.vim @dkearns
+runtime/syntax/awk.vim @dkearns
runtime/syntax/bst.vim @tpope
runtime/syntax/csh.vim @cecamp
runtime/syntax/cucumber.vim @tpope
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 12e20a5ab..ff12e5d9f 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 8.2. Last change: 2020 Aug 15
+*change.txt* For Vim version 8.2. Last change: 2020 Nov 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1809,13 +1809,15 @@ found here: |sort()|, |uniq()|.
With [i] case is ignored.
- With [l] sort uses the current locale. See
- `language collate` to check or set the locale used
- for ordering. For example, with "en_US.UTF8",
- Ö will be ordered after O and before P,
- whereas with the Swedish locale "sv_SE.UTF8",
- it will be after Z.
- Case is typically ignored by the locale.
+ With [l] sort uses the current collation locale.
+ Implementation details: strcoll() is used to compare
+ strings. See |:language| to check or set the collation
+ locale. Example: >
+ :language collate en_US.UTF-8
+ :%sort l
+< |v:collate| can also used to check the current locale.
+ Sorting using the locale typically ignores case.
+ This does not work properly on Mac.
Options [n][f][x][o][b] are mutually exclusive.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index e487d3e28..b573a11bf 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 Oct 23
+*eval.txt* For Vim version 8.2. Last change: 2020 Nov 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3798,7 +3798,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
not need to be the first letter: >
confirm("file has been modified", "&Save\nSave &All")
< For the console, the first letter of each choice is used as
- the default shortcut key.
+ the default shortcut key. Case is ignored.
The optional {default} argument is the number of the choice
that is made if the user hits <CR>. Use 1 to make the first
@@ -4427,10 +4427,10 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|Dictionaries|.
If they are |Lists|: Append {expr2} to {expr1}.
- If {expr3} is given insert the items of {expr2} before item
- {expr3} in {expr1}. When {expr3} is zero insert before the
- first item. When {expr3} is equal to len({expr1}) then
- {expr2} is appended.
+ If {expr3} is given insert the items of {expr2} before the
+ item with index {expr3} in {expr1}. When {expr3} is zero
+ insert before the first item. When {expr3} is equal to
+ len({expr1}) then {expr2} is appended.
Examples: >
:echo sort(extend(mylist, [7, 5]))
:call extend(mylist, [2, 3], 1)
@@ -8319,15 +8319,18 @@ reg_recording() *reg_recording()*
Returns an empty string when not recording. See |q|.
reltime([{start} [, {end}]]) *reltime()*
- Return an item that represents a time value. The format of
- the item depends on the system. It can be passed to
- |reltimestr()| to convert it to a string or |reltimefloat()|
- to convert to a Float.
- Without an argument it returns the current time.
+ Return an item that represents a time value. The item is a
+ list with items that depend on the system. In Vim 9 script
+ list<any> can be used.
+ The item can be passed to |reltimestr()| to convert it to a
+ string or |reltimefloat()| to convert to a Float.
+
+ Without an argument reltime() returns the current time.
With one argument is returns the time passed since the time
specified in the argument.
With two arguments it returns the time passed between {start}
and {end}.
+
The {start} and {end} arguments must be values returned by
reltime().
@@ -9700,15 +9703,25 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
When {func} is given and it is '1' or 'i' then case is
ignored.
- When {func} is given and it is 'l' then the current locale
- is used for ordering. See `language collate` to check or set
- the locale used for ordering. For example, with "en_US.UTF8",
- Ö will be ordered after O and before P, whereas with the
- Swedish locale "sv_SE.UTF8", it will be after Z.
- Case is typically ignored by the locale.
+ When {func} is given and it is 'l' then the current collation
+ locale is used for ordering. Implementation details: strcoll()
+ is used to compare strings. See |:language| check or set the
+ collation locale. |v:collate| can also be used to check the
+ current locale. Sorting using the locale typically ignores
+ case. Example: >
+ " ö is sorted similarly to o with English locale.
+ :language collate en_US.UTF8
+ :echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
+< ['n', 'o', 'O', 'ö', 'p', 'z'] ~
+>
+ " ö is sorted after z with Swedish locale.
+ :language collate sv_SE.UTF8
+ :echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
+< ['n', 'o', 'O', 'p', 'z', 'ö'] ~
+ This does not work properly on Mac.
When {func} is given and it is 'n' then all items will be
- sorted numerical (Implementation detail: This uses the
+ sorted numerical (Implementation detail: this uses the
strtod() function to parse numbers, Strings, Lists, Dicts and
Funcrefs will be considered as being 0).
@@ -11593,7 +11606,7 @@ menu Compiled with support for |:menu|.
mksession Compiled with support for |:mksession|.
modify_fname Compiled with file name modifiers. |filename-modifiers|
(always true)
-mouse Compiled with support mouse.
+mouse Compiled with support for mouse.
mouse_dec Compiled with support for Dec terminal mouse.
mouse_gpm Compiled with support for gpm (Linux console mouse)
mouse_gpm_enabled GPM mouse is working
diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt
index f780e3b32..cc545f145 100644
--- a/runtime/doc/netbeans.txt
+++ b/runtime/doc/netbeans.txt
@@ -1,4 +1,4 @@
-*netbeans.txt* For Vim version 8.2. Last change: 2020 Aug 15
+*netbeans.txt* For Vim version 8.2. Last change: 2020 Nov 02
VIM REFERENCE MANUAL by Gordon Prieur et al.
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index 46cb9b59c..9c52587f4 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -1,4 +1,4 @@
-*sign.txt* For Vim version 8.2. Last change: 2020 Aug 31
+*sign.txt* For Vim version 8.2. Last change: 2020 Oct 28
VIM REFERENCE MANUAL by Gordon Prieur
@@ -81,6 +81,10 @@ on the same line, the attributes of the sign with the highest priority is used
independently of the sign group. The default priority for a sign is 10. The
priority is assigned at the time of placing a sign.
+When two signs with the same priority are present, and one has an icon or text
+in the signcolumn while the other has line highlighting, then both are
+displayed.
+
When the line on which the sign is placed is deleted, the sign is moved to the
next line (or the last line of the buffer, if there is no next line). When
the delete is undone the sign does not move back.
@@ -458,11 +462,11 @@ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()*
entries
The dictionary for each sign contains the following entries:
- group sign group. Set to '' for the global group.
- id identifier of the sign
- lnum line number where the sign is placed
- name name of the defined sign
- priority sign priority
+ group sign group. Set to '' for the global group.
+ id identifier of the sign
+ lnum line number where the sign is placed
+ name name of the defined sign
+ priority sign priority
The returned signs in a buffer are ordered by their line
number and priority.
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 48a7946c1..713bad643 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.2. Last change: 2020 Oct 26
+*todo.txt* For Vim version 8.2. Last change: 2020 Nov 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,12 +38,13 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Sign highlight in signcolumn disappears if there is line highlighting.
+test_vim9_func fails: type from default value not used.
+
+Without extra sleeps netbeans test has valgrind errors.
+PR #7248 from Yegappan - test doesn't fail without code changes
Making everything work:
-- Test all command modifiers.
-- Check many more builtin function arguments at compile time.
-- Closure arguments should be more strict, like any function call?
+- Closure argument call should not always set varargs, like any function call?
- Invoke user command in a :def function
- Make map() give an error if the resulting type is wrong.
Add mapnew() or mapcopy() to create a new List/Dict for the result, which
@@ -54,6 +55,7 @@ Making everything work:
- In autocmd: use legacy syntax, not whatever the current script uses?
- need to check type when a declaration specifies a type: #6507
let nr: number = 'asdf'
+- Check many more builtin function arguments at compile time.
- Make sure that in vim9script a function call without namespace only finds
the script-local function, not a global one.
- Make sure that where a callback is expected a function can be used (without
@@ -279,8 +281,6 @@ Was originally written by Felipe Morales.
Remove SPACE_IN_FILENAME ? It is only used for completion.
-Patch to use collation based sorting. (Christian Brabandt, #6229)
-
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
with 'termguicolors'. #1740
diff --git a/runtime/doc/vim.1 b/runtime/doc/vim.1
index a2ca0e28a..f32c06785 100644
--- a/runtime/doc/vim.1
+++ b/runtime/doc/vim.1
@@ -459,6 +459,9 @@ Use {name} as the server name. Used for the current Vim, unless used with a
\-\-socketid {id}
GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
.TP
+\-\-startuptime {file}
+During startup write timing messages to the file {fname}.
+.TP
\-\-version
Print version information and exit.
.SH ON-LINE HELP
diff --git a/runtime/doc/vim.man b/runtime/doc/vim.man
index e905a82e6..6ab20e907 100644
--- a/runtime/doc/vim.man
+++ b/runtime/doc/vim.man
@@ -345,6 +345,9 @@ OPTIONS
GTK GUI only: Use the GtkPlug mechanism to run gvim in an‐
other window.
+ --startuptime {file}
+ During startup write timing messages to the file {fname}.
+
--version Print version information and exit.
ON-LINE HELP
diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim
index 9809fec38..1bca3ad3c 100644
--- a/runtime/ftplugin/awk.vim
+++ b/runtime/ftplugin/awk.vim
@@ -1,7 +1,8 @@
" Vim filetype plugin
-" Language: awk, nawk, gawk, mawk
-" Maintainer: Antonio Colombo <azc100@gmail.com>
-" Last Change: 2020 Sep 28
+" Language: awk, nawk, gawk, mawk
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
+" Last Change: 2020 Sep 28
" This plugin was prepared by Mark Sikora
" This plugin was updated as proposed by Doug Kearns
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index b48a58f3e..45aa8f930 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 Oct 23
+" Last Change: 2020 Oct 27
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@@ -848,7 +848,7 @@ if has("digraphs")
endif
call <SID>AddOption("tildeop", gettext("the \"~\" command behaves like an operator"))
call <SID>BinOptionG("top", &top)
-call <SID>AddOption("operatorfunc", gettext("function called for the \"g@\" operator"))
+call <SID>AddOption("operatorfunc", gettext("function called for the \"g@\" operator"))
call <SID>OptionG("opfunc", &opfunc)
call <SID>AddOption("showmatch", gettext("when inserting a bracket, briefly jump to its match"))
call <SID>BinOptionG("sm", &sm)
@@ -1267,7 +1267,7 @@ endif
call <SID>Header(gettext("multi-byte characters"))
-call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\"\n\"euc-jp\", \"big5\", etc."))
+call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\",\n\"euc-jp\", \"big5\", etc."))
call <SID>OptionG("enc", &enc)
call <SID>AddOption("fileencoding", gettext("character encoding for the current file"))
call append("$", "\t" .. s:local_to_buffer)
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index c42b069f5..bf38dc93a 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -2,7 +2,7 @@
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
-" Last Change: 2020 Oct 25
+" Last Change: 2020 Oct 28
"
" WORK IN PROGRESS - Only the basics work
" Note: On MS-Windows you need a recent version of gdb. The one included with
@@ -1034,7 +1034,7 @@ endfunc
func s:PlaceSign(id, subid, entry)
let nr = printf('%d.%d', a:id, a:subid)
- exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' file=' . a:entry['fname']
+ exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' priority=110 file=' . a:entry['fname']
let a:entry['placed'] = 1
endfunc
diff --git a/runtime/syntax/asm.vim b/runtime/syntax/asm.vim
index 492e3e8e9..73f283a4a 100644
--- a/runtime/syntax/asm.vim
+++ b/runtime/syntax/asm.vim
@@ -1,11 +1,10 @@
" Vim syntax file
-" Language: GNU Assembler
-" Maintainer: Erik Wognsen <erik.wognsen@gmail.com>
-" Previous maintainer:
-" Kevin Dahlhausen <kdahlhaus@yahoo.com>
-" Last Change: 2014 Feb 04
-
-" Thanks to Ori Avtalion for feedback on the comment markers!
+" Language: GNU Assembler
+" Maintainer: Doug Kearns dougkearns@gmail.com
+" Previous Maintainers: Erik Wognsen <erik.wognsen@gmail.com>
+" Kevin Dahlhausen <kdahlhaus@yahoo.com>
+" Contributors: Ori Avtalion, Lakshay Garg
+" Last Change: 2020 Oct 31
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -34,29 +33,49 @@ syn match asmType "\.space"
syn match asmType "\.string"
syn match asmType "\.word"
-syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1
syn match asmIdentifier "[a-z_][a-z0-9_]*"
+syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1
" Various #'s as defined by GAS ref manual sec 3.6.2.1
-" Technically, the first decNumber def is actually octal,
+" Technically, the first asmDecimal def is actually octal,
" since the value of 0-7 octal is the same as 0-7 decimal,
" I (Kevin) prefer to map it as decimal:
-syn match decNumber "0\+[1-7]\=[\t\n$,; ]"
-syn match decNumber "[1-9]\d*"
-syn match octNumber "0[0-7][0-7]\+"
-syn match hexNumber "0[xX][0-9a-fA-F]\+"
-syn match binNumber "0[bB][0-1]*"
+syn match asmDecimal "\<0\+[1-7]\=\>" display
+syn match asmDecimal "\<[1-9]\d*\>" display
+syn match asmOctal "\<0[0-7][0-7]\+\>" display
+syn match asmHexadecimal "\<0[xX][0-9a-fA-F]\+\>" display
+syn match asmBinary "\<0[bB][0-1]\+\>" display
+
+syn match asmFloat "\<\d\+\.\d*\%(e[+-]\=\d\+\)\=\>" display
+syn match asmFloat "\.\d\+\%(e[+-]\=\d\+\)\=\>" display
+syn match asmFloat "\<\d\%(e[+-]\=\d\+\)\>" display
+syn match asmFloat "[+-]\=Inf\>\|\<NaN\>" display
+
+syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display
+syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d\+\%(\.\d\+\)\=\%(e[+-]\=\d\+\)\=" display
+" Avoid fighting the hexadecimal match for unicorn-like '0x' prefixed floats
+syn match asmFloat "\%(0x\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display
-syn keyword asmTodo contained TODO
+" Allow all characters to be escaped (and in strings) as these vary across
+" architectures [See sec 3.6.1.1 Strings]
+syn match asmCharacterEscape "\\." contained
+syn match asmCharacter "'\\\=." contains=asmCharacterEscape
+syn match asmStringEscape "\\\_." contained
+syn match asmStringEscape "\\\%(\o\{3}\|00[89]\)" contained display
+syn match asmStringEscape "\\x\x\+" contained display
+
+syn region asmString start="\"" end="\"" skip="\\\\\|\\\"" contains=asmStringEscape
+
+syn keyword asmTodo contained TODO FIXME XXX NOTE
" GAS supports one type of multi line comments:
-syn region asmComment start="/\*" end="\*/" contains=asmTodo
+syn region asmComment start="/\*" end="\*/" contains=asmTodo,@Spell
" GAS (undocumentedly?) supports C++ style comments. Unlike in C/C++ however,
" a backslash ending a C++ style comment does not extend the comment to the
" next line (hence the syntax region does not define 'skip="\\$"')
-syn region asmComment start="//" end="$" keepend contains=asmTodo
+syn region asmComment start="//" end="$" keepend contains=asmTodo,@Spell
" Line comment characters depend on the target architecture and command line
" options and some comments may double as logical line number directives or
@@ -69,7 +88,7 @@ syn region asmComment start="//" end="$" keepend contains=asmTodo
" frequently used features of the most popular architectures (and also the
" non-GNU assembly languages that use this syntax file because their asm files
" are also named *.asm), the following are used as line comment characters:
-syn match asmComment "[#;!|].*" contains=asmTodo
+syn match asmComment "[#;!|].*" contains=asmTodo,@Spell
" Side effects of this include:
" - When `;' is used to separate statements on the same line (many targets
@@ -96,35 +115,50 @@ syn match asmMacro "\.endm"
" with '.', including the GCC auto-generated '.L' labels.
syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*"
-
syn case match
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" The default methods for highlighting. Can be overridden later
-hi def link asmSection Special
-hi def link asmLabel Label
-hi def link asmComment Comment
-hi def link asmTodo Todo
+hi def link asmSection Special
+hi def link asmLabel Label
+hi def link asmComment Comment
+hi def link asmTodo Todo
hi def link asmDirective Statement
-hi def link asmInclude Include
-hi def link asmCond PreCondit
-hi def link asmMacro Macro
+hi def link asmInclude Include
+hi def link asmCond PreCondit
+hi def link asmMacro Macro
+
+if exists('g:asm_legacy_syntax_groups')
+ hi def link hexNumber Number
+ hi def link decNumber Number
+ hi def link octNumber Number
+ hi def link binNumber Number
+ hi def link asmHexadecimal hexNumber
+ hi def link asmDecimal decNumber
+ hi def link asmOctal octNumber
+ hi def link asmBinary binNumber
+else
+ hi def link asmHexadecimal Number
+ hi def link asmDecimal Number
+ hi def link asmOctal Number
+ hi def link asmBinary Number
+endif
+hi def link asmFloat Float
-hi def link hexNumber Number
-hi def link decNumber Number
-hi def link octNumber Number
-hi def link binNumber Number
+hi def link asmString String
+hi def link asmStringEscape Special
+hi def link asmCharacter Character
+hi def link asmCharacterEscape Special
hi def link asmIdentifier Identifier
-hi def link asmType Type
-
+hi def link asmType Type
let b:current_syntax = "asm"
let &cpo = s:cpo_save
unlet s:cpo_save
-" vim: ts=8
+" vim: nowrap sw=2 sts=2 ts=8 noet
diff --git a/runtime/syntax/asmh8300.vim b/runtime/syntax/asmh8300.vim
index 8560fb7ae..2eabb7e4e 100644
--- a/runtime/syntax/asmh8300.vim
+++ b/runtime/syntax/asmh8300.vim
@@ -1,19 +1,21 @@
" Vim syntax file
-" Language: Hitachi H-8300h specific syntax for GNU Assembler
-" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
-" Last Change: 2002 Sep 19
+" Language: Hitachi H-8300h specific syntax for GNU Assembler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Previous Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
+" Last Change: 2020 Oct 31
-" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
+runtime! syntax/asm.vim
+
syn case ignore
-syn match asmDirective "\.h8300[h]*"
+syn match asmDirective "\.h8300[hs]n\="
"h8300[h] registers
-syn match asmReg "e\=r[0-7][lh]\="
+syn match asmRegister "e\=r\o[lh]\="
"h8300[h] opcodes - order is important!
syn match asmOpcode "add\.[lbw]"
@@ -37,32 +39,20 @@ syn match asmOpcode "sha[lr]\.[lbw]"
syn match asmOpcode "shl[lr]\.[lbw]"
syn match asmOpcode "sub\.[lbw]"
syn match asmOpcode "xor\.[lbw]"
-syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt"
-syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi"
-syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset"
-syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa"
-syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe"
-syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc"
-syn keyword asmOpcode "sub" "trapa" "xorc"
-
-syn case match
-
-" Read the general asm syntax
-runtime! syntax/asm.vim
-
-
-" Define the default highlighting.
-" Only when an item doesn't have highlighting yet
+syn keyword asmOpcode andc band bcc bclr bcs beq bf bge bgt
+syn keyword asmOpcode bhi bhs biand bild bior bist bixor bmi
+syn keyword asmOpcode bne bnot bnp bor bpl bpt bra brn bset
+syn keyword asmOpcode bsr btst bst bt bvc bvs bxor cmp daa
+syn keyword asmOpcode das eepmov eepmovw inc jmp jsr ldc movfpe
+syn keyword asmOpcode movtpe mov nop orc rte rts sleep stc
+syn keyword asmOpcode sub trapa xorc
-hi def link asmOpcode Statement
-hi def link asmRegister Identifier
-
-" My default-color overrides:
-"hi asmOpcode ctermfg=yellow
-"hi asmReg ctermfg=lightmagenta
+syn case match
+hi def link asmOpcode Statement
+hi def link asmRegister Identifier
let b:current_syntax = "asmh8300"
-" vim: ts=8
+" vim: nowrap sw=2 sts=2 ts=8 noet
diff --git a/runtime/syntax/awk.vim b/runtime/syntax/awk.vim
index 43455b864..3082c1cb5 100644
--- a/runtime/syntax/awk.vim
+++ b/runtime/syntax/awk.vim
@@ -1,7 +1,8 @@
" Vim syntax file
-" Language: awk, nawk, gawk, mawk
-" Maintainer: Antonio Colombo <azc100@gmail.com>
-" Last Change: 2020 Aug 18
+" Language: awk, nawk, gawk, mawk
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
+" Last Change: 2020 Aug 18
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
" The AWK Programming Language, Addison-Wesley, 1988
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index 7321e90b3..33594f38d 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2020 Apr 27
+" Last Change: 2020 Oct 28
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@@ -21,20 +21,20 @@ let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
- \ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
+ \ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy',
\
- \ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
+ \ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hippo', 'devel'
\ ]
let s:unsupported = [
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
- \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
+ \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
- \ 'disco'
+ \ 'disco', 'eoan'
\ ]
let &cpo=s:cpo
diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
index 9085cd01d..25fc252de 100644
--- a/runtime/syntax/debcontrol.vim
+++ b/runtime/syntax/debcontrol.vim
@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2018 Aug 11
+" Last Change: 2020 Oct 26
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
" Standard syntax initialization
@@ -47,22 +47,24 @@ exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs)
unlet s:kernels s:archs s:pairs
+" Keep in sync with https://metadata.ftp-master.org/sections.822
+" curl -q https://metadata.ftp-master.debian.org/sections.822 2>/dev/null| grep-dctrl -n --not -FSection -sSection / -
let s:sections = [
\ 'admin', 'cli-mono', 'comm', 'database', 'debian-installer', 'debug'
\, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded'
- \, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics'
+ \, 'fonts', 'games', 'gnome', 'gnu-r', 'gnustep', 'golang', 'graphics'
\, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection'
- \, 'java\%(script\)\=', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
- \, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net'
- \, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python'
- \, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex'
+ \, 'java', 'javascript', 'kde', 'kernel', 'libdevel', 'libs', 'lisp'
+ \, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net', 'news'
+ \, 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python', 'raku'
+ \, 'ruby', 'rust', 'science', 'shells', 'sound', 'tasks', 'tex', 'text'
\, 'utils', 'vcs', 'video', 'web', 'x11', 'xfce', 'zope'
\ ]
syn keyword debcontrolMultiArch contained no foreign allowed same
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
syn keyword debcontrolPriority contained extra important optional required standard
-exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\%('.join(s:sections, '\|').'\)"'
+exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\<\%('.join(s:sections, '\|').'\)\>"'
syn keyword debcontrolPackageType contained udeb deb
syn match debcontrolVariable contained "\${.\{-}}"
syn keyword debcontrolDmUpload contained yes
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index b59444311..0b9282eeb 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2020 Apr 27
+" Last Change: 2020 Oct 26
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@@ -23,20 +23,20 @@ let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
- \ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
+ \ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy',
\
- \ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
+ \ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hippo', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
- \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
+ \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
- \ 'disco'
+ \ 'disco', 'eoan'
\ ]
let &cpo=s:cpo
diff --git a/runtime/syntax/proto.vim b/runtime/syntax/proto.vim
index 4615e0ca0..0d2d2f259 100644
--- a/runtime/syntax/proto.vim
+++ b/runtime/syntax/proto.vim
@@ -1,26 +1,36 @@
-" syntax file for Protocol Buffers - Google's data interchange format
-"
+" Protocol Buffers - Google's data interchange format
" Copyright 2008 Google Inc. All rights reserved.
+" https://developers.google.com/protocol-buffers/
"
-" Permission is hereby granted, free of charge, to any person obtaining a copy
-" of this software and associated documentation files (the "Software"), to deal
-" in the Software without restriction, including without limitation the rights
-" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-" copies of the Software, and to permit persons to whom the Software is
-" furnished to do so, subject to the following conditions:
-"
-" The above copyright notice and this permission notice shall be included in
-" all copies or substantial portions of the Software.
+" Redistribution and use in source and binary forms, with or without
+" modification, are permitted provided that the following conditions are
+" met:
"
-" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-" THE SOFTWARE.
+" * Redistributions of source code must retain the above copyright
+" notice, this list of conditions and the following disclaimer.
+" * Redistributions in binary form must reproduce the above
+" copyright notice, this list of conditions and the following disclaimer
+" in the documentation and/or other materials provided with the
+" distribution.
+" * Neither the name of Google Inc. nor the names of its
+" contributors may be used to endorse or promote products derived from
+" this software without specific prior written permission.
"
-" http://code.google.com/p/protobuf/
+" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+" This is the Vim syntax file for Google Protocol Buffers as found at
+" https://github.com/protocolbuffers/protobuf
+" Last update: 2020 Oct 29
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -33,10 +43,10 @@ syn keyword protoTodo contained TODO FIXME XXX
syn cluster protoCommentGrp contains=protoTodo
syn keyword protoSyntax syntax import option
-syn keyword protoStructure package message group
+syn keyword protoStructure package message group oneof
syn keyword protoRepeat optional required repeated
syn keyword protoDefault default
-syn keyword protoExtend extend extensions to max
+syn keyword protoExtend extend extensions to max reserved
syn keyword protoRPC service rpc returns
syn keyword protoType int32 int64 uint32 uint64 sint32 sint64
@@ -48,10 +58,10 @@ syn keyword protoBool true false
syn match protoInt /-\?\<\d\+\>/
syn match protoInt /\<0[xX]\x+\>/
syn match protoFloat /\<-\?\d*\(\.\d*\)\?/
-syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp
-syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp
-syn region protoString start=/"/ skip=/\\./ end=/"/
-syn region protoString start=/'/ skip=/\\./ end=/'/
+syn region protoComment start="\/\*" end="\*\/" contains=@pbCommentGrp,@Spell
+syn region protoComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp,@Spell
+syn region protoString start=/"/ skip=/\\./ end=/"/ contains=@Spell
+syn region protoString start=/'/ skip=/\\./ end=/'/ contains=@Spell
hi def link protoTodo Todo
diff --git a/runtime/syntax/typescriptcommon.vim b/runtime/syntax/typescriptcommon.vim
index ff5316832..4074f04a3 100644
--- a/runtime/syntax/typescriptcommon.vim
+++ b/runtime/syntax/typescriptcommon.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: TypeScript and TypeScriptReact
" Maintainer: Bram Moolenaar, Herrington Darkholme
-" Last Change: 2019 Nov 30
+" Last Change: 2020 Oct 27
" Based On: Herrington Darkholme's yats.vim
" Changes: See https:github.com/HerringtonDarkholme/yats.vim
" Credits: See yats.vim on github
@@ -21,15 +21,14 @@ if main_syntax == 'typescript' || main_syntax == 'typescriptreact'
setlocal iskeyword+=$
" syntax cluster htmlJavaScript contains=TOP
endif
+" For private field added from TypeScript 3.8
+setlocal iskeyword+=#
" lowest priority on least used feature
syntax match typescriptLabel /[a-zA-Z_$]\k*:/he=e-1 contains=typescriptReserved nextgroup=@typescriptStatement skipwhite skipempty
" other keywords like return,case,yield uses containedin
syntax region typescriptBlock matchgroup=typescriptBraces start=/{/ end=/}/ contains=@typescriptStatement,@typescriptComments fold
-
-
-"runtime syntax/basic/identifiers.vim
syntax cluster afterIdentifier contains=
\ typescriptDotNotation,
\ typescriptFuncCallArg,
@@ -60,7 +59,56 @@ syntax region typescriptFuncCallArg contained matchgroup=typescriptPa
syntax region typescriptEventFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression
syntax region typescriptEventString contained start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ contains=typescriptASCII,@events
-"runtime syntax/basic/literal.vim
+syntax region typescriptDestructureString
+ \ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/
+ \ contains=typescriptASCII
+ \ nextgroup=typescriptDestructureAs
+ \ contained skipwhite skipempty
+
+syntax cluster typescriptVariableDeclarations
+ \ contains=typescriptVariableDeclaration,@typescriptDestructures
+
+syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
+ \ nextgroup=typescriptTypeAnnotation,typescriptAssign
+ \ contained skipwhite skipempty
+
+syntax cluster typescriptDestructureVariables contains=
+ \ typescriptRestOrSpread,
+ \ typescriptDestructureComma,
+ \ typescriptDestructureLabel,
+ \ typescriptDestructureVariable,
+ \ @typescriptDestructures
+
+syntax match typescriptDestructureVariable /[A-Za-z_$]\k*/ contained
+ \ nextgroup=typescriptDefaultParam
+ \ contained skipwhite skipempty
+
+syntax match typescriptDestructureLabel /[A-Za-z_$]\k*\ze\_s*:/
+ \ nextgroup=typescriptDestructureAs
+ \ contained skipwhite skipempty
+
+syntax match typescriptDestructureAs /:/
+ \ nextgroup=typescriptDestructureVariable,@typescriptDestructures
+ \ contained skipwhite skipempty
+
+syntax match typescriptDestructureComma /,/ contained
+
+syntax cluster typescriptDestructures contains=
+ \ typescriptArrayDestructure,
+ \ typescriptObjectDestructure
+
+syntax region typescriptArrayDestructure matchgroup=typescriptBraces
+ \ start=/\[/ end=/]/
+ \ contains=@typescriptDestructureVariables,@typescriptComments
+ \ nextgroup=typescriptTypeAnnotation,typescriptAssign
+ \ transparent contained skipwhite skipempty fold
+
+syntax region typescriptObjectDestructure matchgroup=typescriptBraces
+ \ start=/{/ end=/}/
+ \ contains=typescriptDestructureString,@typescriptDestructureVariables,@typescriptComments
+ \ nextgroup=typescriptTypeAnnotation,typescriptAssign
+ \ transparent contained skipwhite skipempty fold
+
"Syntax in the JavaScript code
" String
@@ -77,15 +125,15 @@ syntax region typescriptString
\ contains=typescriptSpecial,@Spell
\ extend
-syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{4,5}})|c\u|.)"
+syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)"
" From vim runtime
" <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48>
-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=/`\|$/
- \ contains=typescriptTemplateSubstitution
+ \ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell
\ nextgroup=@typescriptSymbols
\ skipwhite skipempty
@@ -100,18 +148,16 @@ syntax region typescriptArray matchgroup=typescriptBraces
syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
-syntax match typescriptNumber /\d[0-9_]*\.\d[0-9_]*\|\d[0-9_]*\|\.\d[0-9]*/
- \ nextgroup=typescriptExponent,@typescriptSymbols skipwhite skipempty
-syntax match typescriptExponent /[eE][+-]\=\d[0-9]*\>/
- \ nextgroup=@typescriptSymbols skipwhite skipempty contained
+syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/
+ \ nextgroup=typescriptSymbols skipwhite skipempty
-
-" runtime syntax/basic/object.vim
syntax region typescriptObjectLiteral matchgroup=typescriptBraces
\ start=/{/ end=/}/
- \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName
+ \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword
\ fold contained
+syntax keyword typescriptObjectAsyncKeyword async contained
+
syntax match typescriptObjectLabel contained /\k\+\_s*/
\ nextgroup=typescriptObjectColon,@typescriptCallImpl
\ skipwhite skipempty
@@ -136,7 +182,6 @@ syntax match typescriptObjectSpread /\.\.\./ contained containedin=typescriptObj
syntax match typescriptObjectColon contained /:/ nextgroup=@typescriptValue skipwhite skipempty
-"runtime syntax/basic/symbols.vim
" + - ^ ~
syntax match typescriptUnaryOp /[+\-~!]/
\ nextgroup=@typescriptValue
@@ -153,10 +198,12 @@ syntax match typescriptBinaryOp contained /===\?/ nextgroup=@typescriptValue s
syntax match typescriptBinaryOp contained />\(>>=\|>>\|>=\|>\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
" 4: <<=, <<, <=, <
syntax match typescriptBinaryOp contained /<\(<=\|<\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
-" 3: ||, |=, |
-syntax match typescriptBinaryOp contained /|\(|\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
-" 3: &&, &=, &
-syntax match typescriptBinaryOp contained /&\(&\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
+" 3: ||, |=, |, ||=
+syntax match typescriptBinaryOp contained /||\?=\?/ nextgroup=@typescriptValue skipwhite skipempty
+" 4: &&, &=, &, &&=
+syntax match typescriptBinaryOp contained /&&\?=\?/ nextgroup=@typescriptValue skipwhite skipempty
+" 2: ??, ??=
+syntax match typescriptBinaryOp contained /??=\?/ nextgroup=@typescriptValue skipwhite skipempty
" 2: *=, *
syntax match typescriptBinaryOp contained /\*=\?/ nextgroup=@typescriptValue skipwhite skipempty
" 2: %=, %
@@ -177,11 +224,18 @@ syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue
syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword
" runtime syntax/basic/reserved.vim
-
-"runtime syntax/basic/keyword.vim
"Import
-syntax keyword typescriptImport from as import
+syntax keyword typescriptImport from as
+syntax keyword typescriptImport import
+ \ nextgroup=typescriptImportType
+ \ skipwhite
+syntax keyword typescriptImportType type
+ \ contained
syntax keyword typescriptExport export
+ \ nextgroup=typescriptExportType
+ \ skipwhite
+syntax match typescriptExportType /\<type\s*{\@=/
+ \ contained skipwhite skipempty skipnl
syntax keyword typescriptModule namespace module
"this
@@ -199,16 +253,12 @@ syntax keyword typescriptIdentifier arguments this super
\ nextgroup=@afterIdentifier
syntax keyword typescriptVariable let var
- \ nextgroup=typescriptVariableDeclaration
- \ skipwhite skipempty skipnl
+ \ nextgroup=@typescriptVariableDeclarations
+ \ skipwhite skipempty
syntax keyword typescriptVariable const
- \ nextgroup=typescriptEnum,typescriptVariableDeclaration
- \ skipwhite
-
-syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
- \ nextgroup=typescriptTypeAnnotation,typescriptAssign
- \ contained skipwhite skipempty skipnl
+ \ nextgroup=typescriptEnum,@typescriptVariableDeclarations
+ \ skipwhite skipempty
syntax region typescriptEnum matchgroup=typescriptEnumKeyword start=/enum / end=/\ze{/
\ nextgroup=typescriptBlock
@@ -271,7 +321,6 @@ syntax cluster typescriptAmbients contains=
\ typescriptEnumKeyword,typescriptEnum,
\ typescriptModule
-"runtime syntax/basic/doc.vim
"Syntax coloring for Node.js shebang line
syntax match shellbang "^#!.*node\>"
syntax match shellbang "^#!.*iojs\>"
@@ -279,8 +328,9 @@ syntax match shellbang "^#!.*iojs\>"
"JavaScript comments
syntax keyword typescriptCommentTodo TODO FIXME XXX TBD
+syntax match typescriptMagicComment "@ts-\%(ignore\|expect-error\)\>"
syntax match typescriptLineComment "//.*"
- \ contains=@Spell,typescriptCommentTodo,typescriptRef
+ \ contains=@Spell,typescriptCommentTodo,typescriptRef,typescriptMagicComment
syntax region typescriptComment
\ start="/\*" end="\*/"
\ contains=@Spell,typescriptCommentTodo extend
@@ -349,24 +399,27 @@ syntax region typescriptDocLinkTag contained matchgroup=typescriptDo
syntax cluster typescriptDocs contains=typescriptDocParamType,typescriptDocNamedParamType,typescriptDocParam
-if main_syntax == "typescript"
+if exists("main_syntax") && main_syntax == "typescript"
syntax sync clear
syntax sync ccomment typescriptComment minlines=200
endif
syntax case match
-"runtime syntax/basic/type.vim
" Types
syntax match typescriptOptionalMark /?/ contained
+syntax cluster typescriptTypeParameterCluster contains=
+ \ typescriptTypeParameter,
+ \ typescriptGenericDefault
+
syntax region typescriptTypeParameters matchgroup=typescriptTypeBrackets
\ start=/</ end=/>/
- \ contains=typescriptTypeParameter
+ \ contains=@typescriptTypeParameterCluster
\ contained
syntax match typescriptTypeParameter /\K\k*/
- \ nextgroup=typescriptConstraint,typescriptGenericDefault
+ \ nextgroup=typescriptConstraint
\ contained skipwhite skipnl
syntax keyword typescriptConstraint extends
@@ -409,6 +462,7 @@ syntax cluster typescriptPrimaryType contains=
\ typescriptTupleType,
\ typescriptTypeQuery,
\ typescriptStringLiteralType,
+ \ typescriptTemplateLiteralType,
\ typescriptReadonlyArrayKeyword,
\ typescriptAssertType
@@ -417,6 +471,17 @@ syntax region typescriptStringLiteralType contained
\ nextgroup=typescriptUnion
\ skipwhite skipempty
+syntax region typescriptTemplateLiteralType contained
+ \ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
+ \ contains=typescriptTemplateSubstitutionType
+ \ nextgroup=typescriptTypeOperator
+ \ skipwhite skipempty
+
+syntax region typescriptTemplateSubstitutionType matchgroup=typescriptTemplateSB
+ \ start=/\${/ end=/}/
+ \ contains=@typescriptType
+ \ contained
+
syntax region typescriptParenthesizedType matchgroup=typescriptParens
\ start=/(/ end=/)/
\ contains=@typescriptType
@@ -439,7 +504,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,
@@ -447,16 +512,21 @@ syntax cluster typescriptTypeMember contains=
\ typescriptIndexSignature,
\ @typescriptMembers
+syntax match typescriptTupleLable /\K\k*?\?:/
+ \ contained
+
syntax region typescriptTupleType matchgroup=typescriptBraces
\ start=/\[/ end=/\]/
- \ contains=@typescriptType,@typescriptComments
+ \ contains=@typescriptType,@typescriptComments,typescriptRestOrSpread,typescriptTupleLable
\ contained skipwhite
syntax cluster typescriptTypeOperator
- \ contains=typescriptUnion,typescriptTypeBracket
+ \ contains=typescriptUnion,typescriptTypeBracket,typescriptConstraint,typescriptConditionalType
syntax match typescriptUnion /|\|&/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty
+syntax match typescriptConditionalType /?\|:/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty
+
syntax cluster typescriptFunctionType contains=typescriptGenericFunc,typescriptFuncType
syntax region typescriptGenericFunc matchgroup=typescriptTypeBrackets
\ start=/</ end=/>/
@@ -511,6 +581,7 @@ syntax match typescriptTypeAnnotation /:/
syntax cluster typescriptParameterList contains=
\ typescriptTypeAnnotation,
\ typescriptAccessibilityModifier,
+ \ typescriptReadonlyModifier,
\ typescriptOptionalMark,
\ typescriptRestOrSpread,
\ typescriptFuncComma,
@@ -550,10 +621,9 @@ syntax keyword typescriptReadonlyArrayKeyword readonly
\ nextgroup=@typescriptPrimaryType
\ skipwhite
+
" extension
if get(g:, 'yats_host_keyword', 1)
- "runtime syntax/yats.vim
- "runtime syntax/yats/typescript.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Error EvalError
syntax keyword typescriptGlobal containedin=typescriptIdentifierName InternalError
@@ -584,7 +654,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptGlobalMethod
hi def link typescriptGlobalMethod Structure
- "runtime syntax/yats/es6-number.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Number nextgroup=typescriptGlobalNumberDot,typescriptFuncCallArg
syntax match typescriptGlobalNumberDot /\./ contained nextgroup=typescriptNumberStaticProp,typescriptNumberStaticMethod,typescriptProp
syntax keyword typescriptNumberStaticProp contained EPSILON MAX_SAFE_INTEGER MAX_VALUE
@@ -599,7 +668,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptNumberMethod
hi def link typescriptNumberMethod Keyword
- "runtime syntax/yats/es6-string.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName String nextgroup=typescriptGlobalStringDot,typescriptFuncCallArg
syntax match typescriptGlobalStringDot /\./ contained nextgroup=typescriptStringStaticMethod,typescriptProp
syntax keyword typescriptStringStaticMethod contained fromCharCode fromCodePoint raw nextgroup=typescriptFuncCallArg
@@ -615,7 +683,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptStringMethod
hi def link typescriptStringMethod Keyword
- "runtime syntax/yats/es6-array.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Array nextgroup=typescriptGlobalArrayDot,typescriptFuncCallArg
syntax match typescriptGlobalArrayDot /\./ contained nextgroup=typescriptArrayStaticMethod,typescriptProp
syntax keyword typescriptArrayStaticMethod contained from isArray of nextgroup=typescriptFuncCallArg
@@ -629,7 +696,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptArrayMethod
hi def link typescriptArrayMethod Keyword
- "runtime syntax/yats/es6-object.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Object nextgroup=typescriptGlobalObjectDot,typescriptFuncCallArg
syntax match typescriptGlobalObjectDot /\./ contained nextgroup=typescriptObjectStaticMethod,typescriptProp
syntax keyword typescriptObjectStaticMethod contained create defineProperties defineProperty nextgroup=typescriptFuncCallArg
@@ -646,7 +712,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptObjectMethod
hi def link typescriptObjectMethod Keyword
- "runtime syntax/yats/es6-symbol.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Symbol nextgroup=typescriptGlobalSymbolDot,typescriptFuncCallArg
syntax match typescriptGlobalSymbolDot /\./ contained nextgroup=typescriptSymbolStaticProp,typescriptSymbolStaticMethod,typescriptProp
syntax keyword typescriptSymbolStaticProp contained length iterator match replace
@@ -657,13 +722,11 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptSymbolStaticMethod contained for keyFor nextgroup=typescriptFuncCallArg
hi def link typescriptSymbolStaticMethod Keyword
- "runtime syntax/yats/es6-function.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function
syntax keyword typescriptFunctionMethod contained apply bind call nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptFunctionMethod
hi def link typescriptFunctionMethod Keyword
- "runtime syntax/yats/es6-math.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Math nextgroup=typescriptGlobalMathDot,typescriptFuncCallArg
syntax match typescriptGlobalMathDot /\./ contained nextgroup=typescriptMathStaticProp,typescriptMathStaticMethod,typescriptProp
syntax keyword typescriptMathStaticProp contained E LN10 LN2 LOG10E LOG2E PI SQRT1_2
@@ -677,7 +740,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptMathStaticMethod contained sinh sqrt tan tanh trunc nextgroup=typescriptFuncCallArg
hi def link typescriptMathStaticMethod Keyword
- "runtime syntax/yats/es6-date.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Date nextgroup=typescriptGlobalDateDot,typescriptFuncCallArg
syntax match typescriptGlobalDateDot /\./ contained nextgroup=typescriptDateStaticMethod,typescriptProp
syntax keyword typescriptDateStaticMethod contained UTC now parse nextgroup=typescriptFuncCallArg
@@ -699,13 +761,11 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDateMethod
hi def link typescriptDateMethod Keyword
- "runtime syntax/yats/es6-json.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName JSON nextgroup=typescriptGlobalJSONDot,typescriptFuncCallArg
syntax match typescriptGlobalJSONDot /\./ contained nextgroup=typescriptJSONStaticMethod,typescriptProp
syntax keyword typescriptJSONStaticMethod contained parse stringify nextgroup=typescriptFuncCallArg
hi def link typescriptJSONStaticMethod Keyword
- "runtime syntax/yats/es6-regexp.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName RegExp nextgroup=typescriptGlobalRegExpDot,typescriptFuncCallArg
syntax match typescriptGlobalRegExpDot /\./ contained nextgroup=typescriptRegExpStaticProp,typescriptProp
syntax keyword typescriptRegExpStaticProp contained lastIndex
@@ -717,7 +777,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptRegExpMethod
hi def link typescriptRegExpMethod Keyword
- "runtime syntax/yats/es6-map.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Map WeakMap
syntax keyword typescriptES6MapProp contained size
syntax cluster props add=typescriptES6MapProp
@@ -727,7 +786,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptES6MapMethod
hi def link typescriptES6MapMethod Keyword
- "runtime syntax/yats/es6-set.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Set WeakSet
syntax keyword typescriptES6SetProp contained size
syntax cluster props add=typescriptES6SetProp
@@ -737,7 +795,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptES6SetMethod
hi def link typescriptES6SetMethod Keyword
- "runtime syntax/yats/es6-proxy.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Proxy
syntax keyword typescriptProxyAPI contained getOwnPropertyDescriptor getOwnPropertyNames
syntax keyword typescriptProxyAPI contained defineProperty deleteProperty freeze seal
@@ -745,7 +802,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptProxyAPI contained iterate ownKeys apply construct
hi def link typescriptProxyAPI Keyword
- "runtime syntax/yats/es6-promise.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Promise nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg
syntax match typescriptGlobalPromiseDot /\./ contained nextgroup=typescriptPromiseStaticMethod,typescriptProp
syntax keyword typescriptPromiseStaticMethod contained resolve reject all race nextgroup=typescriptFuncCallArg
@@ -754,7 +810,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptPromiseMethod
hi def link typescriptPromiseMethod Keyword
- "runtime syntax/yats/es6-reflect.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Reflect
syntax keyword typescriptReflectMethod contained apply construct defineProperty deleteProperty nextgroup=typescriptFuncCallArg
syntax keyword typescriptReflectMethod contained enumerate get getOwnPropertyDescriptor nextgroup=typescriptFuncCallArg
@@ -763,14 +818,12 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptReflectMethod
hi def link typescriptReflectMethod Keyword
- "runtime syntax/yats/ecma-402.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Intl
syntax keyword typescriptIntlMethod contained Collator DateTimeFormat NumberFormat nextgroup=typescriptFuncCallArg
syntax keyword typescriptIntlMethod contained PluralRules nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptIntlMethod
hi def link typescriptIntlMethod Keyword
- "runtime syntax/yats/node.vim
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName global process
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName console Buffer
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName module exports
@@ -788,7 +841,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName afterAll
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName expect assert
- "runtime syntax/yats/web.vim
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbortController
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbstractWorker AnalyserNode
syntax keyword typescriptBOM containedin=typescriptIdentifierName App Apps ArrayBuffer
@@ -1038,7 +1090,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptBOM containedin=typescriptIdentifierName XMLHttpRequestEventTarget
hi def link typescriptBOM Structure
- "runtime syntax/yats/web-window.vim
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName applicationCache
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName closed
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName Components
@@ -1145,7 +1196,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptBOMWindowCons containedin=typescriptIdentifierName XMLSerializer
hi def link typescriptBOMWindowCons Structure
- "runtime syntax/yats/web-navigator.vim
syntax keyword typescriptBOMNavigatorProp contained battery buildID connection cookieEnabled
syntax keyword typescriptBOMNavigatorProp contained doNotTrack maxTouchPoints oscpu
syntax keyword typescriptBOMNavigatorProp contained productSub push serviceWorker
@@ -1164,7 +1214,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptServiceWorkerMethod
hi def link typescriptServiceWorkerMethod Keyword
- "runtime syntax/yats/web-location.vim
syntax keyword typescriptBOMLocationProp contained href protocol host hostname port
syntax keyword typescriptBOMLocationProp contained pathname search hash username password
syntax keyword typescriptBOMLocationProp contained origin
@@ -1174,7 +1223,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptBOMLocationMethod
hi def link typescriptBOMLocationMethod Keyword
- "runtime syntax/yats/web-history.vim
syntax keyword typescriptBOMHistoryProp contained length current next previous state
syntax keyword typescriptBOMHistoryProp contained scrollRestoration
syntax cluster props add=typescriptBOMHistoryProp
@@ -1183,7 +1231,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptBOMHistoryMethod
hi def link typescriptBOMHistoryMethod Keyword
- "runtime syntax/yats/web-console.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName console
syntax keyword typescriptConsoleMethod contained count dir error group groupCollapsed nextgroup=typescriptFuncCallArg
syntax keyword typescriptConsoleMethod contained groupEnd info log time timeEnd trace nextgroup=typescriptFuncCallArg
@@ -1191,7 +1238,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptConsoleMethod
hi def link typescriptConsoleMethod Keyword
- "runtime syntax/yats/web-xhr.vim
syntax keyword typescriptXHRGlobal containedin=typescriptIdentifierName XMLHttpRequest
hi def link typescriptXHRGlobal Structure
syntax keyword typescriptXHRProp contained onreadystatechange readyState response
@@ -1204,7 +1250,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptXHRMethod
hi def link typescriptXHRMethod Keyword
- "runtime syntax/yats/web-blob.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Blob BlobBuilder
syntax keyword typescriptGlobal containedin=typescriptIdentifierName File FileReader
syntax keyword typescriptGlobal containedin=typescriptIdentifierName FileReaderSync
@@ -1236,7 +1281,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptURLStaticMethod contained createObjectURL revokeObjectURL nextgroup=typescriptFuncCallArg
hi def link typescriptURLStaticMethod Keyword
- "runtime syntax/yats/web-crypto.vim
syntax keyword typescriptCryptoGlobal containedin=typescriptIdentifierName crypto
hi def link typescriptCryptoGlobal Structure
syntax keyword typescriptSubtleCryptoMethod contained encrypt decrypt sign verify nextgroup=typescriptFuncCallArg
@@ -1250,7 +1294,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptCryptoMethod
hi def link typescriptCryptoMethod Keyword
- "runtime syntax/yats/web-fetch.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Headers Request
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Response
syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName fetch nextgroup=typescriptFuncCallArg
@@ -1274,7 +1317,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptResponseMethod
hi def link typescriptResponseMethod Keyword
- "runtime syntax/yats/web-service-worker.vim
syntax keyword typescriptServiceWorkerProp contained controller ready
syntax cluster props add=typescriptServiceWorkerProp
hi def link typescriptServiceWorkerProp Keyword
@@ -1287,7 +1329,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptCacheMethod
hi def link typescriptCacheMethod Keyword
- "runtime syntax/yats/web-encoding.vim
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextEncoder
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextDecoder
hi def link typescriptEncodingGlobal Structure
@@ -1298,21 +1339,18 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptEncodingMethod
hi def link typescriptEncodingMethod Keyword
- "runtime syntax/yats/web-geo.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Geolocation
syntax keyword typescriptGeolocationMethod contained getCurrentPosition watchPosition nextgroup=typescriptFuncCallArg
syntax keyword typescriptGeolocationMethod contained clearWatch nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptGeolocationMethod
hi def link typescriptGeolocationMethod Keyword
- "runtime syntax/yats/web-network.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName NetworkInformation
syntax keyword typescriptBOMNetworkProp contained downlink downlinkMax effectiveType
syntax keyword typescriptBOMNetworkProp contained rtt type
syntax cluster props add=typescriptBOMNetworkProp
hi def link typescriptBOMNetworkProp Keyword
- "runtime syntax/yats/web-payment.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName PaymentRequest
syntax keyword typescriptPaymentMethod contained show abort canMakePayment nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptPaymentMethod
@@ -1340,7 +1378,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptPaymentShippingOptionProp
hi def link typescriptPaymentShippingOptionProp Keyword
- "runtime syntax/yats/dom-node.vim
syntax keyword typescriptDOMNodeProp contained attributes baseURI baseURIObject childNodes
syntax keyword typescriptDOMNodeProp contained firstChild lastChild localName namespaceURI
syntax keyword typescriptDOMNodeProp contained nextSibling nodeName nodePrincipal
@@ -1364,7 +1401,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptDOMNodeType contained DOCUMENT_FRAGMENT_NODE NOTATION_NODE
hi def link typescriptDOMNodeType Keyword
- "runtime syntax/yats/dom-elem.vim
syntax keyword typescriptDOMElemAttrs contained accessKey clientHeight clientLeft
syntax keyword typescriptDOMElemAttrs contained clientTop clientWidth id innerHTML
syntax keyword typescriptDOMElemAttrs contained length onafterscriptexecute onbeforescriptexecute
@@ -1387,7 +1423,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptDOMElemFuncs contained getAttribute
hi def link typescriptDOMElemFuncs Keyword
- "runtime syntax/yats/dom-document.vim
syntax keyword typescriptDOMDocProp contained activeElement body cookie defaultView
syntax keyword typescriptDOMDocProp contained designMode dir domain embeds forms head
syntax keyword typescriptDOMDocProp contained images lastModified links location plugins
@@ -1419,7 +1454,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMDocMethod
hi def link typescriptDOMDocMethod Keyword
- "runtime syntax/yats/dom-event.vim
syntax keyword typescriptDOMEventTargetMethod contained addEventListener removeEventListener nextgroup=typescriptEventFuncCallArg
syntax keyword typescriptDOMEventTargetMethod contained dispatchEvent waitUntil nextgroup=typescriptEventFuncCallArg
syntax cluster props add=typescriptDOMEventTargetMethod
@@ -1480,7 +1514,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMEventMethod
hi def link typescriptDOMEventMethod Keyword
- "runtime syntax/yats/dom-storage.vim
syntax keyword typescriptDOMStorage contained sessionStorage localStorage
hi def link typescriptDOMStorage Keyword
syntax keyword typescriptDOMStorageProp contained length
@@ -1491,7 +1524,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMStorageMethod
hi def link typescriptDOMStorageMethod Keyword
- "runtime syntax/yats/dom-form.vim
syntax keyword typescriptDOMFormProp contained acceptCharset action elements encoding
syntax keyword typescriptDOMFormProp contained enctype length method name target
syntax cluster props add=typescriptDOMFormProp
@@ -1500,7 +1532,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMFormMethod
hi def link typescriptDOMFormMethod Keyword
- "runtime syntax/yats/css.vim
syntax keyword typescriptDOMStyle contained alignContent alignItems alignSelf animation
syntax keyword typescriptDOMStyle contained animationDelay animationDirection animationDuration
syntax keyword typescriptDOMStyle contained animationFillMode animationIterationCount
@@ -1575,8 +1606,6 @@ if get(g:, 'yats_host_keyword', 1)
let typescript_props = 1
-
- "runtime syntax/yats/event.vim
syntax keyword typescriptAnimationEvent contained animationend animationiteration
syntax keyword typescriptAnimationEvent contained animationstart beginEvent endEvent
syntax keyword typescriptAnimationEvent contained repeatEvent
@@ -1710,14 +1739,12 @@ if get(g:, 'yats_host_keyword', 1)
endif
" patch
-"runtime syntax/basic/patch.vim
" patch for generated code
syntax keyword typescriptGlobal Promise
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
syntax keyword typescriptGlobal Map WeakMap
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
-"runtime syntax/basic/members.vim
syntax keyword typescriptConstructor contained constructor
\ nextgroup=@typescriptCallSignature
\ skipwhite skipempty
@@ -1725,7 +1752,7 @@ syntax keyword typescriptConstructor contained constructor
syntax cluster memberNextGroup contains=typescriptMemberOptionality,typescriptTypeAnnotation,@typescriptCallSignature
-syntax match typescriptMember /\K\k*/
+syntax match typescriptMember /#\?\K\k*/
\ nextgroup=@memberNextGroup
\ contained skipwhite
@@ -1765,7 +1792,6 @@ syntax region typescriptComputedMember contained matchgroup=typescriptPropert
\ nextgroup=@memberNextGroup
\ skipwhite skipempty
-"runtime syntax/basic/class.vim
"don't add typescriptMembers to nextgroup, let outer scope match it
" so we won't match abstract method outside abstract class
syntax keyword typescriptAbstract abstract
@@ -1781,7 +1807,7 @@ syntax match typescriptClassName contained /\K\k*/
syntax region typescriptClassTypeParameter
\ start=/</ end=/>/
- \ contains=typescriptTypeParameter
+ \ contains=@typescriptTypeParameterCluster
\ nextgroup=typescriptClassBlock,typescriptClassExtends
\ contained skipwhite skipnl
@@ -1813,7 +1839,7 @@ syntax match typescriptInterfaceName contained /\k\+/
\ skipwhite skipnl
syntax region typescriptInterfaceTypeParameter
\ start=/</ end=/>/
- \ contains=typescriptTypeParameter
+ \ contains=@typescriptTypeParameterCluster
\ nextgroup=typescriptObjectType,typescriptInterfaceExtends
\ contained
\ skipwhite skipnl
@@ -1832,7 +1858,6 @@ syntax region typescriptInterfaceTypeArguments matchgroup=typescriptTypeBrackets
syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl
-"runtime syntax/basic/cluster.vim
"Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement
syntax cluster typescriptStatement
\ contains=typescriptBlock,typescriptVariable,
@@ -1872,7 +1897,6 @@ syntax cluster typescriptValue
syntax cluster typescriptEventExpression contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion
-"runtime syntax/basic/function.vim
syntax keyword typescriptAsyncFuncKeyword async
\ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef
\ skipwhite
@@ -1894,7 +1918,7 @@ syntax match typescriptFuncName contained /\K\k*/
\ skipwhite
" destructuring ({ a: ee }) =>
-syntax match typescriptArrowFuncDef contained /({\_[^}]*}\(:\_[^)]\)\?)\s*=>/
+syntax match typescriptArrowFuncDef contained /(\(\s*\({\_[^}]*}\|\k\+\)\(:\_[^)]\)\?,\?\)\+)\s*=>/
\ contains=typescriptArrowFuncArg,typescriptArrowFunc
\ nextgroup=@typescriptExpression,typescriptBlock
\ skipwhite skipempty
@@ -1913,7 +1937,7 @@ syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/
\ skipwhite skipempty
" TODO: optimize this pattern
-syntax region typescriptArrowFuncDef contained start=/(\_[^)]*):/ end=/=>/
+syntax region typescriptArrowFuncDef contained start=/(\_[^(^)]*):/ end=/=>/
\ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation
\ nextgroup=@typescriptExpression,typescriptBlock
\ skipwhite skipempty keepend
@@ -1925,7 +1949,7 @@ syntax region typescriptArrowFuncArg contained start=/<\|(/ end=/\ze=>
syntax region typescriptReturnAnnotation contained start=/:/ end=/{/me=e-1 contains=@typescriptType nextgroup=typescriptBlock
-syntax region typescriptFuncImpl contained start=/function/ end=/{/me=e-1
+syntax region typescriptFuncImpl contained start=/function\>/ end=/{/me=e-1
\ contains=typescriptFuncKeyword
\ nextgroup=typescriptBlock
@@ -1941,9 +1965,8 @@ syntax region typescriptParamImpl matchgroup=typescriptParens
\ nextgroup=typescriptReturnAnnotation,typescriptBlock
\ contained skipwhite skipnl
-"runtime syntax/basic/decorator.vim
syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
- \ nextgroup=typescriptArgumentList,typescriptTypeArguments
+ \ nextgroup=typescriptFuncCallArg,typescriptTypeArguments
\ contains=@_semantic,typescriptDotNotation
" Define the default highlighting.
@@ -1957,6 +1980,7 @@ hi def link typescriptComment Comment
hi def link typescriptLineComment Comment
hi def link typescriptDocComment Comment
hi def link typescriptCommentTodo Todo
+hi def link typescriptMagicComment SpecialComment
hi def link typescriptRef Include
hi def link typescriptDocNotation SpecialComment
hi def link typescriptDocTags SpecialComment
@@ -1970,9 +1994,11 @@ hi def link typescriptDocParamType Type
hi def link typescriptString String
hi def link typescriptSpecial Special
hi def link typescriptStringLiteralType String
+hi def link typescriptTemplateLiteralType String
hi def link typescriptStringMember String
hi def link typescriptTemplate String
hi def link typescriptEventString String
+hi def link typescriptDestructureString String
hi def link typescriptASCII Special
hi def link typescriptTemplateSB Label
hi def link typescriptRegexpString String
@@ -1986,6 +2012,7 @@ hi def link typescriptDefault typescriptCase
hi def link typescriptBranch Conditional
hi def link typescriptIdentifier Structure
hi def link typescriptVariable Identifier
+hi def link typescriptDestructureVariable PreProc
hi def link typescriptEnumKeyword Identifier
hi def link typescriptRepeat Repeat
hi def link typescriptForOperator Repeat
@@ -1997,14 +2024,17 @@ hi def link typescriptCastKeyword Special
hi def link typescriptType Type
hi def link typescriptNull Boolean
hi def link typescriptNumber Number
-hi def link typescriptExponent Number
hi def link typescriptBoolean Boolean
hi def link typescriptObjectLabel typescriptLabel
+hi def link typescriptDestructureLabel Function
hi def link typescriptLabel Label
+hi def link typescriptTupleLable Label
hi def link typescriptStringProperty String
hi def link typescriptImport Special
+hi def link typescriptImportType Special
hi def link typescriptAmbientDeclaration Special
hi def link typescriptExport Special
+hi def link typescriptExportType Special
hi def link typescriptModule Special
hi def link typescriptTry Special
hi def link typescriptExceptions Special
@@ -2013,6 +2043,7 @@ hi def link typescriptMember Function
hi def link typescriptMethodAccessor Operator
hi def link typescriptAsyncFuncKeyword Keyword
+hi def link typescriptObjectAsyncKeyword Keyword
hi def link typescriptAsyncFor Keyword
hi def link typescriptFuncKeyword Keyword
hi def link typescriptAsyncFunc Keyword