update to mason 2.0
This commit is contained in:
parent
f639d03f6c
commit
42c1f0b966
2 changed files with 37 additions and 42 deletions
|
|
@ -1,40 +1,28 @@
|
||||||
local lspconfig = require "lspconfig"
|
-- local lspconfig = require "lspconfig"
|
||||||
local on_attach = require("nvchad.configs.lspconfig").on_attach
|
-- local on_attach = require("nvchad.configs.lspconfig").on_attach
|
||||||
local on_attach = require("nvchad.configs.lspconfig").on_init
|
-- local on_attach = require("nvchad.configs.lspconfig").on_init
|
||||||
local capabilities
|
local capabilities
|
||||||
require("mason-lspconfig").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup_handlers {
|
require("mason-lspconfig").setup {
|
||||||
function(name)
|
ensure_installed = {
|
||||||
lspconfig[name].setup {}
|
"html",
|
||||||
end,
|
"cssls",
|
||||||
|
"clangd",
|
||||||
|
"gopls",
|
||||||
|
"astro",
|
||||||
|
"lua_ls",
|
||||||
|
"docker_compose_language_service",
|
||||||
|
"ast_grep",
|
||||||
|
"pyright",
|
||||||
|
"bashls",
|
||||||
|
"css_variables",
|
||||||
|
"marksman",
|
||||||
|
-- "rust_analyzer",
|
||||||
|
"rust_analyzer",
|
||||||
|
"ruff",
|
||||||
|
"jdtls",
|
||||||
|
"nil_ls",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
-- if you just want default config for the servers then put them in a table
|
|
||||||
local servers = {
|
|
||||||
"html",
|
|
||||||
"cssls",
|
|
||||||
"clangd",
|
|
||||||
"gopls",
|
|
||||||
"astro",
|
|
||||||
"lua_ls",
|
|
||||||
"docker_compose_language_service",
|
|
||||||
"ast_grep",
|
|
||||||
"pyright",
|
|
||||||
"bashls",
|
|
||||||
"css_variables",
|
|
||||||
"marksman",
|
|
||||||
-- "rust_analyzer",
|
|
||||||
"rust_analyzer",
|
|
||||||
"ruff",
|
|
||||||
"jdtls",
|
|
||||||
"nil_ls",
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
|
||||||
lspconfig[lsp].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
require("copilot").setup()
|
require("copilot").setup()
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,20 @@ return {
|
||||||
-- LSP Stuff
|
-- LSP Stuff
|
||||||
-- TODO: make these lang specific
|
-- TODO: make these lang specific
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"mason/mason.nvim",
|
||||||
-- opts = overrides.mason
|
-- opts = overrides.mason
|
||||||
opts = {
|
opts = {
|
||||||
PATH = "append",
|
PATH = "append",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"mason-org/mason-lspconfig.nvim",
|
||||||
|
opts = {},
|
||||||
|
dependencies = {
|
||||||
|
{ "mason-org/mason.nvim", opts = {} },
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"cbochs/grapple.nvim",
|
"cbochs/grapple.nvim",
|
||||||
|
|
@ -30,7 +38,7 @@ return {
|
||||||
end,
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter", -- optional
|
"nvim-treesitter/nvim-treesitter", -- optional
|
||||||
"nvim-tree/nvim-web-devicons", -- optional
|
"nvim-tree/nvim-web-devicons", -- optional
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ "ThePrimeagen/refactoring.nvim" },
|
{ "ThePrimeagen/refactoring.nvim" },
|
||||||
|
|
@ -50,7 +58,6 @@ return {
|
||||||
end, -- Override to setup mason-lspconfig
|
end, -- Override to setup mason-lspconfig
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvimdev/lspsaga.nvim",
|
"nvimdev/lspsaga.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
},
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
},
|
},
|
||||||
|
|
@ -81,7 +88,7 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Delimiters
|
-- Delimiters
|
||||||
{ "Raimondi/delimitMate", lazy = false },
|
{ "Raimondi/delimitMate", lazy = false },
|
||||||
-- lazygit
|
-- lazygit
|
||||||
{
|
{
|
||||||
"kdheepak/lazygit.nvim",
|
"kdheepak/lazygit.nvim",
|
||||||
|
|
@ -91,7 +98,7 @@ return {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
},
|
},
|
||||||
-- fzf
|
-- fzf
|
||||||
{ "junegunn/fzf.vim", lazy = false },
|
{ "junegunn/fzf.vim", lazy = false },
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
|
|
@ -224,7 +231,7 @@ return {
|
||||||
-- version = "^5", -- Recommended
|
-- version = "^5", -- Recommended
|
||||||
-- lazy = false, -- This plugin is already lazy
|
-- lazy = false, -- This plugin is already lazy
|
||||||
-- },
|
-- },
|
||||||
{ "cordx56/rustowl", dependencies = { "neovim/nvim-lspconfig" } },
|
{ "cordx56/rustowl", dependencies = { "neovim/nvim-lspconfig" } },
|
||||||
-----------
|
-----------
|
||||||
-- swkhd --
|
-- swkhd --
|
||||||
-----------
|
-----------
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue