diff options
author | Hennadii Chernyshchyk <genaloner@gmail.com> | 2022-09-10 14:05:32 +0300 |
---|---|---|
committer | Hennadii Chernyshchyk <genaloner@gmail.com> | 2022-09-10 17:48:06 +0300 |
commit | fb10b4906aadaeff295883d171c05246943e5571 (patch) | |
tree | eae589c4aeb613b8a2e8a1daf678f008f01069b9 /lua/tasks/config.lua | |
download | neovim-tasks-fb10b4906aadaeff295883d171c05246943e5571.tar.gz neovim-tasks-fb10b4906aadaeff295883d171c05246943e5571.zip |
Initial commit
Diffstat (limited to 'lua/tasks/config.lua')
-rw-r--r-- | lua/tasks/config.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lua/tasks/config.lua b/lua/tasks/config.lua new file mode 100644 index 0000000..0d5da61 --- /dev/null +++ b/lua/tasks/config.lua | |||
@@ -0,0 +1,32 @@ | |||
1 | local Path = require('plenary.path') | ||
2 | |||
3 | local config = { | ||
4 | defaults = { | ||
5 | default_params = { | ||
6 | cmake = { | ||
7 | cmd = 'cmake', | ||
8 | build_dir = tostring(Path:new('{cwd}', 'build', '{os}-{build_type}')), | ||
9 | build_type = 'Debug', | ||
10 | dap_name = 'lldb', | ||
11 | args = { | ||
12 | configure = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' }, | ||
13 | }, | ||
14 | }, | ||
15 | cargo = { | ||
16 | dap_name = 'lldb', | ||
17 | }, | ||
18 | }, | ||
19 | save_before_run = true, | ||
20 | params_file = 'neovim.json', | ||
21 | quickfix = { | ||
22 | pos = 'botright', | ||
23 | height = 12, | ||
24 | only_on_error = false, | ||
25 | }, | ||
26 | dap_open_command = function() return require('dap').repl.open() end, | ||
27 | }, | ||
28 | } | ||
29 | |||
30 | setmetatable(config, { __index = config.defaults }) | ||
31 | |||
32 | return config | ||