Skip to content

Commit

Permalink
fix(lsp): temp mason fix for sumenko_lua -> lua_ls rename. See #248
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Feb 12, 2023
1 parent 57e92b0 commit 5431268
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lua/lazyvim/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ return {
---@type lspconfig.options
servers = {
jsonls = {},
sumneko_lua = {
lua_ls = {
-- mason = false, -- set to false if you don't want this server to be installed with mason
settings = {
Lua = {
Expand Down Expand Up @@ -101,6 +101,14 @@ return {
require("lspconfig")[server].setup(server_opts)
end

-- temp fix for lspconfig rename
-- https://github.com/neovim/nvim-lspconfig/pull/2439
local mappings = require("mason-lspconfig.mappings.server")
if not mappings.lspconfig_to_package.lua_ls then
mappings.lspconfig_to_package.lua_ls = "lua-language-server"
mappings.package_to_lspconfig["lua-language-server"] = "lua_ls"
end

local mlsp = require("mason-lspconfig")
local available = mlsp.get_available_servers()

Expand Down

0 comments on commit 5431268

Please sign in to comment.