Skip to content

Getting Started

Syntax highlighting and score preview

ABCLS is a language server and CLI for ABC music notation. It provides syntax highlighting, structural editing via selectors and transforms, transposition, harmonization, preview, and playback.

ABC notation is a markup format that allows you to go from this:

X:1
ABCD |

to this:

ABC notation rendered as a score

ABC notation was created by celtic folk musician Chris Walsham. Its most popular rendering library for the browser was created by Paul Rosen, and its vscode extension, which this project partially vendors, by Alen Siljak.

  • Node.js >= 22.x

Search for “abcls” in the Extensions marketplace, or install from the command line:

Terminal window
code --install-extension antoinebalaine.abcls

Open any .abc file to activate the extension.

Install the Kakoune plugin globally:

Terminal window
npm install -g abcls-kak

Run the install helper to configure your kakrc:

Terminal window
abcls-kak-install

Alternatively, add the following line to your kakrc manually:

source <path-to-global-node-modules>/abcls-kak/rc/abc.kak

The Kakoune plugin requires kak-lsp to be installed and configured.

Installation for other editors (Neovim, Emacs, Helix, etc.)

Section titled “Installation for other editors (Neovim, Emacs, Helix, etc.)”

Other editors are not supported at the moment, but the project’s language server can still be used with them since it implements the language server protocol.

Install the CLI and language server globally:

Terminal window
npm install -g abcls

Configure your editor’s LSP client to use the following server command:

abcls lsp --stdio

Use the following settings:

  • Language ID: abc
  • File extensions: .abc, .abcx

Open a .abc file in your editor and check that syntax highlighting is active. Try running a transform (e.g. transposition) or format the file from the CLI:

Terminal window
abcls format myfile.abc