replace EOL neodev with lazydev

This commit is contained in:
Robin Ting 2024-07-02 10:47:55 -04:00
parent f0b28eb424
commit 950787359a
1 changed files with 38 additions and 1 deletions

View File

@ -1,3 +1,17 @@
---@diagnostic disable: undefined-global
---@diagnostic disable-next-line: undefined-global
---@diagnostic disable: undefined-global
---@diagnostic disable-next-line: undefined-global
---@diagnostic disable: undefined-global
---@diagnostic disable-next-line: undefined-global
---@diagnostic disable: undefined-global
---@diagnostic disable-next-line: undefined-global
---@diagnostic disable: undefined-global
---@diagnostic disable-next-line: undefined-global
---@diagnostic disable: undefined-global
---@diagnostic disable-next-line: undefined-global
---@diagnostic disable: undefined-global
---@diagnostic disable-next-line: undefined-global
--[[
=====================================================================
@ -422,7 +436,30 @@ require('lazy').setup({
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{ 'folke/neodev.nvim', opts = {} },
-- { 'folke/neodev.nvim', opts = {} },
{
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
{ path = "luvit-meta/library", words = { "vim%.uv" } },
},
},
},
{ "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings
{ -- optional completion source for require statements and module annotations
"hrsh7th/nvim-cmp",
opts = function(_, opts)
opts.sources = opts.sources or {}
table.insert(opts.sources, {
name = "lazydev",
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
})
end,
},
{ "folke/neodev.nvim", enabled = false },
},
config = function()
-- Brief aside: **What is LSP?**