MCPcopy
hub / github.com/microsoft/vscode-languageserver-node / DynamicFeature

Interface DynamicFeature

client/src/client.ts:607–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607export interface DynamicFeature<T> {
608
609 /**
610 * The message for which this features support dynamic activation / registration.
611 */
612 messages: RPCMessageType | RPCMessageType[];
613
614 /**
615 * Called to fill the initialize params.
616 *
617 * @params the initialize params.
618 */
619 fillInitializeParams?: (params: InitializeParams) => void;
620
621 /**
622 * Called to fill in the client capabilities this feature implements.
623 *
624 * @param capabilities The client capabilities to fill.
625 */
626 fillClientCapabilities(capabilities: ClientCapabilities): void;
627
628 /**
629 * Initialize the feature. This method is called on a feature instance
630 * when the client has successfully received the initalize request from
631 * the server and before the client sends the initialized notification
632 * to the server.
633 *
634 * @param capabilities the server capabilities.
635 * @param documentSelector the document selector pass to the client's constuctor.
636 * May be `undefined` if the client was created without a selector.
637 */
638 initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector | undefined): void;
639
640 /**
641 * Is called when the server send a register request for the given message.
642 *
643 * @param message the message to register for.
644 * @param data additional registration data as defined in the protocol.
645 */
646 register(message: RPCMessageType, data: RegistrationData<T>): void;
647
648 /**
649 * Is called when the server wants to unregister a feature.
650 *
651 * @param id the id used when registering the feature.
652 */
653 unregister(id: string): void;
654
655 /**
656 * Called when the client is stopped to dispose this feature. Usually a feature
657 * unregisters listeners registerd hooked up with the VS Code extension host.
658 */
659 dispose(): void;
660}
661
662namespace DynamicFeature {
663 export function is<T>(value: any): value is DynamicFeature<T> {

Callers 10

initializeMethod · 0.65
registerMethod · 0.65
initializeMethod · 0.65
initializeMethod · 0.65
registerMethod · 0.65
initializeMethod · 0.65
initializeMethod · 0.65
initializeMethod · 0.65
unregisterMethod · 0.65

Implementers 6

DidChangeTextDocumentFeatureclient/src/client.ts
WillSaveWaitUntilFeatureclient/src/client.ts
FileSystemWatcherFeatureclient/src/client.ts
ConfigurationFeatureclient/src/client.ts
ExecuteCommandFeatureclient/src/client.ts
WorkspaceFoldersFeatureclient/src/workspaceFolders.ts

Calls

no outgoing calls

Tested by

no test coverage detected