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

C/C++ .i header files taken as plain text #3567

Closed
david-cortes opened this issue Apr 30, 2019 · 4 comments
Closed

C/C++ .i header files taken as plain text #3567

david-cortes opened this issue Apr 30, 2019 · 4 comments
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Milestone

Comments

@david-cortes
Copy link

In C language, there's usually header files that end in .h, but these can be pre-processed by compilers such as gcc to produce a .i file which serves the same purpose, but has already underwent macro text substitutions, and can also be included with #include "file.i".

These are currently not recognized as C header files in vscode with the C/C++ extension.

(moved from microsoft/vscode#73089)

@sean-mcmanus
Copy link
Collaborator

Is adding "*.i": "c" to your files.associations setting sufficient?

@sean-mcmanus sean-mcmanus added Language Service more info needed The issue report is not actionable in its current state labels Apr 30, 2019
@david-cortes
Copy link
Author

Is adding "*.i": "c" to your files.associations setting sufficient?

That works, but I think it should be part of the default as .i (AFAIK) are not used in any other language, and are rather standard in C.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Apr 30, 2019

@david-cortes VS Code itself controls the out-of-box files.associations (i.e. the text colorization to use), not our C/C++ extension. However, there are features in our extension that uses those specific files.associations, so we could use this issue to track those other changes.

Also, ".ii", ".cp", ".c++", ".hp", ".h++", ".tcc" should be added treated as "C++" files according to the gcc docs at https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Overall-Options.html .

@sean-mcmanus sean-mcmanus added Feature Request quick fix and removed more info needed The issue report is not actionable in its current state labels Apr 30, 2019
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Sep 10, 2019
@sean-mcmanus sean-mcmanus added this to the 0.26.0 milestone Sep 10, 2019
@sean-mcmanus
Copy link
Collaborator

We have a fix pending for our internal handling of various extensions, but VS Code itself is treating "*.i" as "cpp" instead of "c" now.

sean-mcmanus added a commit that referenced this issue Sep 10, 2019
* Fix for #4211 and #3567: add handle file changed support. 
* Add back files.associations handling.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Projects
None yet
Development

No branches or pull requests

2 participants