wozers
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user