0

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?

enter image description here

rioV8
  • 24,506
  • 3
  • 32
  • 49
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526

1 Answers1

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.

enter image description here

Now files with the .tmpl file extensions are highlighted as Go template language:

enter image description here

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