Skip to content

Add Power Query (M) language support#7896

Merged
lildude merged 13 commits into
github-linguist:mainfrom
jacob-kraniak:patch-1
Jun 6, 2026
Merged

Add Power Query (M) language support#7896
lildude merged 13 commits into
github-linguist:mainfrom
jacob-kraniak:patch-1

Conversation

@jacob-kraniak
Copy link
Copy Markdown
Contributor

@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
Contributor 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
Contributor 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
Contributor 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

Copy link
Copy Markdown
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

The test failure is because you've put samples/PowerQuery/q_MxToolboxScore_SOAR3.pq in the wrong directory. It needs to be in samples/Power Query/

@DecimalTurn
Copy link
Copy Markdown
Contributor

@lildude did OP give you edit permission? If it's only a missing space, the best would probably be to add it directly to avoid missing the release.

@jacob-kraniak jacob-kraniak requested a review from lildude June 5, 2026 22:47
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed parent folder by adding a space

@lildude lildude enabled auto-merge June 6, 2026 07:42
@lildude lildude added this pull request to the merge queue Jun 6, 2026
Merged via the queue into github-linguist:main with commit 6a1b5b4 Jun 6, 2026
5 checks passed
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