Adding an errorformat for the dotnet

This commit is contained in:
Zoe Roux
2022-03-21 16:23:37 +01:00
parent 644f70f112
commit c40fe555ba
2 changed files with 7 additions and 3 deletions
@@ -20,7 +20,7 @@ M.build = function ()
return "dotnet build"
end
M.errorformat = ""
M.errorformat = [[%f(%l\\,%c):\ %t%*[^\ ]\ %m]]
M.run = function (proj)
return "dotnet run --project " .. proj.csproj
+6 -2
View File
@@ -53,8 +53,12 @@ M.build = function ()
M.select_proj(M.build)
return
end
-- TODO: escape the errorformat
vim.cmd(":copen | :AsyncRun -errorformat=" .. proj.adapter.errorformat .. " " .. proj.adapter.build(proj))
local old = vim.g.asyncrun_open
vim.g.asyncrun_open = 10
-- TODO: the gobal errorformat should not be overriden but it could not find how to excape the string.
vim.cmd(":set errorformat=" .. proj.adapter.errorformat)
vim.cmd(":AsyncRun " .. proj.adapter.build(proj))
vim.g.asyncrun_open = old
end
M.run = function ()