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

rust highlights: only the last identifier in attribute macros gets highlighted #13291

Open
lovelymono opened this issue Apr 7, 2025 · 1 comment · May be fixed by #12972
Open

rust highlights: only the last identifier in attribute macros gets highlighted #13291

lovelymono opened this issue Apr 7, 2025 · 1 comment · May be fixed by #12972
Labels
C-bug Category: This is a bug

Comments

@lovelymono
Copy link

lovelymono commented Apr 7, 2025

Summary

When using attribute macros, such as #[warn(...)], only the last identifier gets highlighted with @function.macro.

image

#![warn(clippy::std_instead_of_alloc, clippy::std_instead_of_core, clippy::alloc_instead_of_core)]

In this case, ideally only std_instead_of_alloc, std_instead_of_core and alloc_instead_of_core would get highlighted, without highlighting clippy, but highlighting all identifiers would also be fine.

Alternatively, not highlighting anything would also look good.

Reproduction Steps

Not applicable?

Helix log

Not applicable.

Platform

Linux

Terminal Emulator

ghostty-1.1.3

Installation Method

nix build from source

Helix Version

helix 25.01.1 (29789f2)

@lovelymono lovelymono added the C-bug Category: This is a bug label Apr 7, 2025
@the-mikedavis
Copy link
Member

This is a consequence of #9436 - there's a bug in the highlighter. #12972 will fix this

@the-mikedavis the-mikedavis linked a pull request Apr 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants