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

fix(#2643): correctly apply linked highlight groups in tree window #2653

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

alex-courtis
Copy link
Member

@alex-courtis alex-courtis commented Jan 28, 2024

fixes #2643
fixes #2651

Reverts to &winhl instead of a highlight namespace for the nvim-tree window. See #2634 comments for details on issues encountered.

  • TODO: reapply combined highlights on colorscheme change

@alex-courtis
Copy link
Member Author

@petobens this is a more complete solution than #2652 which you tested. I'd be most grateful if you could test this one.

@JosefLitos and @TroySigX I'd be most grateful for your testing this fix.

I'd be grateful if you could apply some changes to groups like WinSeparator, VertSplit and NvimTreeWinSeparator after you've opened the tree.

Bonus points for changing color schemes ;)

cd /path/to/nvim-tree.lua
git pull
git checkout 2643-back-to-winhl

When you're finished testing:

git checkout master

@TroySigX
Copy link

This fixes my problem as well, but how do I change those groups you mentioned?

@litoj
Copy link

litoj commented Jan 28, 2024

I can also confirm this fixes all my issues - NonText and WinSeparator are both highlighted as expected and statusline shows no odd behaviour.

@petobens
Copy link

Works for me too. Thanks!

@alex-courtis
Copy link
Member Author

This fixes my problem as well, but how do I change those groups you mentioned?

Many thanks all!

You could change the groups before nvim-tree setup using something like:

vim.cmd([[
:hi WinSeparator guifg=blue
:hi NonText guifg=yellow
:hi LineNrAbove guifg=red
]])

When running you can enter the same commands to see "live updates".

@alex-courtis alex-courtis merged commit fbee8a6 into master Jan 29, 2024
7 checks passed
@alex-courtis alex-courtis deleted the 2643-back-to-winhl branch January 29, 2024 01:42
juefeiyan pushed a commit to juefeiyan/nvim-tree.lua that referenced this pull request Jan 30, 2024
…window (nvim-tree#2653)

* fix(nvim-tree#2643): correctly apply linked highlight groups in tree window

* fix(nvim-tree#2643): recreate and apply combined highlight groups on colorscheme change
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.

LineNrAbove/Below Not Applying LineNr after #2415 NonText and WinSeparator have no highlight
4 participants