Syntax highlighting and editing support for FSON live in the ffs-lang-tools monorepo. It also covers FFS-MD, the in-house Markdown dialect used in FFS component content and blog posts.

Sub-projectProducesForPage
vscode-fsonTextMate grammar + language config + a canonical formatterVS CodeVS Code — FSON
vscode-ffsmdinjection grammar + conservative formatterVS CodeVS Code — FFS-MD
highlightjs-fsonhighlight.js language definitionthe web (<pre>, code blocks)highlight.js grammar
highlightjs-ffsmdhighlight.js language definitionthe webhighlight.js grammar

Where to get them

  • Visual Studio Marketplace — publisher Fedem. Search FSON or FFS-MD in the Extensions view, or code --install-extension Fedem.vscode-fson.
  • Packaged files — the .vsix files and the npm tarballs are on the Downloads page. Installing a downloaded .vsix is covered on Installing a .vsix.
  • npm — the highlight.js grammars publish as npm packages; see the highlight.js grammar page.

Single source of truth

Every grammar is derived from spec/ — the normative railroad grammar for FSON, the renderer header for FFS-MD — not from memory, and each is validated against a corpus of real files. When the FSON notation changes, the spec is re-copied and the grammars revised; the version only ever moves forward.