zk.vim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "For autoload, add this to your VIM config:
  2. " VIM: .vimrc
  3. " NeoVIM: .config/nvim/init.vim
  4. "
  5. "autocmd BufRead *.pism call SetPismOptions()
  6. "function SetPismOptions()
  7. " set syntax=pism
  8. " source /home/narodnik/src/drk/scripts/pism.vim
  9. "endfunction
  10. if exists('b:current_syntax')
  11. finish
  12. endif
  13. syn keyword drkKeyword constant contract circuit
  14. "syn keyword drkAttr
  15. syn keyword drkType EcFixedPoint Base Scalar
  16. "syn keyword drkFunctionKeyword enforce lc0_add_one lc1_add_one lc2_add_one lc_coeff_reset lc_coeff_double lc0_sub_one lc1_sub_one lc2_sub_one dump_alloc dump_local
  17. syn match drkFunction "^[ ]*[a-z_0-9]* "
  18. syn match drkComment "#.*$"
  19. syn match drkNumber ' \zs\d\+\ze'
  20. syn match drkHexNumber ' \zs0x[a-z0-9]\+\ze'
  21. syn match drkConst '[A-Z_]\{2,}[A-Z0-9_]*'
  22. syn keyword drkBoolVal true false
  23. syn match drkPreproc "{%.*%}"
  24. syn match drkPreproc2 "{{.*}}"
  25. hi def link drkKeyword Statement
  26. "hi def link drkAttr StorageClass
  27. hi def link drkPreproc PreProc
  28. hi def link drkPreproc2 PreProc
  29. hi def link drkType Type
  30. hi def link drkFunction Function
  31. hi def link drkFunctionKeyword Function
  32. hi def link drkComment Comment
  33. hi def link drkNumber Constant
  34. hi def link drkHexNumber Constant
  35. hi def link drkConst Constant
  36. hi def link drkBoolVal Constant
  37. let b:current_syntax = "pism"