idk anymore

This commit is contained in:
Christoph J. Scherr 2024-02-05 17:16:18 +01:00
parent 52c1f29804
commit e8a35c7ddf
1 changed files with 5 additions and 45 deletions

View File

@ -740,6 +740,10 @@ local plugins = {
local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/"
local codelldb_path = codelldb_root .. "adapter/codelldb"
local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so"
dap.defaults.fallback.external_terminal = {
command = "/home/plex/.local/bin/kitty",
args = {},
}
dap.adapters.codelldb = rustcfg.get_codelldb_adapter(codelldb_path, liblldb_path)
dap.configurations.cpp = {
{
@ -759,62 +763,18 @@ local plugins = {
},
{
"rcarriga/nvim-dap-ui",
enabled = true,
init = function()
require("core.utils").load_mappings "debug"
end,
dependencies = {
"mfussenegger/nvim-dap",
},
config = function()
local dap, dapui = require "dap", require "dapui"
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.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
require("neodev").setup {
library = { plugins = { "nvim-dap-ui" }, types = true },
}
end,
},
{ "folke/neodev.nvim", opts = {} },
{
"mrcjkb/rustaceanvim",
version = "^4", -- Recommended
ft = { "rust" },
config = function()
vim.g.rustaceanvim = function()
-- Update this path
local extension_path = vim.env.HOME .. ".local/share/codelldb"
local codelldb_path = extension_path .. "adapter/codelldb"
local liblldb_path = extension_path .. "lldb/lib/liblldb"
local this_os = vim.uv.os_uname().sysname
-- The path is different on Windows
if this_os:find "Windows" then
codelldb_path = extension_path .. "adapter\\codelldb.exe"
liblldb_path = extension_path .. "lldb\\bin\\liblldb.dll"
else
-- The liblldb extension is .so for Linux and .dylib for MacOS
liblldb_path = liblldb_path .. (this_os == "Linux" and ".so" or ".dylib")
end
local cfg = require "rustaceanvim.config"
return {
dap = {
adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
},
}
end
end,
},
}