microsoft / microsoft/vscode-powerquery
[BUG] Format document command does not produce expected formatting of document
@JordanBoltonMN is already working on this.
Since Sep 11, 2026.
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 25
- Avg merge
- 8d 22h
- Merged PRs (30d)
- 2
Description
Expected behavior
Based on Code formatting section of the Extension details, the extension is expected to insert newlines in a simple one-line let statement.
Actual behavior
On Mac, with latest VSC and extension version, no formatting is applied as far as I can tell.
To Reproduce
Use query similar to docs, in a *.pq file:
let x = Foo(1,{2}) in x
Expect:
let
x = Foo(1,{2})
in
x
Actually get:
let x = Foo(1, {2}) in x
Additional context
I suspected a clash of extension settings with other formatters, but could not diagnose one. I checked whether this extension is actually associated with *.pq files on my setup. This appears to be case as the language hints work as expected.
Snippet of workspace settings.json:
"[powerquery]": {
"editor.defaultFormatter": "PowerQuery.vscode-powerquery"
},
I partially verified the above is actually being propagated through by changing it temporarily to Prettier (esbenp.prettier-vscode)
and then re-attempting the format operation: this generated an error (as expected) from Prettier saying it was not able to format Power Query files. When I restored original setting continued to fail as described above.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.