mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
vim syntax file
This commit is contained in:
parent
aa266f059d
commit
c5d9a07e96
|
@ -450,7 +450,7 @@ fn gen_type_hint(type_hint: &str) -> String {
|
|||
// TODO: Un-hardcode types
|
||||
"vec_int" => "number[]".to_string(),
|
||||
"vec_bool" => "boolean[]".to_string(),
|
||||
"vec_str" => "string[]".to_string(),
|
||||
"vec_string" => "string[]".to_string(),
|
||||
_ => { dbg!(type_hint); todo!() }
|
||||
}
|
||||
}
|
36
editor/hazure.vim
Normal file
36
editor/hazure.vim
Normal file
|
@ -0,0 +1,36 @@
|
|||
" Vim syntax file
|
||||
" Language: Hazure
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
set iskeyword=a-z,A-Z,_
|
||||
|
||||
" Todos
|
||||
syn keyword hazureTodos TODO XXX FIXME NOTE
|
||||
|
||||
" Language keywords
|
||||
syn keyword hazureKeywords let mut fun do end if then else case of return pub
|
||||
syn keyword hazureTypes int string bool void vec_int vec_string vec_bool
|
||||
|
||||
" Comments
|
||||
syn region hazureCommentLine start="--" end="$" contains=hazureTodos
|
||||
syn region hazureCommentBlock start="-{" end="}-" contains=hazureTodos
|
||||
|
||||
" Strings
|
||||
syn region hazureString start=/\v"/ skip=/\v\\./ end=/\v"/
|
||||
|
||||
" Numbers
|
||||
syn region hazureNumber start=/\s\d/ skip=/\d/ end=/\s/
|
||||
|
||||
" Set hilighting
|
||||
hi def link hazureTodos Todo
|
||||
hi def link hazureKeywords Keyword
|
||||
hi def link hazureTypes Types
|
||||
hi def link hazureCommentLine Comment
|
||||
hi def link hazureCommentBlock Comment
|
||||
hi def link hazureString String
|
||||
hi def link hazureNumber Number
|
||||
|
||||
let b:current_syntax="hazure"
|
Loading…
Reference in a new issue