Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8a9ddea7
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,发现更多精彩内容 >>
提交
8a9ddea7
编写于
6月 06, 2016
作者:
J
João Moreno
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7141 from joaomoreno/disable-parameter-hints
Allow disabling parameter hints
上级
1dfdac43
df3b081b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
2 deletion
+30
-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
-1
src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts
...or/contrib/parameterHints/browser/parameterHintsWidget.ts
+14
-1
未找到文件。
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
8a9ddea7
...
...
@@ -183,6 +183,7 @@ class InternalEditorOptionsHelper {
contextmenu
:
toBoolean
(
opts
.
contextmenu
),
quickSuggestions
:
toBoolean
(
opts
.
quickSuggestions
),
quickSuggestionsDelay
:
toInteger
(
opts
.
quickSuggestionsDelay
),
parameterHints
:
toBoolean
(
opts
.
parameterHints
),
iconsInSuggestions
:
toBoolean
(
opts
.
iconsInSuggestions
),
formatOnType
:
toBoolean
(
opts
.
formatOnType
),
suggestOnTriggerCharacters
:
toBoolean
(
opts
.
suggestOnTriggerCharacters
),
...
...
@@ -591,6 +592,11 @@ let editorConfiguration:IConfigurationNode = {
'
minimum
'
:
0
,
'
description
'
:
nls
.
localize
(
'
quickSuggestionsDelay
'
,
"
Controls the delay in ms after which quick suggestions will show up
"
)
},
'
editor.parameterHints
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
DefaultConfig
.
editor
.
parameterHints
,
'
description
'
:
nls
.
localize
(
'
parameterHints
'
,
"
Enables parameter hints
"
)
},
'
editor.autoClosingBrackets
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
DefaultConfig
.
editor
.
autoClosingBrackets
,
...
...
src/vs/editor/common/config/defaultConfig.ts
浏览文件 @
8a9ddea7
...
...
@@ -77,6 +77,7 @@ class ConfigClass implements IConfiguration {
mouseWheelScrollSensitivity
:
1
,
quickSuggestions
:
true
,
quickSuggestionsDelay
:
10
,
parameterHints
:
true
,
iconsInSuggestions
:
true
,
autoClosingBrackets
:
true
,
formatOnType
:
false
,
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
8a9ddea7
...
...
@@ -348,6 +348,10 @@ export interface IEditorOptions {
* Defaults to 500 (ms)
*/
quickSuggestionsDelay
?:
number
;
/**
* Enables parameter hints
*/
parameterHints
?:
boolean
;
/**
* Render icons in suggestions box.
* Defaults to true.
...
...
@@ -765,6 +769,7 @@ export class EditorContribOptions {
contextmenu
:
boolean
;
quickSuggestions
:
boolean
;
quickSuggestionsDelay
:
number
;
parameterHints
:
boolean
;
iconsInSuggestions
:
boolean
;
formatOnType
:
boolean
;
suggestOnTriggerCharacters
:
boolean
;
...
...
@@ -783,6 +788,7 @@ export class EditorContribOptions {
contextmenu
:
boolean
;
quickSuggestions
:
boolean
;
quickSuggestionsDelay
:
number
;
parameterHints
:
boolean
;
iconsInSuggestions
:
boolean
;
formatOnType
:
boolean
;
suggestOnTriggerCharacters
:
boolean
;
...
...
@@ -796,7 +802,8 @@ export class EditorContribOptions {
this
.
hover
=
Boolean
(
source
.
hover
);
this
.
contextmenu
=
Boolean
(
source
.
contextmenu
);
this
.
quickSuggestions
=
Boolean
(
source
.
quickSuggestions
);
this
.
quickSuggestionsDelay
=
source
.
quickSuggestionsDelay
|
0
;
this
.
quickSuggestionsDelay
=
source
.
quickSuggestionsDelay
||
0
;
this
.
parameterHints
=
Boolean
(
source
.
parameterHints
);
this
.
iconsInSuggestions
=
Boolean
(
source
.
iconsInSuggestions
);
this
.
formatOnType
=
Boolean
(
source
.
formatOnType
);
this
.
suggestOnTriggerCharacters
=
Boolean
(
source
.
suggestOnTriggerCharacters
);
...
...
@@ -817,6 +824,7 @@ export class EditorContribOptions {
&&
this
.
contextmenu
===
other
.
contextmenu
&&
this
.
quickSuggestions
===
other
.
quickSuggestions
&&
this
.
quickSuggestionsDelay
===
other
.
quickSuggestionsDelay
&&
this
.
parameterHints
===
other
.
parameterHints
&&
this
.
iconsInSuggestions
===
other
.
iconsInSuggestions
&&
this
.
formatOnType
===
other
.
formatOnType
&&
this
.
suggestOnTriggerCharacters
===
other
.
suggestOnTriggerCharacters
...
...
src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts
浏览文件 @
8a9ddea7
...
...
@@ -37,6 +37,7 @@ export class ParameterHintsModel extends Disposable {
onCancel
:
Event
<
void
>
=
this
.
_onCancel
.
event
;
private
editor
:
ICommonCodeEditor
;
private
enabled
:
boolean
;
private
triggerCharactersListeners
:
IDisposable
[];
private
active
:
boolean
;
private
throttledDelayer
:
RunOnceScheduler
;
...
...
@@ -45,16 +46,20 @@ export class ParameterHintsModel extends Disposable {
super
();
this
.
editor
=
editor
;
this
.
enabled
=
false
;
this
.
triggerCharactersListeners
=
[];
this
.
throttledDelayer
=
new
RunOnceScheduler
(()
=>
this
.
doTrigger
(),
ParameterHintsModel
.
DELAY
);
this
.
active
=
false
;
this
.
_register
(
this
.
editor
.
onDidChangeConfiguration
(()
=>
this
.
onEditorConfigurationChange
()));
this
.
_register
(
this
.
editor
.
onDidChangeModel
(
e
=>
this
.
onModelChanged
()));
this
.
_register
(
this
.
editor
.
onDidChangeModelMode
(
_
=>
this
.
onModelChanged
()));
this
.
_register
(
this
.
editor
.
onDidChangeCursorSelection
(
e
=>
this
.
onCursorChange
(
e
)));
this
.
_register
(
SignatureHelpProviderRegistry
.
onDidChange
(
this
.
onModelChanged
,
this
));
this
.
onEditorConfigurationChange
();
this
.
onModelChanged
();
}
...
...
@@ -69,7 +74,7 @@ export class ParameterHintsModel extends Disposable {
}
trigger
(
delay
=
ParameterHintsModel
.
DELAY
):
void
{
if
(
!
SignatureHelpProviderRegistry
.
has
(
this
.
editor
.
getModel
()))
{
if
(
!
this
.
enabled
||
!
SignatureHelpProviderRegistry
.
has
(
this
.
editor
.
getModel
()))
{
return
;
}
...
...
@@ -130,6 +135,14 @@ export class ParameterHintsModel extends Disposable {
}
}
private
onEditorConfigurationChange
():
void
{
this
.
enabled
=
this
.
editor
.
getConfiguration
().
contribInfo
.
parameterHints
;
if
(
!
this
.
enabled
)
{
this
.
cancel
();
}
}
dispose
():
void
{
this
.
cancel
(
true
);
this
.
triggerCharactersListeners
=
dispose
(
this
.
triggerCharactersListeners
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录