feat(neovim): make debugger adapters work for rust and c++

This commit is contained in:
Alexandre Cavalheiro S. Tiago da Silva 2024-10-28 01:53:18 -03:00
parent 6f8c09023c
commit 97a16187aa
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
5 changed files with 95 additions and 40 deletions

View file

@ -1,39 +0,0 @@
-- This will run last in the setup process and is a good place to configure
-- things like custom filetypes. This just pure lua so anything that doesn't
-- fit in the normal config locations above can go here
-- Set up custom filetypes
vim.filetype.add {
extension = {
foo = "fooscript",
},
filename = {
["Foofile"] = "fooscript",
},
pattern = {
["~/%.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,
},
}