summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorbitmapper <bitmapper85@gmail.com>2019-10-30 13:56:35 -0300
committerOri Bernstein <ori@eigenstate.org>2020-01-12 18:11:19 -0800
commit0a94564dff79963ff86d426065158ffe40479c06 (patch)
tree86dcffd23d9a74f05261919fa2d41b858bf83338 /support
parent35ac808f091891eea09ceb058d6d88ccde4feffb (diff)
downloadmc-0a94564dff79963ff86d426065158ffe40479c06.tar.gz
fixed macos build, "improved" vim syntax highlighting (improved mode off by default)
Diffstat (limited to 'support')
-rw-r--r--support/vim/syntax/myr.vim61
1 files changed, 30 insertions, 31 deletions
diff --git a/support/vim/syntax/myr.vim b/support/vim/syntax/myr.vim
index 84680c5..f1124f0 100644
--- a/support/vim/syntax/myr.vim
+++ b/support/vim/syntax/myr.vim
@@ -6,45 +6,44 @@ if exists("b:current_syntax")
finish
endif
+if exists("myr_color_on")
+ syn keyword myrConditional if elif else match
+ syn keyword myrRepeat while for
+ syn keyword myrStructure generic impl struct trait union type
+ syn keyword myrItem const var extern auto
+ syn keyword myrPackage pkg pkglocal use
+ syn keyword myrControl break continue goto
+ syn keyword myrBool true false
+ syn keyword myrSizeOf sizeof
+ syn match myrTerminate ';;'
+endif
+
syn region myrComment start=+/\*+ end=+\*/+ contains=myrComment
syn region myrComment start=+//+ end=+$+
-syn match myrSpecial display contained "\\\(x\x\+\|\o\{1,3}\|u{[a-zA-Z0-9_]*}\|.\|$\)"
-syn match myrFormat display contained "{[^}]*}"
-syn region myrString start=+"+ skip=+\\"+ end=+"+ contains=myrSpecial,myrFormat extend
-syn region myrChar start=+'+ skip=+\\'+ end=+'+ contains=myrSpecial,myrFormat extend
-syn keyword myrKeyword auto
- \ break
- \ const
- \ continue
- \ elif
- \ else
- \ extern
- \ false
- \ for
- \ generic
- \ goto
- \ if
- \ impl
- \ match
- \ pkg
- \ pkglocal
- \ sizeof
- \ struct
- \ trait
- \ true
- \ type
- \ union
- \ use
- \ var
- \ while
+syn match myrSpecial display contained "\\\(x\x\+\|\o\{1,3}\|u{[a-zA-Z0-9_]*}\|.\|$\)"
+syn match myrFormat display contained "{[^}]*}"
+syn region myrString start=+"+ skip=+\\"+ end=+"+ contains=myrSpecial,myrFormat extend
+syn region myrChar start=+'+ skip=+\\'+ end=+'+ contains=myrSpecial,myrFormat extend
hi def link myrComment Comment
hi def link myrString String
-hi def link myrChar String
+hi def link myrChar String
hi def link myrSpecial Special
hi def link myrFormat Special
+
" Too much color makes my eyes hurt. Just highlight
" the most important and uncommon stuff.
-"hi def link myrKeyword Keyword
+
+if exists("myr_color_on")
+ hi def link myrConditional Conditional
+ hi def link myrRepeat Repeat
+ hi def link myrStructure Structure
+ hi def link myrItem Constant
+ hi def link myrPackage Statement
+ hi def link myrControl Statement
+ hi def link myrBool Constant
+ hi def link myrSizeOf Identifier
+ hi def link myrTerminate SpecialChar
+endif
let b:current_syntax = "myr"