From 42c1f0b966c98d6de7e8a43ee7b01ad2fa6e6918 Mon Sep 17 00:00:00 2001 From: ArgentumCation <5008962+ArgentumCation@users.noreply.github.com> Date: Tue, 16 Sep 2025 14:23:33 -0400 Subject: [PATCH] update to mason 2.0 --- lua/configs/lspconfig.lua | 60 ++++++++++++++++----------------------- lua/plugins.lua | 19 +++++++++---- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index 451ca8f..988064f 100644 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -1,40 +1,28 @@ -local lspconfig = require "lspconfig" -local on_attach = require("nvchad.configs.lspconfig").on_attach -local on_attach = require("nvchad.configs.lspconfig").on_init +-- local lspconfig = require "lspconfig" +-- local on_attach = require("nvchad.configs.lspconfig").on_attach +-- local on_attach = require("nvchad.configs.lspconfig").on_init local capabilities -require("mason-lspconfig").setup() -require("mason-lspconfig").setup_handlers { - function(name) - lspconfig[name].setup {} - end, +require("mason").setup() +require("mason-lspconfig").setup { + ensure_installed = { + "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", + }, } --- 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() diff --git a/lua/plugins.lua b/lua/plugins.lua index 7da6c76..c7ca574 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -9,12 +9,20 @@ return { -- LSP Stuff -- TODO: make these lang specific { - "williamboman/mason.nvim", + "mason/mason.nvim", -- opts = overrides.mason opts = { PATH = "append", }, }, + { + "mason-org/mason-lspconfig.nvim", + opts = {}, + dependencies = { + { "mason-org/mason.nvim", opts = {} }, + "neovim/nvim-lspconfig", + }, + }, { "cbochs/grapple.nvim", @@ -30,7 +38,7 @@ return { end, dependencies = { "nvim-treesitter/nvim-treesitter", -- optional - "nvim-tree/nvim-web-devicons", -- optional + "nvim-tree/nvim-web-devicons", -- optional }, }, { "ThePrimeagen/refactoring.nvim" }, @@ -50,7 +58,6 @@ return { end, -- Override to setup mason-lspconfig dependencies = { "nvimdev/lspsaga.nvim", - "williamboman/mason-lspconfig.nvim", }, lazy = false, }, @@ -81,7 +88,7 @@ return { }, -- Delimiters - { "Raimondi/delimitMate", lazy = false }, + { "Raimondi/delimitMate", lazy = false }, -- lazygit { "kdheepak/lazygit.nvim", @@ -91,7 +98,7 @@ return { lazy = false, }, -- fzf - { "junegunn/fzf.vim", lazy = false }, + { "junegunn/fzf.vim", lazy = false }, { "nvim-telescope/telescope.nvim", config = function() @@ -224,7 +231,7 @@ return { -- version = "^5", -- Recommended -- lazy = false, -- This plugin is already lazy -- }, - { "cordx56/rustowl", dependencies = { "neovim/nvim-lspconfig" } }, + { "cordx56/rustowl", dependencies = { "neovim/nvim-lspconfig" } }, ----------- -- swkhd -- -----------