This commit is contained in:
2025-05-31 03:32:58 -04:00
parent ef678f31fd
commit e830931ff4
41 changed files with 253 additions and 268 deletions

View File

@ -1,18 +1,4 @@
local misc = require("core.misc")
local map = misc.map
--- select a program to execute
---@return thread coroutine containing the picker
local function select_program()
return coroutine.create(function(coro)
---@diagnostic disable-next-line: param-type-mismatch
local entries = vim.fn.readdir(".", [[v:val !~ '^\.']])
vim.ui.select(entries, { prompt = "Select the executable to run:" },
function(choice)
coroutine.resume(coro, choice)
end)
end)
end
local map = core.misc.map
local keymap_restore = {}
--- make the default hover binding work for nvim-dap instead of lsp
@ -66,7 +52,9 @@ return { "mfussenegger/nvim-dap",
name = "Launch file",
type = "codelldb",
request = "launch",
program = select_program,
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd()..'/', 'file')
end,
cwd = "${workspaceFolder}",
stopOnEntry = false