This is an archive of the discontinued LLVM Phabricator instance.

[clangd] WIP/RFC: Prototype for semantic highlighting proposal
AbandonedPublic

Authored by nik on Jun 14 2019, 5:24 AM.

Details

Summary

TODO: Is the visitor the right approach?
TODO: Add tests
TODO: Test that only highlightings for main file are returned, but not headers.

...as specified at

https://github.com/microsoft/vscode-languageserver-node/pull/367

See also

https://github.com/microsoft/vscode-languageserver-node/issues/368

So far, this is an *incomplete* implementation providing highlighting
for identifiers of VarDecl/DeclRefExpr.

Event Timeline

nik created this revision.Jun 14 2019, 5:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2019, 5:24 AM
nik added a comment.Jun 14 2019, 5:29 AM

Any interest in having the *proposal* implemented?

While there is a client implementation available in the theia ide (https://github.com/theia-ide/theia/pull/2332), I have only tested this against Qt Creator's client implementation (also work in progress).

Yeah, we definitely have interest in this feature, and our intern @jvikstrom will work on this feature this summer.

You probably missed the discussion on clangd-dev mailing list, @nridge also has an unfinished prototype for semantic highlighting.

To avoid multiple people working on the same feature, I think the plan is that @jvikstrom will pick up the current stuff, and continue working/improving it.

To avoid multiple people working on the same feature, I think the plan is that @jvikstrom will pick up the current stuff, and continue working/improving it.

Sounds good! I'm excited to see this moving forward :)

I've had a look at this patch, and it's very similar to my prototype implementation in D61842. Mine handles some more cases in the RecursiveASTVIsitor, especially around dependent names inside templates, and has corresponding test cases that you may want to reuse @jvikstrom.

nik added a comment.Jun 18 2019, 4:07 AM

Yeah, we definitely have interest in this feature, and our intern @jvikstrom will work on this feature this summer.

"this summer" depends on the location, so can you concretize this? :)

You probably missed the discussion on clangd-dev mailing list, @nridge also has an unfinished prototype for semantic highlighting.

Yes, I wasn't aware that there is a clangd-dev mailing list and thus was not subscribed to it. Subscribed now.

I'm glad that I haven't put more work into this ;)

To avoid multiple people working on the same feature, I think the plan is that @jvikstrom will pick up the current stuff, and continue working/improving it.

Great. The patch from @nridge is more advanced so I'll abandon this one.

nik abandoned this revision.Jun 18 2019, 4:07 AM
In D63331#1548020, @nik wrote:

Yeah, we definitely have interest in this feature, and our intern @jvikstrom will work on this feature this summer.

"this summer" depends on the location, so can you concretize this? :)

oops, sorry about that. I meant summer in Germany (June ~ the end of August).

You probably missed the discussion on clangd-dev mailing list, @nridge also has an unfinished prototype for semantic highlighting.

Yes, I wasn't aware that there is a clangd-dev mailing list and thus was not subscribed to it. Subscribed now.

I'm glad that I haven't put more work into this ;)

To avoid multiple people working on the same feature, I think the plan is that @jvikstrom will pick up the current stuff, and continue working/improving it.

Great. The patch from @nridge is more advanced so I'll abandon this one.