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

feat(highlight): added optional rainbow labels. Disabled by default. … #74

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

folke
Copy link
Owner

@folke folke commented Jun 27, 2023

…Useful for Treesitter ranges.

@folke folke merged commit ffb865b into main Jun 27, 2023
6 checks passed
@JoseConseco
Copy link

I cant see the rainbow : (
image
I would guess matching labels should be colored same way, right ? @folke
image

@folke
Copy link
Owner Author

folke commented Jun 27, 2023

enabled d at the end

@JoseConseco
Copy link

Thanks it works,
image
Btw. small tweak - to flip order of closing labels would be great.
So if we start with [h,g] we would end with [g,h] labels

@folke
Copy link
Owner Author

folke commented Jun 27, 2023

@JoseConseco good catch! Should be fixed now

@JoseConseco
Copy link

works great! Thx for so fast fix.
image

@faridsaid20
Copy link

works great! Thx for so fast fix.
image

Just by looking at your screenshot it still has wrong closing labels for most of them.
f, e, b, c?

@JoseConseco
Copy link

I think these were fixed already:
image
Look fine now IMO

@folke
Copy link
Owner Author

folke commented Jun 29, 2023

Yeah, when I closed this I had actually pushed these changes to a branch instead of main :)

So pushed it to main later. All good now :)

@JoseConseco
Copy link

@folke any ideas, why after few more Flash.nvim updates the rainbow labels, that are placed on current word - lost the colors? See above image vs current flash.treesitter() labels:
image
As you can see, bunch of labels are just white. I will try to bisect the commit.

@JoseConseco
Copy link

JoseConseco commented Jul 1, 2023

Ok, the commit that broke the highlight in current word range is : 56531ee
The 13022c0 is the last commit that worked 'the old way' / correctly .
EDIT: removing the lines added by the commit mentioned above, fixed the colors for me, on latest flash build.

@folke
Copy link
Owner Author

folke commented Jul 2, 2023

@JoseConseco should be fixed now!

That was a fix to properly show the cursor when on the same position as a label.

I've updated that code to only skip the label when it's on the curor position in the current window and target is not a range

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.

3 participants