some dap fixes
This commit is contained in:
@@ -63,11 +63,10 @@ return {
|
|||||||
dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end
|
dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end
|
||||||
dap.listeners.before.event_exited.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.fn.system('uname'):find('Windows') then
|
||||||
if vim.loop.os_uname().sysname:find('Windows') then
|
require('dap-python').setup('python')
|
||||||
require('dap-python').setup(path .. 'dap-python' .. 'python')
|
|
||||||
else
|
else
|
||||||
require('dap-python').setup(path .. '/venv/bin/python')
|
require('dap-python').setup('/venv/bin/python')
|
||||||
end
|
end
|
||||||
|
|
||||||
-- CPP
|
-- CPP
|
||||||
@@ -75,7 +74,7 @@ return {
|
|||||||
type = 'server',
|
type = 'server',
|
||||||
port = '${port}',
|
port = '${port}',
|
||||||
executable = {
|
executable = {
|
||||||
command = require('mason-core.path').bin_prefix('codelldb'),
|
command = 'codelldb',
|
||||||
args = { '--port', '${port}' },
|
args = { '--port', '${port}' },
|
||||||
|
|
||||||
-- On windows you may have to uncomment this:
|
-- On windows you may have to uncomment this:
|
||||||
@@ -92,7 +91,7 @@ return {
|
|||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = function()
|
command = function()
|
||||||
if vim.loop.os_uname().sysname == 'Linux' then
|
if vim.fn.system('uname') == 'Linux' then
|
||||||
return 'lldb-vscode'
|
return 'lldb-vscode'
|
||||||
else
|
else
|
||||||
return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe'
|
return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe'
|
||||||
|
|||||||
Reference in New Issue
Block a user