Skip to content

Add MQL5 language extension#5326

Open
MichalBPL wants to merge 2 commits intozed-industries:mainfrom
MichalBPL:add-mql5
Open

Add MQL5 language extension#5326
MichalBPL wants to merge 2 commits intozed-industries:mainfrom
MichalBPL:add-mql5

Conversation

@MichalBPL
Copy link

Summary

Adds MQL5 (MetaQuotes Language 5) support for Zed. MQL5 is the programming language used to develop trading strategies (Expert Advisors), indicators, and scripts for the MetaTrader 5 platform.

What's included

  • Syntax highlighting — custom tree-sitter grammar extending C++ with MQL5 keywords (input, sinput, datetime, color), 400+ built-in functions, constants, and event handlers
  • Native language server (mql5-lsp) — Rust-based LSP providing:
    • Autocomplete (1400+ items, context-aware)
    • Go-to-definition (cross-file, including #include navigation)
    • Find all references and rename (scope-aware)
    • Hover info, signature help, inlay hints
    • Diagnostics (unresolved includes, duplicate definitions, unknown functions)
    • Color swatches for C'r,g,b' color literals and named colors
    • Auto-import, code formatting, semantic tokens
  • Smart editing — code folding, auto-indentation, vim text objects, document outline
  • File types.mq5, .mqh

Repository

https://github.com/MichalBPL/zed-mql5

License

MIT

MQL5 (MetaQuotes Language 5) support for Zed:
- Syntax highlighting via tree-sitter grammar (C++ base with MQL5 extensions)
- Native language server (mql5-lsp) with autocomplete, go-to-definition,
  find references, rename, hover, signature help, diagnostics, formatting
- Code folding, indentation, text objects, document outline
- Color swatches for MQL5 color literals

Repository: https://github.com/MichalBPL/zed-mql5
@cla-bot cla-bot bot added the cla-signed label Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant