kjelsrud.dev/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts

36 lines
1.5 KiB
TypeScript
Raw Normal View History

2023-07-19 21:31:30 +02:00
import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
import { LSPAny } from 'vscode-languageserver-types';
import { MessageDirection, ProtocolRequestType } from './messages';
/**
* The 'workspace/configuration' request is sent from the server to the client to fetch a certain
* configuration setting.
*
* This pull model replaces the old push model were the client signaled configuration change via an
* event. If the server still needs to react to configuration changes (since the server caches the
* result of `workspace/configuration` requests) the server should register for an empty configuration
* change event and empty the cache if such an event is received.
*/
export declare namespace ConfigurationRequest {
const method: 'workspace/configuration';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<ConfigurationParams, any[], never, void, void>;
type HandlerSignature = RequestHandler<ConfigurationParams, LSPAny[], void>;
type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<LSPAny[], void>;
}
export interface ConfigurationItem {
/**
* The scope to get the configuration section for.
*/
scopeUri?: string;
/**
* The configuration section asked for.
*/
section?: string;
}
/**
* The parameters of a configuration request.
*/
export interface ConfigurationParams {
items: ConfigurationItem[];
}