Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
b1ddc1ac
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,发现更多精彩内容 >>
提交
b1ddc1ac
编写于
8月 09, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add new setting editor.codeLens and deprecate the old editor.referenceInfos settings, #10238
上级
655efbc2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
15 deletion
+21
-15
src/vs/editor/browser/widget/diffEditorWidget.ts
src/vs/editor/browser/widget/diffEditorWidget.ts
+1
-1
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
-0
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+10
-5
src/vs/editor/contrib/codelens/browser/codelens.ts
src/vs/editor/contrib/codelens/browser/codelens.ts
+2
-2
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+3
-3
未找到文件。
src/vs/editor/browser/widget/diffEditorWidget.ts
浏览文件 @
b1ddc1ac
...
@@ -852,7 +852,7 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif
...
@@ -852,7 +852,7 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif
clonedOptions
.
scrollbar
=
clonedOptions
.
scrollbar
||
{};
clonedOptions
.
scrollbar
=
clonedOptions
.
scrollbar
||
{};
clonedOptions
.
scrollbar
.
vertical
=
'
visible
'
;
clonedOptions
.
scrollbar
.
vertical
=
'
visible
'
;
clonedOptions
.
folding
=
false
;
clonedOptions
.
folding
=
false
;
clonedOptions
.
referenceInfo
s
=
false
;
clonedOptions
.
codeLen
s
=
false
;
return
clonedOptions
;
return
clonedOptions
;
}
}
...
...
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
b1ddc1ac
...
@@ -265,7 +265,7 @@ class InternalEditorOptionsHelper {
...
@@ -265,7 +265,7 @@ class InternalEditorOptionsHelper {
tabCompletion
:
opts
.
tabCompletion
,
tabCompletion
:
opts
.
tabCompletion
,
wordBasedSuggestions
:
opts
.
wordBasedSuggestions
,
wordBasedSuggestions
:
opts
.
wordBasedSuggestions
,
selectionHighlight
:
toBoolean
(
opts
.
selectionHighlight
),
selectionHighlight
:
toBoolean
(
opts
.
selectionHighlight
),
referenceInfos
:
toBoolean
(
opts
.
referenceInfos
)
,
codeLens
:
opts
.
referenceInfos
&&
opts
.
codeLens
,
folding
:
toBoolean
(
opts
.
folding
),
folding
:
toBoolean
(
opts
.
folding
),
});
});
...
@@ -762,10 +762,10 @@ let editorConfiguration:IConfigurationNode = {
...
@@ -762,10 +762,10 @@ let editorConfiguration:IConfigurationNode = {
default
:
DefaultConfig
.
editor
.
renderIndentGuides
,
default
:
DefaultConfig
.
editor
.
renderIndentGuides
,
description
:
nls
.
localize
(
'
renderIndentGuides
'
,
"
Controls whether the editor should render indent guides
"
)
description
:
nls
.
localize
(
'
renderIndentGuides
'
,
"
Controls whether the editor should render indent guides
"
)
},
},
'
editor.
referenceInfo
s
'
:
{
'
editor.
codeLen
s
'
:
{
'
type
'
:
'
boolean
'
,
'
type
'
:
'
boolean
'
,
'
default
'
:
DefaultConfig
.
editor
.
referenceInfo
s
,
'
default
'
:
DefaultConfig
.
editor
.
codeLen
s
,
'
description
'
:
nls
.
localize
(
'
referenceInfos
'
,
"
Controls if the editor shows reference information for the modes that support it
"
)
'
description
'
:
nls
.
localize
(
'
codeLens
'
,
"
Controls if the editor shows code lenses
"
)
},
},
'
editor.folding
'
:
{
'
editor.folding
'
:
{
'
type
'
:
'
boolean
'
,
'
type
'
:
'
boolean
'
,
...
...
src/vs/editor/common/config/defaultConfig.ts
浏览文件 @
b1ddc1ac
...
@@ -87,6 +87,7 @@ class ConfigClass implements IConfiguration {
...
@@ -87,6 +87,7 @@ class ConfigClass implements IConfiguration {
tabCompletion
:
false
,
tabCompletion
:
false
,
wordBasedSuggestions
:
true
,
wordBasedSuggestions
:
true
,
selectionHighlight
:
true
,
selectionHighlight
:
true
,
codeLens
:
true
,
referenceInfos
:
true
,
referenceInfos
:
true
,
folding
:
true
,
folding
:
true
,
renderWhitespace
:
false
,
renderWhitespace
:
false
,
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
b1ddc1ac
...
@@ -408,9 +408,14 @@ export interface IEditorOptions {
...
@@ -408,9 +408,14 @@ export interface IEditorOptions {
*/
*/
selectionHighlight
?:
boolean
;
selectionHighlight
?:
boolean
;
/**
/**
* Show
reference infos (a.k.a. code lenses) for modes that support it
* Show
code lens
* Defaults to true.
* Defaults to true.
*/
*/
codeLens
?:
boolean
;
/**
* @deprecated - use codeLens instead
* @internal
*/
referenceInfos
?:
boolean
;
referenceInfos
?:
boolean
;
/**
/**
* Enable code folding
* Enable code folding
...
@@ -815,7 +820,7 @@ export class EditorContribOptions {
...
@@ -815,7 +820,7 @@ export class EditorContribOptions {
tabCompletion
:
boolean
;
tabCompletion
:
boolean
;
wordBasedSuggestions
:
boolean
;
wordBasedSuggestions
:
boolean
;
selectionHighlight
:
boolean
;
selectionHighlight
:
boolean
;
referenceInfo
s
:
boolean
;
codeLen
s
:
boolean
;
folding
:
boolean
;
folding
:
boolean
;
/**
/**
...
@@ -836,7 +841,7 @@ export class EditorContribOptions {
...
@@ -836,7 +841,7 @@ export class EditorContribOptions {
tabCompletion
:
boolean
;
tabCompletion
:
boolean
;
wordBasedSuggestions
:
boolean
;
wordBasedSuggestions
:
boolean
;
selectionHighlight
:
boolean
;
selectionHighlight
:
boolean
;
referenceInfo
s
:
boolean
;
codeLen
s
:
boolean
;
folding
:
boolean
;
folding
:
boolean
;
})
{
})
{
this
.
selectionClipboard
=
Boolean
(
source
.
selectionClipboard
);
this
.
selectionClipboard
=
Boolean
(
source
.
selectionClipboard
);
...
@@ -853,7 +858,7 @@ export class EditorContribOptions {
...
@@ -853,7 +858,7 @@ export class EditorContribOptions {
this
.
tabCompletion
=
source
.
tabCompletion
;
this
.
tabCompletion
=
source
.
tabCompletion
;
this
.
wordBasedSuggestions
=
source
.
wordBasedSuggestions
;
this
.
wordBasedSuggestions
=
source
.
wordBasedSuggestions
;
this
.
selectionHighlight
=
Boolean
(
source
.
selectionHighlight
);
this
.
selectionHighlight
=
Boolean
(
source
.
selectionHighlight
);
this
.
referenceInfos
=
Boolean
(
source
.
referenceInfo
s
);
this
.
codeLens
=
Boolean
(
source
.
codeLen
s
);
this
.
folding
=
Boolean
(
source
.
folding
);
this
.
folding
=
Boolean
(
source
.
folding
);
}
}
...
@@ -876,7 +881,7 @@ export class EditorContribOptions {
...
@@ -876,7 +881,7 @@ export class EditorContribOptions {
&&
this
.
tabCompletion
===
other
.
tabCompletion
&&
this
.
tabCompletion
===
other
.
tabCompletion
&&
this
.
wordBasedSuggestions
===
other
.
wordBasedSuggestions
&&
this
.
wordBasedSuggestions
===
other
.
wordBasedSuggestions
&&
this
.
selectionHighlight
===
other
.
selectionHighlight
&&
this
.
selectionHighlight
===
other
.
selectionHighlight
&&
this
.
referenceInfos
===
other
.
referenceInfo
s
&&
this
.
codeLens
===
other
.
codeLen
s
&&
this
.
folding
===
other
.
folding
&&
this
.
folding
===
other
.
folding
);
);
}
}
...
...
src/vs/editor/contrib/codelens/browser/codelens.ts
浏览文件 @
b1ddc1ac
...
@@ -354,7 +354,7 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
...
@@ -354,7 +354,7 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
@
ICommandService
private
_commandService
:
ICommandService
,
@
ICommandService
private
_commandService
:
ICommandService
,
@
IMessageService
private
_messageService
:
IMessageService
@
IMessageService
private
_messageService
:
IMessageService
)
{
)
{
this
.
_isEnabled
=
this
.
_editor
.
getConfiguration
().
contribInfo
.
referenceInfo
s
;
this
.
_isEnabled
=
this
.
_editor
.
getConfiguration
().
contribInfo
.
codeLen
s
;
this
.
_globalToDispose
=
[];
this
.
_globalToDispose
=
[];
this
.
_localToDispose
=
[];
this
.
_localToDispose
=
[];
...
@@ -366,7 +366,7 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
...
@@ -366,7 +366,7 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
this
.
_globalToDispose
.
push
(
this
.
_editor
.
onDidChangeModelMode
(()
=>
this
.
onModelChange
()));
this
.
_globalToDispose
.
push
(
this
.
_editor
.
onDidChangeModelMode
(()
=>
this
.
onModelChange
()));
this
.
_globalToDispose
.
push
(
this
.
_editor
.
onDidChangeConfiguration
((
e
:
editorCommon
.
IConfigurationChangedEvent
)
=>
{
this
.
_globalToDispose
.
push
(
this
.
_editor
.
onDidChangeConfiguration
((
e
:
editorCommon
.
IConfigurationChangedEvent
)
=>
{
let
prevIsEnabled
=
this
.
_isEnabled
;
let
prevIsEnabled
=
this
.
_isEnabled
;
this
.
_isEnabled
=
this
.
_editor
.
getConfiguration
().
contribInfo
.
referenceInfo
s
;
this
.
_isEnabled
=
this
.
_editor
.
getConfiguration
().
contribInfo
.
codeLen
s
;
if
(
prevIsEnabled
!==
this
.
_isEnabled
)
{
if
(
prevIsEnabled
!==
this
.
_isEnabled
)
{
this
.
onModelChange
();
this
.
onModelChange
();
}
}
...
...
src/vs/monaco.d.ts
浏览文件 @
b1ddc1ac
...
@@ -1262,10 +1262,10 @@ declare module monaco.editor {
...
@@ -1262,10 +1262,10 @@ declare module monaco.editor {
*/
*/
selectionHighlight
?:
boolean
;
selectionHighlight
?:
boolean
;
/**
/**
* Show
reference infos (a.k.a. code lenses) for modes that support it
* Show
code lens
* Defaults to true.
* Defaults to true.
*/
*/
referenceInfo
s
?:
boolean
;
codeLen
s
?:
boolean
;
/**
/**
* Enable code folding
* Enable code folding
* Defaults to true.
* Defaults to true.
...
@@ -1422,7 +1422,7 @@ declare module monaco.editor {
...
@@ -1422,7 +1422,7 @@ declare module monaco.editor {
tabCompletion
:
boolean
;
tabCompletion
:
boolean
;
wordBasedSuggestions
:
boolean
;
wordBasedSuggestions
:
boolean
;
selectionHighlight
:
boolean
;
selectionHighlight
:
boolean
;
referenceInfo
s
:
boolean
;
codeLen
s
:
boolean
;
folding
:
boolean
;
folding
:
boolean
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录