mirror of
https://github.com/zoriya/dotfiles.git
synced 2026-06-08 20:45:01 +00:00
Creating a basic build architecture
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user