mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-12 21:43:49 -05:00
Switch typescript provider, closes #428
This commit is contained in:
42
syntax/basic/symbols.vim
Normal file
42
syntax/basic/symbols.vim
Normal file
@@ -0,0 +1,42 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" + - ^ ~
|
||||
syntax match typescriptUnaryOp /[+\-~!]/
|
||||
\ nextgroup=@typescriptValue
|
||||
\ skipwhite
|
||||
|
||||
syntax region typescriptTernary matchgroup=typescriptTernaryOp start=/?/ end=/:/ contained contains=@typescriptValue,@typescriptComments nextgroup=@typescriptValue skipwhite skipempty
|
||||
|
||||
syntax match typescriptAssign /=/ nextgroup=@typescriptValue
|
||||
\ skipwhite skipempty
|
||||
|
||||
" 2: ==, ===
|
||||
syntax match typescriptBinaryOp contained /===\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 6: >>>=, >>>, >>=, >>, >=, >
|
||||
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
|
||||
" 2: *=, *
|
||||
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
|
||||
syntax match typescriptBinaryOp contained /!==\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 2: !=, !==
|
||||
syntax match typescriptBinaryOp contained /+\(+\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 3: +, ++, +=
|
||||
syntax match typescriptBinaryOp contained /-\(-\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
|
||||
" 3: -, --, -=
|
||||
|
||||
" exponentiation operator
|
||||
" 2: **, **=
|
||||
syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue
|
||||
|
||||
syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword
|
||||
Reference in New Issue
Block a user