summaryrefslogtreecommitdiff
path: root/lua/aotrix/plugins/cmake_tools.lua
blob: 415aaf26afef4c550d198704c9ebbaf25820e1a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
return {}
-- return {
--     'Civitasv/cmake-tools.nvim',
--     opts = {},
--     config = function()
--         local osys = require("cmake-tools.osys")
--         require("cmake-tools").setup {
--             cmake_command = "cmake",                                          -- this is used to specify cmake command path
--             ctest_command = "ctest",                                          -- this is used to specify ctest command path
--             cmake_use_preset = true,
--             cmake_regenerate_on_save = false,                                 -- auto generate when save CMakeLists.txt
--             cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" }, -- this will be passed when invoke `CMakeGenerate`
--             cmake_build_options = {},                                         -- this will be passed when invoke `CMakeBuild`
--             -- support macro expansion:
--             --       ${kit}
--             --       ${kitGenerator}
--             --       ${variant:xx}
--             cmake_build_directory = function()
--                 return "build/${variant:buildType}"
--             end,                                        -- this is used to specify generate directory for cmake, allows macro expansion, can be a string or a function returning the string, relative to cwd.
--             cmake_soft_link_compile_commands = true,    -- this will automatically make a soft link from compile commands file to project root dir
--             cmake_compile_commands_from_lsp = false,    -- this will automatically set compile commands file location using lsp, to use it, please set `cmake_soft_link_compile_commands` to false
--             cmake_kits_path = nil,                      -- this is used to specify global cmake kits path, see CMakeKits for detailed usage
--             cmake_variants_message = {
--                 short = { show = true },                -- whether to show short message
--                 long = { show = true, max_length = 40 } -- whether to show long message
--             },
--             cmake_dap_configuration = {                 -- debug settings for cmake
--                 name = "cpp",
--                 type = "codelldb",
--                 request = "launch",
--                 stopOnEntry = false,
--                 runInTerminal = true,
--                 console = "integratedTerminal"
--             },
--             cmake_executor = {     -- executor to use
--                 name = "overseer", -- name of the executor
--             },
--             cmake_runner = {       -- runner to use
--                 name = "overseer", -- name of the runner
--             },
--             cmake_notifications = {
--                 runner = { enabled = true },
--                 executor = { enabled = true },
--                 spinner = {
--                     "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧",
--                     "⠇", "⠏"
--                 },                             -- icons used for progress display
--                 refresh_rate_ms = 100          -- how often to iterate icons
--             },
--             cmake_virtual_text_support = false -- Show the target related to current file using virtual text (at right corner)
--         }
--         vim.keymap.set("n", "mt", "<CMD>CMakeRun<CR>")
--         vim.keymap.set("n", "mT", "<CMD>CMakeDebug<CR>")
--         vim.keymap.set("n", "ms", "<CMD>CMakeSelectLaunchTarget<CR>")
--         vim.keymap.set("n", "mc", "<CMD>CMakeClean<CR>")
--     end
-- }