Added dap

This commit is contained in:
EsVagy42 2025-03-03 21:29:05 +00:00
parent 77ac2a1ab6
commit 4579816b7e
2 changed files with 30 additions and 0 deletions

29
config/dap.nix Normal file
View file

@ -0,0 +1,29 @@
{
plugins = {
dap = {
enable = true;
luaConfig.post = ''
local dap = require('dap')
dap.adapters.lldb = {
type = 'executable',
command = '/run/current-system/sw/bin/lldb-dap', -- adjust as needed, must be absolute path
name = 'lldb'
}
dap.configurations.cpp = {
{
name = 'Launch',
type = 'lldb',
request = 'launch',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = "''${workspaceFolder}",
stopOnEntry = false,
args = {},
runInTerminal = true,
},
}
'';
};
};
}

View file

@ -8,6 +8,7 @@
./treesitter.nix
./lsp-format.nix
./lsp.nix
./dap.nix
];
opts = {
number = true;