@aihu/language-server 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/bin.js +20685 -250
- package/dist/chunk-DcSSxlwY.js +30 -0
- package/dist/core/index.d.ts +1630 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +30 -2
- package/dist/core/index.js.map +1 -0
- package/dist/index-ROvxbbgq.d.ts +22204 -0
- package/dist/index-ROvxbbgq.d.ts.map +1 -0
- package/dist/server.d.ts +60 -9
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +19650 -172
- package/dist/server.js.map +1 -1
- package/dist/{core-BHishSOT.js → volar-plugin-cOusBZ0l.js} +952 -7
- package/dist/volar-plugin-cOusBZ0l.js.map +1 -0
- package/package.json +9 -4
- package/dist/core-BHishSOT.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference path="../../typings/thenable.d.ts" />
|
|
3
|
+
import { $ as CodeLensClientCapabilities, $a as WillCreateFilesRequest, $c as Disposable, $i as UnchangedDocumentDiagnosticReport, $l as CompletionItemLabelDetails, $n as PrepareRenameRequest, $o as FoldingRangeClientCapabilities, $r as WillSaveTextDocumentNotification, $s as NotificationHandler1, $t as DocumentOnTypeFormattingClientCapabilities, $u as RenameFileOptions, A as LanguageServiceEnvironment, Aa as TypeHierarchySupertypesRequest, Ac as Tracer, Ad as CodeInformation, Ai as NotebookCellKind, Al as RequestType9, An as HoverOptions, Ao as CallHierarchyOutgoingCallsParams, Ar as SignatureHelpContext, As as ProtocolRequestType0, At as DidCloseTextDocumentNotification, Au as InlineCompletionTriggerKind, B as Proposed, Ba as DeleteFilesParams, Bc as ReadableStreamMessageReader, Bd as TextSpan, Bi as DiagnosticOptions, Bl as ChangeAnnotationIdentifier, Bn as InitializedParams, Bo as WorkDoneProgressCreateRequest, Br as TextDocumentContentChangeEvent, Bs as ConnectionErrors, Bt as DocumentFormattingRegistrationOptions, Bu as LSPArray, C as DocumentDropEdit, Ca as TypeHierarchyOptions, Cc as SetTraceParams, Cd as WorkspaceChange, Ci as DidOpenNotebookDocumentNotification, Cl as RequestType2, Cn as FailureHandlingKind, Co as SemanticTokensRegistrationType, Cr as ShowMessageNotification, Cs as ImplementationParams, Ct as DidChangeConfigurationRegistrationOptions, Cu as Hover, D as FileType, Da as TypeHierarchySubtypesParams, Dc as TraceFormat, Dd as decimal, Di as ExecutionSummary, Dl as RequestType6, Dn as GeneralClientCapabilities, Do as CallHierarchyIncomingCallsParams, Dr as ShowMessageRequestParams, Ds as ProtocolNotificationType, Dt as DidChangeWatchedFilesNotification, Du as InlineCompletionContext, E as FileSystem, Ea as TypeHierarchyRegistrationOptions, Ec as Trace, Ed as WorkspaceSymbol, Ei as DidSaveNotebookDocumentParams, El as RequestType5, En as FileSystemWatcher, Eo as CallHierarchyClientCapabilities, Er as ShowMessageRequestClientCapabilities, Es as MessageDirection, Et as DidChangeWatchedFilesClientCapabilities, Eu as InlayHintLabelPart, F as ProviderResult, Fa as MonikerParams, Fc as AbstractMessageReader, Fd as LanguagePlugin, Fi as NotebookDocumentSyncOptions, Fl as BaseSymbolInformation, Fn as InitializeErrorCodes, Fo as WorkDoneProgress, Fr as SignatureHelpTriggerKind, Fs as CancellationId, Ft as DidSaveTextDocumentParams, Fu as InlineValueVariableLookup, G as ApplyWorkspaceEditResult, Ga as FileDelete, Gc as ContentTypeDecoderOptions, Gi as DocumentDiagnosticReport, Gl as CodeDescription, Gn as MessageType, Go as SelectionRangeParams, Gr as TextDocumentSaveRegistrationOptions, Gs as HandlerResult, Gt as DocumentHighlightRegistrationOptions, Gu as MarkupContent, H as ApplyWorkspaceEditParams, Ha as DidDeleteFilesNotification, Hc as ContentDecoder, Hd as Mapping, Hi as DiagnosticRegistrationOptions, Hl as CodeActionContext, Hn as LogMessageParams, Ho as WorkDoneProgressReport, Hr as TextDocumentPositionParams, Hs as ConnectionStrategy, Ht as DocumentHighlightClientCapabilities, Hu as Location, I as SemanticToken, Ia as MonikerRegistrationOptions, Ic as DataCallback, Id as Mapper, Ii as NotebookDocumentSyncRegistrationOptions, Il as CallHierarchyIncomingCall, In as InitializeParams, Io as WorkDoneProgressBegin, Ir as StaticRegistrationOptions, Is as CancellationReceiverStrategy, It as DocumentFilter, Iu as InsertReplaceEdit, J as CodeActionOptions, Ja as FileOperationPatternKind, Jc as AbstractCancellationTokenSource, Ji as DocumentDiagnosticRequest, Jl as ColorInformation, Jn as NotebookDocumentFilter, Jo as DeclarationClientCapabilities, Jr as TextDocumentSyncOptions, Js as Logger, Jt as DocumentLinkOptions, Ju as ParameterInformation, K as ClientCapabilities, Ka as FileOperationClientCapabilities, Kc as ContentTypeEncoder, Ki as DocumentDiagnosticReportKind, Kl as CodeLens, Kn as NotebookCellTextDocumentFilter, Ko as SelectionRangeRegistrationOptions, Kr as TextDocumentSyncClientCapabilities, Ks as LogTraceNotification, Kt as DocumentHighlightRequest, Ku as MarkupKind, L as typescript_d_exports, La as MonikerRequest, Lc as MessageReader, Ld as MapperFactory, Li as NotebookDocumentSyncRegistrationType, Ll as CallHierarchyItem, Ln as InitializeRequest, Lo as WorkDoneProgressCancelNotification, Lr as TelemetryEventNotification, Ls as CancellationSenderStrategy, Lt as DocumentFormattingClientCapabilities, Lu as InsertTextFormat, M as LanguageServicePluginInstance, Ma as MonikerClientCapabilities, Mc as MessageWriter, Md as CodegenContext, Mi as NotebookDocumentChangeEvent$1, Ml as ResponseMessage, Mn as HoverRegistrationOptions, Mo as CallHierarchyPrepareParams, Mr as SignatureHelpParams, Ms as AbstractMessageBuffer, Mt as DidOpenTextDocumentNotification, Mu as InlineValueContext, N as NullableProviderResult, Na as MonikerKind, Nc as MessageWriterOptions, Nd as IScriptSnapshot, Ni as NotebookDocumentIdentifier, Nl as _EM, Nn as HoverRequest, No as CallHierarchyPrepareRequest, Nr as SignatureHelpRegistrationOptions, Ns as SharedArrayReceiverStrategy, Nt as DidOpenTextDocumentParams, Nu as InlineValueEvaluatableExpression, O as LanguageServiceCommand, Oa as TypeHierarchySubtypesRequest, Oc as TraceOptions, Od as integer, Oi as NotebookCell, Ol as RequestType7, On as GlobPattern, Oo as CallHierarchyIncomingCallsRequest, Or as ShutdownRequest, Os as ProtocolNotificationType0, Ot as DidChangeWatchedFilesParams, Ou as InlineCompletionItem, P as ProjectContext, Pa as MonikerOptions, Pc as WriteableStreamMessageWriter, Pd as Language, Pi as NotebookDocumentSyncClientCapabilities, Pl as AnnotatedTextEdit, Pn as InitializeError, Po as CallHierarchyRegistrationOptions, Pr as SignatureHelpRequest, Ps as SharedArraySenderStrategy, Pt as DidSaveTextDocumentNotification, Pu as InlineValueText, Q as CodeActionResolveRequest, Qa as RenameFilesParams, Qc as Event, Qi as RelatedUnchangedDocumentDiagnosticReport, Ql as CompletionItemKind, Qn as PrepareRenameParams, Qo as DeclarationRequest, Qr as WatchKind, Qs as NotificationHandler0, Qt as DocumentLinkResolveRequest, Qu as RenameFile, R as URI$1, Ra as UniquenessLevel, Rc as MessageReaderOptions, Rd as SourceScript, Ri as VersionedNotebookDocumentIdentifier, Rl as CallHierarchyOutgoingCall, Rn as InitializeResult, Ro as WorkDoneProgressCancelParams, Rr as TextDocumentChangeRegistrationOptions, Rs as CancellationStrategy, Rt as DocumentFormattingOptions, Ru as InsertTextMode, S as DataTransferItem, Sa as TypeHierarchyClientCapabilities, Sc as SetTraceNotification, Sd as VersionedTextDocumentIdentifier, Si as DidCloseNotebookDocumentParams, Sl as RequestType1, Sn as ExitNotification, So as SemanticTokensRegistrationOptions, Sr as ServerCapabilities, Ss as ImplementationOptions, St as DidChangeConfigurationParams, Su as FormattingOptions, T as FileStat, Ta as TypeHierarchyPrepareRequest, Tc as StarRequestHandler, Td as WorkspaceFolder, Ti as DidSaveNotebookDocumentNotification, Tl as RequestType4, Tn as FileEvent, To as TokenFormat, Tr as ShowMessageRequest, Ts as ImplementationRequest, Tt as DidChangeTextDocumentParams, Tu as InlayHintKind, U as ApplyWorkspaceEditRequest, Ua as DidRenameFilesNotification, Uc as ContentEncoder, Ud as SourceMap, Ui as DiagnosticServerCancellationData, Ul as CodeActionKind, Un as MarkdownClientCapabilities, Uo as SelectionRangeClientCapabilities, Ur as TextDocumentRegistrationOptions, Us as GenericNotificationHandler, Ut as DocumentHighlightOptions, Uu as LocationLink, V as ProtocolConnection, Va as DidCreateFilesNotification, Vc as RAL, Vd as VirtualCode, Vi as DiagnosticRefreshRequest, Vl as CodeAction, Vn as LogMessageNotification, Vo as WorkDoneProgressEnd, Vr as TextDocumentFilter, Vs as ConnectionOptions, Vt as DocumentFormattingRequest, Vu as LSPObject, W as ApplyWorkspaceEditResponse, Wa as FileCreate, Wc as ContentTypeDecoder, Wi as DocumentDiagnosticParams, Wl as CodeActionTriggerKind, Wn as MessageActionItem, Wo as SelectionRangeOptions, Wr as TextDocumentSaveReason, Ws as GenericRequestHandler, Wt as DocumentHighlightParams, Wu as MarkedString, X as CodeActionRegistrationOptions, Xa as FileOperationRegistrationOptions, Xc as CancellationTokenSource, Xi as PreviousResultId, Xl as Command, Xn as Pattern, Xo as DeclarationParams, Xr as UnregistrationParams, Xs as MessageStrategy, Xt as DocumentLinkRegistrationOptions, Xu as Range, Y as CodeActionParams, Ya as FileOperationPatternOptions, Yc as CancellationToken, Yi as FullDocumentDiagnosticReport, Yl as ColorPresentation, Yn as PartialResultParams, Yo as DeclarationOptions, Yr as Unregistration, Ys as MessageConnection, Yt as DocumentLinkParams, Yu as Position, Z as CodeActionRequest, Za as FileRename, Zc as Emitter, Zi as RelatedFullDocumentDiagnosticReport, Zl as CompletionItem, Zn as PositionEncodingKind, Zo as DeclarationRegistrationOptions, Zr as UnregistrationRequest, Zs as NotificationHandler, Zt as DocumentLinkRequest, Zu as ReferenceContext, _ as LanguageServerProject, _a as InlineValueParams, _c as RequestHandler5, _d as TextDocumentItem, _i as InlineCompletionRegistrationOptions, _l as NotificationType9, _n as ExecuteCommandClientCapabilities, _o as SemanticTokensParams, _r as RenameParams, _s as WorkspaceFoldersRequest, _t as DefinitionParams, _u as DocumentSymbol, a as DocumentDrop_DataTransferItemFileDataRequest, aa as WorkspaceFullDocumentDiagnosticReport, ac as NotificationHandler7, ad as SemanticTokensDelta, ai as WorkspaceClientCapabilities, al as MessageSignature, an as DocumentRangeFormattingOptions, ao as LinkedEditingRangeRegistrationOptions, ar as ReferenceClientCapabilities, as as ColorPresentationParams, at as CodeLensResolveRequest, au as DeclarationLink, b as SnapshotDocument, ba as InlineValueRequest, bc as RequestHandler8, bd as TypeHierarchyItem, bi as DidChangeNotebookDocumentParams, bl as RequestType, bn as ExecuteCommandRegistrationOptions, bo as SemanticTokensRangeRequest, br as ResourceOperationKind, bs as TypeDefinitionRegistrationOptions, bt as DidChangeConfigurationClientCapabilities, bu as FoldingRange, c as GetServicePluginsRequest, ca as InlayHintOptions, cc as NullLogger, cd as SignatureHelp, ci as WorkspaceSymbolOptions, cl as NotificationType0, cn as DocumentRangeFormattingRequest, co as ShowDocumentClientCapabilities, cr as ReferenceRegistrationOptions, cs as DocumentColorParams, ct as CompletionContext, cu as DeleteFile, d as ReloadProjectNotification, da as InlayHintRegistrationOptions, dc as RequestHandler, dd as SymbolInformation, di as WorkspaceSymbolRequest, dl as NotificationType3, dn as DocumentSelector, do as ShowDocumentResult, dr as RegistrationParams, ds as ConfigurationItem, dt as CompletionRegistrationOptions, du as DiagnosticRelatedInformation, ea as WorkspaceDiagnosticParams, ec as NotificationHandler2, ed as SelectedCompletionInfo, ei as WillSaveTextDocumentParams, el as LRUCache, en as DocumentOnTypeFormattingOptions, eo as WillDeleteFilesRequest, er as PrepareRenameResult, es as FoldingRangeOptions, et as CodeLensOptions, eu as CompletionItemTag, f as UpdateServicePluginStateNotification, fa as InlayHintRequest, fc as RequestHandler0, fd as SymbolKind, fi as WorkspaceSymbolResolveRequest, fl as NotificationType4, fn as DocumentSymbolClientCapabilities, fo as SemanticTokensClientCapabilities, fr as RegistrationRequest, fs as ConfigurationParams, ft as CompletionRequest, fu as DiagnosticSeverity, g as LanguageServerEnvironment, ga as InlineValueOptions, gc as RequestHandler4, gd as TextDocumentIdentifier, gi as InlineCompletionParams, gl as NotificationType8, gn as DocumentSymbolRequest, go as SemanticTokensOptions, gr as RenameOptions, gs as WorkspaceFoldersChangeEvent, gt as DefinitionOptions, gu as DocumentLink, h as LanguageServer, ha as InlineValueClientCapabilities, hc as RequestHandler3, hd as TextDocumentEdit, hi as InlineCompletionOptions, hl as NotificationType7, hn as DocumentSymbolRegistrationOptions, ho as SemanticTokensDeltaRequest, hr as RenameClientCapabilities, hs as DidChangeWorkspaceFoldersParams, ht as DefinitionClientCapabilities, hu as DocumentHighlightKind, i as DocumentDrop_DataTransferItemAsStringRequest, ia as WorkspaceDocumentDiagnosticReport, ic as NotificationHandler6, id as SemanticTokens, ii as WorkDoneProgressParams, il as Message, in as DocumentRangeFormattingClientCapabilities, io as LinkedEditingRangeParams, ir as PublishDiagnosticsParams, is as FoldingRangeRequest, it as CodeLensRequest, iu as Declaration, j as LanguageServicePlugin, ja as Moniker, jc as AbstractMessageWriter, jd as CodeMapping, ji as NotebookDocument, jl as ResponseError, jn as HoverParams, jo as CallHierarchyOutgoingCallsRequest, jr as SignatureHelpOptions, js as RegistrationType, jt as DidCloseTextDocumentParams, ju as InlineValue, k as LanguageServiceContext, ka as TypeHierarchySupertypesParams, kc as TraceValues, kd as uinteger, ki as NotebookCellArrayChange, kl as RequestType8, kn as HoverClientCapabilities, ko as CallHierarchyOptions, kr as SignatureHelpClientCapabilities, ks as ProtocolRequestType, kt as DidChangeWatchedFilesRegistrationOptions, ku as InlineCompletionList, l as GetVirtualCodeRequest, la as InlayHintParams, lc as ProgressToken, ld as SignatureInformation, li as WorkspaceSymbolParams, ll as NotificationType1, ln as DocumentRangesFormattingParams, lo as ShowDocumentParams, lr as ReferencesRequest, ls as DocumentColorRegistrationOptions, lt as CompletionOptions, lu as DeleteFileOptions, m as ExperimentalFeatures, ma as InlayHintWorkspaceClientCapabilities, mc as RequestHandler2, md as TextDocument, mi as InlineCompletionClientCapabilities, ml as NotificationType6, mn as DocumentSymbolParams, mo as SemanticTokensDeltaPartialResult, mr as RelativePattern, ms as DidChangeWorkspaceFoldersNotification, mt as CompletionTriggerKind, mu as DocumentHighlight, n as AutoInsertRequest, na as WorkspaceDiagnosticReportPartialResult, nc as NotificationHandler4, nd as SemanticTokenModifiers, ni as WindowClientCapabilities, nl as Touch, nn as DocumentOnTypeFormattingRegistrationOptions, no as LinkedEditingRangeClientCapabilities, nr as PublishDiagnosticsClientCapabilities, ns as FoldingRangeRefreshRequest, nt as CodeLensRefreshRequest, nu as CreateFile, o as FindFileReferenceRequest, oa as WorkspaceUnchangedDocumentDiagnosticReport, oc as NotificationHandler8, od as SemanticTokensEdit, oi as WorkspaceEditClientCapabilities, ol as NotificationMessage, on as DocumentRangeFormattingParams, oo as LinkedEditingRangeRequest, or as ReferenceOptions, os as ColorPresentationRequest, ot as CodeLensWorkspaceClientCapabilities, ou as Definition, p as UpdateVirtualCodeStateNotification, pa as InlayHintResolveRequest, pc as RequestHandler1, pd as SymbolTag, pi as _InitializeParams, pl as NotificationType5, pn as DocumentSymbolOptions, po as SemanticTokensDeltaParams, pr as RegularExpressionsClientCapabilities, ps as ConfigurationRequest, pt as CompletionResolveRequest, pu as DiagnosticTag, q as CodeActionClientCapabilities, qa as FileOperationOptions, qc as ContentTypeEncoderOptions, qi as DocumentDiagnosticReportPartialResult, ql as Color, qn as NotebookDocumentClientCapabilities, qo as SelectionRangeRequest, qr as TextDocumentSyncKind, qs as LogTraceParams, qt as DocumentLinkClientCapabilities, qu as OptionalVersionedTextDocumentIdentifier, r as DocumentDropRequest, ra as WorkspaceDiagnosticRequest, rc as NotificationHandler5, rd as SemanticTokenTypes, ri as WorkDoneProgressOptions, rl as ErrorCodes, rn as DocumentOnTypeFormattingRequest, ro as LinkedEditingRangeOptions, rr as PublishDiagnosticsNotification, rs as FoldingRangeRegistrationOptions, rt as CodeLensRegistrationOptions, ru as CreateFileOptions, s as GetMatchTsConfigRequest, sa as InlayHintClientCapabilities, sc as NotificationHandler9, sd as SemanticTokensLegend, si as WorkspaceSymbolClientCapabilities, sl as NotificationType, sn as DocumentRangeFormattingRegistrationOptions, so as LinkedEditingRanges, sr as ReferenceParams, ss as DocumentColorOptions, st as CompletionClientCapabilities, su as DefinitionLink, t as index_d_exports, ta as WorkspaceDiagnosticReport, tc as NotificationHandler3, td as SelectionRange, ti as WillSaveTextDocumentWaitUntilRequest, tl as LinkedMap, tn as DocumentOnTypeFormattingParams, to as WillRenameFilesRequest, tr as PrepareSupportDefaultBehavior, ts as FoldingRangeParams, tt as CodeLensParams, tu as CompletionList, u as GetVirtualFileRequest, ua as InlayHintRefreshRequest, uc as ProgressType, ud as StringValue, ui as WorkspaceSymbolRegistrationOptions, ul as NotificationType2, un as DocumentRangesFormattingRequest, uo as ShowDocumentRequest, ur as Registration, us as DocumentColorRequest, ut as CompletionParams, uu as Diagnostic, v as LanguageServerState, va as InlineValueRefreshRequest, vc as RequestHandler6, vd as TextEdit, vi as InlineCompletionRequest, vl as ParameterStructures, vn as ExecuteCommandOptions, vo as SemanticTokensPartialResult, vr as RenameRegistrationOptions, vs as TypeDefinitionOptions, vt as DefinitionRegistrationOptions, vu as DocumentUri, w as EmbeddedCodeFormattingOptions, wa as TypeHierarchyPrepareParams, wc as StarNotificationHandler, wd as WorkspaceEdit, wi as DidOpenNotebookDocumentParams, wl as RequestType3, wn as FileChangeType, wo as SemanticTokensRequest, wr as ShowMessageParams, ws as ImplementationRegistrationOptions, wt as DidChangeTextDocumentNotification, wu as InlayHint, x as DataTransferFile, xa as InlineValueWorkspaceClientCapabilities, xc as RequestHandler9, xd as URI, xi as DidCloseNotebookDocumentNotification, xl as RequestType0, xn as ExecuteCommandRequest, xo as SemanticTokensRefreshRequest, xr as SaveOptions, xs as TypeDefinitionRequest, xt as DidChangeConfigurationNotification, xu as FoldingRangeKind, y as createServerBase, ya as InlineValueRegistrationOptions, yc as RequestHandler7, yd as TextEditChange, yi as DidChangeNotebookDocumentNotification, yl as RequestMessage, yn as ExecuteCommandParams, yo as SemanticTokensRangeParams, yr as RenameRequest, ys as TypeDefinitionParams, yt as DefinitionRequest, yu as EOL, z as LSPErrorCodes, za as CreateFilesParams, zc as PartialMessageInfo, zd as TextChangeRange, zi as DiagnosticClientCapabilities, zl as ChangeAnnotation, zn as InitializedNotification, zo as WorkDoneProgressCreateParams, zr as TextDocumentClientCapabilities, zs as ConnectionError, zt as DocumentFormattingParams, zu as LSPAny } from "../index-ROvxbbgq.js";
|
|
4
|
+
import { Socket } from "net";
|
|
5
|
+
import { ChildProcess } from "child_process";
|
|
6
|
+
import { MessagePort, Worker } from "worker_threads";
|
|
7
|
+
|
|
1
8
|
//#region src/core/code-action.d.ts
|
|
2
9
|
/** Compiler diagnostic codes whose QuickFix is the v2 macro migration codemod. */
|
|
3
10
|
declare const MIGRATE_CODES: Set<string>;
|
|
@@ -93,9 +100,1630 @@ declare function compileWithDiagnostics(source: string, filePath: string): Promi
|
|
|
93
100
|
* connection layer wraps the result in a protocol `Hover`. Clean seam for a
|
|
94
101
|
* future Volar virtual-code hover provider.
|
|
95
102
|
*/
|
|
96
|
-
declare function getBlockContext(lines: string[], lineIndex: number): 'state' | 'template' | 'unknown';
|
|
103
|
+
declare function getBlockContext(lines: string[], lineIndex: number): 'state' | 'template' | 'style' | 'agent' | 'route' | 'unknown';
|
|
97
104
|
declare function getMacroAtPosition(lineText: string, character: number): string | null;
|
|
98
105
|
declare function getHoverContent(macro: string): string | null;
|
|
99
106
|
//#endregion
|
|
100
|
-
|
|
107
|
+
//#region src/core/virtual-source-map.d.ts
|
|
108
|
+
/** Alias for clarity: a Volar CodeMapping carrying CodeInformation data. */
|
|
109
|
+
type AihuCodeMapping = Mapping<CodeInformation>;
|
|
110
|
+
/**
|
|
111
|
+
* An offset within a .aihu source file (character offset from start of file).
|
|
112
|
+
*/
|
|
113
|
+
interface AihuSourcePosition {
|
|
114
|
+
/** Character offset from the start of the .aihu source string. */
|
|
115
|
+
offset: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* An offset within a virtual __state__.ts file generated from the @state block.
|
|
119
|
+
*/
|
|
120
|
+
interface AihuVirtualPosition {
|
|
121
|
+
/** Character offset in the __state__.ts virtual file. */
|
|
122
|
+
offset: number;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Map a virtual-file offset back to the original .aihu source offset.
|
|
126
|
+
* Returns null when virtualOffset is not in any mapped range.
|
|
127
|
+
*
|
|
128
|
+
* Callers treat null as "no virtual-file mapping at this position" and fall
|
|
129
|
+
* back to the static HOVER_TABLE lookup.
|
|
130
|
+
*/
|
|
131
|
+
declare function mapToOriginal(virtualOffset: number, map: SourceMap<CodeInformation>): AihuSourcePosition | null;
|
|
132
|
+
/**
|
|
133
|
+
* Map an original .aihu source offset to the virtual-file offset.
|
|
134
|
+
* The _block parameter is reserved for M3 multi-block support; always '@state' in M2.
|
|
135
|
+
* Returns null when no mapping exists for the given source offset.
|
|
136
|
+
*/
|
|
137
|
+
declare function mapToVirtual(originalOffset: number, _block: '@state', map: SourceMap<CodeInformation>): AihuVirtualPosition | null;
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/core/state-generator.d.ts
|
|
140
|
+
interface GeneratorInput {
|
|
141
|
+
/** Full text of the .aihu source file */
|
|
142
|
+
source: string;
|
|
143
|
+
/** IScriptSnapshot from Volar — use snapshot.getText(0, snapshot.getLength()) */
|
|
144
|
+
snapshot: IScriptSnapshot;
|
|
145
|
+
}
|
|
146
|
+
interface GeneratorOutput {
|
|
147
|
+
/** Content of the virtual TypeScript file (e.g. Counter.__state__.ts) */
|
|
148
|
+
virtualCode: string;
|
|
149
|
+
/** Source-map entries — character-level, one per mapped identifier */
|
|
150
|
+
mappings: AihuCodeMapping[];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Generate the virtual TypeScript file for the @state block of a .aihu source.
|
|
154
|
+
* Returns `{ virtualCode: '', mappings: [] }` if no @state block is found.
|
|
155
|
+
*/
|
|
156
|
+
declare function generateStateVirtualCode(input: GeneratorInput): GeneratorOutput;
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/progress.d.ts
|
|
159
|
+
interface WorkDoneProgressReporter {
|
|
160
|
+
begin(title: string, percentage?: number, message?: string, cancellable?: boolean): void;
|
|
161
|
+
report(percentage: number): void;
|
|
162
|
+
report(message: string): void;
|
|
163
|
+
report(percentage: number, message: string): void;
|
|
164
|
+
done(): void;
|
|
165
|
+
}
|
|
166
|
+
interface WorkDoneProgressServerReporter extends WorkDoneProgressReporter {
|
|
167
|
+
readonly token: CancellationToken;
|
|
168
|
+
}
|
|
169
|
+
interface WindowProgress {
|
|
170
|
+
attachWorkDoneProgress(token: ProgressToken | undefined): WorkDoneProgressReporter;
|
|
171
|
+
createWorkDoneProgress(): Promise<WorkDoneProgressServerReporter>;
|
|
172
|
+
}
|
|
173
|
+
interface ResultProgressReporter<R> {
|
|
174
|
+
report(data: R): void;
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/configuration.d.ts
|
|
178
|
+
interface Configuration {
|
|
179
|
+
getConfiguration(): Promise<any>;
|
|
180
|
+
getConfiguration(section: string): Promise<any>;
|
|
181
|
+
getConfiguration(item: ConfigurationItem): Promise<any>;
|
|
182
|
+
getConfiguration(items: ConfigurationItem[]): Promise<any[]>;
|
|
183
|
+
}
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/workspaceFolder.d.ts
|
|
186
|
+
interface WorkspaceFolders {
|
|
187
|
+
getWorkspaceFolders(): Promise<WorkspaceFolder[] | null>;
|
|
188
|
+
onDidChangeWorkspaceFolders: Event<WorkspaceFoldersChangeEvent>;
|
|
189
|
+
}
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/callHierarchy.d.ts
|
|
192
|
+
/**
|
|
193
|
+
* Shape of the call hierarchy feature
|
|
194
|
+
*
|
|
195
|
+
* @since 3.16.0
|
|
196
|
+
*/
|
|
197
|
+
interface CallHierarchy {
|
|
198
|
+
callHierarchy: {
|
|
199
|
+
onPrepare(handler: ServerRequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, never, void>): Disposable;
|
|
200
|
+
onIncomingCalls(handler: ServerRequestHandler<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, CallHierarchyIncomingCall[], void>): Disposable;
|
|
201
|
+
onOutgoingCalls(handler: ServerRequestHandler<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, CallHierarchyOutgoingCall[], void>): Disposable;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/semanticTokens.d.ts
|
|
206
|
+
/**
|
|
207
|
+
* Shape of the semantic token feature
|
|
208
|
+
*
|
|
209
|
+
* @since 3.16.0
|
|
210
|
+
*/
|
|
211
|
+
interface SemanticTokensFeatureShape {
|
|
212
|
+
semanticTokens: {
|
|
213
|
+
refresh(): void;
|
|
214
|
+
on(handler: ServerRequestHandler<SemanticTokensParams, SemanticTokens, SemanticTokensPartialResult, void>): Disposable;
|
|
215
|
+
onDelta(handler: ServerRequestHandler<SemanticTokensDeltaParams, SemanticTokensDelta | SemanticTokens, SemanticTokensDeltaPartialResult | SemanticTokensPartialResult, void>): Disposable;
|
|
216
|
+
onRange(handler: ServerRequestHandler<SemanticTokensRangeParams, SemanticTokens, SemanticTokensPartialResult, void>): Disposable;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
declare class SemanticTokensBuilder {
|
|
220
|
+
private _id;
|
|
221
|
+
private _prevLine;
|
|
222
|
+
private _prevChar;
|
|
223
|
+
private _data;
|
|
224
|
+
private _dataLen;
|
|
225
|
+
private _prevData;
|
|
226
|
+
constructor();
|
|
227
|
+
private initialize;
|
|
228
|
+
push(line: number, char: number, length: number, tokenType: number, tokenModifiers: number): void;
|
|
229
|
+
get id(): string;
|
|
230
|
+
previousResult(id: string): void;
|
|
231
|
+
build(): SemanticTokens;
|
|
232
|
+
canBuildEdits(): boolean;
|
|
233
|
+
buildEdits(): SemanticTokens | SemanticTokensDelta;
|
|
234
|
+
}
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/showDocument.d.ts
|
|
237
|
+
interface ShowDocumentFeatureShape {
|
|
238
|
+
showDocument(params: ShowDocumentParams): Promise<ShowDocumentResult>;
|
|
239
|
+
}
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/fileOperations.d.ts
|
|
242
|
+
/**
|
|
243
|
+
* Shape of the file operations feature
|
|
244
|
+
*
|
|
245
|
+
* @since 3.16.0
|
|
246
|
+
*/
|
|
247
|
+
interface FileOperationsFeatureShape {
|
|
248
|
+
onDidCreateFiles(handler: NotificationHandler<CreateFilesParams>): Disposable;
|
|
249
|
+
onDidRenameFiles(handler: NotificationHandler<RenameFilesParams>): Disposable;
|
|
250
|
+
onDidDeleteFiles(handler: NotificationHandler<DeleteFilesParams>): Disposable;
|
|
251
|
+
onWillCreateFiles(handler: RequestHandler<CreateFilesParams, WorkspaceEdit | null, never>): Disposable;
|
|
252
|
+
onWillRenameFiles(handler: RequestHandler<RenameFilesParams, WorkspaceEdit | null, never>): Disposable;
|
|
253
|
+
onWillDeleteFiles(handler: RequestHandler<DeleteFilesParams, WorkspaceEdit | null, never>): Disposable;
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/linkedEditingRange.d.ts
|
|
257
|
+
/**
|
|
258
|
+
* Shape of the linked editing feature
|
|
259
|
+
*
|
|
260
|
+
* @since 3.16.0
|
|
261
|
+
*/
|
|
262
|
+
interface LinkedEditingRangeFeatureShape {
|
|
263
|
+
/**
|
|
264
|
+
* Installs a handler for the linked editing range request.
|
|
265
|
+
*
|
|
266
|
+
* @param handler The corresponding handler.
|
|
267
|
+
*/
|
|
268
|
+
onLinkedEditingRange(handler: ServerRequestHandler<LinkedEditingRangeParams, LinkedEditingRanges | undefined | null, never, never>): Disposable;
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/typeHierarchy.d.ts
|
|
272
|
+
/**
|
|
273
|
+
* Shape of the type hierarchy feature
|
|
274
|
+
*
|
|
275
|
+
* @since 3.17.0
|
|
276
|
+
*/
|
|
277
|
+
interface TypeHierarchyFeatureShape {
|
|
278
|
+
typeHierarchy: {
|
|
279
|
+
onPrepare(handler: ServerRequestHandler<TypeHierarchyPrepareParams, TypeHierarchyItem[] | null, never, void>): Disposable;
|
|
280
|
+
onSupertypes(handler: ServerRequestHandler<TypeHierarchySupertypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void>): Disposable;
|
|
281
|
+
onSubtypes(handler: ServerRequestHandler<TypeHierarchySubtypesParams, TypeHierarchyItem[] | null, TypeHierarchyItem[], void>): Disposable;
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/inlineValue.d.ts
|
|
286
|
+
/**
|
|
287
|
+
* Shape of the inline values feature
|
|
288
|
+
*
|
|
289
|
+
* @since 3.17.0
|
|
290
|
+
*/
|
|
291
|
+
interface InlineValueFeatureShape {
|
|
292
|
+
inlineValue: {
|
|
293
|
+
/**
|
|
294
|
+
* Ask the client to refresh all inline values.
|
|
295
|
+
*/
|
|
296
|
+
refresh(): Promise<void>;
|
|
297
|
+
/**
|
|
298
|
+
* Installs a handler for the inline values request.
|
|
299
|
+
*
|
|
300
|
+
* @param handler The corresponding handler.
|
|
301
|
+
*/
|
|
302
|
+
on(handler: ServerRequestHandler<InlineValueParams, InlineValue[] | undefined | null, InlineValue[], void>): Disposable;
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/foldingRange.d.ts
|
|
307
|
+
/**
|
|
308
|
+
* Shape of the folding range feature
|
|
309
|
+
*/
|
|
310
|
+
interface FoldingRangeFeatureShape {
|
|
311
|
+
foldingRange: {
|
|
312
|
+
/**
|
|
313
|
+
* Ask the client to refresh all folding ranges
|
|
314
|
+
*
|
|
315
|
+
* @since 3.18.0.
|
|
316
|
+
* @proposed
|
|
317
|
+
*/
|
|
318
|
+
refresh(): Promise<void>;
|
|
319
|
+
/**
|
|
320
|
+
* Installs a handler for the folding range request.
|
|
321
|
+
*
|
|
322
|
+
* @param handler The corresponding handler.
|
|
323
|
+
*/
|
|
324
|
+
on(handler: ServerRequestHandler<FoldingRangeParams, FoldingRange[] | undefined | null, FoldingRange[], void>): Disposable;
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/inlayHint.d.ts
|
|
329
|
+
/**
|
|
330
|
+
* Shape of the inlay hints feature
|
|
331
|
+
*
|
|
332
|
+
* @since 3.17.0
|
|
333
|
+
*/
|
|
334
|
+
interface InlayHintFeatureShape {
|
|
335
|
+
inlayHint: {
|
|
336
|
+
/**
|
|
337
|
+
* Ask the client to refresh all inlay hints.
|
|
338
|
+
*/
|
|
339
|
+
refresh(): Promise<void>;
|
|
340
|
+
/**
|
|
341
|
+
* Installs a handler for the inlay hints request.
|
|
342
|
+
*
|
|
343
|
+
* @param handler The corresponding handler.
|
|
344
|
+
*/
|
|
345
|
+
on(handler: ServerRequestHandler<InlayHintParams, InlayHint[] | undefined | null, InlayHint[], void>): Disposable;
|
|
346
|
+
/**
|
|
347
|
+
* Installs a handler for the inlay hint resolve request.
|
|
348
|
+
*
|
|
349
|
+
* @param handler The corresponding handler.
|
|
350
|
+
*/
|
|
351
|
+
resolve(handler: RequestHandler<InlayHint, InlayHint, void>): Disposable;
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/diagnostic.d.ts
|
|
356
|
+
/**
|
|
357
|
+
* Shape of the linked editing feature
|
|
358
|
+
*
|
|
359
|
+
* @since 3.16.0
|
|
360
|
+
*/
|
|
361
|
+
interface DiagnosticFeatureShape {
|
|
362
|
+
diagnostics: {
|
|
363
|
+
/**
|
|
364
|
+
* Asks the client to refresh all diagnostics provided by this server by
|
|
365
|
+
* pull for the corresponding documents again.
|
|
366
|
+
*/
|
|
367
|
+
refresh(): void;
|
|
368
|
+
/**
|
|
369
|
+
* Installs a handler for the document diagnostic request.
|
|
370
|
+
*
|
|
371
|
+
* @param handler The corresponding handler.
|
|
372
|
+
*/
|
|
373
|
+
on(handler: ServerRequestHandler<DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData>): Disposable;
|
|
374
|
+
/**
|
|
375
|
+
* Installs a handler for the workspace diagnostic request.
|
|
376
|
+
*
|
|
377
|
+
* @param handler The corresponding handler.
|
|
378
|
+
*/
|
|
379
|
+
onWorkspace(handler: ServerRequestHandler<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, DiagnosticServerCancellationData>): Disposable;
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/textDocuments.d.ts
|
|
384
|
+
/**
|
|
385
|
+
* We should use a mapped type to create this from Connection.
|
|
386
|
+
*/
|
|
387
|
+
interface TextDocumentConnection {
|
|
388
|
+
onDidOpenTextDocument(handler: NotificationHandler<DidOpenTextDocumentParams>): Disposable;
|
|
389
|
+
onDidChangeTextDocument(handler: NotificationHandler<DidChangeTextDocumentParams>): Disposable;
|
|
390
|
+
onDidCloseTextDocument(handler: NotificationHandler<DidCloseTextDocumentParams>): Disposable;
|
|
391
|
+
onWillSaveTextDocument(handler: NotificationHandler<WillSaveTextDocumentParams>): Disposable;
|
|
392
|
+
onWillSaveTextDocumentWaitUntil(handler: RequestHandler<WillSaveTextDocumentParams, TextEdit[] | undefined | null, void>): Disposable;
|
|
393
|
+
onDidSaveTextDocument(handler: NotificationHandler<DidSaveTextDocumentParams>): Disposable;
|
|
394
|
+
}
|
|
395
|
+
interface TextDocumentsConfiguration<T extends {
|
|
396
|
+
uri: DocumentUri;
|
|
397
|
+
}> {
|
|
398
|
+
create(uri: DocumentUri, languageId: string, version: number, content: string): T;
|
|
399
|
+
update(document: T, changes: TextDocumentContentChangeEvent[], version: number): T;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Event to signal changes to a text document.
|
|
403
|
+
*/
|
|
404
|
+
interface TextDocumentChangeEvent<T> {
|
|
405
|
+
/**
|
|
406
|
+
* The document that has changed.
|
|
407
|
+
*/
|
|
408
|
+
document: T;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Event to signal that a document will be saved.
|
|
412
|
+
*/
|
|
413
|
+
interface TextDocumentWillSaveEvent<T> {
|
|
414
|
+
/**
|
|
415
|
+
* The document that will be saved
|
|
416
|
+
*/
|
|
417
|
+
document: T;
|
|
418
|
+
/**
|
|
419
|
+
* The reason why save was triggered.
|
|
420
|
+
*/
|
|
421
|
+
reason: TextDocumentSaveReason;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* A manager for simple text documents. The manager requires at a minimum that
|
|
425
|
+
* the server registered for the following text document sync events in the
|
|
426
|
+
* initialize handler or via dynamic registration:
|
|
427
|
+
*
|
|
428
|
+
* - open and close events.
|
|
429
|
+
* - change events.
|
|
430
|
+
*
|
|
431
|
+
* Registering for save and will save events is optional.
|
|
432
|
+
*/
|
|
433
|
+
declare class TextDocuments<T extends {
|
|
434
|
+
uri: DocumentUri;
|
|
435
|
+
}> {
|
|
436
|
+
private readonly _configuration;
|
|
437
|
+
private readonly _syncedDocuments;
|
|
438
|
+
private readonly _onDidChangeContent;
|
|
439
|
+
private readonly _onDidOpen;
|
|
440
|
+
private readonly _onDidClose;
|
|
441
|
+
private readonly _onDidSave;
|
|
442
|
+
private readonly _onWillSave;
|
|
443
|
+
private _willSaveWaitUntil;
|
|
444
|
+
/**
|
|
445
|
+
* Create a new text document manager.
|
|
446
|
+
*/
|
|
447
|
+
constructor(configuration: TextDocumentsConfiguration<T>);
|
|
448
|
+
/**
|
|
449
|
+
* An event that fires when a text document managed by this manager
|
|
450
|
+
* has been opened.
|
|
451
|
+
*/
|
|
452
|
+
get onDidOpen(): Event<TextDocumentChangeEvent<T>>;
|
|
453
|
+
/**
|
|
454
|
+
* An event that fires when a text document managed by this manager
|
|
455
|
+
* has been opened or the content changes.
|
|
456
|
+
*/
|
|
457
|
+
get onDidChangeContent(): Event<TextDocumentChangeEvent<T>>;
|
|
458
|
+
/**
|
|
459
|
+
* An event that fires when a text document managed by this manager
|
|
460
|
+
* will be saved.
|
|
461
|
+
*/
|
|
462
|
+
get onWillSave(): Event<TextDocumentWillSaveEvent<T>>;
|
|
463
|
+
/**
|
|
464
|
+
* Sets a handler that will be called if a participant wants to provide
|
|
465
|
+
* edits during a text document save.
|
|
466
|
+
*/
|
|
467
|
+
onWillSaveWaitUntil(handler: RequestHandler<TextDocumentWillSaveEvent<T>, TextEdit[], void>): void;
|
|
468
|
+
/**
|
|
469
|
+
* An event that fires when a text document managed by this manager
|
|
470
|
+
* has been saved.
|
|
471
|
+
*/
|
|
472
|
+
get onDidSave(): Event<TextDocumentChangeEvent<T>>;
|
|
473
|
+
/**
|
|
474
|
+
* An event that fires when a text document managed by this manager
|
|
475
|
+
* has been closed.
|
|
476
|
+
*/
|
|
477
|
+
get onDidClose(): Event<TextDocumentChangeEvent<T>>;
|
|
478
|
+
/**
|
|
479
|
+
* Returns the document for the given URI. Returns undefined if
|
|
480
|
+
* the document is not managed by this instance.
|
|
481
|
+
*
|
|
482
|
+
* @param uri The text document's URI to retrieve.
|
|
483
|
+
* @return the text document or `undefined`.
|
|
484
|
+
*/
|
|
485
|
+
get(uri: string): T | undefined;
|
|
486
|
+
/**
|
|
487
|
+
* Returns all text documents managed by this instance.
|
|
488
|
+
*
|
|
489
|
+
* @return all text documents.
|
|
490
|
+
*/
|
|
491
|
+
all(): T[];
|
|
492
|
+
/**
|
|
493
|
+
* Returns the URIs of all text documents managed by this instance.
|
|
494
|
+
*
|
|
495
|
+
* @return the URI's of all text documents.
|
|
496
|
+
*/
|
|
497
|
+
keys(): string[];
|
|
498
|
+
/**
|
|
499
|
+
* Listens for `low level` notification on the given connection to
|
|
500
|
+
* update the text documents managed by this instance.
|
|
501
|
+
*
|
|
502
|
+
* Please note that the connection only provides handlers not an event model. Therefore
|
|
503
|
+
* listening on a connection will overwrite the following handlers on a connection:
|
|
504
|
+
* `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
|
|
505
|
+
* `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
|
|
506
|
+
*
|
|
507
|
+
* Use the corresponding events on the TextDocuments instance instead.
|
|
508
|
+
*
|
|
509
|
+
* @param connection The connection to listen on.
|
|
510
|
+
*/
|
|
511
|
+
listen(connection: TextDocumentConnection): Disposable;
|
|
512
|
+
}
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/notebook.d.ts
|
|
515
|
+
/**
|
|
516
|
+
* Shape of the notebooks feature
|
|
517
|
+
*
|
|
518
|
+
* @since 3.17.0
|
|
519
|
+
*/
|
|
520
|
+
interface NotebookSyncFeatureShape {
|
|
521
|
+
synchronization: {
|
|
522
|
+
onDidOpenNotebookDocument(handler: NotificationHandler1<DidOpenNotebookDocumentParams>): Disposable;
|
|
523
|
+
onDidChangeNotebookDocument(handler: NotificationHandler1<DidChangeNotebookDocumentParams>): Disposable;
|
|
524
|
+
onDidSaveNotebookDocument(handler: NotificationHandler1<DidSaveNotebookDocumentParams>): Disposable;
|
|
525
|
+
onDidCloseNotebookDocument(handler: NotificationHandler1<DidCloseNotebookDocumentParams>): Disposable;
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
type NotebookDocumentChangeEvent = {
|
|
529
|
+
/**
|
|
530
|
+
* The notebook document that changed.
|
|
531
|
+
*/
|
|
532
|
+
notebookDocument: NotebookDocument;
|
|
533
|
+
/**
|
|
534
|
+
* The meta data change if any.
|
|
535
|
+
*
|
|
536
|
+
* Note: old and new should always be an object literal (e.g. LSPObject)
|
|
537
|
+
*/
|
|
538
|
+
metadata?: {
|
|
539
|
+
old: LSPObject | undefined;
|
|
540
|
+
new: LSPObject | undefined;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* The cell changes if any.
|
|
544
|
+
*/
|
|
545
|
+
cells?: {
|
|
546
|
+
/**
|
|
547
|
+
* The cells that got added.
|
|
548
|
+
*/
|
|
549
|
+
added: NotebookCell[];
|
|
550
|
+
/**
|
|
551
|
+
* The cells that got removed.
|
|
552
|
+
*/
|
|
553
|
+
removed: NotebookCell[];
|
|
554
|
+
/**
|
|
555
|
+
* The cells that changed.
|
|
556
|
+
*/
|
|
557
|
+
changed: {
|
|
558
|
+
/**
|
|
559
|
+
* The cell data has changed, excluding its
|
|
560
|
+
* text content which is reported via
|
|
561
|
+
* `textContentChanged`.
|
|
562
|
+
*/
|
|
563
|
+
data: {
|
|
564
|
+
old: NotebookCell;
|
|
565
|
+
new: NotebookCell;
|
|
566
|
+
}[];
|
|
567
|
+
/**
|
|
568
|
+
* The text content of a cell has changed.
|
|
569
|
+
* The actual text is available via the `Notebooks`
|
|
570
|
+
* text document manager.
|
|
571
|
+
*/
|
|
572
|
+
textContent: NotebookCell[];
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
declare class NotebookDocuments<T extends {
|
|
577
|
+
uri: DocumentUri;
|
|
578
|
+
}> {
|
|
579
|
+
private readonly notebookDocuments;
|
|
580
|
+
private readonly notebookCellMap;
|
|
581
|
+
private readonly _onDidOpen;
|
|
582
|
+
private readonly _onDidSave;
|
|
583
|
+
private readonly _onDidChange;
|
|
584
|
+
private readonly _onDidClose;
|
|
585
|
+
private _cellTextDocuments;
|
|
586
|
+
constructor(configurationOrTextDocuments: TextDocumentsConfiguration<T> | TextDocuments<T>);
|
|
587
|
+
get cellTextDocuments(): TextDocuments<T>;
|
|
588
|
+
getCellTextDocument(cell: NotebookCell): T | undefined;
|
|
589
|
+
getNotebookDocument(uri: URI): NotebookDocument | undefined;
|
|
590
|
+
getNotebookCell(uri: DocumentUri): NotebookCell | undefined;
|
|
591
|
+
findNotebookDocumentForCell(cell: DocumentUri | NotebookCell): NotebookDocument | undefined;
|
|
592
|
+
get onDidOpen(): Event<NotebookDocument>;
|
|
593
|
+
get onDidSave(): Event<NotebookDocument>;
|
|
594
|
+
get onDidChange(): Event<NotebookDocumentChangeEvent>;
|
|
595
|
+
get onDidClose(): Event<NotebookDocument>;
|
|
596
|
+
/**
|
|
597
|
+
* Listens for `low level` notification on the given connection to
|
|
598
|
+
* update the notebook documents managed by this instance.
|
|
599
|
+
*
|
|
600
|
+
* Please note that the connection only provides handlers not an event model. Therefore
|
|
601
|
+
* listening on a connection will overwrite the following handlers on a connection:
|
|
602
|
+
* `onDidOpenNotebookDocument`, `onDidChangeNotebookDocument`, `onDidSaveNotebookDocument`,
|
|
603
|
+
* and `onDidCloseNotebookDocument`.
|
|
604
|
+
*
|
|
605
|
+
* @param connection The connection to listen on.
|
|
606
|
+
*/
|
|
607
|
+
listen(connection: Connection): Disposable;
|
|
608
|
+
private updateCellMap;
|
|
609
|
+
}
|
|
610
|
+
//#endregion
|
|
611
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/moniker.d.ts
|
|
612
|
+
/**
|
|
613
|
+
* Shape of the moniker feature
|
|
614
|
+
*
|
|
615
|
+
* @since 3.16.0
|
|
616
|
+
*/
|
|
617
|
+
interface MonikerFeatureShape {
|
|
618
|
+
moniker: {
|
|
619
|
+
on(handler: ServerRequestHandler<MonikerParams, Moniker[] | null, Moniker[], void>): Disposable;
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/server.d.ts
|
|
624
|
+
/**
|
|
625
|
+
* Helps tracking error message. Equal occurrences of the same
|
|
626
|
+
* message are only stored once. This class is for example
|
|
627
|
+
* useful if text documents are validated in a loop and equal
|
|
628
|
+
* error message should be folded into one.
|
|
629
|
+
*/
|
|
630
|
+
declare class ErrorMessageTracker {
|
|
631
|
+
private _messages;
|
|
632
|
+
constructor();
|
|
633
|
+
/**
|
|
634
|
+
* Add a message to the tracker.
|
|
635
|
+
*
|
|
636
|
+
* @param message The message to add.
|
|
637
|
+
*/
|
|
638
|
+
add(message: string): void;
|
|
639
|
+
/**
|
|
640
|
+
* Send all tracked messages to the connection's window.
|
|
641
|
+
*
|
|
642
|
+
* @param connection The connection established between client and server.
|
|
643
|
+
*/
|
|
644
|
+
sendErrors(connection: {
|
|
645
|
+
window: RemoteWindow;
|
|
646
|
+
}): void;
|
|
647
|
+
}
|
|
648
|
+
interface FeatureBase {
|
|
649
|
+
/**
|
|
650
|
+
* Called to initialize the remote with the given
|
|
651
|
+
* client capabilities
|
|
652
|
+
*
|
|
653
|
+
* @param capabilities The client capabilities
|
|
654
|
+
*/
|
|
655
|
+
initialize(capabilities: ClientCapabilities): void;
|
|
656
|
+
/**
|
|
657
|
+
* Called to fill in the server capabilities this feature implements.
|
|
658
|
+
*
|
|
659
|
+
* @param capabilities The server capabilities to fill.
|
|
660
|
+
*/
|
|
661
|
+
fillServerCapabilities(capabilities: ServerCapabilities): void;
|
|
662
|
+
}
|
|
663
|
+
interface Remote extends FeatureBase {
|
|
664
|
+
/**
|
|
665
|
+
* Attach the remote to the given connection.
|
|
666
|
+
*
|
|
667
|
+
* @param connection The connection this remote is operating on.
|
|
668
|
+
*/
|
|
669
|
+
attach(connection: Connection): void;
|
|
670
|
+
/**
|
|
671
|
+
* The connection this remote is attached to.
|
|
672
|
+
*/
|
|
673
|
+
connection: Connection;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* The RemoteConsole interface contains all functions to interact with
|
|
677
|
+
* the tools / clients console or log system. Internally it used `window/logMessage`
|
|
678
|
+
* notifications.
|
|
679
|
+
*/
|
|
680
|
+
interface RemoteConsole extends FeatureBase {
|
|
681
|
+
/**
|
|
682
|
+
* The connection this remote is attached to.
|
|
683
|
+
*/
|
|
684
|
+
connection: Connection;
|
|
685
|
+
/**
|
|
686
|
+
* Show an error message.
|
|
687
|
+
*
|
|
688
|
+
* @param message The message to show.
|
|
689
|
+
*/
|
|
690
|
+
error(message: string): void;
|
|
691
|
+
/**
|
|
692
|
+
* Show a warning message.
|
|
693
|
+
*
|
|
694
|
+
* @param message The message to show.
|
|
695
|
+
*/
|
|
696
|
+
warn(message: string): void;
|
|
697
|
+
/**
|
|
698
|
+
* Show an information message.
|
|
699
|
+
*
|
|
700
|
+
* @param message The message to show.
|
|
701
|
+
*/
|
|
702
|
+
info(message: string): void;
|
|
703
|
+
/**
|
|
704
|
+
* Log a message.
|
|
705
|
+
*
|
|
706
|
+
* @param message The message to log.
|
|
707
|
+
*/
|
|
708
|
+
log(message: string): void;
|
|
709
|
+
/**
|
|
710
|
+
* Log a debug message.
|
|
711
|
+
*
|
|
712
|
+
* @param message The message to log.
|
|
713
|
+
*
|
|
714
|
+
* @since 3.18.0
|
|
715
|
+
*/
|
|
716
|
+
debug(message: string): void;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* The RemoteWindow interface contains all functions to interact with
|
|
720
|
+
* the visual window of VS Code.
|
|
721
|
+
*/
|
|
722
|
+
interface _RemoteWindow extends FeatureBase {
|
|
723
|
+
/**
|
|
724
|
+
* The connection this remote is attached to.
|
|
725
|
+
*/
|
|
726
|
+
connection: Connection;
|
|
727
|
+
/**
|
|
728
|
+
* Shows an error message in the client's user interface. Depending on the client this might
|
|
729
|
+
* be a modal dialog with a confirmation button or a notification in a notification center
|
|
730
|
+
*
|
|
731
|
+
* @param message The message to show.
|
|
732
|
+
* @param actions Possible additional actions presented in the user interface. The selected action
|
|
733
|
+
* will be the value of the resolved promise
|
|
734
|
+
*/
|
|
735
|
+
showErrorMessage(message: string): void;
|
|
736
|
+
showErrorMessage<T extends MessageActionItem>(message: string, ...actions: T[]): Promise<T | undefined>;
|
|
737
|
+
/**
|
|
738
|
+
* Shows a warning message in the client's user interface. Depending on the client this might
|
|
739
|
+
* be a modal dialog with a confirmation button or a notification in a notification center
|
|
740
|
+
*
|
|
741
|
+
* @param message The message to show.
|
|
742
|
+
* @param actions Possible additional actions presented in the user interface. The selected action
|
|
743
|
+
* will be the value of the resolved promise
|
|
744
|
+
*/
|
|
745
|
+
showWarningMessage(message: string): void;
|
|
746
|
+
showWarningMessage<T extends MessageActionItem>(message: string, ...actions: T[]): Promise<T | undefined>;
|
|
747
|
+
/**
|
|
748
|
+
* Shows an information message in the client's user interface. Depending on the client this might
|
|
749
|
+
* be a modal dialog with a confirmation button or a notification in a notification center
|
|
750
|
+
*
|
|
751
|
+
* @param message The message to show.
|
|
752
|
+
* @param actions Possible additional actions presented in the user interface. The selected action
|
|
753
|
+
* will be the value of the resolved promise
|
|
754
|
+
*/
|
|
755
|
+
showInformationMessage(message: string): void;
|
|
756
|
+
showInformationMessage<T extends MessageActionItem>(message: string, ...actions: T[]): Promise<T | undefined>;
|
|
757
|
+
}
|
|
758
|
+
type RemoteWindow = _RemoteWindow & WindowProgress & ShowDocumentFeatureShape;
|
|
759
|
+
/**
|
|
760
|
+
* A bulk registration manages n single registration to be able to register
|
|
761
|
+
* for n notifications or requests using one register request.
|
|
762
|
+
*/
|
|
763
|
+
interface BulkRegistration {
|
|
764
|
+
/**
|
|
765
|
+
* Adds a single registration.
|
|
766
|
+
* @param type the notification type to register for.
|
|
767
|
+
* @param registerParams special registration parameters.
|
|
768
|
+
*/
|
|
769
|
+
add<RO>(type: ProtocolNotificationType0<RO>, registerParams: RO): void;
|
|
770
|
+
add<P, RO>(type: ProtocolNotificationType<P, RO>, registerParams: RO): void;
|
|
771
|
+
/**
|
|
772
|
+
* Adds a single registration.
|
|
773
|
+
* @param type the request type to register for.
|
|
774
|
+
* @param registerParams special registration parameters.
|
|
775
|
+
*/
|
|
776
|
+
add<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, registerParams: RO): void;
|
|
777
|
+
add<P, PR, R, E, RO>(type: ProtocolRequestType<P, PR, R, E, RO>, registerParams: RO): void;
|
|
778
|
+
/**
|
|
779
|
+
* Adds a single registration.
|
|
780
|
+
* @param type the notification type to register for.
|
|
781
|
+
* @param registerParams special registration parameters.
|
|
782
|
+
*/
|
|
783
|
+
add<RO>(type: RegistrationType<RO>, registerParams: RO): void;
|
|
784
|
+
}
|
|
785
|
+
declare namespace BulkRegistration {
|
|
786
|
+
/**
|
|
787
|
+
* Creates a new bulk registration.
|
|
788
|
+
* @return an empty bulk registration.
|
|
789
|
+
*/
|
|
790
|
+
function create(): BulkRegistration;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* A `BulkUnregistration` manages n unregistrations.
|
|
794
|
+
*/
|
|
795
|
+
interface BulkUnregistration extends Disposable {
|
|
796
|
+
/**
|
|
797
|
+
* Disposes a single registration. It will be removed from the
|
|
798
|
+
* `BulkUnregistration`.
|
|
799
|
+
*/
|
|
800
|
+
disposeSingle(arg: string | MessageSignature): boolean;
|
|
801
|
+
}
|
|
802
|
+
declare namespace BulkUnregistration {
|
|
803
|
+
function create(): BulkUnregistration;
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Interface to register and unregister `listeners` on the client / tools side.
|
|
807
|
+
*/
|
|
808
|
+
interface RemoteClient extends FeatureBase {
|
|
809
|
+
/**
|
|
810
|
+
* The connection this remote is attached to.
|
|
811
|
+
*/
|
|
812
|
+
connection: Connection;
|
|
813
|
+
/**
|
|
814
|
+
* Registers a listener for the given request.
|
|
815
|
+
*
|
|
816
|
+
* @param type the request type to register for.
|
|
817
|
+
* @param registerParams special registration parameters.
|
|
818
|
+
* @return a `Disposable` to unregister the listener again.
|
|
819
|
+
*/
|
|
820
|
+
register<P, RO>(type: ProtocolNotificationType<P, RO>, registerParams?: RO): Promise<Disposable>;
|
|
821
|
+
register<RO>(type: ProtocolNotificationType0<RO>, registerParams?: RO): Promise<Disposable>;
|
|
822
|
+
/**
|
|
823
|
+
* Registers a listener for the given request.
|
|
824
|
+
*
|
|
825
|
+
* @param unregisteration the unregistration to add a corresponding unregister action to.
|
|
826
|
+
* @param type the request type to register for.
|
|
827
|
+
* @param registerParams special registration parameters.
|
|
828
|
+
* @return the updated unregistration.
|
|
829
|
+
*/
|
|
830
|
+
register<P, RO>(unregisteration: BulkUnregistration, type: ProtocolNotificationType<P, RO>, registerParams?: RO): Promise<Disposable>;
|
|
831
|
+
register<RO>(unregisteration: BulkUnregistration, type: ProtocolNotificationType0<RO>, registerParams?: RO): Promise<Disposable>;
|
|
832
|
+
/**
|
|
833
|
+
* Registers a listener for the given request.
|
|
834
|
+
*
|
|
835
|
+
* @param type the request type to register for.
|
|
836
|
+
* @param registerParams special registration parameters.
|
|
837
|
+
* @return a `Disposable` to unregister the listener again.
|
|
838
|
+
*/
|
|
839
|
+
register<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, registerParams?: RO): Promise<Disposable>;
|
|
840
|
+
register<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, registerParams?: RO): Promise<Disposable>;
|
|
841
|
+
/**
|
|
842
|
+
* Registers a listener for the given request.
|
|
843
|
+
*
|
|
844
|
+
* @param unregisteration the unregistration to add a corresponding unregister action to.
|
|
845
|
+
* @param type the request type to register for.
|
|
846
|
+
* @param registerParams special registration parameters.
|
|
847
|
+
* @return the updated unregistration.
|
|
848
|
+
*/
|
|
849
|
+
register<P, R, PR, E, RO>(unregisteration: BulkUnregistration, type: ProtocolRequestType<P, R, PR, E, RO>, registerParams?: RO): Promise<Disposable>;
|
|
850
|
+
register<R, PR, E, RO>(unregisteration: BulkUnregistration, type: ProtocolRequestType0<R, PR, E, RO>, registerParams?: RO): Promise<Disposable>;
|
|
851
|
+
/**
|
|
852
|
+
* Registers a listener for the given registration type.
|
|
853
|
+
*
|
|
854
|
+
* @param type the registration type.
|
|
855
|
+
* @param registerParams special registration parameters.
|
|
856
|
+
* @return a `Disposable` to unregister the listener again.
|
|
857
|
+
*/
|
|
858
|
+
register<RO>(type: RegistrationType<RO>, registerParams?: RO): Promise<Disposable>;
|
|
859
|
+
/**
|
|
860
|
+
* Registers a listener for the given registration type.
|
|
861
|
+
*
|
|
862
|
+
* @param unregisteration the unregistration to add a corresponding unregister action to.
|
|
863
|
+
* @param type the registration type.
|
|
864
|
+
* @param registerParams special registration parameters.
|
|
865
|
+
* @return the updated unregistration.
|
|
866
|
+
*/
|
|
867
|
+
register<RO>(unregisteration: BulkUnregistration, type: RegistrationType<RO>, registerParams?: RO): Promise<Disposable>;
|
|
868
|
+
/**
|
|
869
|
+
* Registers a set of listeners.
|
|
870
|
+
* @param registrations the bulk registration
|
|
871
|
+
* @return a `Disposable` to unregister the listeners again.
|
|
872
|
+
*/
|
|
873
|
+
register(registrations: BulkRegistration): Promise<BulkUnregistration>;
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Represents the workspace managed by the client.
|
|
877
|
+
*/
|
|
878
|
+
interface _RemoteWorkspace extends FeatureBase {
|
|
879
|
+
/**
|
|
880
|
+
* The connection this remote is attached to.
|
|
881
|
+
*/
|
|
882
|
+
connection: Connection;
|
|
883
|
+
/**
|
|
884
|
+
* Applies a `WorkspaceEdit` to the workspace
|
|
885
|
+
* @param param the workspace edit params.
|
|
886
|
+
* @return a thenable that resolves to the `ApplyWorkspaceEditResponse`.
|
|
887
|
+
*/
|
|
888
|
+
applyEdit(paramOrEdit: ApplyWorkspaceEditParams | WorkspaceEdit): Promise<ApplyWorkspaceEditResponse>;
|
|
889
|
+
}
|
|
890
|
+
type RemoteWorkspace = _RemoteWorkspace & Configuration & WorkspaceFolders & FileOperationsFeatureShape;
|
|
891
|
+
/**
|
|
892
|
+
* Interface to log telemetry events. The events are actually send to the client
|
|
893
|
+
* and the client needs to feed the event into a proper telemetry system.
|
|
894
|
+
*/
|
|
895
|
+
interface Telemetry extends FeatureBase {
|
|
896
|
+
/**
|
|
897
|
+
* The connection this remote is attached to.
|
|
898
|
+
*/
|
|
899
|
+
connection: Connection;
|
|
900
|
+
/**
|
|
901
|
+
* Log the given data to telemetry.
|
|
902
|
+
*
|
|
903
|
+
* @param data The data to log. Must be a JSON serializable object.
|
|
904
|
+
*/
|
|
905
|
+
logEvent(data: any): void;
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* Interface to log traces to the client. The events are sent to the client and the
|
|
909
|
+
* client needs to log the trace events.
|
|
910
|
+
*/
|
|
911
|
+
interface RemoteTracer extends FeatureBase {
|
|
912
|
+
/**
|
|
913
|
+
* The connection this remote is attached to.
|
|
914
|
+
*/
|
|
915
|
+
connection: Connection;
|
|
916
|
+
/**
|
|
917
|
+
* Log the given data to the trace Log
|
|
918
|
+
*/
|
|
919
|
+
log(message: string, verbose?: string): void;
|
|
920
|
+
}
|
|
921
|
+
interface _Languages extends FeatureBase {
|
|
922
|
+
connection: Connection;
|
|
923
|
+
attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter;
|
|
924
|
+
attachPartialResultProgress<PR>(type: ProgressType<PR>, params: PartialResultParams): ResultProgressReporter<PR> | undefined;
|
|
925
|
+
}
|
|
926
|
+
declare class _LanguagesImpl implements Remote, _Languages {
|
|
927
|
+
private _connection;
|
|
928
|
+
constructor();
|
|
929
|
+
attach(connection: Connection): void;
|
|
930
|
+
get connection(): Connection;
|
|
931
|
+
initialize(_capabilities: ClientCapabilities): void;
|
|
932
|
+
fillServerCapabilities(_capabilities: ServerCapabilities): void;
|
|
933
|
+
attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter;
|
|
934
|
+
attachPartialResultProgress<PR>(_type: ProgressType<PR>, params: PartialResultParams): ResultProgressReporter<PR> | undefined;
|
|
935
|
+
}
|
|
936
|
+
type Languages = _Languages & CallHierarchy & SemanticTokensFeatureShape & LinkedEditingRangeFeatureShape & TypeHierarchyFeatureShape & InlineValueFeatureShape & InlayHintFeatureShape & DiagnosticFeatureShape & MonikerFeatureShape & FoldingRangeFeatureShape;
|
|
937
|
+
interface _Notebooks extends FeatureBase {
|
|
938
|
+
connection: Connection;
|
|
939
|
+
attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter;
|
|
940
|
+
attachPartialResultProgress<PR>(type: ProgressType<PR>, params: PartialResultParams): ResultProgressReporter<PR> | undefined;
|
|
941
|
+
}
|
|
942
|
+
declare class _NotebooksImpl implements Remote, _Notebooks {
|
|
943
|
+
private _connection;
|
|
944
|
+
constructor();
|
|
945
|
+
attach(connection: Connection): void;
|
|
946
|
+
get connection(): Connection;
|
|
947
|
+
initialize(_capabilities: ClientCapabilities): void;
|
|
948
|
+
fillServerCapabilities(_capabilities: ServerCapabilities): void;
|
|
949
|
+
attachWorkDoneProgress(params: WorkDoneProgressParams): WorkDoneProgressReporter;
|
|
950
|
+
attachPartialResultProgress<PR>(_type: ProgressType<PR>, params: PartialResultParams): ResultProgressReporter<PR> | undefined;
|
|
951
|
+
}
|
|
952
|
+
type Notebooks = _Notebooks & NotebookSyncFeatureShape;
|
|
953
|
+
/**
|
|
954
|
+
* An empty interface for new proposed API.
|
|
955
|
+
*/
|
|
956
|
+
interface _ {}
|
|
957
|
+
interface ServerRequestHandler<P, R, PR, E> {
|
|
958
|
+
(params: P, token: CancellationToken, workDoneProgress: WorkDoneProgressReporter, resultProgress?: ResultProgressReporter<PR>): HandlerResult<R, E>;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Interface to describe the shape of the server connection.
|
|
962
|
+
*/
|
|
963
|
+
interface _Connection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _, PLanguages = _, PNotebooks = _> {
|
|
964
|
+
/**
|
|
965
|
+
* Start listening on the input stream for messages to process.
|
|
966
|
+
*/
|
|
967
|
+
listen(): void;
|
|
968
|
+
/**
|
|
969
|
+
* Installs a request handler described by the given {@link RequestType}.
|
|
970
|
+
*
|
|
971
|
+
* @param type The {@link RequestType} describing the request.
|
|
972
|
+
* @param handler The handler to install
|
|
973
|
+
*/
|
|
974
|
+
onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E>): Disposable;
|
|
975
|
+
onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E>): Disposable;
|
|
976
|
+
onRequest<R, PR, E, RO>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable;
|
|
977
|
+
onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable;
|
|
978
|
+
/**
|
|
979
|
+
* Installs a request handler for the given method.
|
|
980
|
+
*
|
|
981
|
+
* @param method The method to register a request handler for.
|
|
982
|
+
* @param handler The handler to install.
|
|
983
|
+
*/
|
|
984
|
+
onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable;
|
|
985
|
+
/**
|
|
986
|
+
* Installs a request handler that is invoked if no specific request handler can be found.
|
|
987
|
+
*
|
|
988
|
+
* @param handler a handler that handles all requests.
|
|
989
|
+
*/
|
|
990
|
+
onRequest(handler: StarRequestHandler): Disposable;
|
|
991
|
+
/**
|
|
992
|
+
* Send a request to the client.
|
|
993
|
+
*
|
|
994
|
+
* @param type The {@link RequestType} describing the request.
|
|
995
|
+
* @param params The request's parameters.
|
|
996
|
+
*/
|
|
997
|
+
sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken): Promise<R>;
|
|
998
|
+
sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken): Promise<R>;
|
|
999
|
+
sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken): Promise<R>;
|
|
1000
|
+
sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken): Promise<R>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Send a request to the client.
|
|
1003
|
+
*
|
|
1004
|
+
* @param method The method to invoke on the client.
|
|
1005
|
+
* @param params The request's parameters.
|
|
1006
|
+
*/
|
|
1007
|
+
sendRequest<R>(method: string, token?: CancellationToken): Promise<R>;
|
|
1008
|
+
sendRequest<R>(method: string, params: any, token?: CancellationToken): Promise<R>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Installs a notification handler described by the given {@link NotificationType}.
|
|
1011
|
+
*
|
|
1012
|
+
* @param type The {@link NotificationType} describing the notification.
|
|
1013
|
+
* @param handler The handler to install.
|
|
1014
|
+
*/
|
|
1015
|
+
onNotification<RO>(type: ProtocolNotificationType0<RO>, handler: NotificationHandler0): Disposable;
|
|
1016
|
+
onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P>): Disposable;
|
|
1017
|
+
onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable;
|
|
1018
|
+
onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable;
|
|
1019
|
+
/**
|
|
1020
|
+
* Installs a notification handler for the given method.
|
|
1021
|
+
*
|
|
1022
|
+
* @param method The method to register a request handler for.
|
|
1023
|
+
* @param handler The handler to install.
|
|
1024
|
+
*/
|
|
1025
|
+
onNotification(method: string, handler: GenericNotificationHandler): Disposable;
|
|
1026
|
+
/**
|
|
1027
|
+
* Installs a notification handler that is invoked if no specific notification handler can be found.
|
|
1028
|
+
*
|
|
1029
|
+
* @param handler a handler that handles all notifications.
|
|
1030
|
+
*/
|
|
1031
|
+
onNotification(handler: StarNotificationHandler): Disposable;
|
|
1032
|
+
/**
|
|
1033
|
+
* Send a notification to the client.
|
|
1034
|
+
*
|
|
1035
|
+
* @param type The {@link NotificationType} describing the notification.
|
|
1036
|
+
* @param params The notification's parameters.
|
|
1037
|
+
*/
|
|
1038
|
+
sendNotification<RO>(type: ProtocolNotificationType0<RO>): Promise<void>;
|
|
1039
|
+
sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params: P): Promise<void>;
|
|
1040
|
+
sendNotification(type: NotificationType0): Promise<void>;
|
|
1041
|
+
sendNotification<P>(type: NotificationType<P>, params: P): Promise<void>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Send a notification to the client.
|
|
1044
|
+
*
|
|
1045
|
+
* @param method The method to invoke on the client.
|
|
1046
|
+
* @param params The notification's parameters.
|
|
1047
|
+
*/
|
|
1048
|
+
sendNotification(method: string, params?: any): Promise<void>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Installs a progress handler for a given token.
|
|
1051
|
+
* @param type the progress type
|
|
1052
|
+
* @param token the token
|
|
1053
|
+
* @param handler the handler
|
|
1054
|
+
*/
|
|
1055
|
+
onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable;
|
|
1056
|
+
/**
|
|
1057
|
+
* Sends progress.
|
|
1058
|
+
* @param type the progress type
|
|
1059
|
+
* @param token the token to use
|
|
1060
|
+
* @param value the progress value
|
|
1061
|
+
*/
|
|
1062
|
+
sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Installs a handler for the initialize request.
|
|
1065
|
+
*
|
|
1066
|
+
* @param handler The initialize handler.
|
|
1067
|
+
*/
|
|
1068
|
+
onInitialize(handler: ServerRequestHandler<InitializeParams, InitializeResult, never, InitializeError>): Disposable;
|
|
1069
|
+
/**
|
|
1070
|
+
* Installs a handler for the initialized notification.
|
|
1071
|
+
*
|
|
1072
|
+
* @param handler The initialized handler.
|
|
1073
|
+
*/
|
|
1074
|
+
onInitialized(handler: NotificationHandler<InitializedParams>): Disposable;
|
|
1075
|
+
/**
|
|
1076
|
+
* Installs a handler for the shutdown request.
|
|
1077
|
+
*
|
|
1078
|
+
* @param handler The initialize handler.
|
|
1079
|
+
*/
|
|
1080
|
+
onShutdown(handler: RequestHandler0<void, void>): Disposable;
|
|
1081
|
+
/**
|
|
1082
|
+
* Installs a handler for the exit notification.
|
|
1083
|
+
*
|
|
1084
|
+
* @param handler The exit handler.
|
|
1085
|
+
*/
|
|
1086
|
+
onExit(handler: NotificationHandler0): Disposable;
|
|
1087
|
+
/**
|
|
1088
|
+
* A property to provide access to console specific features.
|
|
1089
|
+
*/
|
|
1090
|
+
console: RemoteConsole & PConsole;
|
|
1091
|
+
/**
|
|
1092
|
+
* A property to provide access to tracer specific features.
|
|
1093
|
+
*/
|
|
1094
|
+
tracer: RemoteTracer & PTracer;
|
|
1095
|
+
/**
|
|
1096
|
+
* A property to provide access to telemetry specific features.
|
|
1097
|
+
*/
|
|
1098
|
+
telemetry: Telemetry & PTelemetry;
|
|
1099
|
+
/**
|
|
1100
|
+
* A property to provide access to client specific features like registering
|
|
1101
|
+
* for requests or notifications.
|
|
1102
|
+
*/
|
|
1103
|
+
client: RemoteClient & PClient;
|
|
1104
|
+
/**
|
|
1105
|
+
* A property to provide access to windows specific features.
|
|
1106
|
+
*/
|
|
1107
|
+
window: RemoteWindow & PWindow;
|
|
1108
|
+
/**
|
|
1109
|
+
* A property to provide access to workspace specific features.
|
|
1110
|
+
*/
|
|
1111
|
+
workspace: RemoteWorkspace & PWorkspace;
|
|
1112
|
+
/**
|
|
1113
|
+
* A property to provide access to language specific features.
|
|
1114
|
+
*/
|
|
1115
|
+
languages: Languages & PLanguages;
|
|
1116
|
+
/**
|
|
1117
|
+
* A property to provide access to notebook specific features.
|
|
1118
|
+
*/
|
|
1119
|
+
notebooks: Notebooks & PNotebooks;
|
|
1120
|
+
/**
|
|
1121
|
+
* Installs a handler for the `DidChangeConfiguration` notification.
|
|
1122
|
+
*
|
|
1123
|
+
* @param handler The corresponding handler.
|
|
1124
|
+
*/
|
|
1125
|
+
onDidChangeConfiguration(handler: NotificationHandler<DidChangeConfigurationParams>): Disposable;
|
|
1126
|
+
/**
|
|
1127
|
+
* Installs a handler for the `DidChangeWatchedFiles` notification.
|
|
1128
|
+
*
|
|
1129
|
+
* @param handler The corresponding handler.
|
|
1130
|
+
*/
|
|
1131
|
+
onDidChangeWatchedFiles(handler: NotificationHandler<DidChangeWatchedFilesParams>): Disposable;
|
|
1132
|
+
/**
|
|
1133
|
+
* Installs a handler for the `DidOpenTextDocument` notification.
|
|
1134
|
+
*
|
|
1135
|
+
* @param handler The corresponding handler.
|
|
1136
|
+
*/
|
|
1137
|
+
onDidOpenTextDocument(handler: NotificationHandler<DidOpenTextDocumentParams>): Disposable;
|
|
1138
|
+
/**
|
|
1139
|
+
* Installs a handler for the `DidChangeTextDocument` notification.
|
|
1140
|
+
*
|
|
1141
|
+
* @param handler The corresponding handler.
|
|
1142
|
+
*/
|
|
1143
|
+
onDidChangeTextDocument(handler: NotificationHandler<DidChangeTextDocumentParams>): Disposable;
|
|
1144
|
+
/**
|
|
1145
|
+
* Installs a handler for the `DidCloseTextDocument` notification.
|
|
1146
|
+
*
|
|
1147
|
+
* @param handler The corresponding handler.
|
|
1148
|
+
*/
|
|
1149
|
+
onDidCloseTextDocument(handler: NotificationHandler<DidCloseTextDocumentParams>): Disposable;
|
|
1150
|
+
/**
|
|
1151
|
+
* Installs a handler for the `WillSaveTextDocument` notification.
|
|
1152
|
+
*
|
|
1153
|
+
* Note that this notification is opt-in. The client will not send it unless
|
|
1154
|
+
* your server has the `textDocumentSync.willSave` capability or you've
|
|
1155
|
+
* dynamically registered for the `textDocument/willSave` method.
|
|
1156
|
+
*
|
|
1157
|
+
* @param handler The corresponding handler.
|
|
1158
|
+
*/
|
|
1159
|
+
onWillSaveTextDocument(handler: NotificationHandler<WillSaveTextDocumentParams>): Disposable;
|
|
1160
|
+
/**
|
|
1161
|
+
* Installs a handler for the `WillSaveTextDocumentWaitUntil` request.
|
|
1162
|
+
*
|
|
1163
|
+
* Note that this request is opt-in. The client will not send it unless
|
|
1164
|
+
* your server has the `textDocumentSync.willSaveWaitUntil` capability,
|
|
1165
|
+
* or you've dynamically registered for the `textDocument/willSaveWaitUntil`
|
|
1166
|
+
* method.
|
|
1167
|
+
*
|
|
1168
|
+
* @param handler The corresponding handler.
|
|
1169
|
+
*/
|
|
1170
|
+
onWillSaveTextDocumentWaitUntil(handler: RequestHandler<WillSaveTextDocumentParams, TextEdit[] | undefined | null, void>): Disposable;
|
|
1171
|
+
/**
|
|
1172
|
+
* Installs a handler for the `DidSaveTextDocument` notification.
|
|
1173
|
+
*
|
|
1174
|
+
* @param handler The corresponding handler.
|
|
1175
|
+
*/
|
|
1176
|
+
onDidSaveTextDocument(handler: NotificationHandler<DidSaveTextDocumentParams>): Disposable;
|
|
1177
|
+
/**
|
|
1178
|
+
* Sends diagnostics computed for a given document to VSCode to render them in the
|
|
1179
|
+
* user interface.
|
|
1180
|
+
*
|
|
1181
|
+
* @param params The diagnostic parameters.
|
|
1182
|
+
*/
|
|
1183
|
+
sendDiagnostics(params: PublishDiagnosticsParams): Promise<void>;
|
|
1184
|
+
/**
|
|
1185
|
+
* Installs a handler for the `Hover` request.
|
|
1186
|
+
*
|
|
1187
|
+
* @param handler The corresponding handler.
|
|
1188
|
+
*/
|
|
1189
|
+
onHover(handler: ServerRequestHandler<HoverParams, Hover | undefined | null, never, void>): Disposable;
|
|
1190
|
+
/**
|
|
1191
|
+
* Installs a handler for the `Completion` request.
|
|
1192
|
+
*
|
|
1193
|
+
* @param handler The corresponding handler.
|
|
1194
|
+
*/
|
|
1195
|
+
onCompletion(handler: ServerRequestHandler<CompletionParams, CompletionItem[] | CompletionList | undefined | null, CompletionItem[], void>): Disposable;
|
|
1196
|
+
/**
|
|
1197
|
+
* Installs a handler for the `CompletionResolve` request.
|
|
1198
|
+
*
|
|
1199
|
+
* @param handler The corresponding handler.
|
|
1200
|
+
*/
|
|
1201
|
+
onCompletionResolve(handler: RequestHandler<CompletionItem, CompletionItem, void>): Disposable;
|
|
1202
|
+
/**
|
|
1203
|
+
* Installs a handler for the `SignatureHelp` request.
|
|
1204
|
+
*
|
|
1205
|
+
* @param handler The corresponding handler.
|
|
1206
|
+
*/
|
|
1207
|
+
onSignatureHelp(handler: ServerRequestHandler<SignatureHelpParams, SignatureHelp | undefined | null, never, void>): Disposable;
|
|
1208
|
+
/**
|
|
1209
|
+
* Installs a handler for the `Declaration` request.
|
|
1210
|
+
*
|
|
1211
|
+
* @param handler The corresponding handler.
|
|
1212
|
+
*/
|
|
1213
|
+
onDeclaration(handler: ServerRequestHandler<DeclarationParams, Declaration | DeclarationLink[] | undefined | null, Location[] | DeclarationLink[], void>): Disposable;
|
|
1214
|
+
/**
|
|
1215
|
+
* Installs a handler for the `Definition` request.
|
|
1216
|
+
*
|
|
1217
|
+
* @param handler The corresponding handler.
|
|
1218
|
+
*/
|
|
1219
|
+
onDefinition(handler: ServerRequestHandler<DefinitionParams, Definition | DefinitionLink[] | undefined | null, Location[] | DefinitionLink[], void>): Disposable;
|
|
1220
|
+
/**
|
|
1221
|
+
* Installs a handler for the `Type Definition` request.
|
|
1222
|
+
*
|
|
1223
|
+
* @param handler The corresponding handler.
|
|
1224
|
+
*/
|
|
1225
|
+
onTypeDefinition(handler: ServerRequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | undefined | null, Location[] | DefinitionLink[], void>): Disposable;
|
|
1226
|
+
/**
|
|
1227
|
+
* Installs a handler for the `Implementation` request.
|
|
1228
|
+
*
|
|
1229
|
+
* @param handler The corresponding handler.
|
|
1230
|
+
*/
|
|
1231
|
+
onImplementation(handler: ServerRequestHandler<ImplementationParams, Definition | DefinitionLink[] | undefined | null, Location[] | DefinitionLink[], void>): Disposable;
|
|
1232
|
+
/**
|
|
1233
|
+
* Installs a handler for the `References` request.
|
|
1234
|
+
*
|
|
1235
|
+
* @param handler The corresponding handler.
|
|
1236
|
+
*/
|
|
1237
|
+
onReferences(handler: ServerRequestHandler<ReferenceParams, Location[] | undefined | null, Location[], void>): Disposable;
|
|
1238
|
+
/**
|
|
1239
|
+
* Installs a handler for the `DocumentHighlight` request.
|
|
1240
|
+
*
|
|
1241
|
+
* @param handler The corresponding handler.
|
|
1242
|
+
*/
|
|
1243
|
+
onDocumentHighlight(handler: ServerRequestHandler<DocumentHighlightParams, DocumentHighlight[] | undefined | null, DocumentHighlight[], void>): Disposable;
|
|
1244
|
+
/**
|
|
1245
|
+
* Installs a handler for the `DocumentSymbol` request.
|
|
1246
|
+
*
|
|
1247
|
+
* @param handler The corresponding handler.
|
|
1248
|
+
*/
|
|
1249
|
+
onDocumentSymbol(handler: ServerRequestHandler<DocumentSymbolParams, SymbolInformation[] | DocumentSymbol[] | undefined | null, SymbolInformation[] | DocumentSymbol[], void>): Disposable;
|
|
1250
|
+
/**
|
|
1251
|
+
* Installs a handler for the `WorkspaceSymbol` request.
|
|
1252
|
+
*
|
|
1253
|
+
* @param handler The corresponding handler.
|
|
1254
|
+
*/
|
|
1255
|
+
onWorkspaceSymbol(handler: ServerRequestHandler<WorkspaceSymbolParams, SymbolInformation[] | WorkspaceSymbol[] | undefined | null, SymbolInformation[], void>): Disposable;
|
|
1256
|
+
/**
|
|
1257
|
+
* Installs a handler for the `WorkspaceSymbol` request.
|
|
1258
|
+
*
|
|
1259
|
+
* @param handler The corresponding handler.
|
|
1260
|
+
*/
|
|
1261
|
+
onWorkspaceSymbolResolve(handler: RequestHandler<WorkspaceSymbol, WorkspaceSymbol, void>): Disposable;
|
|
1262
|
+
/**
|
|
1263
|
+
* Installs a handler for the `CodeAction` request.
|
|
1264
|
+
*
|
|
1265
|
+
* @param handler The corresponding handler.
|
|
1266
|
+
*/
|
|
1267
|
+
onCodeAction(handler: ServerRequestHandler<CodeActionParams, (Command | CodeAction)[] | undefined | null, (Command | CodeAction)[], void>): Disposable;
|
|
1268
|
+
/**
|
|
1269
|
+
* Installs a handler for the `CodeAction` resolve request.
|
|
1270
|
+
*
|
|
1271
|
+
* @param handler The corresponding handler.
|
|
1272
|
+
*/
|
|
1273
|
+
onCodeActionResolve(handler: RequestHandler<CodeAction, CodeAction, void>): Disposable;
|
|
1274
|
+
/**
|
|
1275
|
+
* Compute a list of {@link CodeLens lenses}. This call should return as fast as possible and if
|
|
1276
|
+
* computing the commands is expensive implementers should only return code lens objects with the
|
|
1277
|
+
* range set and handle the resolve request.
|
|
1278
|
+
*
|
|
1279
|
+
* @param handler The corresponding handler.
|
|
1280
|
+
*/
|
|
1281
|
+
onCodeLens(handler: ServerRequestHandler<CodeLensParams, CodeLens[] | undefined | null, CodeLens[], void>): Disposable;
|
|
1282
|
+
/**
|
|
1283
|
+
* This function will be called for each visible code lens, usually when scrolling and after
|
|
1284
|
+
* the onCodeLens has been called.
|
|
1285
|
+
*
|
|
1286
|
+
* @param handler The corresponding handler.
|
|
1287
|
+
*/
|
|
1288
|
+
onCodeLensResolve(handler: RequestHandler<CodeLens, CodeLens, void>): Disposable;
|
|
1289
|
+
/**
|
|
1290
|
+
* Installs a handler for the document formatting request.
|
|
1291
|
+
*
|
|
1292
|
+
* @param handler The corresponding handler.
|
|
1293
|
+
*/
|
|
1294
|
+
onDocumentFormatting(handler: ServerRequestHandler<DocumentFormattingParams, TextEdit[] | undefined | null, never, void>): Disposable;
|
|
1295
|
+
/**
|
|
1296
|
+
* Installs a handler for the document range formatting request.
|
|
1297
|
+
*
|
|
1298
|
+
* @param handler The corresponding handler.
|
|
1299
|
+
*/
|
|
1300
|
+
onDocumentRangeFormatting(handler: ServerRequestHandler<DocumentRangeFormattingParams, TextEdit[] | undefined | null, never, void>): Disposable;
|
|
1301
|
+
/**
|
|
1302
|
+
* Installs a handler for the document on type formatting request.
|
|
1303
|
+
*
|
|
1304
|
+
* @param handler The corresponding handler.
|
|
1305
|
+
*/
|
|
1306
|
+
onDocumentOnTypeFormatting(handler: RequestHandler<DocumentOnTypeFormattingParams, TextEdit[] | undefined | null, void>): Disposable;
|
|
1307
|
+
/**
|
|
1308
|
+
* Installs a handler for the rename request.
|
|
1309
|
+
*
|
|
1310
|
+
* @param handler The corresponding handler.
|
|
1311
|
+
*/
|
|
1312
|
+
onRenameRequest(handler: ServerRequestHandler<RenameParams, WorkspaceEdit | undefined | null, never, void>): Disposable;
|
|
1313
|
+
/**
|
|
1314
|
+
* Installs a handler for the prepare rename request.
|
|
1315
|
+
*
|
|
1316
|
+
* @param handler The corresponding handler.
|
|
1317
|
+
*/
|
|
1318
|
+
onPrepareRename(handler: RequestHandler<PrepareRenameParams, Range | {
|
|
1319
|
+
range: Range;
|
|
1320
|
+
placeholder: string;
|
|
1321
|
+
} | {
|
|
1322
|
+
defaultBehavior: boolean;
|
|
1323
|
+
} | undefined | null, void>): Disposable;
|
|
1324
|
+
/**
|
|
1325
|
+
* Installs a handler for the document links request.
|
|
1326
|
+
*
|
|
1327
|
+
* @param handler The corresponding handler.
|
|
1328
|
+
*/
|
|
1329
|
+
onDocumentLinks(handler: ServerRequestHandler<DocumentLinkParams, DocumentLink[] | undefined | null, DocumentLink[], void>): Disposable;
|
|
1330
|
+
/**
|
|
1331
|
+
* Installs a handler for the document links resolve request.
|
|
1332
|
+
*
|
|
1333
|
+
* @param handler The corresponding handler.
|
|
1334
|
+
*/
|
|
1335
|
+
onDocumentLinkResolve(handler: RequestHandler<DocumentLink, DocumentLink | undefined | null, void>): Disposable;
|
|
1336
|
+
/**
|
|
1337
|
+
* Installs a handler for the document color request.
|
|
1338
|
+
*
|
|
1339
|
+
* @param handler The corresponding handler.
|
|
1340
|
+
*/
|
|
1341
|
+
onDocumentColor(handler: ServerRequestHandler<DocumentColorParams, ColorInformation[] | undefined | null, ColorInformation[], void>): Disposable;
|
|
1342
|
+
/**
|
|
1343
|
+
* Installs a handler for the document color request.
|
|
1344
|
+
*
|
|
1345
|
+
* @param handler The corresponding handler.
|
|
1346
|
+
*/
|
|
1347
|
+
onColorPresentation(handler: ServerRequestHandler<ColorPresentationParams, ColorPresentation[] | undefined | null, ColorPresentation[], void>): Disposable;
|
|
1348
|
+
/**
|
|
1349
|
+
* Installs a handler for the folding ranges request.
|
|
1350
|
+
*
|
|
1351
|
+
* @param handler The corresponding handler.
|
|
1352
|
+
*/
|
|
1353
|
+
onFoldingRanges(handler: ServerRequestHandler<FoldingRangeParams, FoldingRange[] | undefined | null, FoldingRange[], void>): Disposable;
|
|
1354
|
+
/**
|
|
1355
|
+
* Installs a handler for the selection ranges request.
|
|
1356
|
+
*
|
|
1357
|
+
* @param handler The corresponding handler.
|
|
1358
|
+
*/
|
|
1359
|
+
onSelectionRanges(handler: ServerRequestHandler<SelectionRangeParams, SelectionRange[] | undefined | null, SelectionRange[], void>): Disposable;
|
|
1360
|
+
/**
|
|
1361
|
+
* Installs a handler for the execute command request.
|
|
1362
|
+
*
|
|
1363
|
+
* @param handler The corresponding handler.
|
|
1364
|
+
*/
|
|
1365
|
+
onExecuteCommand(handler: ServerRequestHandler<ExecuteCommandParams, any | undefined | null, never, void>): Disposable;
|
|
1366
|
+
/**
|
|
1367
|
+
* Disposes the connection
|
|
1368
|
+
*/
|
|
1369
|
+
dispose(): void;
|
|
1370
|
+
}
|
|
1371
|
+
interface Connection extends _Connection {}
|
|
1372
|
+
interface Feature<B extends FeatureBase, P> {
|
|
1373
|
+
(Base: new () => B): new () => B & P;
|
|
1374
|
+
}
|
|
1375
|
+
type ConsoleFeature<P> = Feature<RemoteConsole, P>;
|
|
1376
|
+
declare function combineConsoleFeatures<O, T>(one: ConsoleFeature<O>, two: ConsoleFeature<T>): ConsoleFeature<O & T>;
|
|
1377
|
+
type TelemetryFeature<P> = Feature<Telemetry, P>;
|
|
1378
|
+
declare function combineTelemetryFeatures<O, T>(one: TelemetryFeature<O>, two: TelemetryFeature<T>): TelemetryFeature<O & T>;
|
|
1379
|
+
type TracerFeature<P> = Feature<RemoteTracer, P>;
|
|
1380
|
+
declare function combineTracerFeatures<O, T>(one: TracerFeature<O>, two: TracerFeature<T>): TracerFeature<O & T>;
|
|
1381
|
+
type ClientFeature<P> = Feature<RemoteClient, P>;
|
|
1382
|
+
declare function combineClientFeatures<O, T>(one: ClientFeature<O>, two: ClientFeature<T>): ClientFeature<O & T>;
|
|
1383
|
+
type WindowFeature<P> = Feature<_RemoteWindow, P>;
|
|
1384
|
+
declare function combineWindowFeatures<O, T>(one: WindowFeature<O>, two: WindowFeature<T>): WindowFeature<O & T>;
|
|
1385
|
+
type WorkspaceFeature<P> = Feature<_RemoteWorkspace, P>;
|
|
1386
|
+
declare function combineWorkspaceFeatures<O, T>(one: WorkspaceFeature<O>, two: WorkspaceFeature<T>): WorkspaceFeature<O & T>;
|
|
1387
|
+
type LanguagesFeature<P> = Feature<_Languages, P>;
|
|
1388
|
+
declare function combineLanguagesFeatures<O, T>(one: LanguagesFeature<O>, two: LanguagesFeature<T>): LanguagesFeature<O & T>;
|
|
1389
|
+
type NotebooksFeature<P> = Feature<_Notebooks, P>;
|
|
1390
|
+
declare function combineNotebooksFeatures<O, T>(one: NotebooksFeature<O>, two: NotebooksFeature<T>): NotebooksFeature<O & T>;
|
|
1391
|
+
interface Features<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _, PLanguages = _, PNotebooks = _> {
|
|
1392
|
+
__brand: 'features';
|
|
1393
|
+
console?: ConsoleFeature<PConsole>;
|
|
1394
|
+
tracer?: TracerFeature<PTracer>;
|
|
1395
|
+
telemetry?: TelemetryFeature<PTelemetry>;
|
|
1396
|
+
client?: ClientFeature<PClient>;
|
|
1397
|
+
window?: WindowFeature<PWindow>;
|
|
1398
|
+
workspace?: WorkspaceFeature<PWorkspace>;
|
|
1399
|
+
languages?: LanguagesFeature<PLanguages>;
|
|
1400
|
+
notebooks?: NotebooksFeature<PNotebooks>;
|
|
1401
|
+
}
|
|
1402
|
+
declare function combineFeatures<OConsole, OTracer, OTelemetry, OClient, OWindow, OWorkspace, OLanguages, ONotebooks, TConsole, TTracer, TTelemetry, TClient, TWindow, TWorkspace, TLanguages, TNotebooks>(one: Features<OConsole, OTracer, OTelemetry, OClient, OWindow, OWorkspace, OLanguages, ONotebooks>, two: Features<TConsole, TTracer, TTelemetry, TClient, TWindow, TWorkspace, TLanguages, TNotebooks>): Features<OConsole & TConsole, OTracer & TTracer, OTelemetry & TTelemetry, OClient & TClient, OWindow & TWindow, OWorkspace & TWorkspace, OLanguages & TLanguages, ONotebooks & TNotebooks>;
|
|
1403
|
+
interface WatchDog {
|
|
1404
|
+
shutdownReceived: boolean;
|
|
1405
|
+
initialize(params: InitializeParams): void;
|
|
1406
|
+
exit(code: number): void;
|
|
1407
|
+
}
|
|
1408
|
+
//#endregion
|
|
1409
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.d.ts
|
|
1410
|
+
/**
|
|
1411
|
+
* Shape of the inline completions feature
|
|
1412
|
+
*
|
|
1413
|
+
* @since 3.18.0
|
|
1414
|
+
*/
|
|
1415
|
+
interface InlineCompletionFeatureShape {
|
|
1416
|
+
inlineCompletion: {
|
|
1417
|
+
/**
|
|
1418
|
+
* Installs a handler for the inline completions request.
|
|
1419
|
+
*
|
|
1420
|
+
* @param handler The corresponding handler.
|
|
1421
|
+
*/
|
|
1422
|
+
on(handler: ServerRequestHandler<InlineCompletionParams, InlineCompletionList | InlineCompletionItem[] | undefined | null, InlineCompletionItem[], void>): Disposable;
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
//#endregion
|
|
1426
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/node/files.d.ts
|
|
1427
|
+
/**
|
|
1428
|
+
* @deprecated Use the `vscode-uri` npm module which provides a more
|
|
1429
|
+
* complete implementation of handling VS Code URIs.
|
|
1430
|
+
*/
|
|
1431
|
+
declare function uriToFilePath(uri: string): string | undefined;
|
|
1432
|
+
declare function resolve(moduleName: string, nodePath: string | undefined, cwd: string | undefined, tracer: (message: string, verbose?: string) => void): Promise<string>;
|
|
1433
|
+
/**
|
|
1434
|
+
* Resolve the global npm package path.
|
|
1435
|
+
* @deprecated Since this depends on the used package manager and their version the best is that servers
|
|
1436
|
+
* implement this themselves since they know best what kind of package managers to support.
|
|
1437
|
+
* @param tracer the tracer to use
|
|
1438
|
+
*/
|
|
1439
|
+
declare function resolveGlobalNodePath(tracer?: (message: string) => void): string | undefined;
|
|
1440
|
+
declare function resolveGlobalYarnPath(tracer?: (message: string) => void): string | undefined;
|
|
1441
|
+
declare function resolveModulePath(workspaceRoot: string, moduleName: string, nodePath: string, tracer: (message: string, verbose?: string) => void): Promise<string>;
|
|
1442
|
+
//#endregion
|
|
1443
|
+
//#region ../../node_modules/.bun/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/node/main.d.ts
|
|
1444
|
+
declare class IPCMessageReader extends AbstractMessageReader {
|
|
1445
|
+
private process;
|
|
1446
|
+
constructor(process: NodeJS.Process | ChildProcess);
|
|
1447
|
+
listen(callback: DataCallback): Disposable;
|
|
1448
|
+
}
|
|
1449
|
+
declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter {
|
|
1450
|
+
private readonly process;
|
|
1451
|
+
private errorCount;
|
|
1452
|
+
constructor(process: NodeJS.Process | ChildProcess);
|
|
1453
|
+
write(msg: Message): Promise<void>;
|
|
1454
|
+
private handleError;
|
|
1455
|
+
end(): void;
|
|
1456
|
+
}
|
|
1457
|
+
declare class PortMessageReader extends AbstractMessageReader implements MessageReader {
|
|
1458
|
+
private onData;
|
|
1459
|
+
constructor(port: MessagePort | Worker);
|
|
1460
|
+
listen(callback: DataCallback): Disposable;
|
|
1461
|
+
}
|
|
1462
|
+
declare class PortMessageWriter extends AbstractMessageWriter implements MessageWriter {
|
|
1463
|
+
private readonly port;
|
|
1464
|
+
private errorCount;
|
|
1465
|
+
constructor(port: MessagePort | Worker);
|
|
1466
|
+
write(msg: Message): Promise<void>;
|
|
1467
|
+
private handleError;
|
|
1468
|
+
end(): void;
|
|
1469
|
+
}
|
|
1470
|
+
declare class SocketMessageReader extends ReadableStreamMessageReader {
|
|
1471
|
+
constructor(socket: Socket, encoding?: RAL.MessageBufferEncoding);
|
|
1472
|
+
}
|
|
1473
|
+
declare class SocketMessageWriter extends WriteableStreamMessageWriter {
|
|
1474
|
+
private socket;
|
|
1475
|
+
constructor(socket: Socket, options?: RAL.MessageBufferEncoding | MessageWriterOptions);
|
|
1476
|
+
dispose(): void;
|
|
1477
|
+
}
|
|
1478
|
+
declare class StreamMessageReader extends ReadableStreamMessageReader {
|
|
1479
|
+
constructor(readable: NodeJS.ReadableStream, encoding?: RAL.MessageBufferEncoding | MessageReaderOptions);
|
|
1480
|
+
}
|
|
1481
|
+
declare class StreamMessageWriter extends WriteableStreamMessageWriter {
|
|
1482
|
+
constructor(writable: NodeJS.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions);
|
|
1483
|
+
}
|
|
1484
|
+
declare function generateRandomPipeName(): string;
|
|
1485
|
+
interface PipeTransport {
|
|
1486
|
+
onConnected(): Promise<[MessageReader, MessageWriter]>;
|
|
1487
|
+
}
|
|
1488
|
+
declare function createClientPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): Promise<PipeTransport>;
|
|
1489
|
+
declare function createServerPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter];
|
|
1490
|
+
interface SocketTransport {
|
|
1491
|
+
onConnected(): Promise<[MessageReader, MessageWriter]>;
|
|
1492
|
+
}
|
|
1493
|
+
declare function createClientSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): Promise<SocketTransport>;
|
|
1494
|
+
declare function createServerSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter];
|
|
1495
|
+
//#endregion
|
|
1496
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/api.d.ts
|
|
1497
|
+
declare namespace ProposedFeatures {
|
|
1498
|
+
const all: Features<_, _, _, _, _, _, InlineCompletionFeatureShape, _>;
|
|
1499
|
+
type Connection = _Connection<_, _, _, _, _, _, InlineCompletionFeatureShape, _>;
|
|
1500
|
+
}
|
|
1501
|
+
//#endregion
|
|
1502
|
+
//#region ../../node_modules/.bun/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/node/main.d.ts
|
|
1503
|
+
declare namespace Files {
|
|
1504
|
+
let uriToFilePath: typeof uriToFilePath;
|
|
1505
|
+
let resolveGlobalNodePath: typeof resolveGlobalNodePath;
|
|
1506
|
+
let resolveGlobalYarnPath: typeof resolveGlobalYarnPath;
|
|
1507
|
+
let resolve: typeof resolve;
|
|
1508
|
+
let resolveModulePath: typeof resolveModulePath;
|
|
1509
|
+
}
|
|
1510
|
+
//#endregion
|
|
1511
|
+
//#region ../../node_modules/.bun/@volar+language-server@2.4.28/node_modules/@volar/language-server/lib/project/simpleProject.d.ts
|
|
1512
|
+
declare function createSimpleProject(languagePlugins: LanguagePlugin<URI$1>[]): LanguageServerProject;
|
|
1513
|
+
declare function createLanguageServiceEnvironment(server: LanguageServer, workspaceFolders: URI$1[]): LanguageServiceEnvironment;
|
|
1514
|
+
//#endregion
|
|
1515
|
+
//#region ../../node_modules/.bun/@volar+typescript@2.4.28/node_modules/@volar/typescript/lib/protocol/createSys.d.ts
|
|
1516
|
+
declare function createSys(sys: undefined | undefined, env: Pick<LanguageServiceEnvironment, 'onDidChangeWatchedFiles' | 'fs'>, getCurrentDirectory: () => string, uriConverter: {
|
|
1517
|
+
asUri(fileName: string): URI$1;
|
|
1518
|
+
asFileName(uri: URI$1): string;
|
|
1519
|
+
}): undefined & {
|
|
1520
|
+
version: number;
|
|
1521
|
+
sync(): Promise<number>;
|
|
1522
|
+
} & Disposable;
|
|
1523
|
+
//#endregion
|
|
1524
|
+
//#region ../../node_modules/.bun/@volar+typescript@2.4.28/node_modules/@volar/typescript/lib/protocol/createProject.d.ts
|
|
1525
|
+
interface TypeScriptProjectHost extends Pick<undefined, 'getLocalizedDiagnosticMessages' | 'getCurrentDirectory' | 'getCompilationSettings' | 'getProjectReferences' | 'getScriptFileNames' | 'getProjectVersion'> {}
|
|
1526
|
+
declare module 'typescript' {
|
|
1527
|
+
interface LanguageServiceHost {
|
|
1528
|
+
/**
|
|
1529
|
+
* @internal
|
|
1530
|
+
*/
|
|
1531
|
+
getModuleResolutionCache?(): undefined;
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
//#endregion
|
|
1535
|
+
//#region ../../node_modules/.bun/@volar+typescript@2.4.28/node_modules/@volar/typescript/index.d.ts
|
|
1536
|
+
declare module '@volar/language-service' {
|
|
1537
|
+
interface ProjectContext {
|
|
1538
|
+
typescript?: {
|
|
1539
|
+
configFileName: string | undefined;
|
|
1540
|
+
sys: undefined & {
|
|
1541
|
+
version?: number;
|
|
1542
|
+
sync?(): Promise<number>;
|
|
1543
|
+
};
|
|
1544
|
+
languageServiceHost: undefined;
|
|
1545
|
+
getExtraServiceScript(fileName: string): TypeScriptExtraServiceScript | undefined;
|
|
1546
|
+
uriConverter: {
|
|
1547
|
+
asUri(fileName: string): URI$1;
|
|
1548
|
+
asFileName(uri: URI$1): string;
|
|
1549
|
+
};
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
declare module '@volar/language-core' {
|
|
1554
|
+
interface LanguagePlugin {
|
|
1555
|
+
typescript?: TypeScriptGenericOptions & TypeScriptNonTSPluginOptions;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* The following options available to all situations.
|
|
1560
|
+
*/
|
|
1561
|
+
interface TypeScriptGenericOptions {
|
|
1562
|
+
extraFileExtensions: undefined[];
|
|
1563
|
+
resolveHiddenExtensions?: boolean;
|
|
1564
|
+
getServiceScript(root: VirtualCode): TypeScriptServiceScript | undefined;
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* The following options will not be available in TS plugin.
|
|
1568
|
+
*/
|
|
1569
|
+
interface TypeScriptNonTSPluginOptions {
|
|
1570
|
+
getExtraServiceScripts?(fileName: string, root: VirtualCode): TypeScriptExtraServiceScript[];
|
|
1571
|
+
/**
|
|
1572
|
+
* @deprecated Remove in 2.5.0
|
|
1573
|
+
*/
|
|
1574
|
+
resolveLanguageServiceHost?(host: undefined): undefined;
|
|
1575
|
+
}
|
|
1576
|
+
interface TypeScriptServiceScript {
|
|
1577
|
+
code: VirtualCode;
|
|
1578
|
+
extension: '.ts' | '.js' | '.mts' | '.mjs' | '.cjs' | '.cts' | '.d.ts' | string;
|
|
1579
|
+
scriptKind: undefined;
|
|
1580
|
+
/** See #188 */
|
|
1581
|
+
preventLeadingOffset?: boolean;
|
|
1582
|
+
}
|
|
1583
|
+
interface TypeScriptExtraServiceScript extends TypeScriptServiceScript {
|
|
1584
|
+
fileName: string;
|
|
1585
|
+
}
|
|
1586
|
+
//#endregion
|
|
1587
|
+
//#region ../../node_modules/.bun/@volar+language-server@2.4.28/node_modules/@volar/language-server/lib/project/typescriptProjectLs.d.ts
|
|
1588
|
+
interface ProjectExposeContext {
|
|
1589
|
+
env: LanguageServiceEnvironment;
|
|
1590
|
+
configFileName: string | undefined;
|
|
1591
|
+
projectHost: TypeScriptProjectHost;
|
|
1592
|
+
sys: ReturnType<typeof createSys>;
|
|
1593
|
+
uriConverter: {
|
|
1594
|
+
asUri(fileName: string): URI$1;
|
|
1595
|
+
asFileName(uri: URI$1): string;
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
//#endregion
|
|
1599
|
+
//#region ../../node_modules/.bun/@volar+language-server@2.4.28/node_modules/@volar/language-server/lib/project/typescriptProject.d.ts
|
|
1600
|
+
declare function createTypeScriptProject(ts: typeof typescript_d_exports, tsLocalized: undefined<string> | undefined, create: (projectContext: ProjectExposeContext) => ProviderResult<{
|
|
1601
|
+
languagePlugins: LanguagePlugin<URI$1>[];
|
|
1602
|
+
setup?(options: {
|
|
1603
|
+
language: Language;
|
|
1604
|
+
project: ProjectContext;
|
|
1605
|
+
}): void;
|
|
1606
|
+
}>): LanguageServerProject;
|
|
1607
|
+
declare function createUriConverter(rootFolders: URI$1[]): {
|
|
1608
|
+
asFileName: (parsed: URI$1) => string;
|
|
1609
|
+
asUri: (fileName: string) => URI$1;
|
|
1610
|
+
};
|
|
1611
|
+
declare function sortTSConfigs(file: string, a: string, b: string): number;
|
|
1612
|
+
declare function isFileInDir(fileName: string, dir: string): boolean;
|
|
1613
|
+
declare function getWorkspaceFolder(uri: URI$1, workspaceFolders: {
|
|
1614
|
+
has(uri: URI$1): boolean;
|
|
1615
|
+
all: URI$1[];
|
|
1616
|
+
}): URI$1;
|
|
1617
|
+
declare namespace node_d_exports {
|
|
1618
|
+
export { AbstractCancellationTokenSource, AbstractMessageBuffer, AbstractMessageReader, AbstractMessageWriter, AnnotatedTextEdit, ApplyWorkspaceEditParams, ApplyWorkspaceEditRequest, ApplyWorkspaceEditResponse, ApplyWorkspaceEditResult, AutoInsertRequest, BaseSymbolInformation, BulkRegistration, BulkUnregistration, CallHierarchyClientCapabilities, CallHierarchyIncomingCall, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyItem, CallHierarchyOptions, CallHierarchyOutgoingCall, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, CallHierarchyRegistrationOptions, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, CancellationToken, CancellationTokenSource, ChangeAnnotation, ChangeAnnotationIdentifier, ClientCapabilities, ClientFeature, CodeAction, CodeActionClientCapabilities, CodeActionContext, CodeActionKind, CodeActionOptions, CodeActionParams, CodeActionRegistrationOptions, CodeActionRequest, CodeActionResolveRequest, CodeActionTriggerKind, CodeDescription, CodeInformation, CodeLens, CodeLensClientCapabilities, CodeLensOptions, CodeLensParams, CodeLensRefreshRequest, CodeLensRegistrationOptions, CodeLensRequest, CodeLensResolveRequest, CodeLensWorkspaceClientCapabilities, CodeMapping, CodegenContext, Color, ColorInformation, DocumentColorOptions as ColorOptions, ColorPresentation, ColorPresentationParams, ColorPresentationRequest, DocumentColorOptions as ColorProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions, Command, CompletionClientCapabilities, CompletionContext, CompletionItem, CompletionItemKind, CompletionItemLabelDetails, CompletionItemTag, CompletionList, CompletionOptions, CompletionParams, CompletionRegistrationOptions, CompletionRequest, CompletionResolveRequest, CompletionTriggerKind, ConfigurationItem, ConfigurationParams, ConfigurationRequest, Connection, ConnectionError, ConnectionErrors, ConnectionOptions, ConnectionStrategy, ConsoleFeature, ContentDecoder, ContentEncoder, ContentTypeDecoder, ContentTypeDecoderOptions, ContentTypeEncoder, ContentTypeEncoderOptions, CreateFile, CreateFileOptions, CreateFilesParams, DataCallback, DataTransferFile, DataTransferItem, Declaration, DeclarationClientCapabilities, DeclarationLink, DeclarationOptions, DeclarationParams, DeclarationRegistrationOptions, DeclarationRequest, Definition, DefinitionClientCapabilities, DefinitionLink, DefinitionOptions, DefinitionParams, DefinitionRegistrationOptions, DefinitionRequest, DeleteFile, DeleteFileOptions, DeleteFilesParams, Diagnostic, DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRefreshRequest, DiagnosticRegistrationOptions, DiagnosticRelatedInformation, DiagnosticServerCancellationData, DiagnosticSeverity, DiagnosticTag, DidChangeConfigurationClientCapabilities, DidChangeConfigurationNotification, DidChangeConfigurationParams, DidChangeConfigurationRegistrationOptions, DidChangeNotebookDocumentNotification, DidChangeNotebookDocumentParams, DidChangeTextDocumentNotification, DidChangeTextDocumentParams, DidChangeWatchedFilesClientCapabilities, DidChangeWatchedFilesNotification, DidChangeWatchedFilesParams, DidChangeWatchedFilesRegistrationOptions, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, DidCloseNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseTextDocumentNotification, DidCloseTextDocumentParams, DidCreateFilesNotification, DidDeleteFilesNotification, DidOpenNotebookDocumentNotification, DidOpenNotebookDocumentParams, DidOpenTextDocumentNotification, DidOpenTextDocumentParams, DidRenameFilesNotification, DidSaveNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveTextDocumentNotification, DidSaveTextDocumentParams, Disposable, DocumentColorOptions, DocumentColorParams, DocumentColorRegistrationOptions, DocumentColorRequest, DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportKind, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, DocumentDropEdit, DocumentDropRequest, DocumentDrop_DataTransferItemAsStringRequest, DocumentDrop_DataTransferItemFileDataRequest, DocumentFilter, DocumentFormattingClientCapabilities, DocumentFormattingOptions, DocumentFormattingParams, DocumentFormattingRegistrationOptions, DocumentFormattingRequest, DocumentHighlight, DocumentHighlightClientCapabilities, DocumentHighlightKind, DocumentHighlightOptions, DocumentHighlightParams, DocumentHighlightRegistrationOptions, DocumentHighlightRequest, DocumentLink, DocumentLinkClientCapabilities, DocumentLinkOptions, DocumentLinkParams, DocumentLinkRegistrationOptions, DocumentLinkRequest, DocumentLinkResolveRequest, DocumentOnTypeFormattingClientCapabilities, DocumentOnTypeFormattingOptions, DocumentOnTypeFormattingParams, DocumentOnTypeFormattingRegistrationOptions, DocumentOnTypeFormattingRequest, DocumentRangeFormattingClientCapabilities, DocumentRangeFormattingOptions, DocumentRangeFormattingParams, DocumentRangeFormattingRegistrationOptions, DocumentRangeFormattingRequest, DocumentRangesFormattingParams, DocumentRangesFormattingRequest, DocumentSelector, DocumentSymbol, DocumentSymbolClientCapabilities, DocumentSymbolOptions, DocumentSymbolParams, DocumentSymbolRegistrationOptions, DocumentSymbolRequest, DocumentUri, EOL, EmbeddedCodeFormattingOptions, Emitter, ErrorCodes, ErrorMessageTracker, Event, ExecuteCommandClientCapabilities, ExecuteCommandOptions, ExecuteCommandParams, ExecuteCommandRegistrationOptions, ExecuteCommandRequest, ExecutionSummary, ExitNotification, ExperimentalFeatures, FailureHandlingKind, Feature, FeatureBase, Features, FileChangeType, FileCreate, FileDelete, FileEvent, FileOperationClientCapabilities, FileOperationOptions, FileOperationPatternKind, FileOperationPatternOptions, FileOperationRegistrationOptions, FileRename, FileStat, FileSystem, FileSystemWatcher, FileType, Files, FindFileReferenceRequest, FoldingRange, FoldingRangeClientCapabilities, FoldingRangeKind, FoldingRangeOptions, FoldingRangeParams, FoldingRangeOptions as FoldingRangeProviderOptions, FoldingRangeRefreshRequest, FoldingRangeRegistrationOptions, FoldingRangeRequest, FormattingOptions, FullDocumentDiagnosticReport, GeneralClientCapabilities, GenericNotificationHandler, GenericRequestHandler, GetMatchTsConfigRequest, GetServicePluginsRequest, GetVirtualCodeRequest, GetVirtualFileRequest, GlobPattern, HandlerResult, Hover, HoverClientCapabilities, HoverOptions, HoverParams, HoverRegistrationOptions, HoverRequest, IPCMessageReader, IPCMessageWriter, IScriptSnapshot, ImplementationOptions, ImplementationParams, ImplementationRegistrationOptions, ImplementationRequest, InitializeError, InitializeErrorCodes, InitializeParams, InitializeRequest, InitializeResult, InitializedNotification, InitializedParams, InlayHint, InlayHintClientCapabilities, InlayHintKind, InlayHintLabelPart, InlayHintOptions, InlayHintParams, InlayHintRefreshRequest, InlayHintRegistrationOptions, InlayHintRequest, InlayHintResolveRequest, InlayHintWorkspaceClientCapabilities, InlineCompletionClientCapabilities, InlineCompletionContext, InlineCompletionItem, InlineCompletionList, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest, InlineCompletionTriggerKind, InlineValue, InlineValueClientCapabilities, InlineValueContext, InlineValueEvaluatableExpression, InlineValueOptions, InlineValueParams, InlineValueRefreshRequest, InlineValueRegistrationOptions, InlineValueRequest, InlineValueText, InlineValueVariableLookup, InlineValueWorkspaceClientCapabilities, InsertReplaceEdit, InsertTextFormat, InsertTextMode, LRUCache, LSPAny, LSPArray, LSPErrorCodes, LSPObject, Language, LanguagePlugin, LanguageServer, LanguageServerEnvironment, LanguageServerProject, LanguageServerState, LanguageServiceCommand, LanguageServiceContext, LanguageServiceEnvironment, LanguageServicePlugin, LanguageServicePluginInstance, Languages, LanguagesFeature, LinkedEditingRangeClientCapabilities, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, LinkedEditingRanges, LinkedMap, Location, LocationLink, LogMessageNotification, LogMessageParams, LogTraceNotification, LogTraceParams, Logger, Mapper, MapperFactory, MarkdownClientCapabilities, MarkedString, MarkupContent, MarkupKind, Message, MessageActionItem, MessageConnection, MessageDirection, MessageReader, MessageReaderOptions, MessageSignature, MessageStrategy, MessageType, MessageWriter, MessageWriterOptions, Moniker, MonikerClientCapabilities, MonikerKind, MonikerOptions, MonikerParams, MonikerRegistrationOptions, MonikerRequest, NotebookCell, NotebookCellArrayChange, NotebookCellKind, NotebookCellTextDocumentFilter, NotebookDocument, NotebookDocumentChangeEvent$1 as NotebookDocumentChangeEvent, NotebookDocumentClientCapabilities, NotebookDocumentFilter, NotebookDocumentIdentifier, NotebookDocumentSyncClientCapabilities, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, NotebookDocuments, Notebooks, NotebooksFeature, NotificationHandler, NotificationHandler0, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, NullLogger, NullableProviderResult, OptionalVersionedTextDocumentIdentifier, ParameterInformation, ParameterStructures, PartialMessageInfo, PartialResultParams, Pattern, PipeTransport, PortMessageReader, PortMessageWriter, Position, PositionEncodingKind, PrepareRenameParams, PrepareRenameRequest, PrepareRenameResult, PrepareSupportDefaultBehavior, PreviousResultId, ProgressToken, ProgressType, ProjectContext, Proposed, ProposedFeatures, ProtocolConnection, ProtocolNotificationType, ProtocolNotificationType0, ProtocolRequestType, ProtocolRequestType0, ProviderResult, PublishDiagnosticsClientCapabilities, PublishDiagnosticsNotification, PublishDiagnosticsParams, RAL, Range, ReadableStreamMessageReader, ReferenceClientCapabilities, ReferenceContext, ReferenceOptions, ReferenceParams, ReferenceRegistrationOptions, ReferencesRequest, Registration, RegistrationParams, RegistrationRequest, RegistrationType, RegularExpressionsClientCapabilities, RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, RelativePattern, ReloadProjectNotification, RemoteClient, RemoteConsole, RemoteTracer, RemoteWindow, RemoteWorkspace, RenameClientCapabilities, RenameFile, RenameFileOptions, RenameFilesParams, RenameOptions, RenameParams, RenameRegistrationOptions, RenameRequest, RequestHandler, RequestHandler0, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResourceOperationKind, ResponseError, ResponseMessage, ResultProgressReporter, SaveOptions, SelectedCompletionInfo, SelectionRange, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeOptions as SelectionRangeProviderOptions, SelectionRangeRegistrationOptions, SelectionRangeRequest, SemanticToken, SemanticTokenModifiers, SemanticTokenTypes, SemanticTokens, SemanticTokensBuilder, SemanticTokensClientCapabilities, SemanticTokensDelta, SemanticTokensDeltaParams, SemanticTokensDeltaPartialResult, SemanticTokensDeltaRequest, SemanticTokensEdit, SemanticTokensLegend, SemanticTokensOptions, SemanticTokensParams, SemanticTokensPartialResult, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationOptions, SemanticTokensRegistrationType, SemanticTokensRequest, ServerCapabilities, ServerRequestHandler, SetTraceNotification, SetTraceParams, SharedArrayReceiverStrategy, SharedArraySenderStrategy, ShowDocumentClientCapabilities, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowMessageNotification, ShowMessageParams, ShowMessageRequest, ShowMessageRequestClientCapabilities, ShowMessageRequestParams, ShutdownRequest, SignatureHelp, SignatureHelpClientCapabilities, SignatureHelpContext, SignatureHelpOptions, SignatureHelpParams, SignatureHelpRegistrationOptions, SignatureHelpRequest, SignatureHelpTriggerKind, SignatureInformation, SocketMessageReader, SocketMessageWriter, SocketTransport, SourceScript, StarNotificationHandler, StarRequestHandler, StaticRegistrationOptions, StreamMessageReader, StreamMessageWriter, StringValue, SymbolInformation, SymbolKind, SymbolTag, Telemetry, TelemetryEventNotification, TelemetryFeature, TextChangeRange, TextDocument, TextDocumentChangeEvent, TextDocumentChangeRegistrationOptions, TextDocumentClientCapabilities, TextDocumentContentChangeEvent, TextDocumentEdit, TextDocumentFilter, TextDocumentIdentifier, TextDocumentItem, TextDocumentPositionParams, TextDocumentRegistrationOptions, TextDocumentSaveReason, TextDocumentSaveRegistrationOptions, TextDocumentSyncClientCapabilities, TextDocumentSyncKind, TextDocumentSyncOptions, TextDocumentWillSaveEvent, TextDocuments, TextDocumentsConfiguration, TextEdit, TextEditChange, TextSpan, TokenFormat, Touch, Trace, TraceFormat, TraceOptions, TraceValues, Tracer, TracerFeature, TypeDefinitionOptions, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionRequest, TypeHierarchyClientCapabilities, TypeHierarchyItem, TypeHierarchyOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchyRegistrationOptions, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest, URI, UnchangedDocumentDiagnosticReport, UniquenessLevel, Unregistration, UnregistrationParams, UnregistrationRequest, UpdateServicePluginStateNotification, UpdateVirtualCodeStateNotification, VersionedNotebookDocumentIdentifier, VersionedTextDocumentIdentifier, VirtualCode, WatchDog, WatchKind, WillCreateFilesRequest, WillDeleteFilesRequest, WillRenameFilesRequest, WillSaveTextDocumentNotification, WillSaveTextDocumentParams, WillSaveTextDocumentWaitUntilRequest, WindowClientCapabilities, WindowFeature, WorkDoneProgress, WorkDoneProgressBegin, WorkDoneProgressCancelNotification, WorkDoneProgressCancelParams, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressEnd, WorkDoneProgressOptions, WorkDoneProgressParams, WorkDoneProgressReport, WorkDoneProgressReporter, WorkDoneProgressServerReporter, WorkspaceChange, WorkspaceClientCapabilities, WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, WorkspaceDocumentDiagnosticReport, WorkspaceEdit, WorkspaceEditClientCapabilities, WorkspaceFeature, WorkspaceFolder, WorkspaceFoldersChangeEvent, WorkspaceFoldersRequest, WorkspaceFullDocumentDiagnosticReport, WorkspaceSymbol, WorkspaceSymbolClientCapabilities, WorkspaceSymbolOptions, WorkspaceSymbolParams, WorkspaceSymbolRegistrationOptions, WorkspaceSymbolRequest, WorkspaceSymbolResolveRequest, WorkspaceUnchangedDocumentDiagnosticReport, WriteableStreamMessageWriter, _, _Connection, _EM, _InitializeParams, _Languages, _LanguagesImpl, _Notebooks, _NotebooksImpl, _RemoteWindow, _RemoteWorkspace, combineClientFeatures, combineConsoleFeatures, combineFeatures, combineLanguagesFeatures, combineNotebooksFeatures, combineTelemetryFeatures, combineTracerFeatures, combineWindowFeatures, combineWorkspaceFeatures, createClientPipeTransport, createClientSocketTransport, createConnection, createLanguageServiceEnvironment, createServer, createServerBase, createServerPipeTransport, createServerSocketTransport, createSimpleProject, createTypeScriptProject, createUriConverter, decimal, generateRandomPipeName, getWorkspaceFolder, integer, isFileInDir, loadTsdkByPath, sortTSConfigs, uinteger };
|
|
1619
|
+
}
|
|
1620
|
+
declare function createConnection(): _Connection<_, _, _, _, _, _, InlineCompletionFeatureShape, _>;
|
|
1621
|
+
declare function createServer(connection: Connection): {
|
|
1622
|
+
initializeParams: InitializeParams;
|
|
1623
|
+
project: LanguageServerProject;
|
|
1624
|
+
languageServicePlugins: LanguageServicePlugin<any>[];
|
|
1625
|
+
initialize(params: InitializeParams, project: LanguageServerProject, languageServicePlugins: LanguageServicePlugin[]): InitializeResult<ExperimentalFeatures>;
|
|
1626
|
+
initialized(): void;
|
|
1627
|
+
shutdown(): void;
|
|
1628
|
+
configurations: {
|
|
1629
|
+
get: <T>(section: string, scopeUri?: string) => Promise<T | undefined>;
|
|
1630
|
+
onDidChange: (cb: NotificationHandler<DidChangeConfigurationParams>) => {
|
|
1631
|
+
dispose(): void;
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
editorFeatures: void;
|
|
1635
|
+
documents: {
|
|
1636
|
+
all: () => SnapshotDocument[];
|
|
1637
|
+
onDidChangeContent: Event<TextDocumentChangeEvent<SnapshotDocument>>;
|
|
1638
|
+
onDidOpen: Event<TextDocumentChangeEvent<SnapshotDocument>>;
|
|
1639
|
+
onDidClose: Event<TextDocumentChangeEvent<SnapshotDocument>>;
|
|
1640
|
+
onDidSave: Event<TextDocumentChangeEvent<SnapshotDocument>>;
|
|
1641
|
+
get(uri: URI$1): SnapshotDocument | undefined;
|
|
1642
|
+
};
|
|
1643
|
+
workspaceFolders: {
|
|
1644
|
+
readonly all: URI$1[];
|
|
1645
|
+
has(uri: URI$1): boolean;
|
|
1646
|
+
onDidChange: (cb: NotificationHandler<WorkspaceFoldersChangeEvent>) => {
|
|
1647
|
+
dispose(): void;
|
|
1648
|
+
};
|
|
1649
|
+
};
|
|
1650
|
+
fileWatcher: {
|
|
1651
|
+
watchFiles: (patterns: string[]) => Promise<Disposable>;
|
|
1652
|
+
onDidChangeWatchedFiles: (cb: NotificationHandler<DidChangeWatchedFilesParams>) => {
|
|
1653
|
+
dispose: () => void;
|
|
1654
|
+
};
|
|
1655
|
+
};
|
|
1656
|
+
languageFeatures: {
|
|
1657
|
+
requestRefresh: (clearDiagnostics: boolean) => Promise<void>;
|
|
1658
|
+
};
|
|
1659
|
+
fileSystem: {
|
|
1660
|
+
readFile(uri: URI$1): string | Thenable<string | undefined>;
|
|
1661
|
+
stat(uri: URI$1): FileStat | Thenable<FileStat | undefined>;
|
|
1662
|
+
readDirectory(uri: URI$1): ProviderResult<[string, FileType][]>;
|
|
1663
|
+
install(scheme: string, provider: FileSystem): void;
|
|
1664
|
+
};
|
|
1665
|
+
env: LanguageServerEnvironment;
|
|
1666
|
+
connection: Connection;
|
|
1667
|
+
onInitialize(callback: (serverCapabilities: ServerCapabilities<ExperimentalFeatures>) => void): void;
|
|
1668
|
+
onInitialized(callback: () => void): void;
|
|
1669
|
+
};
|
|
1670
|
+
declare function loadTsdkByPath(tsdk: string, locale: string | undefined): {
|
|
1671
|
+
typescript: typeof typescript_d_exports;
|
|
1672
|
+
diagnosticMessages: undefined<string> | undefined;
|
|
1673
|
+
};
|
|
1674
|
+
//#endregion
|
|
1675
|
+
//#region src/core/volar-plugin.d.ts
|
|
1676
|
+
/**
|
|
1677
|
+
* The virtual __state__.ts file generated from a .aihu source's @state block.
|
|
1678
|
+
* Implements VirtualCode from @volar/language-core@2.4.28.
|
|
1679
|
+
* No further embedding (leaf virtual code — embeddedCodes omitted).
|
|
1680
|
+
*/
|
|
1681
|
+
interface AihuVirtualCode extends VirtualCode {
|
|
1682
|
+
/** Always "__state__" — Volar uses this to construct the embedded URI */
|
|
1683
|
+
id: string;
|
|
1684
|
+
/** Always "typescript" */
|
|
1685
|
+
languageId: string;
|
|
1686
|
+
/** IScriptSnapshot wrapping the generated __state__.ts content string */
|
|
1687
|
+
snapshot: IScriptSnapshot;
|
|
1688
|
+
/** Character-level source-map entries (see architect-brief §3) */
|
|
1689
|
+
mappings: AihuCodeMapping[];
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Metadata attached to the host .aihu source script.
|
|
1693
|
+
* Plain data object, NOT a Volar interface implementation.
|
|
1694
|
+
*/
|
|
1695
|
+
interface AihuSource {
|
|
1696
|
+
/** The URI of the .aihu file */
|
|
1697
|
+
uri: URI$1;
|
|
1698
|
+
/** Raw text of the .aihu source */
|
|
1699
|
+
text: string;
|
|
1700
|
+
/** The @state block body text, or null if no @state block found */
|
|
1701
|
+
stateBlockText: string | null;
|
|
1702
|
+
/** Character offset of the @state block's opening brace in `text`, or -1 */
|
|
1703
|
+
stateBlockStart: number;
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Volar LanguagePlugin that handles .aihu files.
|
|
1707
|
+
* Implements LanguagePlugin<URI> from @volar/language-core@2.4.28.
|
|
1708
|
+
* (Generic parameter K=VirtualCode — AihuVirtualCode satisfies VirtualCode.)
|
|
1709
|
+
*/
|
|
1710
|
+
interface AihuLanguagePlugin extends LanguagePlugin<URI$1> {
|
|
1711
|
+
getLanguageId(scriptId: URI$1): string | undefined;
|
|
1712
|
+
createVirtualCode(scriptId: URI$1, languageId: string, snapshot: IScriptSnapshot, ctx: CodegenContext<URI$1>): AihuVirtualCode | undefined;
|
|
1713
|
+
updateVirtualCode?(scriptId: URI$1, virtualCode: AihuVirtualCode, newSnapshot: IScriptSnapshot, ctx: CodegenContext<URI$1>): AihuVirtualCode | undefined;
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Create the Volar LanguagePlugin for .aihu files.
|
|
1717
|
+
* Returns "aihu" language ID for .aihu URIs; generates a virtual __state__.ts
|
|
1718
|
+
* code block from the @state macro body.
|
|
1719
|
+
*/
|
|
1720
|
+
declare function createAihuLanguagePlugin(): AihuLanguagePlugin;
|
|
1721
|
+
/**
|
|
1722
|
+
* Create the Volar LanguageServicePlugin for aihu.
|
|
1723
|
+
* Wraps the existing getMacroAtPosition / getHoverContent from core/hover.ts.
|
|
1724
|
+
* Per architect-brief §4.2 — "direct translation" of the existing onHover handler.
|
|
1725
|
+
*/
|
|
1726
|
+
declare function createAihuLanguageServicePlugin(): LanguageServicePlugin;
|
|
1727
|
+
//#endregion
|
|
1728
|
+
export { type AihuCodeMapping, type AihuDiagnostic, type AihuLanguagePlugin, type AihuSource, type AihuSourcePosition, type AihuVirtualCode, type AihuVirtualPosition, BLOCK_COMPLETIONS, type CompileResult, type GeneratorInput, type GeneratorOutput, type LspCompletionItem, MIGRATE_CODES, type MigrateFix, STATE_MACRO_COMPLETIONS, SourceMap, buildMigrateFix, compileWithDiagnostics, createAihuLanguagePlugin, createAihuLanguageServicePlugin, generateStateVirtualCode, getBlockContext, getHoverContent, getMacroAtPosition, mapToOriginal, mapToVirtual, parseMachineErrors };
|
|
101
1729
|
//# sourceMappingURL=index.d.ts.map
|