-
Notifications
You must be signed in to change notification settings - Fork 93
Semantic tokens support #314
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
Conversation
This looks great, can't wait to give it a try! |
Edit: @wz1000 suggests that they should be imported qualified |
Question: do I need to turn anything "on" in the server configs to enable this? Because I can't trigger any of my semantic highlighting handlers:
|
@banacorn |
It's possible that I failed to hook something up properly. I should write a test that actually sends some requests and responses! |
@michaelpj i am afraid that this needs a rebase (plus the test you commented) |
Thanks for the ping, I'm just not succeeding in spending much time on OSS recently! I'll try and get it polished up soon. |
6402f83
to
a3afe9f
Compare
Okay, pushed an update. Has some more tests, but could do with even more. Things that I'd appreciate eyes on:
|
I have no idea what's up with the Windows CI, cabal is having some incomprehensible difficulties and trying to pick a version of |
Trying the build locally 🤞 |
|
Thanks! |
32ba4ae
to
aff8df0
Compare
This adds support for semantic tokens. Concretely, that menas: - A bevy of new types, in `SemanticTokens.hs`. - Four new methods. - A number of utility functions for working with semantic tokens, based on what I expect any user of this functionality would need (absolute/relative token positions, encoding tokens into arrays, and producing deltas)
@michaelpj the pr with support for ghc-9.0.1 does not have the problem with |
Sure. I accidentally reverted your constraint removal when I got rid of that extra commit :) Feel free to rebase, or I will tomorrow. |
6a15ed2
to
f2e1956
Compare
Okay, CI is passing now. |
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.
lgtm, thanks for tests and comments
will merge soon if nobody disagree
This adds support for semantic tokens. Concretely, that means:
SemanticTokens.hs
.on what I expect any user of this functionality would need
(absolute/relative token positions, encoding tokens into arrays, and
producing deltas)
Notes:
lsp-types
seem to have utility functions in them, so it doesn't seem wildly out of place.