aboutsummaryrefslogtreecommitdiff
path: root/lua/cmake-explorer/config.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/cmake-explorer/config.lua')
-rw-r--r--lua/cmake-explorer/config.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/cmake-explorer/config.lua b/lua/cmake-explorer/config.lua
new file mode 100644
index 0000000..4e1740d
--- /dev/null
+++ b/lua/cmake-explorer/config.lua
@@ -0,0 +1,18 @@
+local default_config = {
+ cmake_cmd = "cmake",
+ build_dir_template = "build-{buildType}",
+ build_types = { "Debug", "Release" },
+ options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" },
+}
+
+local M = vim.deepcopy(default_config)
+
+M.setup = function(opts)
+ local newconf = vim.tbl_deep_extend("force", default_config, opts or {})
+
+ for k, v in pairs(newconf) do
+ M[k] = v
+ end
+end
+
+return M