This commit is contained in:
2025-02-19 02:24:24 -08:00
parent 4f88084419
commit 611be5f360
22 changed files with 1033 additions and 428 deletions

View File

@@ -0,0 +1,6 @@
local M = {}
M.term_factory = require("utils.terminal.term_factory").term_factory
M.term_toggle = require("utils.terminal.toggle").term_toggle
return M

View File

@@ -0,0 +1,12 @@
local Terminal = require("toggleterm.terminal").Terminal
local notify = require("notify")
local M = {}
function M.term_factory(cfg)
cfg["on_stderr"] = function(_, job, data, name)
notify(name .. " encountered an error on job: " .. job .. "\nData: " .. data, "error")
end
return Terminal:new(cfg)
end
return M

View File

@@ -0,0 +1,9 @@
local M = {}
function M.term_toggle(term)
if term then
term:toggle()
end
end
return M