Skip to content

Add Power Query (M) language support#7896

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

Add Power Query (M) language support#7896
jacob-kraniak wants to merge 10 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

@jacob-kraniak
Copy link
Copy Markdown
Author

@DecimalTurn, is anything else pending from my side before merge approval?

@sabicammar73-create
Copy link
Copy Markdown

sabicammar73-create commented Apr 20, 2026 via email

@DecimalTurn
Copy link
Copy Markdown
Contributor

@jacob-kraniak, it looks OK from my end, but I'm a regular "contributor", so I can't formally approve the PR. Only a maintainer can.

I'm sure one will review your PR in time for the next release, but there's no rush since the next release won't be until june at least.

@jacob-kraniak
Copy link
Copy Markdown
Author

@jacob-kraniak, it looks OK from my end, but I'm a regular "contributor", so I can't formally approve the PR. Only a maintainer can.

I'm sure one will review your PR in time for the next release, but there's no rush since the next release won't be until june at least.

ah, I misunderstood. I had thought you were an approver. I am still fairly new to Github!

@DecimalTurn
Copy link
Copy Markdown
Contributor

Now that the tests have run, I can see that the folder containing the samples need to have a space between "Power" and "Query".

Copy link
Copy Markdown
Author

@jacob-kraniak jacob-kraniak left a comment

Choose a reason for hiding this comment

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

should be good to merge now

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.

4 participants