Skip to content

Commit

Permalink
♻️refactor(gleam): Very minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeioth committed Jul 16, 2024
1 parent e3d3c2f commit 79a4d12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
28 changes: 14 additions & 14 deletions lua/compiler/languages/gleam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

local M = {}

-- Frontend - options displayed on telescope
-- Frontend - options displayed on telescope
M.options = {
{ text = "Gleam build and run", value = "option1" },
{ text = "Gleam build", value = "option2" },
{ text = "Gleam run", value = "option3" },
{ text = "Build and run program", value = "option1" },
{ text = "Build program", value = "option2" },
{ text = "Run program", value = "option3" },
}

-- Backend - overseer tasks performed on option selected
Expand All @@ -18,30 +18,30 @@ function M.action(selected_option)
local task = overseer.new_task({
name = "- Gleam compiler",
strategy = { "orchestrator",
tasks = {{ name = "- gleam build & run → " .. "\"./gleam.toml\"",
cmd = "gleam build " .. -- compile
" && gleam run" .. -- run
" && echo \"" .. final_message .. "\"", -- echo
tasks = {{ name = "- Build & run program" .. "\"./gleam.toml\"",
cmd = "gleam build " .. -- compile
" && gleam run" .. -- run
" && echo \"" .. final_message .. "\"", -- echo
components = { "default_extended" }
},},},})
task:start()
elseif selected_option == "option2" then
local task = overseer.new_task({
name = "- Gleam compiler",
strategy = { "orchestrator",
tasks = {{ name = "- gleam build" .. "\"./gleam.toml\"",
cmd = "gleam build " .. -- compile
" && echo \"" .. final_message .. "\"", -- echo
tasks = {{ name = "- Build program" .. "\"./gleam.toml\"",
cmd = "gleam build " .. -- compile
" && echo \"" .. final_message .. "\"", -- echo
components = { "default_extended" }
},},},})
task:start()
elseif selected_option == "option3" then
local task = overseer.new_task({
name = "- Gleam compiler",
strategy = { "orchestrator",
tasks = {{ name = "- gleam run" .. "\"./gleam.toml\"",
cmd = "gleam run " .. -- compile
" && echo \"" .. final_message .. "\"", -- echo
tasks = {{ name = "- Run program" .. "\"./gleam.toml\"",
cmd = "gleam run " .. -- compile
" && echo \"" .. final_message .. "\"", -- echo
components = { "default_extended" }
},},},})
task:start()
Expand Down
1 change: 0 additions & 1 deletion tests/tests/languages/gleam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ coroutine.resume(coroutine.create(function()
sleep()

-- Run
vim.api.nvim_set_current_dir(example .. "build/")
language.action("option3")
sleep()
end))

0 comments on commit 79a4d12

Please sign in to comment.