完成世界书、骰子、apiconfig页面处理

This commit is contained in:
2026-04-30 01:35:10 +08:00
parent a3e3711b2b
commit ba9b925c32
4602 changed files with 785225 additions and 23 deletions

View File

@@ -0,0 +1,4 @@
import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api';
export * from 'vscode-jsonrpc/browser';
export * from '../common/api';
export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection;

View File

@@ -0,0 +1,58 @@
import type { integer } from 'vscode-languageserver-types';
export * from 'vscode-jsonrpc';
export * from 'vscode-languageserver-types';
export * from './messages';
export * from './protocol';
export { ProtocolConnection, createProtocolConnection } from './connection';
export declare namespace LSPErrorCodes {
/**
* This is the start range of LSP reserved error codes.
* It doesn't denote a real error code.
*
* @since 3.16.0
*/
const lspReservedErrorRangeStart: integer;
/**
* A request failed but it was syntactically correct, e.g the
* method name was known and the parameters were valid. The error
* message should contain human readable information about why
* the request failed.
*
* @since 3.17.0
*/
const RequestFailed: integer;
/**
* The server cancelled the request. This error code should
* only be used for requests that explicitly support being
* server cancellable.
*
* @since 3.17.0
*/
const ServerCancelled: integer;
/**
* The server detected that the content of a document got
* modified outside normal conditions. A server should
* NOT send this error code if it detects a content change
* in it unprocessed messages. The result even computed
* on an older state might still be useful for the client.
*
* If a client decides that a result is not of any use anymore
* the client should cancel the request.
*/
const ContentModified: integer;
/**
* The client has canceled a request and a server as detected
* the cancel.
*/
const RequestCancelled: integer;
/**
* This is the end range of LSP reserved error codes.
* It doesn't denote a real error code.
*
* @since 3.16.0
*/
const lspReservedErrorRangeEnd: integer;
}
export type LSPErrorCodes = integer;
export declare namespace Proposed {
}

View File

@@ -0,0 +1,15 @@
"use strict";
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
Object.defineProperty(exports, "__esModule", { value: true });
exports.createProtocolConnection = void 0;
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
function createProtocolConnection(input, output, logger, options) {
if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
options = { connectionStrategy: options };
}
return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options);
}
exports.createProtocolConnection = createProtocolConnection;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,86 @@
import { RequestHandler } from 'vscode-jsonrpc';
import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-types';
import { MessageDirection, ProtocolRequestType } from './messages';
import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
/**
* @since 3.16.0
*/
export interface CallHierarchyClientCapabilities {
/**
* Whether implementation supports dynamic registration. If this is set to `true`
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
* return value for the corresponding server capability as well.
*/
dynamicRegistration?: boolean;
}
/**
* Call hierarchy options used during static registration.
*
* @since 3.16.0
*/
export interface CallHierarchyOptions extends WorkDoneProgressOptions {
}
/**
* Call hierarchy options used during static or dynamic registration.
*
* @since 3.16.0
*/
export interface CallHierarchyRegistrationOptions extends TextDocumentRegistrationOptions, CallHierarchyOptions, StaticRegistrationOptions {
}
/**
* The parameter of a `textDocument/prepareCallHierarchy` request.
*
* @since 3.16.0
*/
export interface CallHierarchyPrepareParams extends TextDocumentPositionParams, WorkDoneProgressParams {
}
/**
* A request to result a `CallHierarchyItem` in a document at a given position.
* Can be used as an input to an incoming or outgoing call hierarchy.
*
* @since 3.16.0
*/
export declare namespace CallHierarchyPrepareRequest {
const method: 'textDocument/prepareCallHierarchy';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<CallHierarchyPrepareParams, CallHierarchyItem[] | null, never, void, CallHierarchyRegistrationOptions>;
type HandlerSignature = RequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, void>;
}
/**
* The parameter of a `callHierarchy/incomingCalls` request.
*
* @since 3.16.0
*/
export interface CallHierarchyIncomingCallsParams extends WorkDoneProgressParams, PartialResultParams {
item: CallHierarchyItem;
}
/**
* A request to resolve the incoming calls for a given `CallHierarchyItem`.
*
* @since 3.16.0
*/
export declare namespace CallHierarchyIncomingCallsRequest {
const method: 'callHierarchy/incomingCalls';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, CallHierarchyIncomingCall[], void, void>;
type HandlerSignature = RequestHandler<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, void>;
}
/**
* The parameter of a `callHierarchy/outgoingCalls` request.
*
* @since 3.16.0
*/
export interface CallHierarchyOutgoingCallsParams extends WorkDoneProgressParams, PartialResultParams {
item: CallHierarchyItem;
}
/**
* A request to resolve the outgoing calls for a given `CallHierarchyItem`.
*
* @since 3.16.0
*/
export declare namespace CallHierarchyOutgoingCallsRequest {
const method: 'callHierarchy/outgoingCalls';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, CallHierarchyOutgoingCall[], void, void>;
type HandlerSignature = RequestHandler<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, void>;
}

View File

@@ -0,0 +1,42 @@
"use strict";
/* --------------------------------------------------------------------------------------------
* Copyright (c) TypeFox, Microsoft and others. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
Object.defineProperty(exports, "__esModule", { value: true });
exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0;
const messages_1 = require("./messages");
/**
* A request to result a `CallHierarchyItem` in a document at a given position.
* Can be used as an input to an incoming or outgoing call hierarchy.
*
* @since 3.16.0
*/
var CallHierarchyPrepareRequest;
(function (CallHierarchyPrepareRequest) {
CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
CallHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
})(CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {}));
/**
* A request to resolve the incoming calls for a given `CallHierarchyItem`.
*
* @since 3.16.0
*/
var CallHierarchyIncomingCallsRequest;
(function (CallHierarchyIncomingCallsRequest) {
CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
CallHierarchyIncomingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
})(CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {}));
/**
* A request to resolve the outgoing calls for a given `CallHierarchyItem`.
*
* @since 3.16.0
*/
var CallHierarchyOutgoingCallsRequest;
(function (CallHierarchyOutgoingCallsRequest) {
CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
CallHierarchyOutgoingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
})(CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {}));

View File

