diff options
Diffstat (limited to 'lua/conf/plugins/dap.lua')
-rw-r--r-- | lua/conf/plugins/dap.lua | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lua/conf/plugins/dap.lua b/lua/conf/plugins/dap.lua index afa9f29..3765350 100644 --- a/lua/conf/plugins/dap.lua +++ b/lua/conf/plugins/dap.lua @@ -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 |