Skip to content

Conversation

@hbiel
Copy link
Contributor

@hbiel hbiel commented Mar 3, 2022

This fixes the issue described in #35. I cleaned everything up and updated the documentation accordingly.

If there's something missing please let me know!

Best regards!

@cseickel
Copy link
Contributor

cseickel commented Mar 3, 2022

This looks good, I'll just try it out later and I'll merge if there are no issues.

@cseickel
Copy link
Contributor

cseickel commented Mar 4, 2022

The problem with this is that I don't think the TitleBar highlight group looks good with a normal border. I tried using the FloatBorder group for the title and that's better but still not great. I think the right thing to do is to add another highlight group which uses the same background as float border but with the Normal foreground.

@cseickel
Copy link
Contributor

cseickel commented Mar 4, 2022

I just added a commit to show you what I mean, what do you think about that? Docs would still need to be updated.

@hbiel
Copy link
Contributor Author

hbiel commented Mar 4, 2022

I think the 'NC' style actually looks better on my initial commit. Although 'rounded' looks better on yours.
I'm using kanagawa.nvim as my theme so you might be getting different results.
Here is a comparison for both cases on my current setup:

'NC' style my commit: 6d46faf0eb43b46ead7c04ff54a3e39c10369d05_NC_border
'NC' style your commit: 093a1fe20abd7080b3b5a4e538327a48ba953ff7_NC_border

'rounded' style my commit: 6d46faf0eb43b46ead7c04ff54a3e39c10369d05_rounded_border
'rounded' style your commit: 093a1fe20abd7080b3b5a4e538327a48ba953ff7_rounded_border

I added another commit in which different highlight groups are used as each case actually needs different highlighting.
In 'NC' style the title border is drawn by the background highlighting of blank characters.
In the other styles the border is drawn by actual glyphs and as such the foreground highlighting is used.

It now looks like this for me:
'NC' style uses the established TitleBar highlight group and looks like this: NC style
'rounded' style uses the FloatBorder highlight group and looks like this (just like telescope does for me): rounded style

The additional highlight group isn't needed anymore as far as i can tell so i removed it.

Does this also look like this on your end or are you seeing different results?

@cseickel
Copy link
Contributor

cseickel commented Mar 4, 2022

I didn't even check the NC style because I didn't expect it to be affected. If you back out the changes you made to that branch then it should work out correctly.

I'd like to keep the added highlight group because I think it's something that others would want to be able to change. I know I personally don't like the way it looks when the title text is the same color as the border. We can, however, make the default for that new group just be linked to the FloatBorder group so the default look is still what you are looking for.

@hbiel hbiel changed the title Enable use of NeoTreeTitleBar hl group on all border styles add NeoTreeFloatTitle highlight group Mar 5, 2022
@hbiel
Copy link
Contributor Author

hbiel commented Mar 5, 2022

I'd like to keep the added highlight group because I think it's something that others would want to be able to change. I know I personally don't like the way it looks when the title text is the same color as the border. We can, however, make the default for that new group just be linked to the FloatBorder group so the default look is still what you are looking for.

Yeah, that's nice to have. I have restored this in the latest commit and kept the defaults you set initially as they seem perfectly fine to me. I'm more than happy to be able to set my own colors in my personal configuration.

I have also added documentation for the new highlight group and have grouped the three groups together.

Copy link
Contributor

@cseickel cseickel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@cseickel cseickel merged commit a4b88f1 into nvim-neo-tree:main Mar 5, 2022
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

Successfully merging this pull request may close these issues.

2 participants