summary refs log tree commit diff stats
ModeNameSize
-rw-r--r--.gitignore32log stats plain blame
-rw-r--r--.travis.yml131log stats plain blame
-rw-r--r--LICENSE35149log stats plain blame
-rw-r--r--Makefile1013log stats plain blame
-rw-r--r--README.md10082log stats plain blame
d---------assets68log stats plain
d---------etc82log stats plain
-rw-r--r--getwtxt.go84log stats plain blame
-rw-r--r--getwtxt.yml3081log stats plain blame
-rw-r--r--go.mod236log stats plain blame
-rw-r--r--go.sum28499log stats plain blame
d---------svc856log stats plain
ral.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
" Vim syntax file
" Language:    mu
" Maintainer:  Kartik Agaram <mu@akkartik.com>
" URL:         http://github.com/akkartik/mu
" License:     public domain
"
" Copy this file into your ftplugin directory, and add the following to your
" vimrc or to .vim/ftdetect/mu.vim:
"   autocmd BufReadPost,BufNewFile *.mu set filetype=mu
"
" Some highlight groups you might want to select colors for in your vimrc:
"   muFunction
"   muTest

let s:save_cpo = &cpo
set cpo&vim

" todo: why does this periodically lose syntax, like on file reload?
"   $ vim x.mu
"   :e
"? if exists("b:syntax")
"?   finish
"? endif
"? let b:syntax = "mu"

setlocal iskeyword=@,48-57,?,!,_,$,-
setlocal formatoptions-=t  " Mu programs have long lines
setlocal formatoptions+=c  " but comments should still wrap

syntax match muSalientComment /##.*$/  | highlight link muSalientComment SalientComment
syntax match muComment /#\( \.\|? \)\@!.*/ | highlight link muComment Comment
syntax match muS1Comment /# \..*/ | highlight link muS1Comment Comment
syntax match muS2Comment /# \. \..*/ | highlight link muS2Comment Comment

set comments+=n:#
syntax match muCommentedCode "#? .*"  | highlight link muCommentedCode CommentedCode
let b:cmt_head = "#? "

syntax match muDelimiter "[{}]"  | highlight link muDelimiter Delimiter

" Mu literals
syntax match muLiteral %\<-\?[0-9][0-9A-Fa-f]*\>%
syntax match muLiteral %\<-\?0x[0-9A-Fa-f]\+\>%
syntax match muLiteral %"[^"]*"%
highlight link muLiteral Constant
syntax match muError %\<[0-9][0-9A-Fa-f]*[^0-9A-Fa-f]\>%
highlight link muError Error

" sources of action at a distance
syntax match muAssign "<-"
highlight link muAssign SpecialChar
syntax keyword muAssign error
highlight link muAssign Special

" common keywords
syntax match muControl "\<return\>\|\<return-if[^ ]*\>"
syntax match muControl "\<jump\>\|\<jump-if[^ ]*"
syntax match muControl "\<break\>\|\<break-if[^ ]*"
syntax match muControl "\<loop\>\|\<loop-if[^ ]*"
highlight link muControl PreProc

syntax match muKeyword " -> "
syntax keyword muKeyword fn sig type var
highlight link muKeyword PreProc

syntax match muFunction "\(fn\s\+\)\@<=\(\S\+\)"
highlight link muFunction Identifier

syntax match muTest "\(fn\s\+\)\@<=\(test-\S\+\)"
highlight link muTest Identifier

syntax match muData "^type\>"
syntax match muData "\<eax\>\|\<ecx\>\|\<edx\>\|\<ebx\>\|\<esi\>\|\<edi\>\|\<xmm[0-7]\>"
highlight link muData Constant

let &cpo = s:save_cpo