← All projects

Project

More Languages for Adobe Brackets — Editor Syntax Plugin

I developed and published an Adobe Brackets plugin that registers existing CodeMirror modes for 19 additional languages and connects them to file extensions and comment shortcuts.

Code ↗ (opens in a new tab)

Explore the language registrations

My extension supplies the language registrations. CodeMirror 5.62.2 supplies the recorded highlighting, shown in this site’s colors. The browser displays the samples without running them.

temperature.ps1

The same source text appears in both views.

Plain text

# Convert Celsius to kelvin.
$celsius = 20
$kelvin = $celsius + 273.15
Write-Output $kelvin

Recorded highlighting

# Convert Celsius to kelvin.
$celsius = 20
$kelvin = $celsius + 273.15
Write-Output $kelvin

Language registration

SettingValue
LanguagePowerShell
CodeMirror modepowershell
File extensions.ps1
Line comment#
Block comment<# … #>

Adobe Brackets was a good editor with a narrow idea of which languages existed. Open a COBOL or Fortran or IDL file and you got a wall of uniform gray text. This plugin fixed that for nineteen languages it had left out.

Context

I was working across a wider spread of languages than a web-focused editor expected — scientific and legacy ones especially — and Brackets treated most as plain text. Rather than switch tools, I extended the one I liked and published the result.

The problem

Brackets is built on CodeMirror, which already knows how to highlight far more languages than Brackets exposed. The missing piece was the wiring: registering each language’s CodeMirror mode, mapping it to file extensions, and hooking it into the editor’s comment commands so the new languages behaved like first-class citizens.

Approach

The plugin registers CodeMirror modes for 19 languages Brackets didn’t ship — COBOL, Fortran, IDL, Julia, Lisp, Mathematica, R, Swift, and more — binding each to its file extensions so highlighting works on open, and wiring them into Brackets’ line- and block-comment shortcuts. Released under AGPL-3.0.

Outcome

It’s published on GitHub and makes Brackets usable for a much broader range of code than it shipped supporting. It’s the most-starred project on my GitHub.

Skills & tools