AL
Sublime Text syntax highlighting for AL (Business Central)
Labels language syntax
Details
Installs
- Total 1
- Win 1
- Mac 0
- Linux 0
| Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
AL for Sublime Text
Syntax highlighting, completions, and symbol indexing for the AL programming language used in Microsoft Dynamics 365 Business Central.
Overview
| Metric | Value |
|---|---|
| Syntax rules | 409 lines, 90 scopes |
| Completions | 228 keyword/type completions |
| File types | .al, .dal |
| Sublime version | 4 (syntax v2) |
| Tests | syntax_test_al.al |
Features
| Feature | Details |
|---|---|
| Syntax highlighting | Full context-aware scoping for all AL constructs |
| Object declarations | codeunit, table, page, report, enum, etc. with ID and name |
| Procedures and triggers | Parameter types, return types, access modifiers |
| Attributes | [Scope('OnPrem')], [NonDebuggable], [EventSubscriber] |
| Preprocessor | #if, #else, #endif, #pragma with condition highlighting |
| Strings | Single-quoted 'text' and verbatim @'multiline' |
| AL-specific literals | Date (0D), time (0T), datetime (0DT), biginteger (1000L) |
| Keyword completions | All AL keywords and built-in types |
| Symbol indexing | Jump to procedures/triggers with Ctrl+R |
| Comment toggling | Line (Ctrl+/) and block (Ctrl+Shift+/) |
| Indentation | Automatic begin/end block indentation |
Installation
Package Control (recommended)
- Open Command Palette (
Ctrl+Shift+P) - Select
Package Control: Install Package - Search for
ALand install
Manual
cd "%APPDATA%/Sublime Text/Packages"
git clone https://github.com/SShadowS/sublime-al.git AL
LSP Support
For full language intelligence (go-to-definition, hover, diagnostics, call hierarchy, code lens), install LSP-AL:
- Install
LSP-ALvia Package Control - The AL Language Server is downloaded automatically — no VS Code required
Key Files
| File | Purpose |
|---|---|
AL.sublime-syntax |
Syntax definition (context-aware, v2 format) |
AL.sublime-completions |
228 keyword and type completions |
AL.tmPreferences |
Comment toggling and indentation rules |
AL.sublime-settings |
Default editor settings for AL files |
tests/syntax_test_al.al |
Syntax highlighting test suite |
Regenerating Completions
If the AL language adds new keywords, regenerate completions from the tree-sitter-al grammar:
node scripts/generate-completions.js /path/to/tree-sitter-al/grammar.js
Author: Torben Leth (sshadows@sshadows.dk) License: MIT (see LICENSE)