diff --git a/lua/lazyvim/plugins/extras/lang/php.lua b/lua/lazyvim/plugins/extras/lang/php.lua index 04469223..c7827b88 100644 --- a/lua/lazyvim/plugins/extras/lang/php.lua +++ b/lua/lazyvim/plugins/extras/lang/php.lua @@ -50,7 +50,7 @@ return { local dap = require("dap") dap.adapters.php = { type = "executable", - command = "php-debug-adapter", + command = vim.fn.exepath("php-debug-adapter"), args = {}, } end, diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 027f49b2..b5da242e 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -111,13 +111,9 @@ return { }, config = function(_, opts) if LazyVim.has("mason.nvim") then - local package_path = LazyVim.get_pkg_path("codelldb") - local codelldb = package_path .. "/extension/adapter/codelldb" - local library_path = package_path .. "/extension/lldb/lib/liblldb.dylib" - local uname = io.popen("uname"):read("*l") - if uname == "Linux" then - library_path = package_path .. "/extension/lldb/lib/liblldb.so" - end + local codelldb = vim.fn.exepath("codelldb") + local codelldb_lib_ext = io.popen("uname"):read("*l") == "Linux" and ".so" or ".dylib" + local library_path = vim.fn.expand("$MASON/opt/lldb/lib/liblldb" .. codelldb_lib_ext) opts.dap = { adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path), } diff --git a/tests/extras/extra_spec.lua b/tests/extras/extra_spec.lua index a6781bde..3bd27d34 100644 --- a/tests/extras/extra_spec.lua +++ b/tests/extras/extra_spec.lua @@ -26,7 +26,12 @@ describe("Extra", function() return not vim.tbl_contains(ignore, extra.modname) end, extras) - local lsp_to_pkg = require("mason-lspconfig").get_mappings().lspconfig_to_package + local lsp_to_pkg = {} + if vim.fn.has("nvim-0.11") == 1 then + lsp_to_pkg = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package + else + lsp_to_pkg = require("mason-lspconfig.mappings.server").lspconfig_to_package + end local tsspec = Plugin.Spec.new({ import = "lazyvim.plugins.treesitter",