Skip to content

A Visual Studio Code extension which adds syntax highlighting for Fastly Varnish Configuration Language (VCL) files.

License

Notifications You must be signed in to change notification settings

fastly/vscode-fastly-vcl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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]>