Use same DAP configuration for C with C++.
parent
ff774da4a8
commit
a97fddb3b3
|
@ -13,8 +13,7 @@ function M.nvim_dap()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.c = dap.configurations.c or {}
|
local config = {
|
||||||
table.insert(dap.configurations.c, {
|
|
||||||
name = 'Launch Executable',
|
name = 'Launch Executable',
|
||||||
type = key,
|
type = key,
|
||||||
request = 'launch',
|
request = 'launch',
|
||||||
|
@ -22,7 +21,13 @@ function M.nvim_dap()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
end,
|
end,
|
||||||
cwd = '${workspaceFolder}',
|
cwd = '${workspaceFolder}',
|
||||||
})
|
}
|
||||||
|
|
||||||
|
dap.configurations.c = dap.configurations.c or {}
|
||||||
|
table.insert(dap.configurations.c, config)
|
||||||
|
|
||||||
|
dap.configurations.cpp = dap.configurations.cpp or {}
|
||||||
|
table.insert(dap.configurations.cpp, config)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.nvim_lspconfig()
|
function M.nvim_lspconfig()
|
||||||
|
|
Loading…
Reference in New Issue