From e830931ff421e4380d5de8b1926842000ba9be34 Mon Sep 17 00:00:00 2001 From: Squibid Date: Sat, 31 May 2025 03:32:58 -0400 Subject: wozers --- lua/conf/plugins/dap.lua | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'lua/conf/plugins/dap.lua') 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 -- cgit v1.2.1