github-linguist/linguist

Power Query (M)

Open

#7.856 geöffnet am 16. März 2026

Auf GitHub ansehen
 (5 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Ruby (5.166 Forks)batch import
Add LanguageGood First Issue

Repository-Metriken

Stars
 (13.466 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 102T 5h) (19 gemergte PRs in 30 T)

Beschreibung

Why this should be a language in Linguist

Power Query (M) is Microsoft’s functional data transformation language used in Power BI, Excel Power Query, Dataflows, and other tooling. It is a distinct language with its own syntax, keywords, operators, and evaluation model.

File extensions

Recommended (non-ambiguous):

  • .pq
  • .pqm

Notes on .m:

  • .m is heavily ambiguous on GitHub (multiple languages share it), so I am not requesting .m by default in the initial proposal. If maintainers prefer, .m support could be handled later via heuristics or limited contexts.

Existing TextMate grammar (for syntax highlighting)

Microsoft maintains an existing TextMate grammar for Power Query / M:

This grammar is actively maintained and intended for editor syntax highlighting consumption.

Proposed Linguist language entry (languages.yml draft)

Power Query:
  type: programming
  aliases:
    - powerquery
    - power-query
    - power query
    - power query m
    - m
  extensions:
    - ".pq"
    - ".pqm"
  tm_scope: source.powerquery
  ace_mode: text
  # color: "#??????"  # optional, can be chosen to match existing conventions

Contributor Guide