Breaking Change : LSPInstaller is dead so use mason.nvim

(#1368)
This commit is contained in:
siduck 2022-07-25 13:49:33 +00:00
parent 5d4c51127c
commit a83ebc34e5
7 changed files with 64 additions and 65 deletions

View file

@ -1,36 +0,0 @@
local present, lsp_installer = pcall(require, "nvim-lsp-installer")
if not present then
return
end
local options = {
-- ensure_installed is not needed as automatic_installation is enabled
-- then any lsp server you setup by lspconfig is going to get installed automatically!
-- ensure_installed = { "lua" },
automatic_installation = true,
ui = {
icons = {
server_installed = "",
server_pending = "",
server_uninstalled = "",
},
keymaps = {
toggle_server_expand = "<CR>",
install_server = "i",
update_server = "u",
check_server_version = "c",
update_all_servers = "U",
check_outdated_servers = "C",
uninstall_server = "X",
},
},
max_concurrent_installers = 10,
}
options = require("core.utils").load_override(options, "williamboman/nvim-lsp-installer")
lsp_installer.setup(options)

View file

@ -6,7 +6,6 @@ end
require("base46").load_highlight "lsp"
require "nvchad_ui.lsp"
require "plugins.configs.lsp_installer"
local M = {}
local utils = require "core.utils"

View file

@ -0,0 +1,36 @@
local present, mason = pcall(require, "mason")
if not present then
return
end
require("base46").load_highlight "mason"
local options = {
ensure_installed = { "pyright" },
ui = {
icons = {
package_pending = "",
package_installed = "",
package_uninstalled = "",
},
keymaps = {
toggle_server_expand = "<CR>",
install_server = "i",
update_server = "u",
check_server_version = "c",
update_all_servers = "U",
check_outdated_servers = "C",
uninstall_server = "X",
cancel_installation = "<C-c>",
},
},
max_concurrent_installers = 10,
}
options = require("core.utils").load_override(options, "williamboman/mason")
mason.setup(options)

View file

@ -49,7 +49,7 @@ M.blankline = function()
"lspinfo",
"TelescopePrompt",
"TelescopeResults",
"lsp-installer",
"Mason",
"",
},
buftype_exclude = { "terminal" },

View file

@ -82,16 +82,18 @@ local plugins = {
-- lsp stuff
["williamboman/nvim-lsp-installer"] = {
cmd = require("core.lazy_load").lsp_cmds,
setup = function()
require("core.lazy_load").on_file_open "nvim-lsp-installer"
["williamboman/mason.nvim"] = {
cmd = require("core.lazy_load").mason_cmds,
config = function()
require "plugins.configs.mason"
end,
},
["neovim/nvim-lspconfig"] = {
after = "nvim-lsp-installer",
module = "lspconfig",
opt = true,
setup = function()
require("core.lazy_load").on_file_open "nvim-lspconfig"
end,
config = function()
require "plugins.configs.lspconfig"
end,