dotnet.vim 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. " Vim compiler file
  2. " Compiler: dotnet build (.NET CLI)
  3. " Maintainer: Nick Jensen <nickspoon@gmail.com>
  4. " Last Change: 2022-12-06
  5. " 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
  6. " License: Vim (see :h license)
  7. " Repository: https://github.com/nickspoons/vim-cs
  8. if exists("current_compiler")
  9. finish
  10. endif
  11. let current_compiler = "dotnet"
  12. let s:cpo_save = &cpo
  13. set cpo&vim
  14. if get(g:, "dotnet_errors_only", v:false)
  15. CompilerSet makeprg=dotnet\ build\ -nologo
  16. \\ -consoleloggerparameters:NoSummary
  17. \\ -consoleloggerparameters:ErrorsOnly
  18. else
  19. CompilerSet makeprg=dotnet\ build\ -nologo\ -consoleloggerparameters:NoSummary
  20. endif
  21. if get(g:, "dotnet_show_project_file", v:true)
  22. CompilerSet errorformat=%E%f(%l\\,%c):\ %trror\ %m,
  23. \%W%f(%l\\,%c):\ %tarning\ %m,
  24. \%-G%.%#
  25. else
  26. CompilerSet errorformat=%E%f(%l\\,%c):\ %trror\ %m\ [%.%#],
  27. \%W%f(%l\\,%c):\ %tarning\ %m\ [%.%#],
  28. \%-G%.%#
  29. endif
  30. let &cpo = s:cpo_save
  31. unlet s:cpo_save