From f603d8af2ef5fecd9b8b40786f7484e933012934 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 15 Dec 2025 07:27:12 +0000 Subject: [PATCH] some dap fixes --- lua/plugins/dap.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 48007cb..084eae8 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -63,11 +63,10 @@ return { dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end dap.listeners.before.event_exited.dapui_config = function() dapui.close() end - local path = require('mason-registry').get_package('debugpy'):get_install_path() - if vim.loop.os_uname().sysname:find('Windows') then - require('dap-python').setup(path .. 'dap-python' .. 'python') + if vim.fn.system('uname'):find('Windows') then + require('dap-python').setup('python') else - require('dap-python').setup(path .. '/venv/bin/python') + require('dap-python').setup('/venv/bin/python') end -- CPP @@ -75,7 +74,7 @@ return { type = 'server', port = '${port}', executable = { - command = require('mason-core.path').bin_prefix('codelldb'), + command = 'codelldb', args = { '--port', '${port}' }, -- On windows you may have to uncomment this: @@ -92,7 +91,7 @@ return { dap.adapters.lldb = { type = 'executable', command = function() - if vim.loop.os_uname().sysname == 'Linux' then + if vim.fn.system('uname') == 'Linux' then return 'lldb-vscode' else return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe'