Get an authentication session matching the desired scopes. Rejects if a provider with providerId is notregistered, or if the user does not consent to sharing authentication information withthe extension. If there are multiple sessions with the same scopes, the user will be shown aquickpick to select which account they would like to use.
Currently, there are only two authentication providers that are contributed from built in extensionsto the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
Namespace for chat functionality. Users interact with chat participants by sending messagesto them in the chat view. Chat participants can respond with markdown or other types of contentvia the ChatResponseStream.
Text editor commands are different from ordinary commands asthey only execute when there is an active editor when the command is called. Also, thecommand handler of an editor command has access to the active editor and to anedit-builder. Note that the edit-builder is only valid while thecallback executes.
The currently active debug session or undefined. The active debug session is the onerepresented by the debug action floating window or the one currently shown in the drop down menu of the debug action floating window.If no debug session is active, the value is undefined.
The currently focused thread or stack frame, or undefined if nothread or stack is focused. A thread can be focused any time there isan active debug session, while a stack frame can only be focused whena session is paused and the call stack has been retrieved.
Converts a "Source" descriptor object received via the Debug Adapter Protocol into a Uri that can be used to load its contents.If the source descriptor is based on a path, a file Uri is returned.If the source descriptor uses a reference number, a specific debug Uri (scheme 'debug') is constructed that requires a corresponding ContentProvider and a running debug session
Register a debug adapter descriptor factory for a specific debug type.An extension is only allowed to register a DebugAdapterDescriptorFactory for the debug type(s) defined by the extension. Otherwise an error is thrown.Registering more than one DebugAdapterDescriptorFactory for a debug type results in an error.
Register a debug configuration provider for a specific debug type.The optional triggerKind can be used to specify when the provideDebugConfigurations method of the provider is triggered.Currently two trigger kinds are possible: with the value Initial (or if no trigger kind argument is given) the provideDebugConfigurations method is used to provide the initial debug configurations to be copied into a newly created launch.json.With the trigger kind Dynamic the provideDebugConfigurations method is used to dynamically determine debug configurations to be presented to the user (in addition to the static configurations from the launch.json).Please note that the triggerKind argument only applies to the provideDebugConfigurations method: so the resolveDebugConfiguration methods are not affected at all.Registering a single provider with resolve methods for different trigger kinds, results in the same resolve methods called multiple times.More than one provider can be registered for the same type.
Start debugging by using either a named launch or named compound configuration,or by directly passing a DebugConfiguration.The named configurations are looked up in '.vscode/launch.json' found in the given folder.Before debugging starts, all unsaved files are saved and the launch configurations are brought up-to-date.Folder specific variables used in the configuration (e.g. '$workspaceFolder') are resolved against the given folder.
Note that the value is undefined when there is no remote extension host but that thevalue is defined in all extension hosts (local and remote) in case a remote extension hostexists. Use Extension.extensionKind to know ifa specific extension runs remote or not.
The detected default shell for the extension host, this is overridden by theterminal.integrated.defaultProfile setting for the extension host's platform. Note that inenvironments that do not support a shell the value is the empty string.
If the extension is running remotely, this function automatically establishes a port forwarding tunnelfrom the local machine to target on the remote and returns a local uri to the tunnel. The lifetime ofthe port forwarding tunnel is managed by the editor and the tunnel can be closed by the user.
Extensions should not make any assumptions about the resulting uri and should not alter it in any way.Rather, extensions can e.g. use this uri in an authentication flow, by adding the uri as callback queryargument to the server to authenticate to.
Namespace for localization-related functionality in the extension API. To use this properly,you must have l10n defined in your extension manifest and have bundle.l10n..json files.For more information on how to generate bundle.l10n..json files, check out thevscode-l10n repo.
Note: Built-in extensions (for example, Git, TypeScript Language Features, GitHub Authentication)are excluded from the l10n property requirement. In other words, they do not need to specifya l10n in the extension manifest because their translated strings come from Language Packs.
The bundle of localized strings that have been loaded for the extension.It's undefined if no bundle has been loaded. The bundle is typically not loaded ifthere was no bundle found or when we are running with the default language.
The URI of the localization bundle that has been loaded for the extension.It's undefined if no bundle has been loaded. The bundle is typically not loaded ifthere was no bundle found or when we are running with the default language.
Marks a string for localization. If a localized bundle is available for the language specified byenv.language and the bundle has a localized value for this message, then that localizedvalue will be returned (with injected args values for any templated values).
Many programming languages exist and there is huge variety in syntaxes, semantics, and paradigms. Despite that, featureslike automatic word-completion, code navigation, or code checking have become popular across different tools for differentprogramming languages.
The editor provides an API that makes it simple to provide such common features by having all UI and actions already in place andby allowing you to participate by providing data only. For instance, to contribute a hover all you have to do is provide a functionthat can be called with a TextDocument and a Position returning hover info. The rest, like tracking themouse, positioning the hover, keeping the hover stable etc. is taken care of by the editor.
Registration is done using a document selector which is either a language id, like javascript ora more complex filter like language: 'typescript', scheme: 'file' . Matching a document against sucha selector will result in a score that is used to determine if and how a provider shall be used. Whenscores are equal the provider that came last wins. For features that allow full arity, like hover,the score is only checked to be >0, for other features, like IntelliSense thescore is used for determining the order in which providers are asked to participate.
Multiple providers can be registered for a language. In that case providers are asked inparallel and the results are merged. A failing provider (rejected promise or exception) willnot cause a failure of the whole operation.
Multiple providers can be registered for a language. In that case providers are sortedby their score and groups of equal score are sequentially asked forcompletion items. The process stops when one or many providers of a group return aresult. A failing provider (rejected promise or exception) will not fail the wholeoperation.
A completion item provider can be associated with a set of triggerCharacters. When triggercharacters are being typed, completions are requested but only from providers that registeredthe typed character. Because of that trigger characters should be different than word characters,a common trigger character is . to trigger member completions.
d3342ee215