@@ -0,0 +1,341 @@
import { RequestHandler0, RequestHandler, ProgressType } from 'vscode-jsonrpc';
import { TextDocumentIdentifier, Diagnostic, DocumentUri, integer } from 'vscode-languageserver-types';
import { MessageDirection, ProtocolRequestType0, ProtocolRequestType } from './messages';
import type { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions } from './protocol';
/**
* Client capabilities specific to diagnostic pull requests.
*
* @since 3.17.0
*/
export type DiagnosticClientCapabilities = {
/**
* Whether implementation supports dynamic registration. If this is set to `true`
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
* return value for the corresponding server capability as well.
*/
dynamicRegistration?: boolean;
/**
* Whether the clients supports related documents for document diagnostic pulls.
*/
relatedDocumentSupport?: boolean;
};
/**
* Workspace client capabilities specific to diagnostic pull requests.
*
* @since 3.17.0
*/
export type DiagnosticWorkspaceClientCapabilities = {
/**
* Whether the client implementation supports a refresh request sent from
* the server to the client.
*
* Note that this event is global and will force the client to refresh all
* pulled diagnostics currently shown. It should be used with absolute care and
* is useful for situation where a server for example detects a project wide
* change that requires such a calculation.
*/
refreshSupport?: boolean;
};
/**
* Diagnostic options.
*
* @since 3.17.0
*/
export type DiagnosticOptions = WorkDoneProgressOptions & {
/**
* An optional identifier under which the diagnostics are
* managed by the client.
*/
identifier?: string;
/**
* Whether the language has inter file dependencies meaning that
* editing code in one file can result in a different diagnostic
* set in another file. Inter file dependencies are common for
* most programming languages and typically uncommon for linters.
*/
interFileDependencies: boolean;
/**
* The server provides support for workspace diagnostics as well.
*/
workspaceDiagnostics: boolean;
};
/**
* Diagnostic registration options.
*
* @since 3.17.0
*/
export type DiagnosticRegistrationOptions = TextDocumentRegistrationOptions & DiagnosticOptions & StaticRegistrationOptions;
export type $DiagnosticServerCapabilities = {
diagnosticProvider?: DiagnosticOptions;
};
/**
* Cancellation data returned from a diagnostic request.
*
* @since 3.17.0
*/
export type DiagnosticServerCancellationData = {
retriggerRequest: boolean;
};
/**
* @since 3.17.0
*/
export declare namespace DiagnosticServerCancellationData {
function is(value: any): value is DiagnosticServerCancellationData;
}
/**
* Parameters of the document diagnostic request.
*
* @since 3.17.0
*/
export type DocumentDiagnosticParams = WorkDoneProgressParams & PartialResultParams & {
/**
* The text document.
*/
textDocument: TextDocumentIdentifier;
/**
* The additional identifier provided during registration.
*/
identifier?: string;
/**
* The result id of a previous response if provided.
*/
previousResultId?: string;
};
/**
* The document diagnostic report kinds.
*
* @since 3.17.0
*/
export declare namespace DocumentDiagnosticReportKind {
/**
* A diagnostic report with a full
* set of problems.
*/
const Full = "full";
/**
* A report indicating that the last
* returned report is still accurate.
*/
const Unchanged = "unchanged";
}
export type DocumentDiagnosticReportKind = 'full' | 'unchanged';
/**
* A diagnostic report with a full set of problems.
*
* @since 3.17.0
*/
export type FullDocumentDiagnosticReport = {
/**
* A full document diagnostic report.
*/
kind: typeof DocumentDiagnosticReportKind.Full;
/**
* An optional result id. If provided it will
* be sent on the next diagnostic request for the
* same document.
*/
resultId?: string;
/**
* The actual items.
*/
items: Diagnostic[];
};
/**
* A full diagnostic report with a set of related documents.
*
* @since 3.17.0
*/
export type RelatedFullDocumentDiagnosticReport = FullDocumentDiagnosticReport & {
/**
* Diagnostics of related documents. This information is useful
* in programming languages where code in a file A can generate
* diagnostics in a file B which A depends on. An example of
* such a language is C/C++ where marco definitions in a file
* a.cpp and result in errors in a header file b.hpp.
*
* @since 3.17.0
*/
relatedDocuments?: {
[uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
};
};
/**
* A diagnostic report indicating that the last returned
* report is still accurate.
*
* @since 3.17.0
*/
export type UnchangedDocumentDiagnosticReport = {
/**
* A document diagnostic report indicating
* no changes to the last result. A server can
* only return `unchanged` if result ids are
* provided.
*/
kind: typeof DocumentDiagnosticReportKind.Unchanged;
/**
* A result id which will be sent on the next
* diagnostic request for the same document.
*/
resultId: string;
};
/**
* An unchanged diagnostic report with a set of related documents.
*
* @since 3.17.0
*/
export type RelatedUnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport & {
/**
* Diagnostics of related documents. This information is useful
* in programming languages where code in a file A can generate
* diagnostics in a file B which A depends on. An example of
* such a language is C/C++ where marco definitions in a file
* a.cpp and result in errors in a header file b.hpp.
*
* @since 3.17.0
*/
relatedDocuments?: {
[uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
};
};
/**
* The result of a document diagnostic pull request. A report can
* either be a full report containing all diagnostics for the
* requested document or an unchanged report indicating that nothing
* has changed in terms of diagnostics in comparison to the last
* pull request.
*
* @since 3.17.0
*/
export type DocumentDiagnosticReport = RelatedFullDocumentDiagnosticReport | RelatedUnchangedDocumentDiagnosticReport;
/**
* A partial result for a document diagnostic report.
*
* @since 3.17.0
*/
export type DocumentDiagnosticReportPartialResult = {
relatedDocuments: {
[uri: DocumentUri]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport;
};
};
/**
* The document diagnostic request definition.
*
* @since 3.17.0
*/
export declare namespace DocumentDiagnosticRequest {
const method: 'textDocument/diagnostic';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData, DiagnosticRegistrationOptions>;
const partialResult: ProgressType<DocumentDiagnosticReportPartialResult>;
type HandlerSignature = RequestHandler<DocumentDiagnosticParams, DocumentDiagnosticReport, void>;
}
/**
* A previous result id in a workspace pull request.
*
* @since 3.17.0
*/
export type PreviousResultId = {
/**
* The URI for which the client knowns a
* result id.
*/
uri: DocumentUri;
/**
* The value of the previous result id.
*/
value: string;
};
/**
* Parameters of the workspace diagnostic request.
*
* @since 3.17.0
*/
export type WorkspaceDiagnosticParams = WorkDoneProgressParams & PartialResultParams & {
/**
* The additional identifier provided during registration.
*/
identifier?: string;
/**
* The currently known diagnostic reports with their
* previous result ids.
*/
previousResultIds: PreviousResultId[];
};
/**
* A full document diagnostic report for a workspace diagnostic result.
*
* @since 3.17.0
*/
export type WorkspaceFullDocumentDiagnosticReport = FullDocumentDiagnosticReport & {
/**
* The URI for which diagnostic information is reported.
*/
uri: DocumentUri;
/**
* The version number for which the diagnostics are reported.
* If the document is not marked as open `null` can be provided.
*/
version: integer | null;
};
/**
* An unchanged document diagnostic report for a workspace diagnostic result.
*
* @since 3.17.0
*/
export type WorkspaceUnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport & {
/**
* The URI for which diagnostic information is reported.
*/
uri: DocumentUri;
/**
* The version number for which the diagnostics are reported.
* If the document is not marked as open `null` can be provided.
*/
version: integer | null;
};
/**
* A workspace diagnostic document report.
*
* @since 3.17.0
*/
export type WorkspaceDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport | WorkspaceUnchangedDocumentDiagnosticReport;
/**
* A workspace diagnostic report.
*
* @since 3.17.0
*/
export type WorkspaceDiagnosticReport = {
items: WorkspaceDocumentDiagnosticReport[];
};
/**
* A partial result for a workspace diagnostic report.
*
* @since 3.17.0
*/
export type WorkspaceDiagnosticReportPartialResult = {
items: WorkspaceDocumentDiagnosticReport[];
};
/**
* The workspace diagnostic request definition.
*
* @since 3.17.0
*/
export declare namespace WorkspaceDiagnosticRequest {
const method: 'workspace/diagnostic';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, DiagnosticServerCancellationData, void>;
const partialResult: ProgressType<WorkspaceDiagnosticReportPartialResult>;
type HandlerSignature = RequestHandler<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport | null, void>;
}
/**
* The diagnostic refresh request definition.
*
* @since 3.17.0
*/
export declare namespace DiagnosticRefreshRequest {
const method: `workspace/diagnostic/refresh`;
const messageDirection: MessageDirection;
const type: ProtocolRequestType0<void, void, void, void>;
type HandlerSignature = RequestHandler0<void, void>;
}

View File

@@ -0,0 +1,21 @@
"use strict";
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImplementationRequest = void 0;
const messages_1 = require("./messages");
// @ts-ignore: to avoid inlining LocationLink as dynamic import
let __noDynamicImport;
/**
* A request to resolve the implementation locations of a symbol at a given text
* document position. The request's parameter is of type {@link TextDocumentPositionParams}
* the response is of type {@link Definition} or a Thenable that resolves to such.
*/
var ImplementationRequest;
(function (ImplementationRequest) {
ImplementationRequest.method = 'textDocument/implementation';
ImplementationRequest.messageDirection = messages_1.MessageDirection.clientToServer;
ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
})(ImplementationRequest || (exports.ImplementationRequest = ImplementationRequest = {}));

View File

@@ -0,0 +1,57 @@
import { InlineCompletionItem, InlineCompletionContext, InlineCompletionList } from 'vscode-languageserver-types';
import { RequestHandler } from 'vscode-jsonrpc';
import { MessageDirection, ProtocolRequestType } from './messages';
import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentPositionParams } from './protocol';
/**
* Client capabilities specific to inline completions.
*
* @since 3.18.0
* @proposed
*/
export type InlineCompletionClientCapabilities = {
/**
* Whether implementation supports dynamic registration for inline completion providers.
*/
dynamicRegistration?: boolean;
};
/**
* Inline completion options used during static registration.
*
* @since 3.18.0
* @proposed
*/
export type InlineCompletionOptions = WorkDoneProgressOptions;
/**
* Inline completion options used during static or dynamic registration.
*
* @since 3.18.0
* @proposed
*/
export type InlineCompletionRegistrationOptions = InlineCompletionOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions;
/**
* A parameter literal used in inline completion requests.
*
* @since 3.18.0
* @proposed
*/
export type InlineCompletionParams = WorkDoneProgressParams & TextDocumentPositionParams & {
/**
* Additional information about the context in which inline completions were
* requested.
*/
context: InlineCompletionContext;
};
/**
* A request to provide inline completions in a document. The request's parameter is of
* type {@link InlineCompletionParams}, the response is of type
* {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such.
*
* @since 3.18.0
* @proposed
*/
export declare namespace InlineCompletionRequest {
const method: 'textDocument/inlineCompletion';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<InlineCompletionParams, InlineCompletionList | InlineCompletionItem[] | null, InlineCompletionItem[], void, InlineCompletionRegistrationOptions>;
type HandlerSignature = RequestHandler<InlineCompletionParams, InlineCompletionList | InlineCompletionItem[] | null, void>;
}

View File

@@ -0,0 +1,943 @@
"use strict";
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = void 0;
exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
const messages_1 = require("./messages");
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
const Is = require("./utils/is");
const protocol_implementation_1 = require("./protocol.implementation");
Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
const protocol_typeDefinition_1 = require("./protocol.typeDefinition");
Object.defineProperty(exports, "TypeDefinitionRequest", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } });
const protocol_workspaceFolder_1 = require("./protocol.workspaceFolder");
Object.defineProperty(exports, "WorkspaceFoldersRequest", { enumerable: true, get: function () { return protocol_workspaceFolder_1.WorkspaceFoldersRequest; } });
Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function () { return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification; } });
const protocol_configuration_1 = require("./protocol.configuration");
Object.defineProperty(exports, "ConfigurationRequest", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } });
const protocol_colorProvider_1 = require("./protocol.colorProvider");
Object.defineProperty(exports, "DocumentColorRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } });
Object.defineProperty(exports, "ColorPresentationRequest", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } });
const protocol_foldingRange_1 = require("./protocol.foldingRange");
Object.defineProperty(exports, "FoldingRangeRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } });
Object.defineProperty(exports, "FoldingRangeRefreshRequest", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRefreshRequest; } });
const protocol_declaration_1 = require("./protocol.declaration");
Object.defineProperty(exports, "DeclarationRequest", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } });
const protocol_selectionRange_1 = require("./protocol.selectionRange");
Object.defineProperty(exports, "SelectionRangeRequest", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } });
const protocol_progress_1 = require("./protocol.progress");
Object.defineProperty(exports, "WorkDoneProgress", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } });
Object.defineProperty(exports, "WorkDoneProgressCreateRequest", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } });
Object.defineProperty(exports, "WorkDoneProgressCancelNotification", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } });
const protocol_callHierarchy_1 = require("./protocol.callHierarchy");
Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } });
Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });
Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });
const protocol_semanticTokens_1 = require("./protocol.semanticTokens");
Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });
Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });
Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });
Object.defineProperty(exports, "SemanticTokensRangeRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } });
Object.defineProperty(exports, "SemanticTokensRefreshRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } });
Object.defineProperty(exports, "SemanticTokensRegistrationType", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } });
const protocol_showDocument_1 = require("./protocol.showDocument");
Object.defineProperty(exports, "ShowDocumentRequest", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } });
const protocol_linkedEditingRange_1 = require("./protocol.linkedEditingRange");
Object.defineProperty(exports, "LinkedEditingRangeRequest", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } });
const protocol_fileOperations_1 = require("./protocol.fileOperations");
Object.defineProperty(exports, "FileOperationPatternKind", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } });
Object.defineProperty(exports, "DidCreateFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } });
Object.defineProperty(exports, "WillCreateFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } });
Object.defineProperty(exports, "DidRenameFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } });
Object.defineProperty(exports, "WillRenameFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } });
Object.defineProperty(exports, "DidDeleteFilesNotification", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } });
Object.defineProperty(exports, "WillDeleteFilesRequest", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } });
const protocol_moniker_1 = require("./protocol.moniker");
Object.defineProperty(exports, "UniquenessLevel", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } });
Object.defineProperty(exports, "MonikerKind", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } });
Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } });
const protocol_typeHierarchy_1 = require("./protocol.typeHierarchy");
Object.defineProperty(exports, "TypeHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest; } });
Object.defineProperty(exports, "TypeHierarchySubtypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest; } });
Object.defineProperty(exports, "TypeHierarchySupertypesRequest", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest; } });
const protocol_inlineValue_1 = require("./protocol.inlineValue");
Object.defineProperty(exports, "InlineValueRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRequest; } });
Object.defineProperty(exports, "InlineValueRefreshRequest", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRefreshRequest; } });
const protocol_inlayHint_1 = require("./protocol.inlayHint");
Object.defineProperty(exports, "InlayHintRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRequest; } });
Object.defineProperty(exports, "InlayHintResolveRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintResolveRequest; } });
Object.defineProperty(exports, "InlayHintRefreshRequest", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRefreshRequest; } });
const protocol_diagnostic_1 = require("./protocol.diagnostic");
Object.defineProperty(exports, "DiagnosticServerCancellationData", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticServerCancellationData; } });
Object.defineProperty(exports, "DocumentDiagnosticReportKind", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticReportKind; } });
Object.defineProperty(exports, "DocumentDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticRequest; } });
Object.defineProperty(exports, "WorkspaceDiagnosticRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.WorkspaceDiagnosticRequest; } });
Object.defineProperty(exports, "DiagnosticRefreshRequest", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticRefreshRequest; } });
const protocol_notebook_1 = require("./protocol.notebook");
Object.defineProperty(exports, "NotebookCellKind", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellKind; } });
Object.defineProperty(exports, "ExecutionSummary", { enumerable: true, get: function () { return protocol_notebook_1.ExecutionSummary; } });
Object.defineProperty(exports, "NotebookCell", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCell; } });
Object.defineProperty(exports, "NotebookDocument", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocument; } });
Object.defineProperty(exports, "NotebookDocumentSyncRegistrationType", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocumentSyncRegistrationType; } });
Object.defineProperty(exports, "DidOpenNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidOpenNotebookDocumentNotification; } });
Object.defineProperty(exports, "NotebookCellArrayChange", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellArrayChange; } });
Object.defineProperty(exports, "DidChangeNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidChangeNotebookDocumentNotification; } });
Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidSaveNotebookDocumentNotification; } });
Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } });
const protocol_inlineCompletion_1 = require("./protocol.inlineCompletion");
Object.defineProperty(exports, "InlineCompletionRequest", { enumerable: true, get: function () { return protocol_inlineCompletion_1.InlineCompletionRequest; } });
// @ts-ignore: to avoid inlining LocationLink as dynamic import
let __noDynamicImport;
/**
* The TextDocumentFilter namespace provides helper functions to work with
* {@link TextDocumentFilter} literals.
*
* @since 3.17.0
*/
var TextDocumentFilter;
(function (TextDocumentFilter) {
function is(value) {
const candidate = value;
return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
}
TextDocumentFilter.is = is;
})(TextDocumentFilter || (exports.TextDocumentFilter = TextDocumentFilter = {}));
/**
* The NotebookDocumentFilter namespace provides helper functions to work with
* {@link NotebookDocumentFilter} literals.
*
* @since 3.17.0
*/
var NotebookDocumentFilter;
(function (NotebookDocumentFilter) {
function is(value) {
const candidate = value;
return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
}
NotebookDocumentFilter.is = is;
})(NotebookDocumentFilter || (exports.NotebookDocumentFilter = NotebookDocumentFilter = {}));
/**
* The NotebookCellTextDocumentFilter namespace provides helper functions to work with
* {@link NotebookCellTextDocumentFilter} literals.
*
* @since 3.17.0
*/
var NotebookCellTextDocumentFilter;
(function (NotebookCellTextDocumentFilter) {
function is(value) {
const candidate = value;
return Is.objectLiteral(candidate)
&& (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook))
&& (candidate.language === undefined || Is.string(candidate.language));
}
NotebookCellTextDocumentFilter.is = is;
})(NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter = {}));
/**
* The DocumentSelector namespace provides helper functions to work with
* {@link DocumentSelector}s.
*/
var DocumentSelector;
(function (DocumentSelector) {
function is(value) {
if (!Array.isArray(value)) {
return false;
}
for (let elem of value) {
if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
return false;
}
}
return true;
}
DocumentSelector.is = is;
})(DocumentSelector || (exports.DocumentSelector = DocumentSelector = {}));
/**
* The `client/registerCapability` request is sent from the server to the client to register a new capability
* handler on the client side.
*/
var RegistrationRequest;
(function (RegistrationRequest) {
RegistrationRequest.method = 'client/registerCapability';
RegistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
RegistrationRequest.type = new messages_1.ProtocolRequestType(RegistrationRequest.method);
})(RegistrationRequest || (exports.RegistrationRequest = RegistrationRequest = {}));
/**
* The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
* handler on the client side.
*/
var UnregistrationRequest;
(function (UnregistrationRequest) {
UnregistrationRequest.method = 'client/unregisterCapability';
UnregistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient;
UnregistrationRequest.type = new messages_1.ProtocolRequestType(UnregistrationRequest.method);
})(UnregistrationRequest || (exports.UnregistrationRequest = UnregistrationRequest = {}));
var ResourceOperationKind;
(function (ResourceOperationKind) {
/**
* Supports creating new files and folders.
*/
ResourceOperationKind.Create = 'create';
/**
* Supports renaming existing files and folders.
*/
ResourceOperationKind.Rename = 'rename';
/**
* Supports deleting existing files and folders.
*/
ResourceOperationKind.Delete = 'delete';
})(ResourceOperationKind || (exports.ResourceOperationKind = ResourceOperationKind = {}));
var FailureHandlingKind;
(function (FailureHandlingKind) {
/**
* Applying the workspace change is simply aborted if one of the changes provided
* fails. All operations executed before the failing operation stay executed.
*/
FailureHandlingKind.Abort = 'abort';
/**
* All operations are executed transactional. That means they either all
* succeed or no changes at all are applied to the workspace.
*/
FailureHandlingKind.Transactional = 'transactional';
/**
* If the workspace edit contains only textual file changes they are executed transactional.
* If resource changes (create, rename or delete file) are part of the change the failure
* handling strategy is abort.
*/
FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
/**
* The client tries to undo the operations already executed. But there is no
* guarantee that this is succeeding.
*/
FailureHandlingKind.Undo = 'undo';
})(FailureHandlingKind || (exports.FailureHandlingKind = FailureHandlingKind = {}));
/**
* A set of predefined position encoding kinds.
*
* @since 3.17.0
*/
var PositionEncodingKind;
(function (PositionEncodingKind) {
/**
* Character offsets count UTF-8 code units (e.g. bytes).
*/
PositionEncodingKind.UTF8 = 'utf-8';
/**
* Character offsets count UTF-16 code units.
*
* This is the default and must always be supported
* by servers
*/
PositionEncodingKind.UTF16 = 'utf-16';
/**
* Character offsets count UTF-32 code units.
*
* Implementation note: these are the same as Unicode codepoints,
* so this `PositionEncodingKind` may also be used for an
* encoding-agnostic representation of character offsets.
*/
PositionEncodingKind.UTF32 = 'utf-32';
})(PositionEncodingKind || (exports.PositionEncodingKind = PositionEncodingKind = {}));
/**
* The StaticRegistrationOptions namespace provides helper functions to work with
* {@link StaticRegistrationOptions} literals.
*/
var StaticRegistrationOptions;
(function (StaticRegistrationOptions) {
function hasId(value) {
const candidate = value;
return candidate && Is.string(candidate.id) && candidate.id.length > 0;
}
StaticRegistrationOptions.hasId = hasId;
})(StaticRegistrationOptions || (exports.StaticRegistrationOptions = StaticRegistrationOptions = {}));
/**
* The TextDocumentRegistrationOptions namespace provides helper functions to work with
* {@link TextDocumentRegistrationOptions} literals.
*/
var TextDocumentRegistrationOptions;
(function (TextDocumentRegistrationOptions) {
function is(value) {
const candidate = value;
return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
}
TextDocumentRegistrationOptions.is = is;
})(TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = TextDocumentRegistrationOptions = {}));
/**
* The WorkDoneProgressOptions namespace provides helper functions to work with
* {@link WorkDoneProgressOptions} literals.
*/
var WorkDoneProgressOptions;
(function (WorkDoneProgressOptions) {
function is(value) {
const candidate = value;
return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
}
WorkDoneProgressOptions.is = is;
function hasWorkDoneProgress(value) {
const candidate = value;
return candidate && Is.boolean(candidate.workDoneProgress);
}
WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
})(WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = WorkDoneProgressOptions = {}));
/**
* The initialize request is sent from the client to the server.
* It is sent once as the request after starting up the server.
* The requests parameter is of type {@link InitializeParams}
* the response if of type {@link InitializeResult} of a Thenable that
* resolves to such.
*/
var InitializeRequest;
(function (InitializeRequest) {
InitializeRequest.method = 'initialize';
InitializeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
InitializeRequest.type = new messages_1.ProtocolRequestType(InitializeRequest.method);
})(InitializeRequest || (exports.InitializeRequest = InitializeRequest = {}));
/**
* Known error codes for an `InitializeErrorCodes`;
*/
var InitializeErrorCodes;
(function (InitializeErrorCodes) {
/**
* If the protocol version provided by the client can't be handled by the server.
*
* @deprecated This initialize error got replaced by client capabilities. There is
* no version handshake in version 3.0x
*/
InitializeErrorCodes.unknownProtocolVersion = 1;
})(InitializeErrorCodes || (exports.InitializeErrorCodes = InitializeErrorCodes = {}));
/**
* The initialized notification is sent from the client to the
* server after the client is fully initialized and the server
* is allowed to send requests from the server to the client.
*/
var InitializedNotification;
(function (InitializedNotification) {
InitializedNotification.method = 'initialized';
InitializedNotification.messageDirection = messages_1.MessageDirection.clientToServer;
InitializedNotification.type = new messages_1.ProtocolNotificationType(InitializedNotification.method);
})(InitializedNotification || (exports.InitializedNotification = InitializedNotification = {}));
//---- Shutdown Method ----
/**
* A shutdown request is sent from the client to the server.
* It is sent once when the client decides to shutdown the
* server. The only notification that is sent after a shutdown request
* is the exit event.
*/
var ShutdownRequest;
(function (ShutdownRequest) {
ShutdownRequest.method = 'shutdown';
ShutdownRequest.messageDirection = messages_1.MessageDirection.clientToServer;
ShutdownRequest.type = new messages_1.ProtocolRequestType0(ShutdownRequest.method);
})(ShutdownRequest || (exports.ShutdownRequest = ShutdownRequest = {}));
//---- Exit Notification ----
/**
* The exit event is sent from the client to the server to
* ask the server to exit its process.
*/
var ExitNotification;
(function (ExitNotification) {
ExitNotification.method = 'exit';
ExitNotification.messageDirection = messages_1.MessageDirection.clientToServer;
ExitNotification.type = new messages_1.ProtocolNotificationType0(ExitNotification.method);
})(ExitNotification || (exports.ExitNotification = ExitNotification = {}));
/**
* The configuration change notification is sent from the client to the server
* when the client's configuration has changed. The notification contains
* the changed configuration as defined by the language client.
*/
var DidChangeConfigurationNotification;
(function (DidChangeConfigurationNotification) {
DidChangeConfigurationNotification.method = 'workspace/didChangeConfiguration';
DidChangeConfigurationNotification.messageDirection = messages_1.MessageDirection.clientToServer;
DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType(DidChangeConfigurationNotification.method);
})(DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = DidChangeConfigurationNotification = {}));
//---- Message show and log notifications ----
/**
* The message type
*/
var MessageType;
(function (MessageType) {
/**
* An error message.
*/
MessageType.Error = 1;
/**
* A warning message.
*/
MessageType.Warning = 2;
/**
* An information message.
*/
MessageType.Info = 3;
/**
* A log message.
*/
MessageType.Log = 4;
/**
* A debug message.
*
* @since 3.18.0
*/
MessageType.Debug = 5;
})(MessageType || (exports.MessageType = MessageType = {}));
/**
* The show message notification is sent from a server to a client to ask
* the client to display a particular message in the user interface.
*/
var ShowMessageNotification;
(function (ShowMessageNotification) {
ShowMessageNotification.method = 'window/showMessage';
ShowMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient;
ShowMessageNotification.type = new messages_1.ProtocolNotificationType(ShowMessageNotification.method);
})(ShowMessageNotification || (exports.ShowMessageNotification = ShowMessageNotification = {}));
/**
* The show message request is sent from the server to the client to show a message
* and a set of options actions to the user.
*/
var ShowMessageRequest;
(function (ShowMessageRequest) {
ShowMessageRequest.method = 'window/showMessageRequest';
ShowMessageRequest.messageDirection = messages_1.MessageDirection.serverToClient;
ShowMessageRequest.type = new messages_1.ProtocolRequestType(ShowMessageRequest.method);
})(ShowMessageRequest || (exports.ShowMessageRequest = ShowMessageRequest = {}));
/**
* The log message notification is sent from the server to the client to ask
* the client to log a particular message.
*/
var LogMessageNotification;
(function (LogMessageNotification) {
LogMessageNotification.method = 'window/logMessage';
LogMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient;
LogMessageNotification.type = new messages_1.ProtocolNotificationType(LogMessageNotification.method);
})(LogMessageNotification || (exports.LogMessageNotification = LogMessageNotification = {}));
//---- Telemetry notification
/**
* The telemetry event notification is sent from the server to the client to ask
* the client to log telemetry data.
*/
var TelemetryEventNotification;
(function (TelemetryEventNotification) {
TelemetryEventNotification.method = 'telemetry/event';
TelemetryEventNotification.messageDirection = messages_1.MessageDirection.serverToClient;
TelemetryEventNotification.type = new messages_1.ProtocolNotificationType(TelemetryEventNotification.method);
})(TelemetryEventNotification || (exports.TelemetryEventNotification = TelemetryEventNotification = {}));
/**
* Defines how the host (editor) should sync
* document changes to the language server.
*/
var TextDocumentSyncKind;
(function (TextDocumentSyncKind) {
/**
* Documents should not be synced at all.
*/
TextDocumentSyncKind.None = 0;
/**
* Documents are synced by always sending the full content
* of the document.
*/
TextDocumentSyncKind.Full = 1;
/**
* Documents are synced by sending the full content on open.
* After that only incremental updates to the document are
* send.
*/
TextDocumentSyncKind.Incremental = 2;
})(TextDocumentSyncKind || (exports.TextDocumentSyncKind = TextDocumentSyncKind = {}));
/**
* The document open notification is sent from the client to the server to signal
* newly opened text documents. The document's truth is now managed by the client
* and the server must not try to read the document's truth using the document's
* uri. Open in this sense means it is managed by the client. It doesn't necessarily
* mean that its content is presented in an editor. An open notification must not
* be sent more than once without a corresponding close notification send before.
* This means open and close notification must be balanced and the max open count
* is one.
*/
var DidOpenTextDocumentNotification;
(function (DidOpenTextDocumentNotification) {
DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
DidOpenTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
})(DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = DidOpenTextDocumentNotification = {}));
var TextDocumentContentChangeEvent;
(function (TextDocumentContentChangeEvent) {
/**
* Checks whether the information describes a delta event.
*/
function isIncremental(event) {
let candidate = event;
return candidate !== undefined && candidate !== null &&
typeof candidate.text === 'string' && candidate.range !== undefined &&
(candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
}
TextDocumentContentChangeEvent.isIncremental = isIncremental;
/**
* Checks whether the information describes a full replacement event.
*/
function isFull(event) {
let candidate = event;
return candidate !== undefined && candidate !== null &&
typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
}
TextDocumentContentChangeEvent.isFull = isFull;
})(TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = TextDocumentContentChangeEvent = {}));
/**
* The document change notification is sent from the client to the server to signal
* changes to a text document.
*/
var DidChangeTextDocumentNotification;
(function (DidChangeTextDocumentNotification) {
DidChangeTextDocumentNotification.method = 'textDocument/didChange';
DidChangeTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
})(DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = DidChangeTextDocumentNotification = {}));
/**
* The document close notification is sent from the client to the server when
* the document got closed in the client. The document's truth now exists where
* the document's uri points to (e.g. if the document's uri is a file uri the
* truth now exists on disk). As with the open notification the close notification
* is about managing the document's content. Receiving a close notification
* doesn't mean that the document was open in an editor before. A close
* notification requires a previous open notification to be sent.
*/
var DidCloseTextDocumentNotification;
(function (DidCloseTextDocumentNotification) {
DidCloseTextDocumentNotification.method = 'textDocument/didClose';
DidCloseTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
})(DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = DidCloseTextDocumentNotification = {}));
/**
* The document save notification is sent from the client to the server when
* the document got saved in the client.
*/
var DidSaveTextDocumentNotification;
(function (DidSaveTextDocumentNotification) {
DidSaveTextDocumentNotification.method = 'textDocument/didSave';
DidSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
})(DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = DidSaveTextDocumentNotification = {}));
/**
* Represents reasons why a text document is saved.
*/
var TextDocumentSaveReason;
(function (TextDocumentSaveReason) {
/**
* Manually triggered, e.g. by the user pressing save, by starting debugging,
* or by an API call.
*/
TextDocumentSaveReason.Manual = 1;
/**
* Automatic after a delay.
*/
TextDocumentSaveReason.AfterDelay = 2;
/**
* When the editor lost focus.
*/
TextDocumentSaveReason.FocusOut = 3;
})(TextDocumentSaveReason || (exports.TextDocumentSaveReason = TextDocumentSaveReason = {}));
/**
* A document will save notification is sent from the client to the server before
* the document is actually saved.
*/
var WillSaveTextDocumentNotification;
(function (WillSaveTextDocumentNotification) {
WillSaveTextDocumentNotification.method = 'textDocument/willSave';
WillSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer;
WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
})(WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = WillSaveTextDocumentNotification = {}));
/**
* A document will save request is sent from the client to the server before
* the document is actually saved. The request can return an array of TextEdits
* which will be applied to the text document before it is saved. Please note that
* clients might drop results if computing the text edits took too long or if a
* server constantly fails on this request. This is done to keep the save fast and
* reliable.
*/
var WillSaveTextDocumentWaitUntilRequest;
(function (WillSaveTextDocumentWaitUntilRequest) {
WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
WillSaveTextDocumentWaitUntilRequest.messageDirection = messages_1.MessageDirection.clientToServer;
WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
})(WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = WillSaveTextDocumentWaitUntilRequest = {}));
/**
* The watched files notification is sent from the client to the server when
* the client detects changes to file watched by the language client.
*/
var DidChangeWatchedFilesNotification;
(function (DidChangeWatchedFilesNotification) {
DidChangeWatchedFilesNotification.method = 'workspace/didChangeWatchedFiles';
DidChangeWatchedFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer;
DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType(DidChangeWatchedFilesNotification.method);
})(DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = DidChangeWatchedFilesNotification = {}));
/**
* The file event type
*/
var FileChangeType;
(function (FileChangeType) {
/**
* The file got created.
*/
FileChangeType.Created = 1;
/**
* The file got changed.
*/
FileChangeType.Changed = 2;
/**
* The file got deleted.
*/
FileChangeType.Deleted = 3;
})(FileChangeType || (exports.FileChangeType = FileChangeType = {}));
var RelativePattern;
(function (RelativePattern) {
function is(value) {
const candidate = value;
return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern);
}
RelativePattern.is = is;
})(RelativePattern || (exports.RelativePattern = RelativePattern = {}));
var WatchKind;
(function (WatchKind) {
/**
* Interested in create events.
*/
WatchKind.Create = 1;
/**
* Interested in change events
*/
WatchKind.Change = 2;
/**
* Interested in delete events
*/
WatchKind.Delete = 4;
})(WatchKind || (exports.WatchKind = WatchKind = {}));
/**
* Diagnostics notification are sent from the server to the client to signal
* results of validation runs.
*/
var PublishDiagnosticsNotification;
(function (PublishDiagnosticsNotification) {
PublishDiagnosticsNotification.method = 'textDocument/publishDiagnostics';
PublishDiagnosticsNotification.messageDirection = messages_1.MessageDirection.serverToClient;
PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType(PublishDiagnosticsNotification.method);
})(PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = PublishDiagnosticsNotification = {}));
/**
* How a completion was triggered
*/
var CompletionTriggerKind;
(function (CompletionTriggerKind) {
/**
* Completion was triggered by typing an identifier (24x7 code
* complete), manual invocation (e.g Ctrl+Space) or via API.
*/
CompletionTriggerKind.Invoked = 1;
/**
* Completion was triggered by a trigger character specified by
* the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
*/
CompletionTriggerKind.TriggerCharacter = 2;
/**
* Completion was re-triggered as current completion list is incomplete
*/
CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
})(CompletionTriggerKind || (exports.CompletionTriggerKind = CompletionTriggerKind = {}));
/**
* Request to request completion at a given text document position. The request's
* parameter is of type {@link TextDocumentPosition} the response
* is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList}
* or a Thenable that resolves to such.
*
* The request can delay the computation of the {@link CompletionItem.detail `detail`}
* and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve`
* request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
* `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
*/
var CompletionRequest;
(function (CompletionRequest) {
CompletionRequest.method = 'textDocument/completion';
CompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
})(CompletionRequest || (exports.CompletionRequest = CompletionRequest = {}));
/**
* Request to resolve additional information for a given completion item.The request's
* parameter is of type {@link CompletionItem} the response
* is of type {@link CompletionItem} or a Thenable that resolves to such.
*/
var CompletionResolveRequest;
(function (CompletionResolveRequest) {
CompletionResolveRequest.method = 'completionItem/resolve';
CompletionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
})(CompletionResolveRequest || (exports.CompletionResolveRequest = CompletionResolveRequest = {}));
/**
* Request to request hover information at a given text document position. The request's
* parameter is of type {@link TextDocumentPosition} the response is of
* type {@link Hover} or a Thenable that resolves to such.
*/
var HoverRequest;
(function (HoverRequest) {
HoverRequest.method = 'textDocument/hover';
HoverRequest.messageDirection = messages_1.MessageDirection.clientToServer;
HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
})(HoverRequest || (exports.HoverRequest = HoverRequest = {}));
/**
* How a signature help was triggered.
*
* @since 3.15.0
*/
var SignatureHelpTriggerKind;
(function (SignatureHelpTriggerKind) {
/**
* Signature help was invoked manually by the user or by a command.
*/
SignatureHelpTriggerKind.Invoked = 1;
/**
* Signature help was triggered by a trigger character.
*/
SignatureHelpTriggerKind.TriggerCharacter = 2;
/**
* Signature help was triggered by the cursor moving or by the document content changing.
*/
SignatureHelpTriggerKind.ContentChange = 3;
})(SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = SignatureHelpTriggerKind = {}));
var SignatureHelpRequest;
(function (SignatureHelpRequest) {
SignatureHelpRequest.method = 'textDocument/signatureHelp';
SignatureHelpRequest.messageDirection = messages_1.MessageDirection.clientToServer;
SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
})(SignatureHelpRequest || (exports.SignatureHelpRequest = SignatureHelpRequest = {}));
/**
* A request to resolve the definition location of a symbol at a given text
* document position. The request's parameter is of type {@link TextDocumentPosition}
* the response is of either type {@link Definition} or a typed array of
* {@link DefinitionLink} or a Thenable that resolves to such.
*/
var DefinitionRequest;
(function (DefinitionRequest) {
DefinitionRequest.method = 'textDocument/definition';
DefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
})(DefinitionRequest || (exports.DefinitionRequest = DefinitionRequest = {}));
/**
* A request to resolve project-wide references for the symbol denoted
* by the given text document position. The request's parameter is of
* type {@link ReferenceParams} the response is of type
* {@link Location Location[]} or a Thenable that resolves to such.
*/
var ReferencesRequest;
(function (ReferencesRequest) {
ReferencesRequest.method = 'textDocument/references';
ReferencesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
})(ReferencesRequest || (exports.ReferencesRequest = ReferencesRequest = {}));
/**
* Request to resolve a {@link DocumentHighlight} for a given
* text document position. The request's parameter is of type {@link TextDocumentPosition}
* the request response is an array of type {@link DocumentHighlight}
* or a Thenable that resolves to such.
*/
var DocumentHighlightRequest;
(function (DocumentHighlightRequest) {
DocumentHighlightRequest.method = 'textDocument/documentHighlight';
DocumentHighlightRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
})(DocumentHighlightRequest || (exports.DocumentHighlightRequest = DocumentHighlightRequest = {}));
/**
* A request to list all symbols found in a given text document. The request's
* parameter is of type {@link TextDocumentIdentifier} the
* response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable
* that resolves to such.
*/
var DocumentSymbolRequest;
(function (DocumentSymbolRequest) {
DocumentSymbolRequest.method = 'textDocument/documentSymbol';
DocumentSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
})(DocumentSymbolRequest || (exports.DocumentSymbolRequest = DocumentSymbolRequest = {}));
/**
* A request to provide commands for the given text document and range.
*/
var CodeActionRequest;
(function (CodeActionRequest) {
CodeActionRequest.method = 'textDocument/codeAction';
CodeActionRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
})(CodeActionRequest || (exports.CodeActionRequest = CodeActionRequest = {}));
/**
* Request to resolve additional information for a given code action.The request's
* parameter is of type {@link CodeAction} the response
* is of type {@link CodeAction} or a Thenable that resolves to such.
*/
var CodeActionResolveRequest;
(function (CodeActionResolveRequest) {
CodeActionResolveRequest.method = 'codeAction/resolve';
CodeActionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method);
})(CodeActionResolveRequest || (exports.CodeActionResolveRequest = CodeActionResolveRequest = {}));
/**
* A request to list project-wide symbols matching the query string given
* by the {@link WorkspaceSymbolParams}. The response is
* of type {@link SymbolInformation SymbolInformation[]} or a Thenable that
* resolves to such.
*
* @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients
* need to advertise support for WorkspaceSymbols via the client capability
* `workspace.symbol.resolveSupport`.
*
*/
var WorkspaceSymbolRequest;
(function (WorkspaceSymbolRequest) {
WorkspaceSymbolRequest.method = 'workspace/symbol';
WorkspaceSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer;
WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
})(WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = WorkspaceSymbolRequest = {}));
/**
* A request to resolve the range inside the workspace
* symbol's location.
*
* @since 3.17.0
*/
var WorkspaceSymbolResolveRequest;
(function (WorkspaceSymbolResolveRequest) {
WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve';
WorkspaceSymbolResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method);
})(WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = WorkspaceSymbolResolveRequest = {}));
/**
* A request to provide code lens for the given text document.
*/
var CodeLensRequest;
(function (CodeLensRequest) {
CodeLensRequest.method = 'textDocument/codeLens';
CodeLensRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method);
})(CodeLensRequest || (exports.CodeLensRequest = CodeLensRequest = {}));
/**
* A request to resolve a command for a given code lens.
*/
var CodeLensResolveRequest;
(function (CodeLensResolveRequest) {
CodeLensResolveRequest.method = 'codeLens/resolve';
CodeLensResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);
})(CodeLensResolveRequest || (exports.CodeLensResolveRequest = CodeLensResolveRequest = {}));
/**
* A request to refresh all code actions
*
* @since 3.16.0
*/
var CodeLensRefreshRequest;
(function (CodeLensRefreshRequest) {
CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;
CodeLensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient;
CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);
})(CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = CodeLensRefreshRequest = {}));
/**
* A request to provide document links
*/
var DocumentLinkRequest;
(function (DocumentLinkRequest) {
DocumentLinkRequest.method = 'textDocument/documentLink';
DocumentLinkRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
})(DocumentLinkRequest || (exports.DocumentLinkRequest = DocumentLinkRequest = {}));
/**
* Request to resolve additional information for a given document link. The request's
* parameter is of type {@link DocumentLink} the response
* is of type {@link DocumentLink} or a Thenable that resolves to such.
*/
var DocumentLinkResolveRequest;
(function (DocumentLinkResolveRequest) {
DocumentLinkResolveRequest.method = 'documentLink/resolve';
DocumentLinkResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method);
})(DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = DocumentLinkResolveRequest = {}));
/**
* A request to format a whole document.
*/
var DocumentFormattingRequest;
(function (DocumentFormattingRequest) {
DocumentFormattingRequest.method = 'textDocument/formatting';
DocumentFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
})(DocumentFormattingRequest || (exports.DocumentFormattingRequest = DocumentFormattingRequest = {}));
/**
* A request to format a range in a document.
*/
var DocumentRangeFormattingRequest;
(function (DocumentRangeFormattingRequest) {
DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
DocumentRangeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
})(DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = DocumentRangeFormattingRequest = {}));
/**
* A request to format ranges in a document.
*
* @since 3.18.0
* @proposed
*/
var DocumentRangesFormattingRequest;
(function (DocumentRangesFormattingRequest) {
DocumentRangesFormattingRequest.method = 'textDocument/rangesFormatting';
DocumentRangesFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentRangesFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangesFormattingRequest.method);
})(DocumentRangesFormattingRequest || (exports.DocumentRangesFormattingRequest = DocumentRangesFormattingRequest = {}));
/**
* A request to format a document on type.
*/
var DocumentOnTypeFormattingRequest;
(function (DocumentOnTypeFormattingRequest) {
DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
DocumentOnTypeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer;
DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
})(DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = DocumentOnTypeFormattingRequest = {}));
//---- Rename ----------------------------------------------
var PrepareSupportDefaultBehavior;
(function (PrepareSupportDefaultBehavior) {
/**
* The client's default behavior is to select the identifier
* according the to language's syntax rule.
*/
PrepareSupportDefaultBehavior.Identifier = 1;
})(PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = PrepareSupportDefaultBehavior = {}));
/**
* A request to rename a symbol.
*/
var RenameRequest;
(function (RenameRequest) {
RenameRequest.method = 'textDocument/rename';
RenameRequest.messageDirection = messages_1.MessageDirection.clientToServer;
RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
})(RenameRequest || (exports.RenameRequest = RenameRequest = {}));
/**
* A request to test and perform the setup necessary for a rename.
*
* @since 3.16 - support for default behavior
*/
var PrepareRenameRequest;
(function (PrepareRenameRequest) {
PrepareRenameRequest.method = 'textDocument/prepareRename';
PrepareRenameRequest.messageDirection = messages_1.MessageDirection.clientToServer;
PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
})(PrepareRenameRequest || (exports.PrepareRenameRequest = PrepareRenameRequest = {}));
/**
* A request send from the client to the server to execute a command. The request might return
* a workspace edit which the client will apply to the workspace.
*/
var ExecuteCommandRequest;
(function (ExecuteCommandRequest) {
ExecuteCommandRequest.method = 'workspace/executeCommand';
ExecuteCommandRequest.messageDirection = messages_1.MessageDirection.clientToServer;
ExecuteCommandRequest.type = new messages_1.ProtocolRequestType(ExecuteCommandRequest.method);
})(ExecuteCommandRequest || (exports.ExecuteCommandRequest = ExecuteCommandRequest = {}));
/**
* A request sent from the server to the client to modified certain resources.
*/
var ApplyWorkspaceEditRequest;
(function (ApplyWorkspaceEditRequest) {
ApplyWorkspaceEditRequest.method = 'workspace/applyEdit';
ApplyWorkspaceEditRequest.messageDirection = messages_1.MessageDirection.serverToClient;
ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
})(ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = ApplyWorkspaceEditRequest = {}));

