mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(extras): Enable project-specific plugin specs using .lazy.lua
This commit is contained in:
parent
879e29504d
commit
4a821c3b0b
2 changed files with 21 additions and 0 deletions
20
lua/lazyvim/plugins/extras/lazyrc.lua
Normal file
20
lua/lazyvim/plugins/extras/lazyrc.lua
Normal 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)()
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue