From d36594025727d32b6580f188a4c0476aaeecfd77 Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Thu, 14 Mar 2024 23:42:56 +0300 Subject: feat: initial ability to configure --- lua/cmake-explorer/config.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lua/cmake-explorer/config.lua (limited to 'lua/cmake-explorer/config.lua') 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 -- cgit v1.2.3