As for me it looks like we lack semantic tokens for punctuation and macros, am I right?
I thnk so, yeh
Regarding https://github.com/rust-analyzer/rust-analyzer/pull/4903#issuecomment-645442415 any thoughts on how to handle the one case I brought up (comments in doc comments are indistinguishable from doc comments if we append
documentation to all items in a doctest)? I wanted to explore possible options here.
My preference would be to mark them with a
doctest modifier instead, but I'm also open to any other ideas. My personal preference is to have the two comments show differently if the code is also going to be highlighted differently.
Yeah, I think a separate modifier makes sense. Instead of documentation, we should use something that means "this code is highlihgitng as rust, but is really a comment". Not sure about the right name
maybe just "injected"?
ok, in that case do you think it makes sense to pull this out, then in a new story do this along with the other item we mentioned? The one about adding the new modifier to the operators and currently unmarked items like
;, etc. (Not sure if something else might get missed).
I could go either way there
Splitting PRs is always a good idea!
ok, will do, then we can bikeshed the modifier in a whole new story :D
Just pushed an update for the PR (should be good to go at this point) and created https://github.com/rust-analyzer/rust-analyzer/issues/4939 to track the new modifier. I'll get started on that right away (I think it should also be entirely independent of the documentation highlighting)
Ok, new PR is up with the fixes: https://github.com/rust-analyzer/rust-analyzer/pull/4940