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 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()
|
||||
|
|
|
|||
|
|
@ -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 --
|
||||
-----------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue