feat: added build pristine, build configuration, erase and recover

This commit is contained in:
unai committed 2026-10-12 11:51:45 +02:00
1 parent 80a2c4d56f
commit 5b1d640d4b
11 files changed
+636 -80

No files matched your search

+33 -6
View File
@@ -1,14 +1,41 @@
local M = {}
function M.setup(_)
vim.api.nvim_create_user_command("HegoBuild", function()
require("hego").build(false)
local H = require("hego")
local cmd = vim.api.nvim_create_user_command
cmd("HegoBuild", function()
H.build(false)
end, {})
vim.api.nvim_create_user_command("HegoBuildPristine", function()
require("hego").build(true)
cmd("HegoBuildPristine", function()
H.build(true)
end, {})
vim.api.nvim_create_user_command("HegoFlash", function()
require("hego").flash()
cmd("HegoFlash", function()
H.flash()
end, {})
cmd("HegoFlashErase", function()
H.flash("erase")
end, {})
cmd("HegoFlashRecover", function()
H.flash("recover")
end, {})
cmd("HegoDeviceRecover", function()
H.device_recover()
end, {})
cmd("HegoMenuconfig", function()
H.kconfig()
end, {})
cmd("HegoMemoryReport", function()
H.memory_report()
end, {})
cmd("HegoMonitor", function()
H.monitor()
end, {})
cmd("HegoConfig", function()
H.edit_config()
end, {})
cmd("HegoBuildConfig", function()
H.build_from_config()
end, {})
end