Skip to content

Commit

Permalink
fix(lazydev-nvim): add deprecation notice as it was added upstream (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
azdanov authored Feb 4, 2025
1 parent c2ff9b9 commit 0688937
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Requires:
- [Neovim v0.10+](https://github.com/neovim/neovim/releases)

**Repository:** <https://github.com/folke/lazydev.nvim>

Note: This plugins is part of AstroNvim core as of [v4.22.0](https://github.com/AstroNvim/AstroNvim/releases/tag/v4.22.0)
34 changes: 5 additions & 29 deletions lua/astrocommunity/neovim-lua-development/lazydev-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,10 @@ return {
"folke/lazydev.nvim",
ft = "lua",
cmd = "LazyDev",
opts = function(_, opts)
if not opts.library then
opts.library = {
{ path = "luvit-meta/library", words = { "vim%.uv" } },
{ path = "astrocore", words = { "AstroCore" } },
{ path = "astrolsp", words = { "AstroLSP" } },
{ path = "astroui", words = { "AstroUI" } },
{ path = "astrotheme", words = { "AstroTheme" } },
{ path = "lazy.nvim", words = { "Lazy" } },
}
end
init = function()
require("astrocore").notify(
"`lazydev.nvim` has been included upstream!\nPlease remove from your community plugins.",
vim.log.levels.WARN
)
end,
specs = {
{ "folke/neodev.nvim", optional = true, enabled = false },
{ "Bilal2453/luvit-meta", lazy = true },
{
"hrsh7th/nvim-cmp",
optional = true,
opts = function(_, opts)
local lazydev_inserted
for _, source in ipairs(opts.sources or {}) do
if (type(source) == "table" and source.name or source) == "lazydev" then
lazydev_inserted = true
break
end
end
if not lazydev_inserted then table.insert(opts.sources, { name = "lazydev", group_index = 0 }) end
end,
},
},
}

0 comments on commit 0688937

Please sign in to comment.