lsp now uses lspconfig

This commit is contained in:
Anthony Debucquoy
2025-10-13 17:47:07 +02:00
committed by Anthony Debucquoy
parent 42116f4fae
commit 779fded05c
16 changed files with 167 additions and 25 deletions

View File

@@ -0,0 +1,51 @@
local dap = require('dap')
dap.adapters.gdb = {
id = 'gdb',
type = 'executable',
command = 'gdb',
args = { '--quiet', '--interpreter=dap' },
}
dap.configurations.c = {
{
name = 'Run executable (GDB)',
type = 'gdb',
request = 'launch',
program = function()
local path = vim.fn.input({
prompt = 'Path to executable: ',
default = vim.fn.getcwd() .. '/',
completion = 'file',
})
return (path and path ~= '') and path or dap.ABORT
end,
},
{
name = 'Run executable with arguments (GDB)',
type = 'gdb',
request = 'launch',
program = function()
local path = vim.fn.input({
prompt = 'Path to executable: ',
default = vim.fn.getcwd() .. '/',
completion = 'file',
})
return (path and path ~= '') and path or dap.ABORT
end,
args = function()
local args_str = vim.fn.input({
prompt = 'Arguments: ',
})
return vim.split(args_str, ' +')
end
},
{
name = 'Attach to process (GDB)',
type = 'gdb',
request = 'gdb',
processId = require('dap.utils').pick_process,
},
}
dap.configurations.rust = dap.configurations.c