[nvim] fix: change deprecated LSP installer
use `mason` instead of `lsp-install`
This commit is contained in:
parent
2e26e7df30
commit
03a7796555
@ -5,7 +5,8 @@
|
|||||||
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local lsp_installer = require("nvim-lsp-installer")
|
local mason = require("mason")
|
||||||
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
|
|
||||||
local globals = require("globals")
|
local globals = require("globals")
|
||||||
local signs = {
|
local signs = {
|
||||||
@ -58,8 +59,8 @@ local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|||||||
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||||
|
|
||||||
local servers = { "clangd", "sumneko_lua", "texlab" }
|
local servers = { "clangd", "sumneko_lua", "texlab" }
|
||||||
lsp_installer.setup {
|
|
||||||
ensure_installed = servers,
|
mason.setup({
|
||||||
ui = {
|
ui = {
|
||||||
icons = {
|
icons = {
|
||||||
server_installed = "✓",
|
server_installed = "✓",
|
||||||
@ -67,7 +68,12 @@ lsp_installer.setup {
|
|||||||
server_uninstalled = ""
|
server_uninstalled = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
|
mason_lspconfig.setup({
|
||||||
|
ensure_installed = servers,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
for _, server in ipairs(servers) do
|
for _, server in ipairs(servers) do
|
||||||
local opts = {
|
local opts = {
|
||||||
|
@ -69,7 +69,8 @@ return require("packer").startup(function()
|
|||||||
use {
|
use {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
requires = {
|
requires = {
|
||||||
"williamboman/nvim-lsp-installer",
|
"williamboman/mason.nvim",
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
},
|
},
|
||||||
config = function() require("plugin.lsp") end
|
config = function() require("plugin.lsp") end
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user