refactor: lint and dap
This commit is contained in:
parent
7785311043
commit
2bed6f50c0
46 changed files with 2453 additions and 0 deletions
45
nivm/lua/settings/cpp-dap.lua
Normal file
45
nivm/lua/settings/cpp-dap.lua
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue