Skip to content

Commit

Permalink
fix: prioritize user config for theme-loader on windows (#1213) (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
daephx authored Mar 21, 2024
1 parent af4c3cf commit b5e8bb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/lualine/utils/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ local function load_theme(theme_name)
-- put entries from user config path in front
local user_config_path = vim.fn.stdpath('config')
table.sort(files, function(a, b)
return vim.startswith(a, user_config_path) or not vim.startswith(b, user_config_path)
local pattern = table.concat { user_config_path, sep }
return string.match(a, pattern) or not string.match(b, pattern)
end)
-- More then 1 found . Use the first one that isn't in lualines repo
local lualine_repo_pattern = table.concat({ 'lualine.nvim', 'lua', 'lualine' }, sep)
Expand Down

0 comments on commit b5e8bb6

Please sign in to comment.