Skip to content

Small fix for rust-analyzer syntax highlighting of parameters for functions annotated with #[builder]#275

Merged
Veetaha merged 1 commit intomasterfrom
fix/smallfix-ra-syntax-highlighting-for-fn-params
Apr 9, 2025
Merged

Small fix for rust-analyzer syntax highlighting of parameters for functions annotated with #[builder]#275
Veetaha merged 1 commit intomasterfrom
fix/smallfix-ra-syntax-highlighting-for-fn-params

Conversation

@Veetaha
Copy link
Copy Markdown
Collaborator

@Veetaha Veetaha commented Apr 9, 2025

This isn't a complete fix. Unfortunately, the parameters are now getting assigned the semantic token type of variable instead of parameter after this fix, which is only slightly better than struct semantic token type that they were assigned before this fix.

This problem became worse after #269 which added unconditional two-level macro expansion, after which I noticed this problem, although a little later after that patch was released.

Created an issue in rust-analyzer repository to track this problem: rust-lang/rust-analyzer#19556.

…ctions annotated with `#[builder]`

This isn't a complete fix. Unfortunately, the parameters now get assigned the semantic token type of `variable` after this fix, which is only slightly better than `struct` semantic token type that they were assigned before this fix.

Created an issue in rust-analyzer repository to track this problem: rust-lang/rust-analyzer#19556.
@Veetaha Veetaha merged commit 7629c50 into master Apr 9, 2025
33 checks passed
@Veetaha Veetaha deleted the fix/smallfix-ra-syntax-highlighting-for-fn-params branch April 9, 2025 21:52
@github-actions github-actions Bot mentioned this pull request Apr 9, 2025
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.

2 participants