fix: changed lua language server, lua_ls no longer exists in mason registry
This commit is contained in:
parent
e79572c9e6
commit
31d5347cfd
6
init.lua
6
init.lua
|
|
@ -614,7 +614,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_ls', -- Lua Language server
|
'lua-language-server', -- 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 +628,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_ls', {
|
vim.lsp.config('lua-language-server', {
|
||||||
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 +652,7 @@ require('lazy').setup({
|
||||||
Lua = {},
|
Lua = {},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable 'lua_ls'
|
vim.lsp.enable 'lua-language-server'
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue