-
Notifications
You must be signed in to change notification settings - Fork 11
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: support "prio" priority value for gutter marks #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of points:
- In the default config we should add priorities, shorter movements should have higher priority. I would suggest, G = 10, gg = 9, { = 8, } = 8
- This will break some tests but means we handle priority the same for gutters as we do for lines
- We should add tests for priority replacing in
gutter_hints_spec
If you need help with testing then more than happy to help guide you through it
But thanks for the PR @josh-nz. Its great to have help!
For some general help @josh-nz The checks can be ran on your local machine by running I really should write up a |
This was addressed in commit 88ab881 I believe.
Thanks for your help with the tests. I did figure out to run Anything else that needs to be done? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready to go, let me test it for a few days and then we will get it merged
Closes #42
One detail not documented is what happens if there is a conflict between hints with the same priority. In the case of the gutter hints, I believe it is first-in wins, where first-in is defined by the internal gutter hints Lua table ordering (ie, not config). Not sure how relevant this is to be noted anywhere, but something to consider. Similarly for the line hints. |
6ee2b32
to
308ba29
Compare
308ba29
to
6e7eb55
Compare
@willothy what are your thoughts on this, I'm sort of thinking if you footgun yourself with your config raise an issue? |
That's my preference. It's the simplest solution and doesn't add any additional code burden. Perhaps a quick note in the readme something to the effect of "make any hints that could appear in the same place as others have unique priorities to avoid conflicts" |
Yeah, I agree. I don't think ordering of same-priority items is particularly important, and if someone does run into an issue they can ask about it. |
Excellent, if you want to add a note to the README @josh-nz then we can get this merged |
README updated. |
This is my first pass at implementing #42.
Closes #42
I have not adjusted nor added any tests and therefore these might be broken. As per my previous pull request, my understanding of how to implement and run Neovim plugin tests is insufficient for me to be useful in this area.