aboutsummaryrefslogtreecommitdiff
path: root/plugin/cmake-explorer.lua
diff options
context:
space:
mode:
authorDaniil Rozanov <daniilrozzanov@gmail.com>2024-03-29 04:37:56 +0300
committerDaniil Rozanov <daniilrozzanov@gmail.com>2024-03-29 04:37:56 +0300
commit672f0d32e322b79661b5d7959887adaa9e41ad98 (patch)
treec2c3f4e2157d47c7e3f8dfd2f3229e37e0919b3e /plugin/cmake-explorer.lua
parentd453f54d98536eb3a52daebfe279c4e624979c31 (diff)
feat: build from current variant
Diffstat (limited to 'plugin/cmake-explorer.lua')
-rw-r--r--plugin/cmake-explorer.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugin/cmake-explorer.lua b/plugin/cmake-explorer.lua
new file mode 100644
index 0000000..8413923
--- /dev/null
+++ b/plugin/cmake-explorer.lua
@@ -0,0 +1,33 @@
+local cmd = vim.api.nvim_create_user_command
+
+cmd("CMakeSelectBehaviour", function()
+ require("cmake-explorer").change_current_behaviour()
+end, { desc = "Configure one of existings directories" })
+
+cmd("CMakeSelectConfig", function()
+ require("cmake-explorer").change_current_config()
+end, { desc = "Configure with parameters" })
+
+cmd("CMakeConfigure", function()
+ require("cmake-explorer").configure()
+end, { desc = "Configure with parameters" })
+
+cmd("CMakeConfigureLast", function()
+ require("cmake-explorer").configure_last()
+end, { desc = "Configure last if exists. Otherwise default" })
+
+cmd("CMakeBuild", function()
+ require("cmake-explorer").build()
+end, { desc = "Configure one of existings directories" })
+
+cmd("CMakeBuildLast", function()
+ require("cmake-explorer").build_last()
+end, { desc = "Configure one of existings directories" })
+
+cmd("CMakeConfigureProject", function()
+ require("cmake-explorer").configure_project()
+end, { desc = "Configure one of existings directories" })
+
+cmd("CMakeInitProject", function()
+ require("cmake-explorer").init_project()
+end, { desc = "Configure one of existings directories" })