diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 5c369df..3407cdc 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -735,11 +735,15 @@ local plugins = { end, config = function() local dap = require "dap" - local rustcfg = require "rustaceanvim.config" + 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" 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, }, }