Skip to content

Declare support for TOML files - #1127

Merged
ntBre merged 1 commit into
mainfrom
brent/toml-support
Jul 31, 2026
Merged

Declare support for TOML files#1127
ntBre merged 1 commit into
mainfrom
brent/toml-support

Conversation

@ntBre

@ntBre ntBre commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Related to astral-sh/ruff#26862. I copied the Markdown changes from #950.

Closes astral-sh/ruff#27088.

Test Plan

Screenshot 2026-07-30 at 12 17 29

Summary
--

Related to astral-sh/ruff#26862. I copied the Markdown changes from #950.

Closes astral-sh/ruff#27088.

Test Plan
--

<!-- TODO screenshot of VS Code -->
Comment thread src/common/utilities.ts
{ scheme: "vscode-notebook-cell", language: "python" },
{ scheme: "file", language: "markdown" },
{ scheme: "untitled", language: "markdown" },
{ scheme: "file", pattern: "**/{pyproject.toml,ruff.toml,.ruff.toml}" },

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.

Codex says that this also registers Ruff as a TOML formatter but that fixing this is not simple and should be a follow-up. It also shouldn't prevent users from selecting/configuring an actual TOML formatter, it just shows Ruff as an additional option.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Sounds like the answer is yes, but Codex says that fix is back in ruff_server, not here. I'll see what that looks like.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, the fix is in ruff_server.

ntBre added a commit to astral-sh/ruff that referenced this pull request Jul 31, 2026
…27332)

Summary
--

Addresses
astral-sh/ruff-vscode#1127 (comment),
which would
otherwise expose Ruff as a TOML formatter in VS Code. Instead of
registering formatting and range
formatting capabilities statically, we now register them dynamically
only for Python, Markdown, and
notebook files, excluding TOML files.

We still fall back on static registration if dynamic registration is
unavailable.

Test Plan
--

New e2e tests
@ntBre
ntBre merged commit fa5f89b into main Jul 31, 2026
7 checks passed
@ntBre
ntBre deleted the brent/toml-support branch July 31, 2026 14:11
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.

errors reported inside pyproject.toml/ruff.toml are not reported in the language server

2 participants