diff options
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/rego.vim | 61 | ||||
-rw-r--r-- | syntax/thrift.vim | 5 |
2 files changed, 2 insertions, 64 deletions
diff --git a/syntax/rego.vim b/syntax/rego.vim deleted file mode 100644 index 5fa20d1a..00000000 --- a/syntax/rego.vim +++ /dev/null @@ -1,61 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rego') == -1 - -" Vim syntax file -" Language: Rego (http://github.com/open-policy-agent/opa) -" Maintainers: Torin Sandall <torinsandall@gmail.com> - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syn case match - -" language keywords -syn keyword regoKeyword package import as not with default else some - -" comments -syn match regoComment "#.*$" contains=regoTodo,@Spell -syn keyword regoTodo FIXME XXX TODO contained - -" data types -syn keyword regoNull null -syn keyword regoBoolean true false -syn match regoNumber "\<\(0[0-7]*\|0[xx]\x\+\|\d\+\)[ll]\=\>" -syn match regoNumber "\(\<\d\+\.\d*\|\.\d\+\)\([ee][-+]\=\d\+\)\=[ffdd]\=" -syn match regoNumber "\<\d\+[ee][-+]\=\d\+[ffdd]\=\>" -syn match regoNumber "\<\d\+\([ee][-+]\=\d\+\)\=[ffdd]\>" -syn region regoString start="\"" skip="\\\"" end="\"" contains=regoStringEscape -syn match regoStringEscape "\\u[0-9a-fA-F]\{4}" contained -syn match regoStringEscape "\\[nrfvb\\\"]" contained - -" rules -syn match regoRuleName "^\(\w\+\)" -syn region regoBody start="{" end="}" transparent - -" operators -syn match regoEquality "=" -syn match regoInequality "[<>!]" -syn match regoArith "[+-/*&|]" -syn match regoBuiltin "\w\+(" nextgroup=regoBuiltinArgs contains=regoBuiltinArgs -syn region regoBuiltinArgs start="(" end=")" contained contains=regoNull,regoBoolean,regoNumber,regoString - -" highlighting -hi link regoKeyword Keyword -hi link regoNull Function -hi link regoBoolean Boolean -hi link regoNumber Number -hi link regoString String - -hi link regoRuleName Function - -hi link regoEquality Keyword -hi link regoInequality Keyword -hi link regoArith Keyword -hi link regoBuiltin Type - -hi link regoComment Comment -hi link regoTodo Todo - -endif diff --git a/syntax/thrift.vim b/syntax/thrift.vim index 4dac50fa..806845a6 100644 --- a/syntax/thrift.vim +++ b/syntax/thrift.vim @@ -40,7 +40,8 @@ syn region thriftComment start="/\*" end="\*/" contains=thriftTodo,@Spell syn match thriftComment "//.\{-}\(?>\|$\)\@=" " String -syn region thriftStringDouble matchgroup=None start=+"+ end=+"+ +syn region thriftString start=+"+ skip=+\\"+ end=+"+ +syn region thriftString start=+'+ skip=+\\'+ end=+'+ " Number syn match thriftNumber "-\=\<\d\+\>" contained @@ -55,7 +56,6 @@ syn keyword thriftBasicTypes void bool byte string binary syn keyword thriftBasicTypes i16 i32 i64 double syn keyword thriftType map list set syn keyword thriftClass union struct exception enum -syn region thriftString start=+"+ end=+"+ " Special syn match thriftNumber "\d\+:" @@ -91,7 +91,6 @@ if version >= 508 || !exists("did_thrift_syn_inits") HiLink thriftStatement Statement HiLink thriftInclude Include HiLink thriftClass Type - HiLink thriftString String delcommand HiLink endif |