diff --git a/init.lua b/init.lua index 3fa423fc..63da8271 100644 --- a/init.lua +++ b/init.lua @@ -481,6 +481,7 @@ require('lazy').setup({ -- Mason must be loaded before its dependents so we need to set it up here. -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` { 'mason-org/mason.nvim', opts = {} }, + { 'mason-org/mason-lspconfig.nvim', opts = {} }, 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. @@ -614,7 +615,7 @@ require('lazy').setup({ -- You can press `g?` for help in this menu. local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { - 'lua-language-server', -- Lua Language server + 'lua_ls', -- Lua Language server 'stylua', -- Used to format Lua code -- You can add other tools here that you want Mason to install }) @@ -628,7 +629,7 @@ require('lazy').setup({ end -- Special Lua Config, as recommended by neovim help docs - vim.lsp.config('lua-language-server', { + vim.lsp.config('lua_ls', { on_init = function(client) if client.workspace_folders then local path = client.workspace_folders[1].name @@ -652,7 +653,7 @@ require('lazy').setup({ Lua = {}, }, }) - vim.lsp.enable 'lua-language-server' + vim.lsp.enable 'lua_ls' end, },