robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
4d736cd41f
master
1-- For 'exrc' and related functionality. 2 3local files =vim . fs . find ( { '.nvim.lua' , '.nvimrc' , '.exrc' } , { 4type ='file' , 5upward =true , 6limit =math . huge , 7} ) 8for _ , file in ipairs ( files ) do 9local trusted =vim . secure . read ( file ) --[[@as string|nil]] 10if trusted then 11if vim . endswith ( file , '.lua' ) then 12assert ( loadstring ( trusted , '@' .. file ))() 13else 14vim . api . nvim_exec2 ( trusted ) 15end 16end 17-- If the user unset 'exrc' in the current exrc then stop searching 18if not vim . o . exrc then 19break 20end 21end