We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
package.path
1 parent b431d22 commit ccf39b6Copy full SHA for ccf39b6
lua/lualine/utils/loader.lua
@@ -220,8 +220,12 @@ local function load_theme(theme_name)
220
end
221
local n_files = #files
222
if n_files == 0 then
223
- -- No match found
224
- error(path .. ' Not found')
+ -- No match found on runtimepath. Fall back to package.path
+ local file = assert(
225
+ package.searchpath('lualine.themes.' .. theme_name, package.path),
226
+ 'Theme ' .. theme_name .. ' not found'
227
+ )
228
+ retval = dofile(file)
229
elseif n_files == 1 then
230
-- when only one is found run that and return it's return value
231
retval = dofile(files[1])
0 commit comments