refactor: remove lazydev and luvit-meta as lsp dependencies

- moved lazydev and luvit-meta into their own specs to enable
  lazy-loading

Based on this [discussion](https://github.com/folke/lazy.nvim/discussions/610#discussioncomment-5175014) lazydev.nvim and luvit-meta will always load when nvim-lspconfig loads.
This commit is contained in:
iton0 2024-07-23 21:34:59 -04:00
parent 56b9114bf2
commit 352e461ff1
1 changed files with 16 additions and 15 deletions

View File

@ -399,21 +399,10 @@ require('lazy').setup({
end,
},
{ -- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
-- LSP Plugins
{
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{
'folke/lazydev.nvim',
ft = 'lua',
opts = {
@ -424,6 +413,18 @@ require('lazy').setup({
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
{
-- Main LSP Configuration
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
},
config = function()
-- Brief aside: **What is LSP?**