ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

AL

by SShadowS ST4

Sublime Text syntax highlighting for AL (Business Central)

Details

  • 1.0.3
  • github.​com
  • github.​com
  • 6 months ago
  • 47 minutes ago
  • 6 months ago

Installs

  • Total 28
  • Win 11
  • Mac 9
  • Linux 8
Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15
Windows 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 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 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 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 1 0 0 0 2 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.

Package Control License: MIT

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)

  1. Open Command Palette (Ctrl+Shift+P)
  2. Select Package Control: Install Package
  3. Search for AL and 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:

  1. Install LSP-AL via Package Control
  2. 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)