-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix node style with no LS_COLORS set #656
Conversation
Actually hold up, i'm still getting some issues with the default config, i'm going to need to test this one a bit more |
I'm giving priority to config defined styles and falling back to ls_colors if they are not defined for an element, not sure if that is the intended behavior, i'm going to need some input here |
Sorry, I haven't been able to review this. I'll do it soon. For now take a look at these for the intended behaviour: |
So, from what i understand the priority should be like this: Instead of right now: But the lua implementation only allows the current implementation OR the opposite: |
Damn, it's getting complex 😅 ... I need some more time to remember and document things (as I'm sure I'll forget it again). But as of now, IMO, the priority should be: xplr.config.node_types (it's empty by default) > $LS_COLORS. If $LS_COLORS is unset i.e. xplr.config.node_types prioritizes specific over generic, and the final value can be obtained dynamically by i.e. specific xplr.config.node_types > generic xplr.config.node_types > $LS_COLORS So, $LS_COLORS is the most generic, because it applies across different tools. Note that this isn't the case for |
But I guess it makes sense to be able to ignore $LS_COLORS completely. Maybe Another option is to treat unset and "" differently, but that'll probably add more confusion. Another option is to add xplr.config.general.disable_ls_colors, which would be ideal, but feels a bit of overkill. |
Closing this as the intended behaviour is to prioritize init.lua over LS_COLORS. |
Fixing the issue mentioned #651
Instead of calling for default() on LsColors it calls on empty() in order to avoid injecting a default style
Tested with and without LS_COLORS set and it seems to do the trick