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

Actually highlight the ? operator in rendered code #44706

Closed
6 tasks
est31 opened this issue Sep 19, 2017 · 5 comments
Closed
6 tasks

Actually highlight the ? operator in rendered code #44706

est31 opened this issue Sep 19, 2017 · 5 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.

Comments

@est31
Copy link
Member

est31 commented Sep 19, 2017

About one year after the ? operator was stabilized with the promise that it will get highlighting when being rendered, work on getting hightlighting of ? into text editors and renderers has stalled.

I've done work on this for rustdoc in #37102. For (current, non rewritten) rustdoc, it looks like this:

image

But I've found a couple of places where there is still no highlighting:

If you stumble across additional cases, please mention them here!

I know these projects are separate from Rust itself, but its important to get ? highlighted consistently so that it can't be overlooked.

cc @Stebalien @eddyb @GuillaumeGomez

@eddyb
Copy link
Member

eddyb commented Sep 19, 2017

I believe I locally hacked this into my kate syntax highlighting files:

<DetectChar char="?" attribute="QM" context="#stay"/>
<itemData name="QM" defStyleNum="dsError" bold="true" underline="false"/>

@cramertj
Copy link
Member

cramertj commented Sep 20, 2017

If you stumble across additional cases

The VIM plugin (using 'rust-lang/rust.vim') and the RustyCode VSCode plugin don't highlight ?.

@TimNN TimNN added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Sep 20, 2017
@ishitatsuyuki
Copy link
Contributor

Given that most IDEs have moved to RLS, is this still a thing?

@petrochenkov
Copy link
Contributor

RLS has to do anything with highlighting?

In VSCode neither default syntax scheme for Rust nor plugins highlight ? currently.

@ishitatsuyuki
Copy link
Contributor

IIRC language server protocol has a feature called semantic highlighting.

@est31 est31 closed this as completed Oct 19, 2018
@rust-lang rust-lang locked and limited conversation to collaborators Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants