Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8a93c778
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8a93c778
编写于
2月 20, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename editor.highlightMatchingBrackets to editor.matchBrackets
上级
46c9a3cd
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
29 addition
and
16 deletion
+29
-16
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+4
-4
src/vs/editor/common/config/defaultConfig.ts
src/vs/editor/common/config/defaultConfig.ts
+1
-1
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+6
-6
src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts
.../editor/contrib/bracketMatching/common/bracketMatching.ts
+14
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+3
-3
src/vs/platform/telemetry/common/telemetryUtils.ts
src/vs/platform/telemetry/common/telemetryUtils.ts
+1
-1
未找到文件。
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
8a93c778
...
...
@@ -308,7 +308,7 @@ class InternalEditorOptionsHelper {
selectionHighlight
:
toBoolean
(
opts
.
selectionHighlight
),
codeLens
:
opts
.
referenceInfos
&&
opts
.
codeLens
,
folding
:
toBoolean
(
opts
.
folding
),
highlightMatchingBrackets
:
toBoolean
(
opts
.
highlightMatching
Brackets
),
matchBrackets
:
toBoolean
(
opts
.
match
Brackets
),
});
return
new
editorCommon
.
InternalEditorOptions
({
...
...
@@ -823,10 +823,10 @@ const editorConfiguration: IConfigurationNode = {
'
default
'
:
DefaultConfig
.
editor
.
folding
,
'
description
'
:
nls
.
localize
(
'
folding
'
,
"
Controls whether the editor has code folding enabled
"
)
},
'
editor.
highlightMatching
Brackets
'
:
{
'
editor.
match
Brackets
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
true
,
'
description
'
:
nls
.
localize
(
'
highlightMatching
Brackets
'
,
"
Highlight matching brackets when one of them is selected.
"
)
'
default
'
:
DefaultConfig
.
editor
.
matchBrackets
,
'
description
'
:
nls
.
localize
(
'
match
Brackets
'
,
"
Highlight matching brackets when one of them is selected.
"
)
},
'
editor.glyphMargin
'
:
{
'
type
'
:
'
boolean
'
,
...
...
src/vs/editor/common/config/defaultConfig.ts
浏览文件 @
8a93c778
...
...
@@ -106,7 +106,7 @@ class ConfigClass implements IConfiguration {
renderIndentGuides
:
false
,
renderLineHighlight
:
'
line
'
,
useTabStops
:
true
,
highlightMatching
Brackets
:
true
,
match
Brackets
:
true
,
fontFamily
:
(
platform
.
isMacintosh
?
DEFAULT_MAC_FONT_FAMILY
:
(
platform
.
isLinux
?
DEFAULT_LINUX_FONT_FAMILY
:
DEFAULT_WINDOWS_FONT_FAMILY
)
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
8a93c778
...
...
@@ -481,10 +481,10 @@ export interface IEditorOptions {
*/
folding
?:
boolean
;
/**
* Enable
to highlight
matching brackets.
* Enable
highlighting of
matching brackets.
* Defaults to true.
*/
highlightMatching
Brackets
?:
boolean
;
match
Brackets
?:
boolean
;
/**
* Enable rendering of whitespace.
* Defaults to none.
...
...
@@ -971,7 +971,7 @@ export class EditorContribOptions {
readonly
selectionHighlight
:
boolean
;
readonly
codeLens
:
boolean
;
readonly
folding
:
boolean
;
readonly
highlightMatching
Brackets
:
boolean
;
readonly
match
Brackets
:
boolean
;
/**
* @internal
...
...
@@ -998,7 +998,7 @@ export class EditorContribOptions {
selectionHighlight
:
boolean
;
codeLens
:
boolean
;
folding
:
boolean
;
highlightMatching
Brackets
:
boolean
;
match
Brackets
:
boolean
;
})
{
this
.
selectionClipboard
=
Boolean
(
source
.
selectionClipboard
);
this
.
hover
=
Boolean
(
source
.
hover
);
...
...
@@ -1021,7 +1021,7 @@ export class EditorContribOptions {
this
.
selectionHighlight
=
Boolean
(
source
.
selectionHighlight
);
this
.
codeLens
=
Boolean
(
source
.
codeLens
);
this
.
folding
=
Boolean
(
source
.
folding
);
this
.
highlightMatchingBrackets
=
Boolean
(
source
.
highlightMatching
Brackets
);
this
.
matchBrackets
=
Boolean
(
source
.
match
Brackets
);
}
/**
...
...
@@ -1050,7 +1050,7 @@ export class EditorContribOptions {
&&
this
.
selectionHighlight
===
other
.
selectionHighlight
&&
this
.
codeLens
===
other
.
codeLens
&&
this
.
folding
===
other
.
folding
&&
this
.
highlightMatchingBrackets
===
other
.
highlightMatching
Brackets
&&
this
.
matchBrackets
===
other
.
match
Brackets
);
}
...
...
src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts
浏览文件 @
8a93c778
...
...
@@ -67,6 +67,7 @@ export class BracketMatchingController extends Disposable implements editorCommo
private
_lastVersionId
:
number
;
private
_decorations
:
string
[];
private
_updateBracketsSoon
:
RunOnceScheduler
;
private
_matchBrackets
:
boolean
;
constructor
(
editor
:
editorCommon
.
ICommonCodeEditor
,
...
...
@@ -78,10 +79,19 @@ export class BracketMatchingController extends Disposable implements editorCommo
this
.
_lastVersionId
=
0
;
this
.
_decorations
=
[];
this
.
_updateBracketsSoon
=
this
.
_register
(
new
RunOnceScheduler
(()
=>
this
.
_updateBrackets
(),
50
));
this
.
_matchBrackets
=
this
.
_editor
.
getConfiguration
().
contribInfo
.
matchBrackets
;
this
.
_updateBracketsSoon
.
schedule
();
this
.
_register
(
editor
.
onDidChangeCursorPosition
((
e
)
=>
this
.
_updateBracketsSoon
.
schedule
()));
this
.
_register
(
editor
.
onDidChangeModel
((
e
)
=>
{
this
.
_decorations
=
[];
this
.
_updateBracketsSoon
.
schedule
();
}));
this
.
_register
(
editor
.
onDidChangeConfiguration
((
e
)
=>
{
this
.
_matchBrackets
=
this
.
_editor
.
getConfiguration
().
contribInfo
.
matchBrackets
;
if
(
!
this
.
_matchBrackets
&&
this
.
_decorations
.
length
>
0
)
{
// Remove existing decorations if bracket matching is off
this
.
_decorations
=
this
.
_editor
.
deltaDecorations
(
this
.
_decorations
,
[]);
}
this
.
_updateBracketsSoon
.
schedule
();
}));
}
public
getId
():
string
{
...
...
@@ -124,12 +134,15 @@ export class BracketMatchingController extends Disposable implements editorCommo
};
private
_updateBrackets
():
void
{
if
(
!
this
.
_matchBrackets
)
{
return
;
}
this
.
_recomputeBrackets
();
let
newDecorations
:
editorCommon
.
IModelDeltaDecoration
[]
=
[],
newDecorationsLen
=
0
;
for
(
let
i
=
0
,
len
=
this
.
_lastBracketsData
.
length
;
i
<
len
;
i
++
)
{
let
brackets
=
this
.
_lastBracketsData
[
i
].
brackets
;
if
(
this
.
configurationService
.
lookup
<
boolean
>
(
'
editor.highlightMatchingBrackets
'
).
value
&&
brackets
)
{
if
(
brackets
)
{
newDecorations
[
newDecorationsLen
++
]
=
{
range
:
brackets
[
0
],
options
:
BracketMatchingController
.
_DECORATION_OPTIONS
};
newDecorations
[
newDecorationsLen
++
]
=
{
range
:
brackets
[
1
],
options
:
BracketMatchingController
.
_DECORATION_OPTIONS
};
}
...
...
src/vs/monaco.d.ts
浏览文件 @
8a93c778
...
...
@@ -1397,10 +1397,10 @@ declare module monaco.editor {
*/
folding
?:
boolean
;
/**
* Enable
to highlight
matching brackets.
* Enable
highlighting of
matching brackets.
* Defaults to true.
*/
highlightMatching
Brackets
?:
boolean
;
match
Brackets
?:
boolean
;
/**
* Enable rendering of whitespace.
* Defaults to none.
...
...
@@ -1590,7 +1590,7 @@ declare module monaco.editor {
readonly
selectionHighlight
:
boolean
;
readonly
codeLens
:
boolean
;
readonly
folding
:
boolean
;
readonly
highlightMatching
Brackets
:
boolean
;
readonly
match
Brackets
:
boolean
;
}
/**
...
...
src/vs/platform/telemetry/common/telemetryUtils.ts
浏览文件 @
8a93c778
...
...
@@ -250,7 +250,7 @@ const configurationValueWhitelist = [
'
editor.hideCursorInOverviewRuler
'
,
'
editor.trimAutoWhitespace
'
,
'
editor.folding
'
,
'
editor.
highlightMatching
Brackets
'
,
'
editor.
match
Brackets
'
,
'
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录