Reputation: 87
I have a project with two separate docker files.
VSCode can recognize the first file as a docker file, but not so much luck with the second one. There is no syntax highlighting, and the file hasn't got the docker icon.
Is there any workaround like in vim:
autocmd BufNewFile,BufRead Dockerfile.* set filetype=dockerfile
Can I have some kind of association between Dockerfile.dev and Dockerfile to trick VSCode that Dockerfile.dev is a Docker file.
Upvotes: 2
Views: 2137
Reputation: 531
CMD + Shift + P (CTRL + Shift + P for Linux/Windows) then type > Change Language Mode, press Enter, "Configure File Association for '.dev'..." and select Docker. Done!
Upvotes: 5