summaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-09-04 13:57:48 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-09-04 13:57:48 +0200
commit0feb1c2bf8c62ba02834340bf1052e8fcafd531a (patch)
treeb1b93a2d1e23136550073e4d414225a78596db2e /lua
parent34ae1c4bc83ad3c2fe51b4b61d3f0c1508e0a003 (diff)
downloadnvimrc-0feb1c2bf8c62ba02834340bf1052e8fcafd531a.tar.gz
nvimrc-0feb1c2bf8c62ba02834340bf1052e8fcafd531a.tar.bz2
nvimrc-0feb1c2bf8c62ba02834340bf1052e8fcafd531a.zip
Rust debugger support
Diffstat (limited to 'lua')
-rw-r--r--lua/debugging.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/debugging.lua b/lua/debugging.lua
index 82f073b..bb57624 100644
--- a/lua/debugging.lua
+++ b/lua/debugging.lua
@@ -18,6 +18,12 @@ dap.adapters.php = {
args = { '/usr/lib/node_modules/php-debug/out/phpDebug.js' }
}
+dap.adapters.rust_gdb = {
+ type = "executable",
+ command = "rust-gdb",
+ args = { "-i", "dap" }
+}
+
--
-- Configurations
--
@@ -33,6 +39,18 @@ dap.configurations.c = {
},
}
+dap.configurations.rust = {
+ {
+ name = "Launch",
+ type = "rust_gdb",
+ request = "launch",
+ program = function()
+ return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/target/debug', 'file')
+ end,
+ cwd = "${workspacefolder}",
+ },
+}
+
dap.configurations.php = {
{
name = "Listen for Xdebug",