mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nvim): add mason-null-ls plugin
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
local mason_status_ok, mason = pcall(require, "mason")
|
||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
||||
local mason_lsp_config_status_ok, mason_lspconfig = pcall(require, "mason-lspconfig")
|
||||
local mason_null_ls_status_ok, mason_null_ls = pcall(require, "mason-null-ls")
|
||||
|
||||
if not mason_status_ok then
|
||||
return
|
||||
@@ -14,6 +15,10 @@ if not mason_lsp_config_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
if not mason_null_ls_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local servers = {
|
||||
"astro",
|
||||
"cssls",
|
||||
@@ -48,6 +53,12 @@ mason.setup({
|
||||
max_concurrent_installers = 4,
|
||||
})
|
||||
|
||||
mason_null_ls.setup({
|
||||
ensure_installed = nil,
|
||||
automatic_installation = true,
|
||||
automatic_setup = true,
|
||||
})
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = servers,
|
||||
})
|
||||
|
||||
@@ -75,6 +75,7 @@ return packer.startup(function(use)
|
||||
use("neovim/nvim-lspconfig") -- Enable LSP
|
||||
use("williamboman/mason.nvim") -- Manage LSP servers, DAP servers, linters, and formatters
|
||||
use("williamboman/mason-lspconfig.nvim") -- Bridge betwen Mason and lspconfig
|
||||
use("jay-babu/mason-null-ls.nvim") -- Bridge between Mason and null-ls
|
||||
use("jose-elias-alvarez/null-ls.nvim") -- Inject LSP diagnostics, code actions, and more
|
||||
use("folke/trouble.nvim") -- Diagnostics
|
||||
use("creativenull/diagnosticls-configs-nvim") -- Collection of linters and formatters
|
||||
|
||||
Reference in New Issue
Block a user