Last active
January 17, 2024 03:03
-
-
Save bus710/c3101ac5cef0cd1f19cce6944314bc6c to your computer and use it in GitHub Desktop.
Debian + Zig + AstronNvim debugging configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Should be placed in the plugins directory. | |
return { | |
"mfussenegger/nvim-dap", | |
config = function() | |
local dap, dapui = require "dap", require "dapui" | |
dap.adapters.lldb = { | |
type = 'executable', | |
command = '/usr/bin/lldb-vscode-16', | |
name = 'lldb' | |
} | |
dap.configurations.zig = { | |
{ | |
name = 'Launch', | |
type = 'lldb', | |
request = 'launch', | |
program = '${workspaceFolder}/zig-out/bin/${workspaceFolderBasename}', | |
cwd = '${workspaceFolder}', | |
stopOnEntry = false, | |
args = {}, | |
} | |
} | |
dap.listeners.after.event_initialized["dapui_config"] = function() | |
dapui.open({}) | |
end | |
dap.listeners.before.event_terminated["dapui_config"] = function() | |
dapui.close({}) | |
end | |
dap.listeners.before.event_exited["dapui_config"] = function() | |
dapui.close({}) | |
end | |
end, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many thanks to https://terminalprogrammer.com/neovim-setup-for-zig