Skip to content

Conversation

@dmitrivMS
Copy link
Contributor

@dmitrivMS dmitrivMS commented Dec 19, 2025

Fixes #85775

Added new color editorBracketMatch-foreground (defaults to null) and use it for matching brackets foreground color.

Round 2: using new and unique inlineClassName to avoid pushing outlining into the span (which was causing text jumping with previous attempt).

We can also probably close #284437

Copilot AI review requested due to automatic review settings December 19, 2025 21:59
@dmitrivMS dmitrivMS enabled auto-merge December 19, 2025 21:59
@dmitrivMS dmitrivMS self-assigned this Dec 19, 2025
@dmitrivMS dmitrivMS requested a review from hediet December 19, 2025 21:59
@dmitrivMS dmitrivMS added the editor-bracket-matching Editor brace matching label Dec 19, 2025
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new optional color setting editorBracketMatch.foreground that allows users to customize the foreground (text) color of matching brackets. The implementation uses a unique inlineClassName (bracket-match-inline) to apply the color styling, which avoids layout jumps that occurred in a previous attempt. The foreground color is set to override bracket pair colorization when defined.

Key Changes

  • New color setting editorBracketMatch.foreground defaults to null (optional)
  • Uses inlineClassName pattern to apply color without affecting layout
  • CSS rule with !important ensures bracket match color overrides bracket pair colorization

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/vs/editor/common/core/editorColorRegistry.ts Registers the new editorBracketMatch.foreground color with null default
src/vs/editor/contrib/bracketMatching/browser/bracketMatching.ts Adds inlineClassName to decoration options and implements theming participant to apply the foreground color with appropriate specificity
build/lib/stylelint/vscode-known-variables.json Adds CSS variable --vscode-editorBracketMatch-foreground to known variables list

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

Labels

editor-bracket-matching Editor brace matching

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Insiders: code font changes when selecting certain tokens Can editorBracketMatch.foreground theme colour be added please?

2 participants