Skip to content

VS Code extension to add syntax hightlighting for Go template files

License

Notifications You must be signed in to change notification settings

romantomjak/vscode-go-template

Repository files navigation

Go template syntax highlighting

VS Code extension to add syntax highlighting for Go template files.

Features

  • Multiple supported file extensions - *.tmpl, *.gohtml and *.tpl
  • Support for Go templates in string literals
  • HTML, JavaScript and CSS tag syntax highlighting
  • Syntax highlighting in HTML attributes - href="{{ .Link }}", style="width: {{ .Width }}%"

screenshot

Known issues

  • Syntax highlighting does not (yet) work in <script> and <style> HTML elements

Contributing

If you are interested in fixing a bug or contributing a feature, please file an issue first. Wait for a project maintainer to respond before you spend time coding. If you have any other ideas or suggestions, just open an issue and share your thoughts.

If you wish to work on an existing issue, please leave a comment saying so, as someone may already be working on it.

Development

  • Press F5 to open a new window with the extension loaded
  • Create a new file with a file name suffix matching the language
  • Verify that syntax highlighting works and that the language configuration settings are working
  • Reload (Ctrl+R or Cmd+R on Mac) the VS Code window with your extension to load your changes

Publishing

  • update changelog.md
  • vsce login
  • vsce publish <minor|patch>

License

MIT

About

VS Code extension to add syntax hightlighting for Go template files

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published