Reputation: 867
What I want to do is tell Visual Studio Code to associate all files containing the word "Dockerfile" in their filename with the Dockerfile language to get the syntax highlighting. According to this site the language is just called "Dockerfile", so I added the following entry to settings.json:
"files.associations": {
"*Dockerfile*": "Dockerfile"
}
But all that happened was that now even the standard Dockerfiles are no longer associated with their respective language. What am I doing wrong?
Upvotes: 4
Views: 540
Reputation: 1025
The language identifier for Dockerfile is a lower-case dockerfile
as stated on https://code.visualstudio.com/docs/languages/identifiers. Hence, you need to adjust your snippet as follows:
"files.associations": {
"*Dockerfile*": "dockerfile"
}
Upvotes: 4