VS Code Extensions
COSY Infinity

COSY Infinity

by AoLiu

Syntax highlighting for beam dynamics simulation and analysis code COSY INFINITY.

Downloads

1

Rating

(0)

Version

0.0.4

Last updated

Jul 20, 2026

VS Code Language Extension for COSY INFINITY

Syntax highlighting and editor configuration for COSYScript (.fox) files.

Written by Ao Liu, ShanghaiTech University. Contact: [email protected]

COSY INFINITY is an arbitrary-order beam-dynamics simulation and analysis code. It supports accelerator lattices, spectrographs, beamlines, electron microscopes, and other charged-particle optical systems. More information is available from the official COSY INFINITY website.

Features

  • .fox file association and COSY language mode
  • COSY keywords, declarations, intrinsics, beam-physics procedures, operators, and numeric literals
  • Single-quoted strings with doubled-quote escapes
  • Nested { ... } block comments
  • Bracket matching, automatic closing, and selection surrounding

Install from a VSIX

  1. Download the latest cosy-*.vsix release artifact.
  2. In VS Code, run Extensions: Install from VSIX… from the Command Palette.
  3. Open a .fox file and confirm the language indicator shows COSY.

Development

npm ci
npm test
npm run package

npm test runs TextMate scope regressions for COSY strings, comparison operators, real-number formats, and comments. npm run package creates the Marketplace-ready cosy-<version>.vsix archive.

The extension is declarative and contains no executable extension-host code.

Icon attribution

The extension icon is adapted from Lorenz attractor yb.svg by Wikimol and Dschwen, via Wikimedia Commons, licensed under CC BY-SA 3.0.

Related extensions