diff --git a/lua/hego/commands.lua b/lua/hego/commands.lua index d71a6b7..19acd94 100644 --- a/lua/hego/commands.lua +++ b/lua/hego/commands.lua @@ -1,9 +1,15 @@ -vim.api.nvim_create_user_command("HegoBuild", function() - require("hego").build(false) -end, {}) -vim.api.nvim_create_user_command("HegoBuildPristine", function() - require("hego").build(true) -end, {}) -vim.api.nvim_create_user_command("HegoFlash", function() - require("hego").flash() -end, {}) +local M = {} + +function M.setup(_) + vim.api.nvim_create_user_command("HegoBuild", function() + require("hego").build(false) + end, {}) + vim.api.nvim_create_user_command("HegoBuildPristine", function() + require("hego").build(true) + end, {}) + vim.api.nvim_create_user_command("HegoFlash", function() + require("hego").flash() + end, {}) +end + +return M diff --git a/lua/hego/keymaps.lua b/lua/hego/keymaps.lua index 76bdb67..5ec8c9c 100644 --- a/lua/hego/keymaps.lua +++ b/lua/hego/keymaps.lua @@ -1,5 +1,9 @@ +local M = {} + function M.setup(opts) - local k, H = opts.keys, require("hego") + local k = opts.keys + local H = require("hego") + vim.keymap.set("n", k.build, function() H.build(false) end, { desc = "NCS: Build" }) @@ -10,3 +14,5 @@ function M.setup(opts) H.flash() end, { desc = "NCS: Flash" }) end + +return M