View File

@@ -0,0 +1,37 @@
"use strict";
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0;
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
const messages_1 = require("./messages");
var WorkDoneProgress;
(function (WorkDoneProgress) {
WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
function is(value) {
return value === WorkDoneProgress.type;
}
WorkDoneProgress.is = is;
})(WorkDoneProgress || (exports.WorkDoneProgress = WorkDoneProgress = {}));
/**
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
* reporting from the server.
*/
var WorkDoneProgressCreateRequest;
(function (WorkDoneProgressCreateRequest) {
WorkDoneProgressCreateRequest.method = 'window/workDoneProgress/create';
WorkDoneProgressCreateRequest.messageDirection = messages_1.MessageDirection.serverToClient;
WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType(WorkDoneProgressCreateRequest.method);
})(WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = WorkDoneProgressCreateRequest = {}));
/**
* The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
* initiated on the server side.
*/
var WorkDoneProgressCancelNotification;
(function (WorkDoneProgressCancelNotification) {
WorkDoneProgressCancelNotification.method = 'window/workDoneProgress/cancel';
WorkDoneProgressCancelNotification.messageDirection = messages_1.MessageDirection.clientToServer;
WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType(WorkDoneProgressCancelNotification.method);
})(WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = WorkDoneProgressCancelNotification = {}));

