Recommended VSCode Theme for Terraform

Morning all

Apologies if this has been asked before - I didnt see any results from a search.

Is there a recommended theme for terraform when using VScode or IntelliJ ?

Ive tried a few but I find they make the code harder to read.

Hoping theres other themes out there that might be easier on the eye :slight_smile:

Thanks in advance

Andy

Hi @andrewglass-bjss
As far as I know there is no HashiCorp-maintained theme for any editor, HCL or Terraform specific and there are currently no intentions to create one.

However, the grammars HashiCorp does maintain (GitHub - hashicorp/syntax: TextMate grammars for highlighting HCL, HCL-based languages and Sentinel.) should work reasonably well with the default themes in VS Code. Or at least I can say that care was taken to make it so.

I personally use GitHub Theme - Visual Studio Marketplace with success but of course that just reflects my own preference. Your mileage may vary.

Also what may be relevant to mention here for anyone thinking about developing Terraform specific themes is that there is some documentation and semantic tokens which can make this possible/easier:

This was implemented a while back (almost 2 years ago) and the relevant PR also has an example of what’s possible: Support custom semantic tokens & modifiers by radeksimko · Pull Request #958 · hashicorp/vscode-terraform · GitHub

FWIW The auto-switching of light/dark themes (where the OS theme in itself can be driven by time of day, or sunset/sunrise) is also helpful in alleviating some eye strain. Visual Studio Code Themes

"window.autoDetectColorScheme": true,

I assume that other IDEs may offer similar feature.