69 lines
1.6 KiB
VimL
69 lines
1.6 KiB
VimL
" Vim syntax file
|
|
" Language: Funk
|
|
" Maintainer: Maxwell Jeffress
|
|
" Latest Revision: 25 October 2025
|
|
|
|
if exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
" Keywords
|
|
syn keyword funkKeyword func import
|
|
syn keyword funkConditional if while
|
|
syn keyword funkBoolean true false
|
|
|
|
" Built-in functions
|
|
syn keyword funkBuiltin print println
|
|
|
|
" Operators
|
|
syn match funkOperator "\v\="
|
|
syn match funkOperator "\v\=\="
|
|
syn match funkOperator "\v!\="
|
|
syn match funkOperator "\v\>"
|
|
syn match funkOperator "\v\<"
|
|
syn match funkOperator "\v\>\="
|
|
syn match funkOperator "\v\<\="
|
|
syn match funkOperator "\v\+"
|
|
syn match funkOperator "\v-"
|
|
syn match funkOperator "\v\*"
|
|
syn match funkOperator "\v/"
|
|
syn match funkOperator "\v\^"
|
|
syn match funkOperator "\v\%"
|
|
syn match funkOperator "\v\&\&"
|
|
syn match funkOperator "\v\|\|"
|
|
syn match funkOperator "\v!"
|
|
|
|
" Numbers
|
|
syn match funkNumber "\v<\d+>"
|
|
syn match funkNumber "\v<\d+\.\d+>"
|
|
|
|
" Strings
|
|
syn region funkString start='"' end='"' skip='\\"'
|
|
|
|
" Comments
|
|
syn match funkComment "\v//.*$"
|
|
|
|
" Identifiers (function/variable names)
|
|
syn match funkIdentifier "\v<[a-zA-Z_][a-zA-Z0-9_]*>"
|
|
|
|
" Special variables (arg0, arg1, etc.)
|
|
syn match funkSpecialVar "\varg\d+"
|
|
|
|
" Delimiters
|
|
syn match funkDelimiter "\v[\(\)\{\}]"
|
|
|
|
" Highlighting
|
|
hi def link funkKeyword Keyword
|
|
hi def link funkConditional Conditional
|
|
hi def link funkBoolean Boolean
|
|
hi def link funkBuiltin Function
|
|
hi def link funkOperator Operator
|
|
hi def link funkNumber Number
|
|
hi def link funkString String
|
|
hi def link funkComment Comment
|
|
hi def link funkIdentifier Identifier
|
|
hi def link funkSpecialVar Special
|
|
hi def link funkDelimiter Delimiter
|
|
|
|
let b:current_syntax = "funk"
|