From 05a33a9de7d213692759dbf1a8ba3d68ddc38820 Mon Sep 17 00:00:00 2001 From: mmj <121494430+mmj2023@users.noreply.github.com> Date: Fri, 9 May 2025 02:11:18 -0400 Subject: [PATCH] trying out possible solutions --- lua/lazyvim/plugins/lsp/init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 26660d2b..55ab81d1 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -211,8 +211,11 @@ return { -- get all the servers that are available through mason-lspconfig local have_mason, mlsp = pcall(require, "mason-lspconfig") local all_mslp_servers = {} - if have_mason then - all_mslp_servers = require("mason-lspconfig").get_mappings().lspconfig_to_package + if have_mason and vim.fn.has("nvim-0.11") == 1 then + -- all_mslp_servers = vim.tbl_keys(require("mason-lspconfig").get_mappings().lspconfig_to_package) + all_mslp_servers = require("mason-lspconfig").get_available_servers()) + elseif have_mason then + all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings.server").lspconfig_to_package) end local ensure_installed = {} ---@type string[]