fix: edids

This commit is contained in:
Marvin Drescher 2024-03-28 17:13:57 +01:00
parent b514432521
commit 27c690efc5
2 changed files with 62 additions and 0 deletions

61
debugger.lua Normal file
View File

@ -0,0 +1,61 @@
local dap = require("dap")
dap.adapters.gdb = {
id = 'gdb',
type = 'executable',
command = 'gdb',
args = { '--quiet', '--interpreter=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',
-- This requires special handling of 'run_last', see
-- https://github.com/mfussenegger/nvim-dap/issues/1025#issuecomment-1695852355
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',
-- This requires special handling of 'run_last', see
-- https://github.com/mfussenegger/nvim-dap/issues/1025#issuecomment-1695852355
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 = 'attach',
processId = require('dap.utils').pick_process,
},

View File

@ -413,3 +413,4 @@ require('neotest').setup {
require("lsp-inlayhints").setup() require("lsp-inlayhints").setup()
require("completion") require("completion")
require("rust") require("rust")
require("debugger")