This commit is contained in:
2025-10-25 21:10:52 +08:00
parent 7db680831d
commit 5928f7d13c
4 changed files with 16 additions and 8 deletions

View File

@@ -117,14 +117,11 @@ vim.api.nvim_create_user_command("Args", function(a) updateArgs(a.fargs) end,
{ nargs = '*', desc = "Update run/debug arguments" })
if dap_ok then
-- We need to query this to get the sysroot
-- ls $(rustc --print sysroot)/lib/rustlib/etc
local rust_path = vim.fn.system("rustc --print sysroot")
-- trim trailing newline
rust_path =
local rust_path = vim.fn.system("rustc --print sysroot") -- We need to query this to get the sysroot
rust_path = string.sub(rust_path, 1, #rust_path - 1) -- trim trailing newline
local lldb_init = {
"command script import "..rust_path.."/lib/rustlib/etc/lldb_lookup.py",
"command source "..rust_path.."lib/rustlib/etc/lldb_commands",
"command script import " .. rust_path .. "/lib/rustlib/etc/lldb_lookup.py",
"command source " .. rust_path .. "/lib/rustlib/etc/lldb_commands",
}
dap_configs = {
{