Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
a67c8151
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,发现更多精彩内容 >>
提交
a67c8151
编写于
7月 30, 2018
作者:
O
ozyx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add option to enable cycling of parameter hints
上级
64c433bf
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
39 addition
and
4 deletion
+39
-4
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+5
-0
src/vs/editor/common/config/editorOptions.ts
src/vs/editor/common/config/editorOptions.ts
+10
-0
src/vs/editor/contrib/parameterHints/parameterHintsWidget.ts
src/vs/editor/contrib/parameterHints/parameterHintsWidget.ts
+17
-4
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
浏览文件 @
a67c8151
...
...
@@ -684,6 +684,11 @@ const editorConfiguration: IConfigurationNode = {
'
default
'
:
EDITOR_DEFAULTS
.
contribInfo
.
codeLens
,
'
description
'
:
nls
.
localize
(
'
codeLens
'
,
"
Controls whether the editor shows CodeLens
"
)
},
'
editor.cycleParameterHints
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
EDITOR_DEFAULTS
.
contribInfo
.
cycleParameterHints
,
'
description
'
:
nls
.
localize
(
'
cycleParameterHints
'
,
"
Controls whether the parameter hints menu cycles or closes when reaching the end of the list.
"
)
},
'
editor.folding
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
EDITOR_DEFAULTS
.
contribInfo
.
folding
,
...
...
src/vs/editor/common/config/editorOptions.ts
浏览文件 @
a67c8151
...
...
@@ -416,6 +416,11 @@ export interface IEditorOptions {
* Defaults to true.
*/
contextmenu
?:
boolean
;
/**
* Enable cycling through parameter hints.
* Defaults to false.
*/
cycleParameterHints
?:
boolean
;
/**
* A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.
* Defaults to 1.
...
...
@@ -909,6 +914,7 @@ export interface EditorContribOptions {
readonly
hover
:
InternalEditorHoverOptions
;
readonly
links
:
boolean
;
readonly
contextmenu
:
boolean
;
readonly
cycleParameterHints
:
boolean
;
readonly
quickSuggestions
:
boolean
|
{
other
:
boolean
,
comments
:
boolean
,
strings
:
boolean
};
readonly
quickSuggestionsDelay
:
number
;
readonly
parameterHints
:
boolean
;
...
...
@@ -1289,6 +1295,7 @@ export class InternalEditorOptions {
&&
this
.
_equalsHoverOptions
(
a
.
hover
,
b
.
hover
)
&&
a
.
links
===
b
.
links
&&
a
.
contextmenu
===
b
.
contextmenu
&&
a
.
cycleParameterHints
===
b
.
cycleParameterHints
&&
InternalEditorOptions
.
_equalsQuickSuggestions
(
a
.
quickSuggestions
,
b
.
quickSuggestions
)
&&
a
.
quickSuggestionsDelay
===
b
.
quickSuggestionsDelay
&&
a
.
parameterHints
===
b
.
parameterHints
...
...
@@ -1884,6 +1891,7 @@ export class EditorOptionsValidator {
hover
:
this
.
_santizeHoverOpts
(
opts
.
hover
,
defaults
.
hover
),
links
:
_boolean
(
opts
.
links
,
defaults
.
links
),
contextmenu
:
_boolean
(
opts
.
contextmenu
,
defaults
.
contextmenu
),
cycleParameterHints
:
_boolean
(
opts
.
cycleParameterHints
,
defaults
.
cycleParameterHints
),
quickSuggestions
:
quickSuggestions
,
quickSuggestionsDelay
:
_clampedInt
(
opts
.
quickSuggestionsDelay
,
defaults
.
quickSuggestionsDelay
,
Constants
.
MIN_SAFE_SMALL_INTEGER
,
Constants
.
MAX_SAFE_SMALL_INTEGER
),
parameterHints
:
_boolean
(
opts
.
parameterHints
,
defaults
.
parameterHints
),
...
...
@@ -1992,6 +2000,7 @@ export class InternalEditorOptionsFactory {
hover
:
opts
.
contribInfo
.
hover
,
links
:
(
accessibilityIsOn
?
false
:
opts
.
contribInfo
.
links
),
// DISABLED WHEN SCREEN READER IS ATTACHED
contextmenu
:
opts
.
contribInfo
.
contextmenu
,
cycleParameterHints
:
opts
.
contribInfo
.
cycleParameterHints
,
quickSuggestions
:
opts
.
contribInfo
.
quickSuggestions
,
quickSuggestionsDelay
:
opts
.
contribInfo
.
quickSuggestionsDelay
,
parameterHints
:
opts
.
contribInfo
.
parameterHints
,
...
...
@@ -2463,6 +2472,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
},
links
:
true
,
contextmenu
:
true
,
cycleParameterHints
:
false
,
quickSuggestions
:
{
other
:
true
,
comments
:
false
,
strings
:
false
},
quickSuggestionsDelay
:
10
,
parameterHints
:
true
,
...
...
src/vs/editor/contrib/parameterHints/parameterHintsWidget.ts
浏览文件 @
a67c8151
...
...
@@ -476,14 +476,20 @@ export class ParameterHintsWidget implements IContentWidget, IDisposable {
next
():
boolean
{
const
length
=
this
.
hints
.
signatures
.
length
;
const
last
=
(
this
.
currentSignature
%
length
)
===
(
length
-
1
);
const
cycleParameterHints
=
this
.
editor
.
getConfiguration
().
contribInfo
.
cycleParameterHints
;
// If there is only one signature, or we're on last signature of list
if
(
length
<
2
||
last
)
{
if
(
(
length
<
2
||
last
)
&&
!
cycleParameterHints
)
{
this
.
cancel
();
return
false
;
}
this
.
currentSignature
++
;
if
(
last
&&
cycleParameterHints
)
{
this
.
currentSignature
=
0
;
}
else
{
this
.
currentSignature
++
;
}
this
.
render
();
return
true
;
}
...
...
@@ -491,13 +497,20 @@ export class ParameterHintsWidget implements IContentWidget, IDisposable {
previous
():
boolean
{
const
length
=
this
.
hints
.
signatures
.
length
;
const
first
=
this
.
currentSignature
===
0
;
const
cycleParameterHints
=
this
.
editor
.
getConfiguration
().
contribInfo
.
cycleParameterHints
;
if
(
length
<
2
||
first
)
{
// If there is only one signature, or we're on first signature of list
if
((
length
<
2
||
first
)
&&
!
cycleParameterHints
)
{
this
.
cancel
();
return
false
;
}
this
.
currentSignature
--
;
if
(
first
&&
cycleParameterHints
)
{
this
.
currentSignature
=
length
-
1
;
}
else
{
this
.
currentSignature
--
;
}
this
.
render
();
return
true
;
}
...
...
src/vs/monaco.d.ts
浏览文件 @
a67c8151
...
...
@@ -2754,6 +2754,11 @@ declare namespace monaco.editor {
* Defaults to true.
*/
contextmenu
?:
boolean
;
/**
* Enable cycling through parameter hints.
* Defaults to false.
*/
cycleParameterHints
?:
boolean
;
/**
* A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.
* Defaults to 1.
...
...
@@ -3188,6 +3193,7 @@ declare namespace monaco.editor {
readonly
hover
:
InternalEditorHoverOptions
;
readonly
links
:
boolean
;
readonly
contextmenu
:
boolean
;
readonly
cycleParameterHints
:
boolean
;
readonly
quickSuggestions
:
boolean
|
{
other
:
boolean
;
comments
:
boolean
;
...
...
src/vs/platform/telemetry/common/telemetryUtils.ts
浏览文件 @
a67c8151
...
...
@@ -113,6 +113,7 @@ const configurationValueWhitelist = [
'
editor.multiCursorModifier
'
,
'
editor.quickSuggestions
'
,
'
editor.quickSuggestionsDelay
'
,
'
editor.cycleParameterHints
'
,
'
editor.parameterHints
'
,
'
editor.autoClosingBrackets
'
,
'
editor.autoIndent
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录