Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
76325786
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
76325786
编写于
2月 05, 2017
作者:
C
Chirag Bhatia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes #16424 - Added option to toggle matching brackets highlighter
上级
12992d3c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
2 deletion
+29
-2
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+6
-0
src/vs/editor/common/config/defaultConfig.ts
src/vs/editor/common/config/defaultConfig.ts
+1
-0
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+9
-0
src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts
.../editor/contrib/bracketMatching/common/bracketMatching.ts
+6
-2
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+6
-0
src/vs/platform/telemetry/common/telemetryUtils.ts
src/vs/platform/telemetry/common/telemetryUtils.ts
+1
-0
未找到文件。
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
76325786
...
...
@@ -301,6 +301,7 @@ class InternalEditorOptionsHelper {
selectionHighlight
:
toBoolean
(
opts
.
selectionHighlight
),
codeLens
:
opts
.
referenceInfos
&&
opts
.
codeLens
,
folding
:
toBoolean
(
opts
.
folding
),
highlightMatchingBrackets
:
toBoolean
(
opts
.
highlightMatchingBrackets
),
});
return
new
editorCommon
.
InternalEditorOptions
({
...
...
@@ -792,6 +793,11 @@ const editorConfiguration: IConfigurationNode = {
'
default
'
:
DefaultConfig
.
editor
.
folding
,
'
description
'
:
nls
.
localize
(
'
folding
'
,
"
Controls whether the editor has code folding enabled
"
)
},
'
editor.highlightMatchingBrackets
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
true
,
'
description
'
:
nls
.
localize
(
'
highlightMatchingBrackets
'
,
"
Highlight matching brackets when one of them is selected.
"
)
},
'
editor.glyphMargin
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
DefaultConfig
.
editor
.
glyphMargin
,
...
...
src/vs/editor/common/config/defaultConfig.ts
浏览文件 @
76325786
...
...
@@ -103,6 +103,7 @@ class ConfigClass implements IConfiguration {
renderIndentGuides
:
false
,
renderLineHighlight
:
'
line
'
,
useTabStops
:
true
,
highlightMatchingBrackets
:
true
,
fontFamily
:
(
platform
.
isMacintosh
?
DEFAULT_MAC_FONT_FAMILY
:
(
platform
.
isLinux
?
DEFAULT_LINUX_FONT_FAMILY
:
DEFAULT_WINDOWS_FONT_FAMILY
)
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
76325786
...
...
@@ -464,6 +464,11 @@ export interface IEditorOptions {
* Defaults to true in vscode and to false in monaco-editor.
*/
folding
?:
boolean
;
/**
* Enable to highlight matching brackets.
* Defaults to true.
*/
highlightMatchingBrackets
?:
boolean
;
/**
* Enable rendering of whitespace.
* Defaults to none.
...
...
@@ -913,6 +918,7 @@ export class EditorContribOptions {
readonly
selectionHighlight
:
boolean
;
readonly
codeLens
:
boolean
;
readonly
folding
:
boolean
;
readonly
highlightMatchingBrackets
:
boolean
;
/**
* @internal
...
...
@@ -939,6 +945,7 @@ export class EditorContribOptions {
selectionHighlight
:
boolean
;
codeLens
:
boolean
;
folding
:
boolean
;
highlightMatchingBrackets
:
boolean
;
})
{
this
.
selectionClipboard
=
Boolean
(
source
.
selectionClipboard
);
this
.
hover
=
Boolean
(
source
.
hover
);
...
...
@@ -961,6 +968,7 @@ export class EditorContribOptions {
this
.
selectionHighlight
=
Boolean
(
source
.
selectionHighlight
);
this
.
codeLens
=
Boolean
(
source
.
codeLens
);
this
.
folding
=
Boolean
(
source
.
folding
);
this
.
highlightMatchingBrackets
=
Boolean
(
source
.
highlightMatchingBrackets
);
}
/**
...
...
@@ -989,6 +997,7 @@ export class EditorContribOptions {
&&
this
.
selectionHighlight
===
other
.
selectionHighlight
&&
this
.
codeLens
===
other
.
codeLens
&&
this
.
folding
===
other
.
folding
&&
this
.
highlightMatchingBrackets
===
other
.
highlightMatchingBrackets
);
}
...
...
src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts
浏览文件 @
76325786
...
...
@@ -13,6 +13,7 @@ import { Position } from 'vs/editor/common/core/position';
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
editorAction
,
commonEditorContribution
,
ServicesAccessor
,
EditorAction
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
EditorContextKeys
=
editorCommon
.
EditorContextKeys
;
...
...
@@ -67,7 +68,10 @@ export class BracketMatchingController extends Disposable implements editorCommo
private
_decorations
:
string
[];
private
_updateBracketsSoon
:
RunOnceScheduler
;
constructor
(
editor
:
editorCommon
.
ICommonCodeEditor
)
{
constructor
(
editor
:
editorCommon
.
ICommonCodeEditor
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
)
{
super
();
this
.
_editor
=
editor
;
this
.
_lastBracketsData
=
[];
...
...
@@ -125,7 +129,7 @@ export class BracketMatchingController extends Disposable implements editorCommo
let
newDecorations
:
editorCommon
.
IModelDeltaDecoration
[]
=
[],
newDecorationsLen
=
0
;
for
(
let
i
=
0
,
len
=
this
.
_lastBracketsData
.
length
;
i
<
len
;
i
++
)
{
let
brackets
=
this
.
_lastBracketsData
[
i
].
brackets
;
if
(
brackets
)
{
if
(
this
.
configurationService
.
lookup
<
boolean
>
(
'
editor.highlightMatchingBrackets
'
).
value
&&
brackets
)
{
newDecorations
[
newDecorationsLen
++
]
=
{
range
:
brackets
[
0
],
options
:
BracketMatchingController
.
_DECORATION_OPTIONS
};
newDecorations
[
newDecorationsLen
++
]
=
{
range
:
brackets
[
1
],
options
:
BracketMatchingController
.
_DECORATION_OPTIONS
};
}
...
...
src/vs/monaco.d.ts
浏览文件 @
76325786
...
...
@@ -1381,6 +1381,11 @@ declare module monaco.editor {
* Defaults to true in vscode and to false in monaco-editor.
*/
folding
?:
boolean
;
/**
* Enable to highlight matching brackets
* Defaults to true
*/
highlightMatchingBrackets
?:
boolean
;
/**
* Enable rendering of whitespace.
* Defaults to none.
...
...
@@ -1563,6 +1568,7 @@ declare module monaco.editor {
readonly
selectionHighlight
:
boolean
;
readonly
codeLens
:
boolean
;
readonly
folding
:
boolean
;
readonly
highlightMatchingBrackets
:
boolean
;
}
/**
...
...
src/vs/platform/telemetry/common/telemetryUtils.ts
浏览文件 @
76325786
...
...
@@ -258,6 +258,7 @@ const configurationValueWhitelist = [
'
editor.hideCursorInOverviewRuler
'
,
'
editor.trimAutoWhitespace
'
,
'
editor.folding
'
,
'
editor.highlightMatchingBrackets
'
,
'
workbench.editor.enablePreviewFromQuickOpen
'
,
'
php.builtInCompletions.enable
'
,
'
php.validate.enable
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录