Editing support for Asterisk extensions.conf dialplans.
Features
Priority numbers in the gutter — resolves and displays the actual priority for every exten/same line, including n and n(label) tokens.
Syntax highlighting — contexts, exten/same/include/ignorepat/switch statements, application calls, and comments, scoped to extensions.conf/extensions_*.conf files.
Variable colouring — ${VAR} variables and inherited vars get their own colours, with _VAR (inherited one level) and __VAR (inherited by all descendants) each distinguished from a plain variable.
Goto/Gosub navigation — hover over a Goto()/Gosub() call to see the resolved priority and line, click through to jump straight there. Matches Asterisk's extension pattern syntax (_X., _9NXXXXXX, etc.), not just literal extensions.
Find All References — right-click a priority or label line to find every Goto/Gosub call that jumps to it, across the workspace.
Diagnostics — flags duplicate priorities within an extension, unresolved Goto/Gosub targets, and unreachable code after an unconditional Goto/Hangup. Variable-based targets (e.g. Goto(ctx,${VAR},1)) are recognized as call-time-only and not flagged.
Document symbols / outline view — contexts and extensions/labels show up in the editor outline and breadcrumbs for quick navigation.
Troubleshooting
Syntax highlighting isn't showing up. This extension recognizes files named extensions.conf or extensions_*.conf automatically. If your dialplan lives under a different filename, add ;asterisk-dialplan as the very first line of the file — it'll be picked up and highlighted regardless of name.