Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lazydev-nvim): add deprecation notice as it was added upstream #1354

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},
},
}