zk.vim
1 " Syntax highlighting for zkas scripts. 2 " Symlink into ~/.vim/syntax/zk.vim 3 " Add to your vim init file: 4 " au BufNewFile,BufRead,BufReadPost *.zk set syntax=zk 5 6 if exists("b:current_syntax") 7 finish 8 endif 9 10 syn keyword zkasKeyword 11 \ k 12 \ field 13 \ constant 14 \ witness 15 \ circuit 16 17 syn keyword zkasType 18 \ EcPoint EcFixedPoint EcFixedPointBase EcFixedPointShort EcNiPoint 19 \ Base BaseArray Scalar ScalarArray 20 \ MerklePath Uint32 Uint64 21 22 syn keyword zkasInstruction 23 \ ec_add ec_mul ec_mul_base ec_mul_short ec_mul_var_base 24 \ ec_get_x ec_get_y 25 \ base_add base_mul base_sub 26 \ poseidon_hash merkle_root 27 \ range_check less_than_strict less_than_loose bool_check 28 \ cond_select zero_cond witness_base 29 \ constrain_equal_base constrain_equal_point 30 \ constrain_instance debug 31 32 syn region zkasString start='"' end='"' contained 33 34 syn keyword zkasTodo contained TODO FIXME XXX NOTE 35 syn match zkasComment "#.*$" contains=zkasTodo 36 37 hi def link zkasKeyword Statement 38 hi def link zkasType Type 39 hi def link zkasInstruction Function 40 hi def link zkasString Constant 41 hi def link zkasTodo Todo 42 hi def link zkasComment Comment 43 44 let b:current_syntax = "zk"