microsoft / microsoft/vscode-cpptools
Auto-detect C++ type on extensionless headers based on the first line
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: LanguageService
Auto-detect C++ type on extensionless headers based on the first line
- OS and Version: Any
- VS Code Version: 1.38.1
- C/C++ Extension Version: Version 0.25.1
To Reproduce
- Open up any file lacking an extension
- Observe how it is not syntax colored without human intervention
Expected behavior
Standard C++ library and some open source libraries use extensionless headers.
Other editors (including viewer of github) are able to recognize that by scanning the first line of the header that embeds a - C++ - string in the comment.
Example: https://github.com/llvm-mirror/libcxx/blob/master/include/vector
Here are other examples of the first line of the extensionless files from several popular open source projects:
// -*- C++ -*-
or
//===- some description ---*- C++ -*-==//
Related issue on vscode
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by reproducing the behavior with an extensionless header, then review the related VS Code issue and the C/C++ extension's language-service handling for file types. Done means recognizing the shown first-line C++ markers and applying C++ syntax coloring without manual intervention.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100