summaryrefslogtreecommitdiff
path: root/lua/aotrix
diff options
context:
space:
mode:
authorAotrix <[email protected]>2026-06-02 23:59:17 +0200
committerAotrix <[email protected]>2026-06-02 23:59:17 +0200
commita19b42cc097ad48dfcea16ffd565ad4f48ec90f9 (patch)
treeaf3e5ce7979242ea6897608d57a68a50a94c1fc8 /lua/aotrix
parent6d4007e12ef62a603b159628448452cf99ca6d18 (diff)
Add custom command option: need to fix the createCommand function
Diffstat (limited to 'lua/aotrix')
-rw-r--r--lua/aotrix/build.lua16
1 files changed, 4 insertions, 12 deletions
diff --git a/lua/aotrix/build.lua b/lua/aotrix/build.lua
index 3124e68..878bb73 100644
--- a/lua/aotrix/build.lua
+++ b/lua/aotrix/build.lua
@@ -14,19 +14,11 @@ function executeCommandInTerminal(command)
end
local COMMANDS = {}
-COMMANDS.EditBatConfig = {
- command = "cmake --build build",
- description = "Build project"
-}
-
-COMMANDS.SourceCurrentLuaFile = {
- command = "pwd",
- description = "Print current working directory"
-}
+local personalCommands = require("aotrix.personal_commands")
COMMANDS.AddTempCommand = {
- command = "echo 'Please implement me! A lua script which is executed maybe? Also remove global variables :p'",
- description = "TODO IMPLEMENT ME"
+ command = function() personalCommands.createCommand(COMMANDS) end,
+ description = "Add temporary command"
}
function selectCommand(listOfCommands, callback)
@@ -37,7 +29,7 @@ function selectCommand(listOfCommands, callback)
end
}, function(choice)
if (choice ~= nil) then
- CURRENT_COMMAND = listOfCommands[choice].command
+ CURRENT_COMMAND = listOfCommands[choice].command()
callback()
end
end)