File viewer does not syntax-highlight Terraform (.tf) files
What happened
In the Claude Code app's built-in File viewer, opening a .tf file renders it as plain monospace text with no syntax highlighting. Other languages (Python, YAML, TypeScript) highlight correctly.
Detail / likely cause
The bundled syntax highlighter already includes an HCL/Terraform grammar — terraform and hcl both appear in the language registry (confirmed in the claude binary, v2.1.197). The same Terraform content highlights fine inside a fenced `hcl code block in chat. It appears the File viewer simply isn't mapping the .tf (and likely .tfvars) file extension to the existing HCL grammar, so it falls back to plaintext.
Suggested fix
Associate the .tf / .tfvars extensions with the bundled HCL/Terraform grammar in the file viewer's extension→language resolver.
Environment
Claude Code app, claude v2.1.197 (macOS, arm64).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