>_EMACS-ARB — ARB IN EMACS
Open a .arb file and the whole spec lights up. emacs-arb targets arb, a Tcl/Tk-flavored declarative language for visualizing and modifying Unix pipelines, on fusevm/JIT. arb-mode derives from prog-mode, font-locks arb keywords, the widgets, the query verbs, input sources, directives, dotted widget paths (.codes), -flags and /regex/ literals, indents brace blocks, runs the buffer through arb (C-c C-c), serves eldoc + completion for the verb corpus, and wires arb --lsp into both eglot and lsp-mode.
Install
The arb binary must be on $PATH to run buffers and for the language server (brew install menketechnologies/menketech/arblang).
;; manual (add-to-list 'load-path "/path/to/emacs-arb") (require 'arb-mode) ;; use-package + built-in VC (use-package arb-mode :mode "\\.arb\\'" :vc (:url "https://github.com/MenkeTechnologies/emacs-arb"))
Press C-c C-c to run a buffer. With eglot: M-x eglot in a .arb buffer, or (add-hook 'arb-mode-hook #'eglot-ensure).
What you get
Filetype detection
Every *.arb file uses arb-mode (auto-mode-alist); an arb shebang is detected via interpreter-mode-alist.
Spec-aware font-lock
Keywords, the widgets, the query verbs, input sources, directives, dotted widget paths, -flags, and /regex/ literals — with their own faces for widgets and widget paths.
Regex in operand position
A syntax-propertize rule recognizes /regex/ only where arb allows it (after (, ,, |, =, a keyword, line start), so division a / b is not mistaken for a regex.
Run via arb
arb-run-buffer (C-c C-c) runs the buffer's spec through arb FILE in a *compilation* buffer with next-error navigation.
eldoc + completion
One-line verb signatures in the echo area and completion-at-point over the query-verb names, from arb-stdlib.el.
Language server
Registers arb --lsp for eglot (built in since Emacs 29) and lsp-mode, both loaded lazily. Launched with --lsp only — no appended --stdio.
Verified
scripts/face-test.el byte-compiles the package and asserts the face at each probe token — proven to load and classify correctly.
Faces
| Token group | Face |
|---|---|
Keywords (fn var let if for match) | font-lock-keyword-face |
Widgets (text table gauge bars spark tail) | arb-widget-face |
Query verbs (field where map tally sort_by) | font-lock-builtin-face |
Widget paths (.codes .errors) | arb-widget-path-face |
Flags (-max -cols -label) | arb-flag-face |
Strings / comments / /regex/ | via syntax table + syntax-propertize |
Run, language server & config
| Setting / command | Effect |
|---|---|
arb-executable | "arb" — path to the executable used to run buffers and start the server |
arb-indent-offset | 4 — spaces per indent level |
C-c C-c (arb-run-buffer) | run the buffer's spec through arb FILE via compile |
M-x eglot | start the server via eglot (Emacs 29+) |
M-x lsp | start the server via lsp-mode |
Compatibility
| Target | Status |
|---|---|
| Emacs 27.1+ | Mode + font-lock + indent + run + eldoc + completion |
| eglot | Built in since Emacs 29; works on 27/28 if installed |
| lsp-mode | Registered client |
| Syntax highlighting | No binary required |