vscode APIs
- workspace
- window
- ExtensionContext
- Uri
- commands
- Range
- Position
- TextDocument
- Disposable
- CancellationToken
- languages
- TextEditor
- EventEmitter
- ViewColumn
- QuickPickItem
- Event
- OutputChannel
- MarkdownString
- extensions
- ProviderResult
- env
- StatusBarItem
- StatusBarAlignment
- WorkspaceConfiguration
- Location
- TreeItemCollapsibleState
- TreeItem
- Selection
- CompletionItem
- WorkspaceFolder
- TreeDataProvider
- TextEdit
- CompletionItemKind
- Command
- Hover
- WorkspaceEdit
- WebviewPanel
- Diagnostic
- DiagnosticSeverity
- ConfigurationTarget
- ProgressLocation
- ThemeColor
- TextEditorDecorationType
- TextDocumentChangeEvent
- CodeActionProvider
- HoverProvider
- ThemeIcon
- SnippetString
- CompletionList
- DecorationOptions
- RelativePattern
- DiagnosticCollection
- CompletionContext
- CompletionItemProvider
- CodeAction
- CodeActionKind
- InputBoxOptions
- ColorThemeKind
- ConfigurationChangeEvent
- FileSystemWatcher
- TextEditorEdit
- TextDocumentContentChangeEvent
- Extension
- CodeActionContext
- FileStat
- QuickPickOptions
- DocumentSymbol
- SymbolKind
- QuickInputButton
- Webview
- IndentAction
- debug
- FileSystemError
- TreeView
- TextEditorRevealType
- FileSystemProvider
- FileChangeEvent
- Memento
- Definition
- FormattingOptions
- DocumentFilter
- DecorationRenderOptions
- QuickPick
- WebviewView
- WebviewViewProvider
- DocumentHighlight
- DebugConfiguration
- Terminal
- FileType
- TextDocumentWillSaveEvent
- FileChangeType
- OpenDialogOptions
- DocumentSelector
- DefinitionProvider
- LocationLink
- TextDocumentShowOptions
- DecorationRangeBehavior
- OverviewRulerLane
- SignatureHelp
- SemanticTokens
- Progress
- DocumentFormattingEditProvider
- SemanticTokensBuilder
- WebviewViewResolveContext
- CustomDocument
- DebugSession
- CodeLens
- CodeLensProvider
- WebviewOptions
- WebviewPanelOptions
- FileRenameEvent
- TextDocumentSaveReason
- CancellationTokenSource
- CustomTextEditorProvider
- QuickPickItemKind
- DocumentLink
- DocumentHighlightKind
- FileDecoration
- FileDecorationProvider
- TextDocumentContentProvider
- GlobPattern
- FileDeleteEvent
- SaveDialogOptions
- SignatureInformation
- CompletionItemTag
- FileCreateEvent
- ReferenceContext
- SemanticTokensLegend
- TreeViewVisibilityChangeEvent
- QuickInput
- QuickInputButtons
- CustomReadonlyEditorProvider
- DiagnosticRelatedInformation
- DebugConfigurationProvider
- DebugAdapterExecutable
- DebugAdapterDescriptor
- DebugAdapterDescriptorFactory
- DebugAdapterServer
- FileSearchOptions
- FileSearchProvider
- FileSearchQuery
- TextSearchComplete
- TextSearchOptions
- TextSearchProvider
- TextSearchQuery
- TextSearchResult
- EndOfLine
- FileWillRenameEvent
- FoldingRangeKind
- MessageItem
- TextEditorVisibleRangesChangeEvent
- ColorTheme
- CustomEditorProvider
- CustomDocumentBackupContext
- CustomDocumentBackup
- CustomDocumentOpenContext
- CustomDocumentContentChangeEvent
- SymbolInformation
- DecorationInstanceRenderOptions
- DefinitionLink
- DocumentLinkProvider
- TerminalOptions
- CodeActionProviderMetadata
- MarkedString
- tasks
- Task
- TaskDefinition
- ShellExecution
- TaskGroup
- DocumentRangeFormattingEditProvider
- TaskScope
- TextEditorSelectionChangeKind
- RenameProvider
- TextLine
- WorkspaceFoldersChangeEvent
- TreeItemLabel
Other Related APIs
- vscode#window
- vscode#Position
- vscode#SnippetString
- vscode#commands
- vscode#TextDocument
- vscode#Range
- vscode#Diagnostic
- vscode#CancellationToken
- vscode#CompletionItem
- vscode#CompletionItemKind
- vscode#CompletionItemProvider
- vscode#CompletionList
- vscode#Location
- vscode#Hover
- vscode#LocationLink
- vscode#WorkspaceEdit
- vscode#DocumentSymbol
- vscode#Memento
- vscode#SemanticTokens
- vscode#Definition
- vscode#ReferenceContext
vscode#SignatureHelp TypeScript Examples
The following examples show how to use
vscode#SignatureHelp.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: insertParameters.ts From sourcepawn-vscode with MIT License | 6 votes |
export async function run(args: any) {
let document = window.activeTextEditor.document;
let position = window.activeTextEditor.selection.active;
const linetext = document.lineAt(position).text;
if (
linetext[position.character] === ")" &&
linetext[position.character - 1] === "("
) {
let signatureHelp = (await commands.executeCommand(
"vscode.executeSignatureHelpProvider",
document.uri,
position
)) as SignatureHelp;
let label = signatureHelp.signatures[0].label;
let parameters = label.substring(
label.indexOf("(") + 1,
label.indexOf(")")
);
window.activeTextEditor.edit(function (editBuilder) {
editBuilder.insert(position, parameters);
});
} else {
window.activeTextEditor.edit(function (editBuilder) {
editBuilder.insert(position, "\t");
});
}
}
Example #2
Source File: spDocCompletions.ts From sourcepawn-vscode with MIT License | 6 votes |
async function getFullParams(document: TextDocument, position: Position) {
const lines = document.getText().split("\n");
let lineNB = position.line + 1;
let line = lines[lineNB];
let newSyntaxRe = /^(\s)*(?:(?:stock|public|native|forward|static)\s+)*(?:(\w*)\s+)?(\w*)\s*\(/;
let match = line.match(newSyntaxRe);
if (!match) {
match = line.match(
/^(\s)*(?:(?:static|native|stock|public|forward)\s+)*(?:(\w+)\s*:)?\s*(\w*)\s*\(/
);
if (!match) {
return {
signature: undefined,
indent: undefined,
};
}
}
let newPos = new Position(lineNB, match[0].length);
let res: SignatureHelp = await commands.executeCommand(
"vscode.executeSignatureHelpProvider",
document.uri,
newPos
);
if (res === undefined || res.signatures.length === 0) {
return {
signature: undefined,
indent: undefined,
};
}
return {
signature: res.signatures[0],
indent: match[1] == undefined ? "" : match[1],
};
}
Example #3
Source File: spProviders.ts From sourcepawn-vscode with MIT License | 5 votes |
public async provideSignatureHelp(
document: TextDocument,
position: Position,
token: CancellationToken
): Promise<SignatureHelp> {
return signatureProvider(this.itemsRepository, document, position, token);
}