How can I configure github.com/jinliming2/vscode-go-template to accept custom file extensions?

PHPz
Release: 2024-02-06 08:42:11
forward
1358 people have browsed it

如何配置 github.com/jinliming2/vscode-go-template 以接受自定义文件扩展名?

Question content

According to https://marketplace.visualstudio.com/items?itemName=jinliming2.vscode-go-template, this VS Code extension Go template language syntax highlighting for any custom file extension should be supported (see screenshot below). However, I can't seem to deduce from that documentation how to specify a custom file extension to which syntax highlighting should be applied. Does anyone know how to do this?


Correct answer


FromHow to make VS Code treat file extensions as a language? by going to "File Associations" in settings and adding (in my case) the key-value pair *tmpl: go-template.

Files with the .tmpl file extension will now be highlighted as Go Template Language:

The above is the detailed content of How can I configure github.com/jinliming2/vscode-go-template to accept custom file extensions?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:stackoverflow.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!