From 80a2c4d56fcecad49aac46339570fa5ad7ca009b Mon Sep 17 00:00:00 2001 From: unai_71 Date: Sat, 10 Oct 2026 18:41:58 +0200 Subject: [PATCH] fix: local and return were missing from commands and keymaps files --- lua/hego/commands.lua | 24 +++++++++++++++--------- lua/hego/keymaps.lua | 8 +++++++- 2 files changed, 22 insertions(+), 10 deletions(-) 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