summaryrefslogtreecommitdiffstats
path: root/syntax/yats/es6-math.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-09-06 14:32:07 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-09-06 14:32:07 +0200
commit84ec4eedcdd2892249b5369f91a6dd1d12fef2fc (patch)
tree6c9806851123656af2b71f6c6f5d89649442909c /syntax/yats/es6-math.vim
parent66b769328c4511b2273f01c70de971c41f6964dd (diff)
downloadvim-polyglot-84ec4eedcdd2892249b5369f91a6dd1d12fef2fc.tar.gz
vim-polyglot-84ec4eedcdd2892249b5369f91a6dd1d12fef2fc.zip
Switch typescript provider, closes #428v4.0.0
Diffstat (limited to 'syntax/yats/es6-math.vim')
-rw-r--r--syntax/yats/es6-math.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/syntax/yats/es6-math.vim b/syntax/yats/es6-math.vim
new file mode 100644
index 00000000..20444a5a
--- /dev/null
+++ b/syntax/yats/es6-math.vim
@@ -0,0 +1,18 @@
+if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1
+ finish
+endif
+
+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
+syntax keyword typescriptMathStaticProp contained SQRT2
+if exists("did_typescript_hilink") | HiLink typescriptMathStaticProp Keyword
+endif
+syntax keyword typescriptMathStaticMethod contained abs acos acosh asin asinh atan nextgroup=typescriptFuncCallArg
+syntax keyword typescriptMathStaticMethod contained atan2 atanh cbrt ceil clz32 cos nextgroup=typescriptFuncCallArg
+syntax keyword typescriptMathStaticMethod contained cosh exp expm1 floor fround hypot nextgroup=typescriptFuncCallArg
+syntax keyword typescriptMathStaticMethod contained imul log log10 log1p log2 max nextgroup=typescriptFuncCallArg
+syntax keyword typescriptMathStaticMethod contained min pow random round sign sin nextgroup=typescriptFuncCallArg
+syntax keyword typescriptMathStaticMethod contained sinh sqrt tan tanh trunc nextgroup=typescriptFuncCallArg
+if exists("did_typescript_hilink") | HiLink typescriptMathStaticMethod Keyword
+endif