Skip to content

Conversation

@dmitrivMS
Copy link
Contributor

Fixes #85775

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

It would be possible to avoid themeing participant when bracket pair colorization is off, but I think the scenario with that setting enabled and foreground color being set is a valid one, hence this approach.

Copilot AI review requested due to automatic review settings December 17, 2025 11:17
@dmitrivMS dmitrivMS added the editor-bracket-matching Editor brace matching label Dec 17, 2025
@dmitrivMS dmitrivMS self-assigned this Dec 17, 2025
@dmitrivMS dmitrivMS requested a review from hediet December 17, 2025 11:17
@dmitrivMS dmitrivMS enabled auto-merge (squash) December 17, 2025 11:17
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 17, 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 editorBracketMatch.foreground color setting that allows users to customize the text color of matching brackets. The implementation involves registering a new theme color, updating CSS styling, and ensuring the color properly overrides bracket pair colorization when both features are enabled.

Key Changes

  • Added editorBracketMatch.foreground color registration (defaults to null for backward compatibility)
  • Changed bracket match decorations from className to inlineClassName to properly apply text color styling
  • Added theming participant with !important to ensure bracket match foreground overrides bracket pair colorization colors

Reviewed changes

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

File Description
src/vs/editor/common/core/editorColorRegistry.ts Registers new editorBracketMatch.foreground color with null default value and localized description
src/vs/editor/contrib/bracketMatching/browser/bracketMatching.ts Changes decoration options from className to inlineClassName and adds theming participant to apply foreground color with !important override
src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css Adds CSS variable for foreground color to bracket-match class
build/lib/stylelint/vscode-known-variables.json Adds new CSS variable to known variables list for stylelint validation

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.

Can editorBracketMatch.foreground theme colour be added please?

2 participants