make lua package loading conditional on cat

This commit is contained in:
Daniel Winkler 2026-05-21 21:10:30 +10:00
commit 6226a1c9b1

View file

@ -1,6 +1,7 @@
local add = Config.add
local now_if_args = Config.now_if_args
local later = MiniDeps.later
local nix = require('config.nix')
if not Config.isNixCats then
local m_add = MiniDeps.add
@ -12,19 +13,21 @@ end
-- lua
later(function()
add("luvit-meta")
add("lazydev")
require("lazydev").setup({
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
"lua",
"mini.nvim",
"MiniDeps",
{ path = "luvit-meta/library", words = { "vim%.uv" } },
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
})
if nix.get_cat("lua", false) then
add("luvit-meta")
add("lazydev")
require("lazydev").setup({
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
"lua",
"mini.nvim",
"MiniDeps",
{ path = "luvit-meta/library", words = { "vim%.uv" } },
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
})
end
end)
-- Markdown