modula2.vim 691 B

1234567891011121314151617181920212223242526272829303132
  1. " Vim filetype plugin file
  2. " Language: Modula-2
  3. " Maintainer: Doug Kearns <dougkearns@gmail.com>
  4. " Last Change: 2024 Jan 04
  5. " Dialect can be one of pim, iso, r10
  6. function modula2#GetDialect() abort
  7. if exists("b:modula2.dialect")
  8. return b:modula2.dialect
  9. endif
  10. if exists("g:modula2_default_dialect")
  11. let dialect = g:modula2_default_dialect
  12. else
  13. let dialect = "pim"
  14. endif
  15. return dialect
  16. endfunction
  17. function modula2#SetDialect(dialect, extension = "") abort
  18. if exists("b:modula2")
  19. unlockvar! b:modula2
  20. endif
  21. let b:modula2 = #{ dialect: a:dialect, extension: a:extension }
  22. lockvar! b:modula2
  23. endfunction
  24. " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: