diff options
Diffstat (limited to 'lua/cmake/config.lua')
-rw-r--r-- | lua/cmake/config.lua | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/lua/cmake/config.lua b/lua/cmake/config.lua index 6ac5856..b4b2bf7 100644 --- a/lua/cmake/config.lua +++ b/lua/cmake/config.lua @@ -51,55 +51,55 @@ ---@type CMakeConfig local default_config = { - cmake = { - cmake_path = "cmake", - ctest_path = "ctest", - cpack_path = "cpack", - environment = {}, - configure_environment = {}, - build_directory = "${workspaceFolder}/build-${buildType}", - build_environment = {}, - build_args = {}, - build_tool_args = {}, - generator = nil, - parallel_jobs = nil, - }, - variants = { - buildType = { - default = "debug", - description = "Build type", - choices = { - debug = { short = "Debug", buildType = "Debug" }, - release = { short = "Release", buildType = "Release" }, - relWithDebInfo = { short = "RelWithDebInfo", buildType = "RelWithDebInfo" }, - minSizeRel = { short = "MinSizeRel", buildType = "MinSizeRel" }, - }, - }, - }, - save_before_build = true, - generate_after_save = true, - cmake_terminal = { - split = "below", - size = 15, - close_on_exit = "success", - open_on_start = true, - clear_env = false, - enter = false, - }, - target_terminal = { - split = "below", - size = 15, - enter = true, - immediately = true, - }, - notification = { - after = "success", - }, - variants_display = { - short = { sep = " × ", show = true }, - long = { sep = " ❄ ", show = false }, - }, - keybinds = {}, + cmake = { + cmake_path = "cmake", + ctest_path = "ctest", + cpack_path = "cpack", + environment = {}, + configure_environment = {}, + build_directory = "${workspaceFolder}/build-${buildType}", + build_environment = {}, + build_args = {}, + build_tool_args = {}, + generator = nil, + parallel_jobs = nil, + }, + variants = { + buildType = { + default = "debug", + description = "Build type", + choices = { + debug = { short = "Debug", buildType = "Debug" }, + release = { short = "Release", buildType = "Release" }, + relWithDebInfo = { short = "RelWithDebInfo", buildType = "RelWithDebInfo" }, + minSizeRel = { short = "MinSizeRel", buildType = "MinSizeRel" }, + }, + }, + }, + save_before_build = true, + generate_after_save = true, + cmake_terminal = { + split = "below", + size = 15, + close_on_exit = "success", + open_on_start = true, + clear_env = false, + enter = false, + }, + target_terminal = { + split = "below", + size = 15, + enter = true, + immediately = true, + }, + notification = { + after = "success", + }, + variants_display = { + short = { sep = " × ", show = true }, + long = { sep = " ❄ ", show = false }, + }, + keybinds = {}, } local M = vim.deepcopy(default_config) @@ -107,11 +107,11 @@ local M = vim.deepcopy(default_config) ---Setup configs ---@param opts CMakeConfig M.setup = function(opts) - local newconf = vim.tbl_deep_extend("force", default_config, opts or {}) + local newconf = vim.tbl_deep_extend("force", default_config, opts or {}) - for k, v in pairs(newconf) do - M[k] = v - end + for k, v in pairs(newconf) do + M[k] = v + end end return M |