View File

@@ -0,0 +1,41 @@
import { RequestHandler } from 'vscode-jsonrpc';
import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types';
import { MessageDirection, ProtocolRequestType } from './messages';
import type { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol';
export interface SelectionRangeClientCapabilities {
/**
* Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
* the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
* capability as well.
*/
dynamicRegistration?: boolean;
}
export interface SelectionRangeOptions extends WorkDoneProgressOptions {
}
export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
}
/**
* A parameter literal used in selection range requests.
*/
export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams {
/**
* The text document.
*/
textDocument: TextDocumentIdentifier;
/**
* The positions inside the text document.
*/
positions: Position[];
}
/**
* A request to provide selection ranges in a document. The request's
* parameter is of type {@link SelectionRangeParams}, the
* response is of type {@link SelectionRange SelectionRange[]} or a Thenable
* that resolves to such.
*/
export declare namespace SelectionRangeRequest {
const method: 'textDocument/selectionRange';
const messageDirection: MessageDirection;
const type: ProtocolRequestType<SelectionRangeParams, SelectionRange[] | null, SelectionRange[], void, SelectionRangeRegistrationOptions>;
type HandlerSignature = RequestHandler<SelectionRangeParams, SelectionRange[] | null, void>;
}

View File

@@ -0,0 +1,20 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectionRangeRequest = void 0;
const messages_1 = require("./messages");
/**
* A request to provide selection ranges in a document. The request's
* parameter is of type {@link SelectionRangeParams}, the
* response is of type {@link SelectionRange SelectionRange[]} or a Thenable
* that resolves to such.
*/
var SelectionRangeRequest;
(function (SelectionRangeRequest) {
SelectionRangeRequest.method = 'textDocument/selectionRange';
SelectionRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
})(SelectionRangeRequest || (exports.SelectionRangeRequest = SelectionRangeRequest = {}));

