Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Highlight templates in F#New to Visual Studio Code? Get it now.
Highlight templates in F#

Highlight templates in F#

Alfonso Garcia-Caro

|
3,527 installs
| (5) | Free
Syntax highlighting for template strings in F#
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Syntax highlighting for template strings in F#

VS Code extension that highlights HTML/SVG/CSS/SQL/JS/Python F# triple quoted strings (interpolated or not) preceded by a function named html/svg/css/sql/js/python.

html """<h1>Hello World!</h1>"""

You need to declare the functions by yourself in a module with RequireQualifiedAccess attribute. If you need to do some transformation, make the function accept FormattableString:

let sql (s: FormattableString) = ...

If you just want to trigger highlighting, use an identity function:

let css (s: string) = s

The extension will also accept functions ending with _html/_sql/etc.

For HTML/CSS/JS templates, the extension will forward completion and hover requests to the built-in language providers in VS Code.

Example

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft