mirror of
https://github.com/zoriya/dotfiles.git
synced 2026-06-08 12:42:02 +00:00
Adding an errorformat for the dotnet
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user