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 mason_status_ok, mason = pcall(require, "mason")
|
||||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
||||||
local mason_lsp_config_status_ok, mason_lspconfig = pcall(require, "mason-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
|
if not mason_status_ok then
|
||||||
return
|
return
|
||||||
@@ -14,6 +15,10 @@ if not mason_lsp_config_status_ok then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not mason_null_ls_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
"astro",
|
"astro",
|
||||||
"cssls",
|
"cssls",
|
||||||
@@ -48,6 +53,12 @@ mason.setup({
|
|||||||
max_concurrent_installers = 4,
|
max_concurrent_installers = 4,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mason_null_ls.setup({
|
||||||
|
ensure_installed = nil,
|
||||||
|
automatic_installation = true,
|
||||||
|
automatic_setup = true,
|
||||||
|
})
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
mason_lspconfig.setup({
|
||||||
ensure_installed = servers,
|
ensure_installed = servers,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ return packer.startup(function(use)
|
|||||||
use("neovim/nvim-lspconfig") -- Enable LSP
|
use("neovim/nvim-lspconfig") -- Enable LSP
|
||||||
use("williamboman/mason.nvim") -- Manage LSP servers, DAP servers, linters, and formatters
|
use("williamboman/mason.nvim") -- Manage LSP servers, DAP servers, linters, and formatters
|
||||||
use("williamboman/mason-lspconfig.nvim") -- Bridge betwen Mason and lspconfig
|
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("jose-elias-alvarez/null-ls.nvim") -- Inject LSP diagnostics, code actions, and more
|
||||||
use("folke/trouble.nvim") -- Diagnostics
|
use("folke/trouble.nvim") -- Diagnostics
|
||||||
use("creativenull/diagnosticls-configs-nvim") -- Collection of linters and formatters
|
use("creativenull/diagnosticls-configs-nvim") -- Collection of linters and formatters
|
||||||
|
|||||||
Reference in New Issue
Block a user