-- return { -- "mrcjkb/rustaceanvim", -- version = "^4", -- ft = "rust", -- opts = function() -- local adapter -- local success, package = pcall(function() return require("mason-registry").get_package "codelldb" end) -- local cfg = require "rustaceanvim.config" -- if success then -- local package_path = package:get_install_path() -- local codelldb_path = package_path .. "/codelldb" -- local liblldb_path = package_path .. "/extension/lldb/lib/liblldb" -- local this_os = vim.loop.os_uname().sysname -- -- -- The path in windows is different -- if this_os:find "Windows" then -- codelldb_path = package_path .. "\\extension\\adapter\\codelldb.exe" -- liblldb_path = package_path .. "\\extension\\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 -- adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path) -- else -- adapter = cfg.get_codelldb_adapter() -- end -- -- local astrolsp_avail, astrolsp = pcall(require, "astrolsp") -- return { server = astrolsp_avail and astrolsp.lsp_opts "rust_analyzer", dap = { adapter = adapter } } -- end, -- config = function(_, opts) vim.g.rustaceanvim = require("astrocore").extend_tbl(opts, vim.g.rustaceanvim) end, -- }