adjust plugin order based on mason-lspconfig recommendation

This commit is contained in:
2025-10-14 14:39:20 +05:00
parent a598dcd1fc
commit c3a1ec874e
2 changed files with 30 additions and 10 deletions

View File

@ -4,16 +4,7 @@ return {
config = true config = true
}, },
{ {
"williamboman/mason-lspconfig.nvim", "mason-org/mason-lspconfig.nvim",
},
{
"neovim/nvim-lspconfig",
event = "BufReadPre BufNewFile",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"nvimtools/none-ls.nvim",
},
config = function() config = function()
require("user.plugins.lsp.mason_lsp_config") require("user.plugins.lsp.mason_lsp_config")
require("user.plugins.lsp.diagnostics_config").setup() require("user.plugins.lsp.diagnostics_config").setup()
@ -33,6 +24,17 @@ return {
vim.cmd([[ command! Format execute 'lua vim.lsp.buf.format{async=true}' ]]) vim.cmd([[ command! Format execute 'lua vim.lsp.buf.format{async=true}' ]])
end, end,
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
},
{
"neovim/nvim-lspconfig",
event = "BufReadPre BufNewFile",
dependencies = {
"nvimtools/none-ls.nvim",
},
}, },
{ {
"lukas-reineke/lsp-format.nvim", "lukas-reineke/lsp-format.nvim",

View File

@ -4,6 +4,8 @@ vim.lsp.enable({
"omnisharp", "omnisharp",
"pylsp", "pylsp",
"rust_analyzer", "rust_analyzer",
"luals",
"vimls"
}) })
-- TODO: this does not work, need to install pylsp-mypy plugin manually -- TODO: this does not work, need to install pylsp-mypy plugin manually
@ -45,4 +47,20 @@ vim.lsp.config('rust_analyzer', {
} }
}) })
vim.lsp.config('luals', {
settings = {
Lua = {}
}
})
vim.lsp.config('rust_analyzer', {
settings = {
["rust-analyzer"] = {
cargo = {
features = "all",
},
},
}
})
mason_lspconfig.setup() mason_lspconfig.setup()