Skip to content

Latest commit

 

History

History
88 lines (50 loc) · 2.88 KB

README.md

File metadata and controls

88 lines (50 loc) · 2.88 KB

Fastly Varnish Configuration Language (VCL) Support for Visual Studio Code

.vcl icon

A Visual Studio Code extension that adds syntax highlighting, code completion, snippets, documentation and linter diagnostics for Fastly Varnish Configuration Language (VCL) files.

This extension is based on the public Fastly VCL reference.

Dark and light screenshots

Features

Syntax highlighting

The screenshots above are of VCL boilerplate using the GitHub Dark Default theme and the JetBrains Mono font and using Visual Studio Code's default Light+ theme and the Cascadia Code font.

Diagnostics (with falco)

Diagnostics

Contextual completions

Completions include:

  • VCL functions
  • VCL variables
  • HTTP headers
  • Subroutine snippets
  • Fastly macros

Completions

Signature help

Signature help

Documentation on hover

Hover

Installation

From Marketplace

The extension is in the Visual Studio Code Marketplace. To install in Visual Studio Code, switch to the Extensions View and search for “Fastly”. Select the “Fastly Varnish Configuration Language (VCL)” extension and use the Install button. The extension will syntax highlight code for any file with a .vcl extension.

From GitHub

Alternatively, to install the extension from GitHub:

Uninstall (or disable) any previously-enabled VCL extensions.

Download the latest GitHub release and then run:

code --install-extension vscode-fastly-vcl-2.0.2.vsix

Requirements

NodeJS LTS.

Extension Settings

  • fastly.vcl.lintingEnabled (default: true) – Enables linter diagnostics.
  • fastly.vcl.maxLintingIssues (default: 100) - Specifies the maximum number of linting issues that the server will return.

Known Issues

Use our GitHub issues to report a problem or request a feature.

TODO

  • Syntax highlight VCL embedded into Markdown documents.
  • Syntax highlight regular expressions.

Contributors

Special thanks to all contributors:

Future

Is this useful? Let me know! Leon Brocard <[email protected]>