pism.vim 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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/sapvi/scripts/pism.vim
  9. "endfunction
  10. if exists('b:current_syntax')
  11. finish
  12. endif
  13. syn keyword sapviKeyword constant contract start end constraint
  14. "syn keyword sapviAttr
  15. syn keyword sapviType FixedGenerator BlakePersonalization PedersenPersonalization ByteSize U64 Fr Point Bool Scalar BinarySize
  16. syn keyword sapviFunctionKeyword enforce lc0_add_one lc1_add_one lc2_add_one
  17. syn match sapviFunction "^[ ]*[a-z_0-9]* "
  18. syn match sapviComment "#.*$"
  19. syn match sapviNumber ' \zs\d\+\ze'
  20. syn match sapviConst '[A-Z_]\{2,}[A-Z0-9_]*'
  21. syn keyword sapviBoolVal true false
  22. syn match sapviPreproc "{%.*%}"
  23. syn match sapviPreproc2 "{{.*}}"
  24. hi def link sapviKeyword Statement
  25. "hi def link sapviAttr StorageClass
  26. hi def link sapviPreproc PreProc
  27. hi def link sapviPreproc2 PreProc
  28. hi def link sapviType Type
  29. hi def link sapviFunction Function
  30. hi def link sapviFunctionKeyword Function
  31. hi def link sapviComment Comment
  32. hi def link sapviNumber Constant
  33. hi def link sapviConst Constant
  34. hi def link sapviBoolVal Constant
  35. let b:current_syntax = "pism"