feat: actually configure dap :)

This commit is contained in:
Alexandre Cavalheiro S. Tiago da Silva 2024-02-19 00:58:48 -03:00
parent 33cd62170b
commit 17780f8e10
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
4 changed files with 21 additions and 24 deletions

View file

@ -1,10 +0,0 @@
return {
codelldb = {
type = "server",
port = "${port}",
executable = {
command = "codelldb",
args = { "--port", "${port}" },
},
},
}

View file

@ -1,12 +0,0 @@
return {
rust = {
{
name = "Launch file",
type = "codelldb",
request = "launch",
program = function() return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
},
},
}

View file

@ -100,5 +100,26 @@ return {
-- ["~/%.config/foo/.*"] = "fooscript",
-- },
-- }
local dap = require "dap"
dap.adapters.codelldb = {
port = "${port}",
type = "server",
executable = {
command = "codelldb",
args = { "--port", "${port}" },
},
}
dap.configurations.rust = {
{
name = "Launch file",
type = "codelldb",
request = "launch",
program = function() return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
},
}
end,
}

View file

@ -7,8 +7,6 @@ return {
spell = false, -- sets vim.opt.spell
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
wrap = false, -- sets vim.opt.wrap
autochdir = true, -- automatically change the current directory
autowrite = true, -- write file on modification
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
},
g = {