diff --git a/lua/lazyvim/plugins/extras/lazyrc.lua b/lua/lazyvim/plugins/extras/lazyrc.lua new file mode 100644 index 00000000..1c4d0d62 --- /dev/null +++ b/lua/lazyvim/plugins/extras/lazyrc.lua @@ -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)() diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index 4eb73804..1ecf081a 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -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,