aboutsummaryrefslogtreecommitdiff
path: root/lua/config_cmake.lua
diff options
context:
space:
mode:
authornathan11 <thenathansmithsmith@gmail.com>2023-07-25 00:52:07 -0600
committernathan11 <thenathansmithsmith@gmail.com>2023-07-25 00:52:07 -0600
commit0f8c62f2d18fd86e2bad01a33e5e9beb4e2ef77b (patch)
treee098cecfe770af08bd77eda320f8a0260c3c68c6 /lua/config_cmake.lua
first commit
Diffstat (limited to 'lua/config_cmake.lua')
-rw-r--r--lua/config_cmake.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/config_cmake.lua b/lua/config_cmake.lua
new file mode 100644
index 0000000..bed0b89
--- /dev/null
+++ b/lua/config_cmake.lua
@@ -0,0 +1,19 @@
+local constants = require("constants")
+
+require("cmake-tools").setup {
+ cmake_command = "cmake",
+ cmake_build_directory = "build",
+ --cmake_build_directory_prefix = "cmake_build_", -- when cmake_build_directory is "", this option will be activated
+ cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1" },
+ cmake_build_options = {},
+ cmake_console_size = 10, -- cmake output window height
+ cmake_show_console = "always", -- "always", "only_on_error"
+ cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional
+ cmake_dap_open_command = require("dap").repl.open, -- optional
+ cmake_variants_message = {
+ short = { show = true },
+ long = { show = true, max_length = 40 }
+ }
+}
+
+vim.keymap.set({"n", "i"}, "<leader>b", ":CMakeBuild<CR>")