
How to associate files with a specific extension to a language in VSCode
2024年5月4日 • ☕️ 1 min read
When editing shell template files for chezmoi in VSCode, I will introduce a method to associate files with the extension .sh.tmpl with shellscript.
Configuration Steps
- Open
Preferences: User Settings(JSON)
Press Command + Shift + P and select Preferences: Open User Settings (JSON).
- Add a configuration to associate
*.sh.tmplfiles with shellscript in the opened JSON file.
"files.associations": {
"*.sh.tmpl": "shellscript"
}
With these steps, files with the .sh.tmpl extension will be treated as shellscript.

Blog part of ThunderMiracle.com
Comments load when in view