feat(extras): Enable project-specific plugin specs using .lazy.lua

This commit is contained in:
abeldekat 2023-12-03 10:57:31 +01:00
parent 879e29504d
commit 4a821c3b0b
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,20 @@
--[[
This extra allows for project-specific plugin specs.
File .lazy.lua:
is read when present in the current working directory
should return a plugin spec
has to be manually trusted for each instance of the file
This extra should be the last plugin spec parsed by lazy.nvim
See:
:h 'exrc'
:h :trust
--]]
local filepath = vim.fn.fnamemodify(".lazy.lua", ":p")
local file = vim.secure.read(filepath)
if not file then
return {}
end
return loadstring(file)()

View file

@ -2,6 +2,7 @@ local Config = require("lazyvim.config")
-- Some extras need to be loaded before others
local prios = {
["lazyvim.plugins.extras.lazyrc"] = 1000,
["lazyvim.plugins.extras.editor.aerial"] = 100,
["lazyvim.plugins.extras.editor.symbols-outline"] = 100,
["lazyvim.plugins.extras.test.core"] = 1,