refactor: lint and dap

This commit is contained in:
Fabio Lenherr 2022-10-12 22:03:34 +02:00
parent a9cb122592
commit 7785311043
46 changed files with 2453 additions and 0 deletions

45
nivm/settings/cpp-dap.lua Normal file
View file

@ -0,0 +1,45 @@
local dap = require('dap')
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
command = '/home/dashie/.config/nvim/plugged/cpptools/extension/debugAdapters/bin/OpenDebugAD7',
}
dap.configurations.cpp = {
{
name = "Launch file",
type = "cppdbg",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build/', 'file')
end,
cwd = '${workspaceFolder}',
stopAtEntry = true,
},
{
name = "Launch file --gui",
type = "cppdbg",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build/', 'file')
end,
args = {'--gui'},
cwd = '${workspaceFolder}',
stopAtEntry = true,
},
{
name = 'Attach to gdbserver :1234',
type = 'cppdbg',
request = 'launch',
MIMode = 'gdb',
miDebuggerServerAddress = 'localhost:1234',
miDebuggerPath = '/usr/bin/gdb',
cwd = '${workspaceFolder}',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build/', 'file')
end,
},
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp