Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 1.52 KB

README.md

File metadata and controls

22 lines (13 loc) · 1.52 KB

Button Card Javascript Syntax Highlighting in VSCode

release license

This is a very niche extension for Visual Studio Code which provides syntax highlighting of Javascript code blocks in YAML which are enclosed by triple square brackets ([[[ ... ]]]). Used when configuring the advanced javascript templates properties of Button-Card cards for Home Assistant Lovelace dashboards.

  • Syntax highlighting provided using built-in Javascript grammar
  • "Double quoted" and block YAML strings supported
  • Works with the standard YAML language and the home-assistant YAML language created by the Home Assistant Config Helper plugin.

I made this while I was working on Creative Button Card Templates and could not handle writing any more JS without syntax highlighting. Hopefully it gives someone else the same relief it gave me.

Installation

Preview

VSCode BC JS Example

The preview above is using the OneDark Pro theme, however this plugin will work with any theme that supports yaml and javascript.