Reputation: 3293
I have two folders on my computer
/home/zee/projects/c/
/home/zee/projects/cpp/
the c folder has my C projects obviously, and then the cpp folder has my C++ projects. I want visual studio code to treat files with the .h
extension as C headers if they are in a directory inside the c folder but also treat files with that extension inside the cpp folder as C++ headers. Is this possible?
Upvotes: 1
Views: 578
Reputation: 28623
they are most likely in different workspaces.
You can change the files.associations
setting per workspace
https://code.visualstudio.com/docs/languages/overview#_adding-a-file-extension-to-a-language https://code.visualstudio.com/docs/languages/overview#_can-i-map-additional-file-extensions-to-a-language
Upvotes: 1