我真的不明白提供具有其他功能的圖形主題的意義,例如但不限于著色括號,根本不關心您正在使用的主題。
我通常使用深色主題,但是,根據我作業的房間和一天中的時間,我需要切換到淺色主題。當我切換到淺色主題時,我看不到一些黃色的括號。使用最暗的淺色主題之一,我得到了這個:

我已經檢查了我擁有的所有設定:我看到它已啟用。我沒有使用擴展,我認為這是一個內置的 VSC 功能。

但是,我無法禁用它:
- 我沒有在任何 settings.json 檔案(用戶、作業區、遠程等)中找到特定設定
- 我無法在 GUI 中禁用它
有什么建議?
uj5u.com熱心網友回復:
你的問題不是你的主題
因此,首先,通過查看您發布的螢屏截圖,不是您為括號著色的主題,而是您當前配置 VS Code 的方式。首先,我將解決使每個塊級別的括號具有不同顏色的配置。
還有兩個其他“來源”會影響括號對的著色和突出顯示。我還將進一步解決這些問題。
括號對著色
上面, 我已經包含了與名為. “括號對著色”是一項較新的功能,因為它是在 2021 年 9 月bracketPairColorization才添加的。自發布以來,它已經更新了幾次,因為它的初始版本報告了幾個錯誤。此功能是負責為括號著色的功能。它的作業方式是為不同的括號對著色不同的顏色。每個塊級別的顏色與其下方的塊級別和其上方的塊級別不同。
配置括號對著色:
BrackPairColorization功能由一些設定配置。了解哪些設定會影響括號的著色和突出顯示非常重要,這樣您才能獲得所需的結果。獲得您正在尋找的結果(關閉著色)的最直接方法是禁用該功能。要禁用BracketPairColorization,請參閱下面的代碼段。
_NOTE:應該注意,還有 4 個其他設定與括號對顏色化密切相關,并且在配置括號對顏色化時也應始終考慮這些配置。
// @file "settings.json"
{
// Enables/Disables the coloring of the brackets themselves
"editor.bracketPairColorization.enabled": false,
// Enables/Disables the highlighting of the bracket-pair guides
"editor.guides.highlightActiveBracketPair": false,
"editor.guides.highlightActiveIndentation": false,
// Enables/Disables the Coloring of the bracket-pair guides.
"editor.guides.bracketPairs": false
"editor.guides.indentation": false,
}
以下屬性將允許您更改括號突出顯示的顏色。如果您更改這些設定,則在禁用括號對顏色之前,您將能夠根據自己的喜好自定義顏色。(你有一些選擇)
"workbench.colorCustomizations": {
// BRACKET PAIR HIGHLIGHT (Foreground)
"editorBracketHighlight.foreground1": "#9933FF",
"editorBracketHighlight.foreground2": "#1188FF",
"editorBracketHighlight.foreground3": "#9933FF",
"editorBracketHighlight.foreground4": "#1188FF",
"editorBracketHighlight.foreground5": "#9933FF",
"editorBracketHighlight.foreground6": "#1188FF",
"editorBracketHighlight.unexpectedBracket.foreground": "#FF4040",
// BRACKET PAIR GUIDE
"editorBracketPairGuide.activeBackground1": "#EE2288",
"editorBracketPairGuide.activeBackground2": "#EE2288",
"editorBracketPairGuide.activeBackground3": "#EE2288",
"editorBracketPairGuide.activeBackground4": "#EE2288",
"editorBracketPairGuide.activeBackground5": "#EE2288",
"editorBracketPairGuide.activeBackground6": "#EE2288",
"editorBracketPairGuide.background1": "#77CC33",
"editorBracketPairGuide.background2": "#77CC33",
"editorBracketPairGuide.background3": "#77CC33",
"editorBracketPairGuide.background4": "#77CC33",
"editorBracketPairGuide.background5": "#77CC33",
"editorBracketPairGuide.background6": "#77CC33"
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/454168.html
標籤:视觉工作室代码
