chore: renamed open_float_terminal to terminal and annotated utils.lua

This commit is contained in:
DarthMooMancer
2025-05-12 08:59:02 -04:00
parent a2c43661c4
commit 2d2164c380
7 changed files with 26 additions and 19 deletions
+2 -2
View File
@@ -16,14 +16,14 @@ function M.run()
local output = vim.fn.system(table.concat(cmd, "/"))
if not vim.v.shell_error == 0 then
local term_buf = utils.open_float_terminal(cmd)
local term_buf = utils.terminal(cmd)
vim.api.nvim_buf_set_option(term_buf, "modifiable", true)
vim.api.nvim_buf_set_lines(term_buf, 0, -1, false,
vim.list_extend({ "Error during compilation:" }, vim.split(output, "\n", { trimempty = true }))
)
vim.api.nvim_buf_set_option(term_buf, "modifiable", false)
else
utils.open_float_terminal({ "cd " .. root, "build" .. " && .", utils.get_project_name() })
utils.terminal({ "cd " .. root, "build" .. " && .", utils.get_project_name() })
end
end