Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
520106eb
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,发现更多精彩内容 >>
提交
520106eb
编写于
11月 30, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move signature help context to stable api
Fixes #54972
上级
df471692
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
70 addition
and
67 deletion
+70
-67
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+70
-1
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+0
-66
未找到文件。
src/vs/vscode.d.ts
浏览文件 @
520106eb
...
@@ -3123,6 +3123,53 @@ declare module 'vscode' {
...
@@ -3123,6 +3123,53 @@ declare module 'vscode' {
activeParameter
:
number
;
activeParameter
:
number
;
}
}
/**
* How a [`SignatureHelpProvider`](#SignatureHelpProvider) was triggered
*/
export
enum
SignatureHelpTriggerReason
{
/**
* Signature help was invoked manually by the user or by a command.
*/
Invoke
=
1
,
/**
* Signature help was triggered by a trigger character.
*/
TriggerCharacter
=
2
,
/**
* Signature help was triggered by the cursor moving or by the document content changing.
*/
ContentChange
=
3
,
}
/**
* Additional information about the context in which a
* [`SignatureHelpProvider`](#SignatureHelpProvider.provideSignatureHelp) was triggered.
*/
export
interface
SignatureHelpContext
{
/**
* Action that caused signature help to be triggered.
*/
readonly
triggerReason
:
SignatureHelpTriggerReason
;
/**
* Character that caused signature help to be triggered.
*
* This is `undefined` when signature help is not triggered by typing, such as when manually invoking
* signature help or when moving the cursor.
*/
readonly
triggerCharacter
?:
string
;
/**
* Whether or not signature help was previously showing when triggered.
*
* Retriggers occur when the signature help is already active and can be caused by typing a trigger character
* or by a cursor move.
*/
readonly
isRetrigger
:
boolean
;
}
/**
/**
* The signature help provider interface defines the contract between extensions and
* The signature help provider interface defines the contract between extensions and
* the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature.
* the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature.
...
@@ -3135,10 +3182,30 @@ declare module 'vscode' {
...
@@ -3135,10 +3182,30 @@ declare module 'vscode' {
* @param document The document in which the command was invoked.
* @param document The document in which the command was invoked.
* @param position The position at which the command was invoked.
* @param position The position at which the command was invoked.
* @param token A cancellation token.
* @param token A cancellation token.
* @param context Information about how signature help was triggered.
*
* @return Signature help or a thenable that resolves to such. The lack of a result can be
* @return Signature help or a thenable that resolves to such. The lack of a result can be
* signaled by returning `undefined` or `null`.
* signaled by returning `undefined` or `null`.
*/
*/
provideSignatureHelp
(
document
:
TextDocument
,
position
:
Position
,
token
:
CancellationToken
):
ProviderResult
<
SignatureHelp
>
;
provideSignatureHelp
(
document
:
TextDocument
,
position
:
Position
,
token
:
CancellationToken
,
context
:
SignatureHelpContext
):
ProviderResult
<
SignatureHelp
>
;
}
/**
* Metadata about a registered [`SignatureHelpProvider`](#SignatureHelpProvider).
*/
export
interface
SignatureHelpProviderMetadata
{
/**
* List of characters that trigger signature help.
*/
readonly
triggerCharacters
:
ReadonlyArray
<
string
>
;
/**
* List of characters that re-trigger signature help.
*
* These trigger characters are only active when signature help is alread showing. All trigger characters
* are also counted as re-trigger characters.
*/
readonly
retriggerCharacters
:
ReadonlyArray
<
string
>
;
}
}
/**
/**
...
@@ -7925,9 +7992,11 @@ declare module 'vscode' {
...
@@ -7925,9 +7992,11 @@ declare module 'vscode' {
* @param selector A selector that defines the documents this provider is applicable to.
* @param selector A selector that defines the documents this provider is applicable to.
* @param provider A signature help provider.
* @param provider A signature help provider.
* @param triggerCharacters Trigger signature help when the user types one of the characters, like `,` or `(`.
* @param triggerCharacters Trigger signature help when the user types one of the characters, like `,` or `(`.
* @param metadata Information about the provider.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
*/
*/
export
function
registerSignatureHelpProvider
(
selector
:
DocumentSelector
,
provider
:
SignatureHelpProvider
,
...
triggerCharacters
:
string
[]):
Disposable
;
export
function
registerSignatureHelpProvider
(
selector
:
DocumentSelector
,
provider
:
SignatureHelpProvider
,
...
triggerCharacters
:
string
[]):
Disposable
;
export
function
registerSignatureHelpProvider
(
selector
:
DocumentSelector
,
provider
:
SignatureHelpProvider
,
metadata
:
SignatureHelpProviderMetadata
):
Disposable
;
/**
/**
* Register a document link provider.
* Register a document link provider.
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
520106eb
...
@@ -1060,72 +1060,6 @@ declare module 'vscode' {
...
@@ -1060,72 +1060,6 @@ declare module 'vscode' {
}
}
//#endregion
//#endregion
//#region Signature Help
/**
* How a [Signature provider](#SignatureHelpProvider) was triggered
*/
export
enum
SignatureHelpTriggerReason
{
/**
* Signature help was invoked manually by the user or by a command.
*/
Invoke
=
1
,
/**
* Signature help was triggered by a trigger character.
*/
TriggerCharacter
=
2
,
/**
* Signature help was triggered by the cursor moving or by the document content changing.
*/
ContentChange
=
3
,
}
/**
* Contains additional information about the context in which a
* [signature help provider](#SignatureHelpProvider.provideSignatureHelp) is triggered.
*/
export
interface
SignatureHelpContext
{
/**
* Action that caused signature help to be requested.
*/
readonly
triggerReason
:
SignatureHelpTriggerReason
;
/**
* Character that caused signature help to be requested.
*
* This is `undefined` when signature help is not triggered by typing, such as when invoking signature help
* or when moving the cursor.
*/
readonly
triggerCharacter
?:
string
;
/**
* Whether or not signature help was previously showing when triggered.
*
* Retriggers occur when the signature help is already active and can be caused by typing a trigger character
* or by a cursor move.
*/
readonly
isRetrigger
:
boolean
;
}
export
interface
SignatureHelpProvider
{
provideSignatureHelp
(
document
:
TextDocument
,
position
:
Position
,
token
:
CancellationToken
,
context
:
SignatureHelpContext
):
ProviderResult
<
SignatureHelp
>
;
}
export
interface
SignatureHelpProviderMetadata
{
readonly
triggerCharacters
:
ReadonlyArray
<
string
>
;
readonly
retriggerCharacters
:
ReadonlyArray
<
string
>
;
}
namespace
languages
{
export
function
registerSignatureHelpProvider
(
selector
:
DocumentSelector
,
provider
:
SignatureHelpProvider
,
metadata
:
SignatureHelpProviderMetadata
):
Disposable
;
}
//#endregion
//#region Alex - OnEnter enhancement
//#region Alex - OnEnter enhancement
export
interface
OnEnterRule
{
export
interface
OnEnterRule
{
/**
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录