I've been recently learning cmake and I want to use the command configure_file
to generate .cpp
file because I need dynamic values created from cmake variables in my source files. However, it seems that VSCode doesn't recognize the extension .cpp.in
, therefore the editor doesn't show any autosuggestion or highlight. But VSCode still recognizes the extension .h.in
and shows perfectly autosuggestion and highlight. Can someone suggest a way to make VSCode to recognize the extension .cpp.in
? Thank a lot :)
Asked
Active
Viewed 559 times
1

Hoang Ho
- 13
- 4
1 Answers
2
You have to associate the extension with the language.
In Settings, search for Files:Associations. Select the Add Item Button and specify *.in
as key and cpp
as value. From now on all files with the extension .in
are associated with c++. I don't know if *.cpp.in
will work, you have to test that on your own.
More Info: Language Identifiers

Erdal Küçük
- 4,810
- 1
- 6
- 11