58 lines
1.7 KiB
Lua
58 lines
1.7 KiB
Lua
local M = {}
|
|
|
|
function M.setup(opts)
|
|
local k = opts.keys
|
|
local H = require("hego")
|
|
|
|
vim.keymap.set("n", k.build, function()
|
|
H.build(false)
|
|
end, { desc = "NCS: Build" })
|
|
vim.keymap.set("n", k.pristine, function()
|
|
H.build(true)
|
|
end, { desc = "NCS: Build (pristine)" })
|
|
vim.keymap.set("n", k.flash, function()
|
|
H.flash()
|
|
end, { desc = "NCS: Flash" })
|
|
vim.keymap.set("n", k.flash_erase, function()
|
|
H.flash("erase")
|
|
end, { desc = "NCS: Flash (--erase)" })
|
|
vim.keymap.set("n", k.flash_recover, function()
|
|
H.flash("recover")
|
|
end, { desc = "NCS: Flash (--recover)" })
|
|
vim.keymap.set("n", k.device_recover, function()
|
|
H.device_recover()
|
|
end, { desc = "NCS: Device recover (nrfutil)" })
|
|
vim.keymap.set("n", k.kconfig, function()
|
|
H.kconfig()
|
|
end, { desc = "NCS: Kconfig (menuconfig)" })
|
|
vim.keymap.set("n", k.memory, function()
|
|
H.memory_report()
|
|
end, { desc = "NCS: Memory report" })
|
|
vim.keymap.set("n", k.config, function()
|
|
H.edit_config()
|
|
end, { desc = "NCS: Edit build configs" })
|
|
vim.keymap.set("n", k.build_config, function()
|
|
H.build_from_config()
|
|
end, { desc = "NCS: Build with config..." })
|
|
vim.keymap.set("n", k.monitor, function()
|
|
H.monitor()
|
|
end, { desc = "NCS: Monitor serie" })
|
|
vim.keymap.set("n", k.terminal, function()
|
|
H.terminal()
|
|
end, { desc = "NCS: Terminal (entorno NCS)" })
|
|
vim.keymap.set("n", k.toolchain, function()
|
|
H.toolchain_pick()
|
|
end, { desc = "NCS: Toolchains" })
|
|
vim.keymap.set("n", k.toolchain_install, function()
|
|
H.toolchain_install()
|
|
end, { desc = "NCS: Instalar toolchain" })
|
|
vim.keymap.set("n", k.toolchain_search, function()
|
|
H.toolchain_search()
|
|
end, { desc = "NCS: Buscar toolchains" })
|
|
vim.keymap.set("n", k.sdk, function()
|
|
H.sdk_pick()
|
|
end, { desc = "NCS: SDK manager" })
|
|
end
|
|
|
|
return M
|