BBEdit Language Assistant User Guide
The Language Assistant helps you create support for a programming language
that BBEdit doesn’t already know about. Given some basic information about the
language, it uses Apple’s on-device intelligence model to prepare a Language
Playground document with a working starting point – syntax coloring for
keywords, comments, strings, and numbers; basic folding; and, where possible,
function navigation – which you can then refine and install as a language
module.
The assistant creates a draft, not a finished product. Everything it produces
appears in the Language Playground, where you can see live coloring against
sample text, review any issues it found, adjust the rules, and export or
install the result exactly as you would for a playground you built by hand.
(See the Language Playground User Guide for the playground itself, and the
Declarative Language Modules User Guide for the module format.)
Requirements
The Language Assistant uses the on-device language model provided by macOS,
and is available when:
- you are running macOS 26 or later, on a Mac that supports Apple
Intelligence;
- Apple Intelligence is turned on in System Settings;
- the on-device model has finished downloading.
If these conditions aren’t met, the assistant’s commands are unavailable, and
you can still create and edit Language Playground documents by hand.
Everything the assistant does happens entirely on your Mac. The information
you provide is processed by the on-device model only; nothing is sent to any
server.
Creating an Assisted Playground
Choose “Language Playground with Assistant…” from the New submenu of the
File menu. (The command is enabled whenever the on-device model is
available; see Requirements above.) The assistant asks for:
- The language’s name. Required.
- A sample source file. Required, and the most important input: the
assistant accepts a fact only when your sample corroborates it – this is
what keeps a confidently wrong guess out of your draft – and the sample
becomes the playground’s preview text, so you immediately see the coloring
the draft produces. Choose a file that genuinely represents the language:
a few pages showing comments, strings, keywords, and a function or two
corroborate better than either a one-liner or a giant log.
- An excerpt from the language’s documentation (optional) – ideally the
section that lists the language’s keywords and describes its comment and
string syntax. With an excerpt, the assistant reads facts only from what
you pasted – the right choice for languages the model doesn’t know.
Without one, the model answers from its own knowledge of the named
language, still checked against your sample. A long excerpt is analyzed
in sections: keywords are gathered from all of it, but the description of
comments and strings is read from the beginning – so if you’re choosing
what to paste, lead with the part that describes the basic syntax, and
let the keyword lists follow.
Click Create, and after a few moments a new Language Playground document
opens containing the draft.
Other facts you know – filename extensions beyond the sample’s, string
escapes, block pairs the sample doesn’t exercise, language server settings –
go straight into the draft in the playground afterwards; every rule the
assistant creates is ordinary, editable playground content.
What You Get
A new Language Playground document containing the assistant’s draft:
- keyword coloring (from your list, the documentation, and/or the model’s own
knowledge of the language);
- comment, string, and number coloring;
- fold ranges for keyword-delimited blocks, and brace folding when your
sample uses braces;
- function navigation, when the language declares functions with a leading
keyword (such as
def, func, proc, or sub) or in the C family’s
“type name(arguments)” shape, which the assistant detects from your
sample;
- language server settings, if you provided them.
Review the draft in the playground: the sample text shows live coloring, the
Issues tab lists anything the assistant (or the validator) flagged, and every
rule is editable. If the assistant wasn’t given a four-character language
code, choose one before exporting – the playground will remind you.
What It Doesn’t Do
- Formatting and build/run. Language modules provide coloring,
navigation, and folding. Code formatting and build integration are
available separately through Unix scripting, text filters, and language
servers; see the BBEdit User Manual.
- Embedded and template languages. Languages that live inside another
document type (for example, HTML templating systems) are not currently
supported by the language module format, so the assistant cannot create
them.
- Column-oriented formats. Languages whose meaning depends on fixed
column positions can’t be described by this kind of language module.
- Perfection. The assistant’s draft is a starting point. It may miss
keywords, over-color, or under-fold; that’s what the playground’s editing
and preview tools are for.
Back to Technical Notes