diff options
Diffstat (limited to 'lua/cmake/commands.lua')
-rw-r--r-- | lua/cmake/commands.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/cmake/commands.lua b/lua/cmake/commands.lua new file mode 100644 index 0000000..78e5bb8 --- /dev/null +++ b/lua/cmake/commands.lua @@ -0,0 +1,31 @@ +local M = {} + +local cmd = vim.api.nvim_create_user_command + +M.register_commands = function() + cmd("CMakeGenerate", function() + require("cmake.actions").generate() + end, { desc = "Generate with last configuration" }) + + cmd("CMakeGenerateSelect", function() + require("cmake.actions").generate_select() + end, { desc = "Select configuration and generate" }) + + cmd("CMakeBuild", function() + require("cmake.actions").build() + end, { desc = "Build with last build option" }) + + cmd("CMakeBuildSelect", function() + require("cmake.actions").build_select() + end, { desc = "Select build option and build" }) + + cmd("CMakeRun", function() + require("cmake.actions").run_tagret() + end, { desc = "Select build option and build" }) + + cmd("CMakeRunSelect", function() + require("cmake.actions").run_tagret_select() + end, { desc = "Select build option and build" }) +end + +return M |