// VSCODE-ARB — VS CODE SUPPORT FOR THE ARB LANGUAGE

filetype detection (*.arb) · standalone TextMate grammar (source.arb) · LSP via arb --lsp · DAP via arb --dap

settings arb.path / arb.lsp.enabled / arb.lsp.args · run arb: Run File (Ctrl+F5) · debug F5

Report GitHub
// Color scheme

>_VSCODE-ARB — ARB IN VS CODE

Open a .arb file and the whole spec lights up. arb is a Tcl/Tk-flavored declarative language for visualizing and modifying Unix pipelines: pipe a stream in and arb spawns a ratatui TUI or a served web page from a small spec — a jq/xpath/css/yq superset, on fusevm/JIT. vscode-arb registers the arb language for *.arb files, highlights with a standalone TextMate grammar (source.arb) covering widgets, the query verbs, input sources, directives, /.../ regex literals, dotted widget paths, and -flags, starts the arb --lsp language server via vscode-languageclient, and debugs the stream through arb --dap.

Install

The arb binary must be on $PATH for the language server and debugging (brew install menketechnologies/menketech/arblang). Build and install the .vsix locally:

git clone https://github.com/MenkeTechnologies/vscode-arb
cd vscode-arb
npm install
npx @vscode/vsce package          # vscode-arb-<version>.vsix
code --install-extension vscode-arb-*.vsix

Or clone straight into your extensions dir for development: ~/.vscode/extensions/vscode-arb.

What you get

Filetype detection

Every *.arb file becomes the arb language, so a spec highlights and talks to the language server the moment it opens.

Standalone grammar

A TextMate grammar (source.arb) — widgets, the query verbs, input sources, directives, keywords, dotted widget paths, -flags, /regex/, strings, durations/sizes, numbers, operators.

Language server

Launches arb --lsp (stdio JSON-RPC) through vscode-languageclient — diagnostics, hover, and completion over the verb / widget / directive corpus.

Run

arb: Run File (Ctrl+F5 / editor-title ▶) saves and runs the active spec as arb <file> in an integrated terminal.

Debugging

Step the stream, set regex breakpoints, inspect the live pipeline state, and run-without-debugging via the native debug adapter (arb --dap).

Verified

A vscode-textmate + vscode-oniguruma test tokenizes a sample spec and asserts the scopes, so the grammar is proven to load and classify correctly.

A spec at a glance

# http-status — status-code distribution + live 5xx count from logfmt lines
bars  .codes  -label "status codes"
gauge .errors -max 50 -label "5xx count"
tail  .raw
source .codes  { in.logfmt | field code | tally }
source .errors { in.logfmt | field code | match /^5/ | count }
source .raw    { in }

Pipe a log into it — tail -f access.logfmt | arb http-status.arb — and arb draws the dashboard, live.

Scopes

Token groupScope
Widgets (text table gauge bars spark)support.class.widget.arb
Query verbs (field where map tally sort_by)support.function.arb
Input sources (in in.json in.csv in.logfmt)support.constant.source.arb
Directives (source bind grid out timeout)keyword.other.directive.arb
Control flow (if for while match return)keyword.control.arb
Declarations (fn var let import)storage.type.arb
Widget paths (.codes .errors.sel)variable.other.widget-path.arb
Flags (-label -max -cols -color)variable.parameter.flag.arb
Regex literals (/^5/ /err/i)string.regexp.arb
Pipe / bind / lambda (|> <- =>)keyword.operator.arb

Strings (single- and double-quoted with escapes), /.../ regex literals, numbers (integer / float / durations like 500ms / sizes like 4mb), comments (#), and the operator set are scoped too.

Language server settings

SettingDefault & effect
arb.patharb — path to the executable
arb.lsp.enabledtrue — start the server; set false for highlighting only
arb.lsp.args["--lsp"] — args to start the server

The transport is omitted so the client spawns bare arb --lsp and never appends --stdio. If the binary is missing, the extension shows one non-fatal warning and highlighting keeps working.

Compatibility

TargetStatus
VS Code 1.75+Grammar + LSP + DAP
VSCodium / OSS buildsSame extension
Syntax highlightingNo binary required
Language server & debugRequires arb on PATH