Add propane ftdetect and syntax files
This commit is contained in:
parent
daab290325
commit
12e422b9c3
1
ftdetect/propane.vim
Normal file
1
ftdetect/propane.vim
Normal file
@ -0,0 +1 @@
|
|||||||
|
au BufNewFile,BufRead *.propane set filetype=propane
|
||||||
33
syntax/propane.vim
Normal file
33
syntax/propane.vim
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
" Vim syntax file for Propane
|
||||||
|
" Language: propane
|
||||||
|
" Maintainer: Josh Holtrop
|
||||||
|
" URL: https://github.com/holtrop/propane
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists("b:propane_subtype")
|
||||||
|
let b:propane_subtype = "d"
|
||||||
|
endif
|
||||||
|
|
||||||
|
exe "syn include @propaneTarget syntax/".b:propane_subtype.".vim"
|
||||||
|
|
||||||
|
syn region propaneTarget matchgroup=propaneDelimiter start="<<" end=">>$" contains=@propaneTarget keepend
|
||||||
|
|
||||||
|
syn match propaneComment "#.*"
|
||||||
|
syn match propaneOperator "->"
|
||||||
|
syn match propaneFieldAlias ":[a-zA-Z0-9_]\+" contains=propaneFieldOperator
|
||||||
|
syn match propaneFieldOperator ":" contained
|
||||||
|
syn match propaneOperator "?"
|
||||||
|
syn keyword propaneKeyword drop free_token_node free_token_user_fields module prefix ptype start token token_user_fields tokenid tree tree_prefix tree_suffix
|
||||||
|
|
||||||
|
syn region propaneRegex start="/" end="/" skip="\v\\\\|\\/"
|
||||||
|
|
||||||
|
hi def link propaneComment Comment
|
||||||
|
hi def link propaneKeyword Keyword
|
||||||
|
hi def link propaneRegex String
|
||||||
|
hi def link propaneOperator Operator
|
||||||
|
hi def link propaneFieldOperator Operator
|
||||||
|
hi def link propaneDelimiter Delimiter
|
||||||
|
hi def link propaneFieldAlias Identifier
|
||||||
Loading…
x
Reference in New Issue
Block a user