Page MenuHomePhabricator

[clangd] Detect C++ for extension-less source files in vscode extension
ClosedPublic

Authored by hokein on Jun 17 2019, 12:58 AM.

Details

Summary

Extend our extension to support detecting these files as C++ files based on the first
line (-*- C++ -*-), it will make clangd work on C++ standard headers
(e.g. iostream).

We use the contributes.languages[1] to enrich the buildin VScode C++
support.

[1]: https://code.visualstudio.com/api/references/contribution-points#contributes.languages

Diff Detail

Repository
rL LLVM

Event Timeline

hokein created this revision.Jun 17 2019, 12:58 AM

Could you also update summary to include a link to documentation regarding contributes.languages ?

clang-tools-extra/clangd/clients/clangd-vscode/package.json
55 ↗(On Diff #204997)

could you also make sure it starts with "^//"

hokein updated this revision to Diff 204999.Jun 17 2019, 1:20 AM
hokein marked 2 inline comments as done.

Address comments.

hokein edited the summary of this revision. (Show Details)Jun 17 2019, 1:21 AM
kadircet accepted this revision.Jun 17 2019, 1:28 AM
This revision is now accepted and ready to land.Jun 17 2019, 1:28 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2019, 5:56 AM