rustc.vim 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. " Vim compiler file
  2. " Compiler: Rust Compiler
  3. " Maintainer: Chris Morgan <me@chrismorgan.info>
  4. " Latest Revision: 2023-09-11
  5. " For bugs, patches and license go to https://github.com/rust-lang/rust.vim
  6. if exists("current_compiler")
  7. finish
  8. endif
  9. let current_compiler = "rustc"
  10. " vint: -ProhibitAbbreviationOption
  11. let s:save_cpo = &cpo
  12. set cpo&vim
  13. " vint: +ProhibitAbbreviationOption
  14. if get(g:, 'rustc_makeprg_no_percent', 0)
  15. CompilerSet makeprg=rustc
  16. else
  17. if has('patch-7.4.191')
  18. CompilerSet makeprg=rustc\ \%:S
  19. else
  20. CompilerSet makeprg=rustc\ \"%\"
  21. endif
  22. endif
  23. " New errorformat (after nightly 2016/08/10)
  24. CompilerSet errorformat=
  25. \%-G,
  26. \%-Gerror:\ aborting\ %.%#,
  27. \%-Gerror:\ Could\ not\ compile\ %.%#,
  28. \%Eerror:\ %m,
  29. \%Eerror[E%n]:\ %m,
  30. \%Wwarning:\ %m,
  31. \%Inote:\ %m,
  32. \%C\ %#-->\ %f:%l:%c,
  33. \%E\ \ left:%m,%C\ right:%m\ %f:%l:%c,%Z
  34. " Old errorformat (before nightly 2016/08/10)
  35. CompilerSet errorformat+=
  36. \%f:%l:%c:\ %t%*[^:]:\ %m,
  37. \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m,
  38. \%-G%f:%l\ %s,
  39. \%-G%*[\ ]^,
  40. \%-G%*[\ ]^%*[~],
  41. \%-G%*[\ ]...
  42. " vint: -ProhibitAbbreviationOption
  43. let &cpo = s:save_cpo
  44. unlet s:save_cpo
  45. " vint: +ProhibitAbbreviationOption
  46. " vim: set et sw=4 sts=4 ts=8: