fix: Added mason-lspconfig in mason deps
This commit is contained in:
parent
31d5347cfd
commit
9a727e0ca4
7
init.lua
7
init.lua
|
|
@ -481,6 +481,7 @@ require('lazy').setup({
|
||||||
-- Mason must be loaded before its dependents so we need to set it up here.
|
-- 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({})`
|
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
|
||||||
{ 'mason-org/mason.nvim', opts = {} },
|
{ 'mason-org/mason.nvim', opts = {} },
|
||||||
|
{ 'mason-org/mason-lspconfig.nvim', opts = {} },
|
||||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
|
|
@ -614,7 +615,7 @@ require('lazy').setup({
|
||||||
-- You can press `g?` for help in this menu.
|
-- You can press `g?` for help in this menu.
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
'lua-language-server', -- Lua Language server
|
'lua_ls', -- Lua Language server
|
||||||
'stylua', -- Used to format Lua code
|
'stylua', -- Used to format Lua code
|
||||||
-- You can add other tools here that you want Mason to install
|
-- You can add other tools here that you want Mason to install
|
||||||
})
|
})
|
||||||
|
|
@ -628,7 +629,7 @@ require('lazy').setup({
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Special Lua Config, as recommended by neovim help docs
|
-- Special Lua Config, as recommended by neovim help docs
|
||||||
vim.lsp.config('lua-language-server', {
|
vim.lsp.config('lua_ls', {
|
||||||
on_init = function(client)
|
on_init = function(client)
|
||||||
if client.workspace_folders then
|
if client.workspace_folders then
|
||||||
local path = client.workspace_folders[1].name
|
local path = client.workspace_folders[1].name
|
||||||
|
|
@ -652,7 +653,7 @@ require('lazy').setup({
|
||||||
Lua = {},
|
Lua = {},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable 'lua-language-server'
|
vim.lsp.enable 'lua_ls'
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue