Skip to content

Add Power Query (M) language support#7896

Open
jacob-kraniak wants to merge 7 commits intogithub-linguist:mainfrom
jacob-kraniak:patch-1
Open

Add Power Query (M) language support#7896
jacob-kraniak wants to merge 7 commits intogithub-linguist:mainfrom
jacob-kraniak:patch-1

Conversation

@jacob-kraniak
Copy link
Copy Markdown

@jacob-kraniak jacob-kraniak commented Apr 4, 2026

Description

This pull request adds support for the Power Query (M) language (also known as Power Query Formula Language).

  • Added language definition in lib/linguist/languages.yml
  • Registered the official syntax highlighting grammar
  • Included representative real-world sample files

This implements the addition discussed and approved in issue #7856.

Checklist:

  • I am adding a new language.
    • The extension of the new language is used in hundreds of repositories on GitHub.com.
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
      • Sample license(s):
        MIT License. The source repository is licensed under MIT, and the extracted sample files are released under the same terms that cover the Linguist project.
    • I have included a syntax highlighting grammar: https://github.com/microsoft/powerquery-language
    • I have added a color
      • Hex value: #d38e0d
      • Rationale: Gold tone inspired by Power BI / Power Query branding. Provides strong contrast in both light and dark GitHub themes and is consistent with other Microsoft data languages.
    • I have updated the heuristics to distinguish my language from others using the same extension.
      (Not required — .pq and .pqm show low conflict risk with other languages.)

@jacob-kraniak jacob-kraniak marked this pull request as ready for review April 4, 2026 20:25
@jacob-kraniak jacob-kraniak requested a review from a team as a code owner April 4, 2026 20:25
Comment thread lib/linguist/languages.yml Outdated
Comment thread lib/linguist/languages.yml Outdated
Copy link
Copy Markdown
Contributor

@DecimalTurn DecimalTurn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just 2 comments.

Removed alias 'power query m' and extension '.pqm' for Power Query.

applied recommended changes.
@DecimalTurn
Copy link
Copy Markdown
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants