aboutsummaryrefslogtreecommitdiff
path: root/lua/tasks/config.lua
blob: 0d5da612b1ebc69c1e0b942c4722e27f3bb2cd39 (plain) (blame)
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
local Path = require('plenary.path')

local config = {
  defaults = {
    default_params = {
      cmake = {
        cmd = 'cmake',
        build_dir = tostring(Path:new('{cwd}', 'build', '{os}-{build_type}')),
        build_type = 'Debug',
        dap_name = 'lldb',
        args = {
          configure = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' },
        },
      },
      cargo = {
        dap_name = 'lldb',
      },
    },
    save_before_run = true,
    params_file = 'neovim.json',
    quickfix = {
      pos = 'botright',
      height = 12,
      only_on_error = false,
    },
    dap_open_command = function() return require('dap').repl.open() end,
  },
}

setmetatable(config, { __index = config.defaults })

return config