According to https://marketplace.visualstudio.com/items?itemName=jinliming2.vscode-go-template, this VS Code extension should support Go template language syntax highlighting for any custom file extension (see screenshot below). What I can't seem to infer from that documentation, however, is how to specify custom file extensions to which syntax highlighting should apply. Does anyone know how to do that?
Asked
Active
Viewed 30 times
1 Answers
0
From How to make VS Code treat a file extensions as a certain language?, the way to do this is to go to "file associations" in settings and add (in my case) the key-value pair *tmpl
: go-template
.
Now files with the .tmpl
file extensions are highlighted as Go template language:

Kurt Peek
- 52,165
- 91
- 301
- 526