-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathconst.lua
More file actions
147 lines (142 loc) · 7.56 KB
/
const.lua
File metadata and controls
147 lines (142 loc) · 7.56 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
local osys = require("cmake-tools.osys")
local const = {
cmake_command = "cmake", -- this is used to specify cmake command path
ctest_command = "ctest", -- this is used to specify ctest command path
ctest_extra_args = {}, -- this is used to specify extra arguments for ctest
cmake_use_preset = true, -- when `false`, this is used to define if the `--preset` option should be use on cmake commands
cmake_regenerate_on_save = true, -- 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`
cmake_show_disabled_build_presets = true,
cmake_build_directory = function()
if osys.iswin32 then
return "out\\${variant:buildType}"
end
return "out/${variant:buildType}"
end, -- this is used to specify generate directory for cmake
cmake_compile_commands_options = {
action = "soft_link", -- available options: soft_link, copy, lsp, none
-- soft_link: this will automatically make a soft link from compile commands file to target
-- copy: this will automatically copy compile commands file to target
-- lsp: this will automatically set compile commands file location using lsp
-- none: this will make this option ignored
target = vim.loop.cwd(), -- path to directory, this is used only if action == "soft_link" or action == "copy"
},
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 = "quickfix", -- name of the executor
opts = {}, -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for executors
quickfix = {
show = "always", -- "always", "only_on_error"
position = "belowright", -- "bottom", "top"
size = 10,
encoding = "utf-8",
auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful.
},
toggleterm = {
direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float'
close_on_exit = false, -- whether close the terminal when exit
auto_scroll = true, -- auto scroll on new input
scroll_on_error = false, -- scroll to bottom on error
auto_focus = true, -- auto focus the terminal on activation
focus_on_error = false, -- focus on error
singleton = true, -- single instance, autocloses the opened one, if present
},
overseer = {
new_task_opts = {
strategy = {
"terminal",
},
}, -- options to pass into the `overseer.new_task` command
on_new_task = function(task)
require("overseer").open({ enter = false, direction = "right" })
end, -- a function that gets overseer.Task when it is created, before calling `task:start`
},
vimux = {},
terminal = {
name = "Executor Terminal",
prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name
split_direction = "horizontal", -- "horizontal", "vertical"
split_size = 11,
-- Window handling
single_terminal_per_instance = true, -- Single instance, multiple windows
single_terminal_per_tab = true, -- Single instance per tab
keep_terminal_static_location = true, -- Static location of the instance if avialable
auto_resize = true, -- Resize the terminal if it already exists
-- Running Tasks
start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun
focus = false, -- Focus on terminal when cmake task is launched.
do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter.
},
},
},
cmake_runner = { -- executor to use
name = "terminal", -- name of the runner
opts = {}, -- the options the runner will get, possible values depend on the runner type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for runners
quickfix = {
show = "always", -- "always", "only_on_error"
position = "belowright", -- "bottom", "top"
size = 10,
encoding = "utf-8",
auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful.
},
toggleterm = {
direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float'
close_on_exit = false, -- whether close the terminal when exit
auto_scroll = true, -- auto scroll on new input
scroll_on_error = false, -- scroll to bottom on error
auto_focus = true, -- auto focus the terminal on activation
focus_on_error = false, -- focus on error
singleton = true, -- single instance, autocloses the opened one, if present
},
overseer = {
new_task_opts = {
strategy = {
"terminal",
},
}, -- options to pass into the `overseer.new_task` command
on_new_task = function(task) end, -- a function that gets overseer.Task when it is created, before calling `task:start`
},
vimux = {},
terminal = {
name = "Runner Terminal",
prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name
split_direction = "horizontal", -- "horizontal", "vertical"
split_size = 11,
-- Window handling
single_terminal_per_instance = true, -- Single instance, multiple windows
single_terminal_per_tab = true, -- Single instance per tab
keep_terminal_static_location = true, -- Static location of the instance if avialable
auto_resize = true, -- Resize the terminal if it already exists
-- Running Tasks
start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun
focus = false, -- Focus on terminal when cmake task is launched.
do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter.
use_shell_alias = false, -- Hide the implementation details used to run the built target by using a shell alias
},
},
},
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 = true, -- Show the target related to current file using virtual text (at right corner)
cmake_use_scratch_buffer = false, -- A buffer that shows what cmake-tools has done
}
return const