-
Notifications
You must be signed in to change notification settings - Fork 13k
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
emacs: Attributes highlighting fixes #14818
emacs: Attributes highlighting fixes #14818
Conversation
Setting `OVERRIDE` to `t` overrides the conflicting highlight Emacs places on string literals. Fix rust-lang#14347
cc @brson @nikomatsakis @pnkfelix, surely there is an emacser who can review this. |
@tomjakubowski I tried to find documentation on what the trailing (Having said that, I will r+ this now, since I trust that it is an improvement on what we had before, especially with the bug fix to the regexp.) |
… r=pnkfelix This addresses two problems noted in #14347: the highlight of `#foo]` as an attribute, and the non-highlight of `#[foo = "bar"]`.
@pnkfelix the relevant documentation is in
The problem is that Emacs's highlighting for matched delimiters in the syntax table take precedence over keywords. Thinking it over some more we should be using I'll submit another PR with that fix. |
This addresses the font lock regression introduced by the earlier pull request rust-lang#14818 - attributes are no longer be highligted inside of comments and strings. Also add some font lock test infrastructure and some tests for attribute font locking.
…ht, r=pnkfelix This addresses the font lock regression introduced by the earlier pull request #14818 - attributes are no longer be highligted inside of comments and strings. Also add some font lock test infrastructure and some tests for attribute font locking and fix some minor nits.
…=Veykril fix: place type inlay hints after the item and without left-padding **Before**: ![Type hints were placed before the item and there was left-padding that accentuaded the issue](https://github.com/rust-lang/rust-analyzer/assets/7951708/006a28e9-ed7b-4d49-a7e7-3c6da8efca79) **After**: ![Type hints are now placed after the item and without padding since there already is `: ` in front of the type](https://github.com/rust-lang/rust-analyzer/assets/7951708/330a847f-8c59-40c7-877f-bf1aaced30e2)
This addresses two problems noted in #14347: the highlight of
#foo]
as an attribute, and the non-highlight of#[foo = "bar"]
.