Skip to content
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

Colors on Windows #34

Closed
yngwi opened this issue Aug 5, 2020 · 6 comments
Closed

Colors on Windows #34

yngwi opened this issue Aug 5, 2020 · 6 comments

Comments

@yngwi
Copy link

yngwi commented Aug 5, 2020

Hi again,

sorry to open so much issues and thank you for your work! I wonder why chadtree doesn't display colors for instance for folders on my windows install. See my screenshot that has both coc-explorer and chadtree open.

image

@ms-jpq
Copy link
Owner

ms-jpq commented Aug 6, 2020

I suspect you don't have termguicolors set am I correct?

If so you will not see the github colours.

I just fixed a bug that hid LS_COLORS if they are 8bit. Idk if you have LS_COLORS set before, but it should work now.

fd3672a

@yngwi
Copy link
Author

yngwi commented Aug 6, 2020

Hm actually I do have set termguicolors in my vim config. As I said, I'm on windows, maybe that influences things?

@ms-jpq
Copy link
Owner

ms-jpq commented Aug 7, 2020

Do you mind pulling latest commit and see if that changes anything?

I added ability to customize 8bit -> 24bit mapping for LS_COLORS also, its under the Colours section in the readme.

@yngwi
Copy link
Author

yngwi commented Aug 7, 2020

Hi, thank you again for your reply. If I set LS_COLORS as a windows environment parameter the tree is colored:
image.

However, the color doesn't follow the color theme in vim while it does so in coc-explorer (for example). Is there a way to make this theme-controlled? I'm sorry if this is a naive question, I have no idea how that kind of thing is supposed to work.

Related to this: I have a function in my vimfiles that switches the theme and/or background color based on time of day or keypress (light/dark) basically calling colorscheme and/or set background and when I call this function, the colors in the file tree disappear again.

Sorry to bother you, I'm very grateful for your work and support!

@ms-jpq
Copy link
Owner

ms-jpq commented Aug 7, 2020

nono you are not bothering me,

I appreciate the feedback actually, thank you.

So I have an issue in the works that would allow this to follow colorscheme on top of LS_COLORS

#32

The reason I initially designed this to work with LS_COLORS instead of vim Highlight groups is because most LS_COLORS schemes will include useful information about each file, for example: executables are usually coloured green and such, and sockets will be usually yellow. And symlinks will often be coloured differently depending on if they are dead, or pointing to some actual file.

However, there is enough interest in further customizations that justifies me putting in more work to make it better.

I suspect that COC-explorer have colour theme support because it's more established, and colour themes support it's highlight groups.

See example here: theme im using right now

It straight up includes COC highlight groups in the theme itself.

So my plan is to basically emulate one of the more popular file explorers, so themes will automatically apply to CHADTree as if it is NerdTree or something.

I will close this issue, in favour of #32

@ms-jpq ms-jpq closed this as completed Aug 7, 2020
@yngwi
Copy link
Author

yngwi commented Aug 7, 2020

Very cool, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants