-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
vb.lua
39 lines (34 loc) · 1.38 KB
/
vb.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- Visual basic dotnet language actions
local M = {}
--- Frontend - options displayed on telescope
M.options = {
{ text = "Build and run program (dotnet)", value = "option1" },
{ text = "Build program (dotnet)", value = "option2" }
}
--- Backend - overseer tasks performed on option selected
function M.action(selected_option)
local overseer = require("overseer")
local final_message = "--task finished--"
if selected_option == "option1" then
local task = overseer.new_task({
name = "- Visual basic dotnet compiler",
strategy = { "orchestrator",
tasks = {{ name = "- Dotnet build & run → \"Program.vbproj\"",
cmd = "dotnet run" .. -- compile and run
" && echo \"" .. final_message .. "\"", -- echo
components = { "default_extended" }
},},},})
task:start()
elseif selected_option == "option2" then
local task = overseer.new_task({
name = "- Visual basic dotnet compiler",
strategy = { "orchestrator",
tasks = {{ name = "- Dotnet build → \"Program.vbproj\"",
cmd = "dotnet build" .. -- compile
" && echo \"" .. final_message .. "\"", -- echo
components = { "default_extended" }
},},},})
task:start()
end
end
return M