summaryrefslogtreecommitdiffstats
path: root/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'syntax')
-rw-r--r--syntax/basic/type.vim16
-rw-r--r--syntax/common.vim1
-rw-r--r--syntax/elixir.vim6
3 files changed, 17 insertions, 6 deletions
diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim
index 616c3271..02e78237 100644
--- a/syntax/basic/type.vim
+++ b/syntax/basic/type.vim
@@ -56,6 +56,7 @@ syntax cluster typescriptPrimaryType contains=
\ typescriptTupleType,
\ typescriptTypeQuery,
\ typescriptStringLiteralType,
+ \ typescriptTemplateLiteralType,
\ typescriptReadonlyArrayKeyword,
\ typescriptAssertType
@@ -64,6 +65,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
@@ -103,10 +115,12 @@ syntax region typescriptTupleType matchgroup=typescriptBraces
\ 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=/>/
diff --git a/syntax/common.vim b/syntax/common.vim
index 0fca4de1..b5e5c16c 100644
--- a/syntax/common.vim
+++ b/syntax/common.vim
@@ -71,6 +71,7 @@ if exists("did_typescript_hilink")
HiLink typescriptString String
HiLink typescriptSpecial Special
HiLink typescriptStringLiteralType String
+ HiLink typescriptTemplateLiteralType String
HiLink typescriptStringMember String
HiLink typescriptTemplate String
HiLink typescriptEventString String
diff --git a/syntax/elixir.vim b/syntax/elixir.vim
index ca057b3d..890bb279 100644
--- a/syntax/elixir.vim
+++ b/syntax/elixir.vim
@@ -20,10 +20,6 @@ syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' contains=elixirUnusedVariable
-syn match elixirFunctionCall '\<[a-z_]\w*[!?]\?\(\s*\.\?\s*(\|\s\+[a-zA-Z0-9@:\'\"\[]\)\@='
-syn match elixirFunctionCall '\(:\w\+\s*\.\s*\|[A-Z]\w*\s*\.\s*\)\@<=[a-z_]\w*[!?]\?'
-syn match elixirFunctionCall '\(>\s+\)\<[a-z_]\w*[!?]\?'
-
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
@@ -48,7 +44,7 @@ syn match elixirOperator '\~>\|\~>>\|<\~\|<<\~\|<\~>'
syn match elixirAlias '\([a-z]\)\@<![A-Z]\w*\%(\.[A-Z]\w*\)*'
-syn match elixirAtom '\(:\)\@<!:\%([a-zA-Z_]\w*\%([?!]\|=[>=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)'
+syn match elixirAtom '\(:\)\@<!:\%([a-zA-Z_*]\w*\%([?!]\|=[>=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)'
syn match elixirAtom '\(:\)\@<!:\%(<=>\|&&\?\|%\(()\|\[\]\|{}\)\|++\?\|--\?\|||\?\|!\|//\|[%&`/|]\)'
syn match elixirAtom "\%([a-zA-Z_]\w*[?!]\?\):\(:\)\@!"