DBG WORKS WITH STDOUT!!!

This commit is contained in:
Christoph J. Scherr 2024-02-06 13:13:01 +01:00
parent 2c779d1ed4
commit c7bbbf1a77
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 27 additions and 5 deletions

View File

@ -735,7 +735,6 @@ local plugins = {
end,
config = function()
local dap = require "dap"
local rustcfg = require "rustaceanvim.config"
local mason_registry = require "mason-registry"
local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/"
local codelldb_path = codelldb_root .. "adapter/codelldb"
@ -744,12 +743,12 @@ local plugins = {
command = "/home/plex/.local/bin/kitty",
args = {},
}
dap.adapters.lldb = {
dap.adapters.codelldb = {
type = "server",
port = "${port}",
port = "30333",
executable = {
command = codelldb_path,
args = { "--port", "${port}" },
args = { "--port", "30333" },
detached = false,
},
}
@ -766,7 +765,7 @@ local plugins = {
},
}
dap.configurations.c = dap.configurations.cpp
-- dap.configurations.rust = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
end,
},
{
@ -795,6 +794,7 @@ local plugins = {
{ "folke/neodev.nvim", opts = {} },
{
"mrcjkb/rustaceanvim",
enabled = true,
version = "^4", -- Recommended
ft = { "rust" },
},
@ -803,6 +803,28 @@ local plugins = {
lazy = false, -- PERF: this can be done more elegant
config = function()
require("nvim-dap-virtual-text").setup()
local dap = require "dap"
vim.g.rustaceanvim = {
-- Plugin configuration
tools = {},
-- LSP configuration
server = {
on_attach = function(client, bufnr)
-- you can also put keymaps in here
end,
settings = {
-- rust-analyzer language server configuration
["rust-analyzer"] = {},
},
},
-- DAP configuration
dap = {
-- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the
-- opened terminal, effectively rendering debugging with it useless. Luckily,
-- we can use the regular nvim-dap and nvim-dap-ui.
adapter = dap.adapters.codelldb,
},
}
end,
},
}