Skip to content

lspeasy / server/src / RequestContext

Interface: RequestContext

Defined in: packages/server/src/types.ts:136

Context provided to request handlers alongside params and the cancellation token.

Remarks

Use id for correlating log entries to specific requests, and clientCapabilities to conditionally include capability-dependent data in the response (e.g. include commitCharacters only when the client supports completionItem.commitCharactersSupport).

Properties

PropertyTypeDescriptionDefined in
clientCapabilities?anyClient capabilities received during initialize. Available after the first initialize request.packages/server/src/types.ts:154
idstring | numberJSON-RPC request ID for correlation. Remarks May be a string or a number — never coerce to integer.packages/server/src/types.ts:143
methodstringLSP method string, e.g. 'textDocument/hover'.packages/server/src/types.ts:148

Released under the MIT License.