View File

@@ -0,0 +1,9 @@
export declare function boolean(value: any): value is boolean;
export declare function string(value: any): value is string;
export declare function number(value: any): value is number;
export declare function error(value: any): value is Error;
export declare function func(value: any): value is Function;
export declare function array<T>(value: any): value is T[];
export declare function stringArray(value: any): value is string[];
export declare function typedArray<T>(value: any, check: (value: any) => boolean): value is T[];
export declare function objectLiteral(value: any): value is object;

View File

@@ -0,0 +1,6 @@
/// <reference types="node" />
import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api';
export * from 'vscode-jsonrpc/node';
export * from '../common/api';
export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection;
export declare function createProtocolConnection(input: NodeJS.ReadableStream, output: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection;

View File

@@ -0,0 +1,28 @@
"use strict";
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createProtocolConnection = void 0;
const node_1 = require("vscode-jsonrpc/node");
__exportStar(require("vscode-jsonrpc/node"), exports);
__exportStar(require("../common/api"), exports);
function createProtocolConnection(input, output, logger, options) {
return (0, node_1.createMessageConnection)(input, output, logger, options);
}
exports.createProtocolConnection = createProtocolConnection;

View File

@@ -0,0 +1,31 @@
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
For Microsoft vscode-languageclient
This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
granted, whether by implication, estoppel or otherwise.
1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)
This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.