Creating a basic build architecture

This commit is contained in:
Zoe Roux
2022-03-19 18:13:39 +01:00
parent 6ae2e17be7
commit d264291bed
2 changed files with 48 additions and 0 deletions
@@ -0,0 +1,26 @@
local Iterator = require "plenary.iterators"
local M = {}
M.pattern = "*.sln"
M.list = function ()
local projs = io.popen("dotnet sln list | tail -n +3")
local ret = Iterator.from_fun(projs:lines("a"))
:map(function(x) return {x:match("%\a+.csproj$"), x} end)
:tolistn()
projs:close()
return ret
end
M.build = function ()
return "dotnet build"
end
M.errorformat = ""
M.run = function (proj)
return "dotnet run --project " .. proj[2]
end
return M
+22
View File
@@ -0,0 +1,22 @@
local Iterator = require "plenary.iterators"
local M = {
adapters = {},
}
table.insert(M.adapters, require "build.adapters.dotnet")
M.list_projs = function ()
end
M.select_proj = function ()
local projs = M.list_projs()
vim.ui.select(projs, {
prompt = "Select a project",
}, function (proj)
end)
end
return M