scheme.vim 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. " Vim filetype plugin file
  2. " Language: Scheme (R7RS)
  3. " Last Change: 2024 Jun 21
  4. " 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
  5. " Author: Evan Hanson <evhan@foldling.org>
  6. " Maintainer: Evan Hanson <evhan@foldling.org>
  7. " Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
  8. " Repository: https://git.foldling.org/vim-scheme.git
  9. " URL: https://foldling.org/vim/ftplugin/scheme.vim
  10. if exists('b:did_ftplugin')
  11. finish
  12. endif
  13. let s:cpo = &cpo
  14. set cpo&vim
  15. setl lisp
  16. setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
  17. setl commentstring=;\ %s
  18. setl define=^\\s*(def\\k*
  19. setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126
  20. setl formatoptions-=t
  21. let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword< formatoptions<'
  22. setl lispwords+=case
  23. setl lispwords+=define
  24. setl lispwords+=define-library
  25. setl lispwords+=define-record-type
  26. setl lispwords+=define-syntax
  27. setl lispwords+=define-values
  28. setl lispwords+=do
  29. setl lispwords+=guard
  30. setl lispwords+=lambda
  31. setl lispwords+=let
  32. setl lispwords+=let*
  33. setl lispwords+=let*-values
  34. setl lispwords+=let-syntax
  35. setl lispwords+=let-values
  36. setl lispwords+=letrec
  37. setl lispwords+=letrec*
  38. setl lispwords+=letrec-syntax
  39. setl lispwords+=parameterize
  40. setl lispwords+=set!
  41. setl lispwords+=syntax-rules
  42. setl lispwords+=unless
  43. setl lispwords+=when
  44. let b:undo_ftplugin = b:undo_ftplugin . ' lispwords<'
  45. let b:did_scheme_ftplugin = 1
  46. if exists('b:is_chicken') || exists('g:is_chicken')
  47. runtime! ftplugin/chicken.vim
  48. endif
  49. unlet b:did_scheme_ftplugin
  50. let b:did_ftplugin = 1
  51. let &cpo = s:cpo
  52. unlet s:cpo