@singapore-editor/lsp-plugin 0.1.1
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 +103 -0
- package/dist/bufferSync.d.ts +12 -0
- package/dist/bufferSync.d.ts.map +1 -0
- package/dist/bufferSync.js +35 -0
- package/dist/bufferSync.js.map +1 -0
- package/dist/codeActions.d.ts +83 -0
- package/dist/codeActions.d.ts.map +1 -0
- package/dist/codeActions.js +294 -0
- package/dist/codeActions.js.map +1 -0
- package/dist/colorAlpha.d.ts +4 -0
- package/dist/colorAlpha.d.ts.map +1 -0
- package/dist/colorAlpha.js +28 -0
- package/dist/colorAlpha.js.map +1 -0
- package/dist/completion.d.ts +124 -0
- package/dist/completion.d.ts.map +1 -0
- package/dist/completion.js +609 -0
- package/dist/completion.js.map +1 -0
- package/dist/completionCommit.d.ts +19 -0
- package/dist/completionCommit.d.ts.map +1 -0
- package/dist/completionCommit.js +57 -0
- package/dist/completionCommit.js.map +1 -0
- package/dist/completionController.d.ts +89 -0
- package/dist/completionController.d.ts.map +1 -0
- package/dist/completionController.js +376 -0
- package/dist/completionController.js.map +1 -0
- package/dist/completionProviders.d.ts +50 -0
- package/dist/completionProviders.d.ts.map +1 -0
- package/dist/completionProviders.js +64 -0
- package/dist/completionProviders.js.map +1 -0
- package/dist/connectionContext.d.ts +7 -0
- package/dist/connectionContext.d.ts.map +1 -0
- package/dist/definitionLinkController.d.ts +54 -0
- package/dist/definitionLinkController.d.ts.map +1 -0
- package/dist/definitionLinkController.js +221 -0
- package/dist/definitionLinkController.js.map +1 -0
- package/dist/definitionNavigation.d.ts +76 -0
- package/dist/definitionNavigation.d.ts.map +1 -0
- package/dist/definitionNavigation.js +143 -0
- package/dist/definitionNavigation.js.map +1 -0
- package/dist/diagnosticNotes.d.ts +7 -0
- package/dist/diagnosticNotes.d.ts.map +1 -0
- package/dist/diagnosticNotes.js +37 -0
- package/dist/diagnosticNotes.js.map +1 -0
- package/dist/diagnosticProjection.d.ts +31 -0
- package/dist/diagnosticProjection.d.ts.map +1 -0
- package/dist/diagnosticProjection.js +79 -0
- package/dist/diagnosticProjection.js.map +1 -0
- package/dist/diagnostics.d.ts +16 -0
- package/dist/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics.js +94 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/diagnosticsPresenter.d.ts +64 -0
- package/dist/diagnosticsPresenter.d.ts.map +1 -0
- package/dist/diagnosticsPresenter.js +305 -0
- package/dist/diagnosticsPresenter.js.map +1 -0
- package/dist/document.d.ts +69 -0
- package/dist/document.d.ts.map +1 -0
- package/dist/document.js +190 -0
- package/dist/document.js.map +1 -0
- package/dist/documentHighlightController.d.ts +34 -0
- package/dist/documentHighlightController.d.ts.map +1 -0
- package/dist/documentHighlightController.js +101 -0
- package/dist/documentHighlightController.js.map +1 -0
- package/dist/documentSnapshot.d.ts +9 -0
- package/dist/documentSnapshot.d.ts.map +1 -0
- package/dist/documentSnapshot.js +31 -0
- package/dist/documentSnapshot.js.map +1 -0
- package/dist/documentSync.d.ts +53 -0
- package/dist/documentSync.d.ts.map +1 -0
- package/dist/documentSync.js +334 -0
- package/dist/documentSync.js.map +1 -0
- package/dist/documentSyncController.d.ts +26 -0
- package/dist/documentSyncController.d.ts.map +1 -0
- package/dist/documentSyncController.js +24 -0
- package/dist/documentSyncController.js.map +1 -0
- package/dist/formatOnType.d.ts +43 -0
- package/dist/formatOnType.d.ts.map +1 -0
- package/dist/formatOnType.js +198 -0
- package/dist/formatOnType.js.map +1 -0
- package/dist/formatting.d.ts +18 -0
- package/dist/formatting.d.ts.map +1 -0
- package/dist/formatting.js +52 -0
- package/dist/formatting.js.map +1 -0
- package/dist/fuzzyMatch.d.ts +22 -0
- package/dist/fuzzyMatch.d.ts.map +1 -0
- package/dist/fuzzyMatch.js +216 -0
- package/dist/fuzzyMatch.js.map +1 -0
- package/dist/hoverParticipant.d.ts +24 -0
- package/dist/hoverParticipant.d.ts.map +1 -0
- package/dist/hoverParticipant.js +156 -0
- package/dist/hoverParticipant.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/keyCommands.d.ts +19 -0
- package/dist/keyCommands.d.ts.map +1 -0
- package/dist/keyCommands.js +21 -0
- package/dist/keyCommands.js.map +1 -0
- package/dist/lane.d.ts +28 -0
- package/dist/lane.d.ts.map +1 -0
- package/dist/lane.js +138 -0
- package/dist/lane.js.map +1 -0
- package/dist/lspConnection.d.ts +94 -0
- package/dist/lspConnection.d.ts.map +1 -0
- package/dist/lspConnection.js +195 -0
- package/dist/lspConnection.js.map +1 -0
- package/dist/lspConnectionPool.d.ts +34 -0
- package/dist/lspConnectionPool.d.ts.map +1 -0
- package/dist/lspConnectionPool.js +255 -0
- package/dist/lspConnectionPool.js.map +1 -0
- package/dist/minimalEdits.d.ts +21 -0
- package/dist/minimalEdits.d.ts.map +1 -0
- package/dist/minimalEdits.js +181 -0
- package/dist/minimalEdits.js.map +1 -0
- package/dist/paths.d.ts +6 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +38 -0
- package/dist/paths.js.map +1 -0
- package/dist/plugin.d.ts +100 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +837 -0
- package/dist/plugin.js.map +1 -0
- package/dist/plugin.styles.d.ts +31 -0
- package/dist/plugin.styles.d.ts.map +1 -0
- package/dist/plugin.styles.js +102 -0
- package/dist/plugin.styles.js.map +1 -0
- package/dist/pluginTypes.d.ts +41 -0
- package/dist/pluginTypes.d.ts.map +1 -0
- package/dist/pluginTypes.js +0 -0
- package/dist/pullDiagnostics.d.ts +30 -0
- package/dist/pullDiagnostics.d.ts.map +1 -0
- package/dist/pullDiagnostics.js +94 -0
- package/dist/pullDiagnostics.js.map +1 -0
- package/dist/renameWidget.d.ts +30 -0
- package/dist/renameWidget.d.ts.map +1 -0
- package/dist/renameWidget.js +117 -0
- package/dist/renameWidget.js.map +1 -0
- package/dist/semanticTokenDecoder.d.ts +81 -0
- package/dist/semanticTokenDecoder.d.ts.map +1 -0
- package/dist/semanticTokenDecoder.js +132 -0
- package/dist/semanticTokenDecoder.js.map +1 -0
- package/dist/semanticTokens.d.ts +47 -0
- package/dist/semanticTokens.d.ts.map +1 -0
- package/dist/semanticTokens.js +68 -0
- package/dist/semanticTokens.js.map +1 -0
- package/dist/serverSet.d.ts +69 -0
- package/dist/serverSet.d.ts.map +1 -0
- package/dist/serverSet.js +331 -0
- package/dist/serverSet.js.map +1 -0
- package/dist/signatureHelp.d.ts +40 -0
- package/dist/signatureHelp.d.ts.map +1 -0
- package/dist/signatureHelp.js +108 -0
- package/dist/signatureHelp.js.map +1 -0
- package/dist/signatureHelpController.d.ts +52 -0
- package/dist/signatureHelpController.d.ts.map +1 -0
- package/dist/signatureHelpController.js +160 -0
- package/dist/signatureHelpController.js.map +1 -0
- package/dist/sourceText.d.ts +22 -0
- package/dist/sourceText.d.ts.map +1 -0
- package/dist/sourceText.js +70 -0
- package/dist/sourceText.js.map +1 -0
- package/dist/types.d.ts +238 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +17 -0
- package/dist/types.js.map +1 -0
- package/dist/viewDocumentSnapshot.d.ts +5 -0
- package/dist/viewDocumentSnapshot.d.ts.map +1 -0
- package/dist/viewDocumentSnapshot.js +12 -0
- package/dist/viewDocumentSnapshot.js.map +1 -0
- package/dist/websocket.d.ts +6 -0
- package/dist/websocket.d.ts.map +1 -0
- package/dist/websocket.js +4 -0
- package/dist/workspaceEdit.d.ts +66 -0
- package/dist/workspaceEdit.d.ts.map +1 -0
- package/dist/workspaceEdit.js +276 -0
- package/dist/workspaceEdit.js.map +1 -0
- package/dist/workspaceEditProvenance.d.ts +5 -0
- package/dist/workspaceEditProvenance.d.ts.map +1 -0
- package/dist/workspaceEditProvenance.js +16 -0
- package/dist/workspaceEditProvenance.js.map +1 -0
- package/dist/workspaceTextEdits.d.ts +60 -0
- package/dist/workspaceTextEdits.d.ts.map +1 -0
- package/dist/workspaceTextEdits.js +395 -0
- package/dist/workspaceTextEdits.js.map +1 -0
- package/package.json +118 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","names":[],"sources":["../src/plugin.ts"],"sourcesContent":["import { LanguageServerDocument, type DocumentLanguageServerLane } from './document'\nimport type { LanguageServerDocumentPluginOptions } from './types'\nimport type { EditorCommandId } from '@singapore-editor/core/editor'\nimport type {\n EditorContributionChange,\n EditorCapabilityToken,\n EditorCommandContributionContext,\n EditorDisposable,\n EditorEditContribution,\n EditorEditContributionContext,\n EditorViewContribution,\n EditorViewContributionContext,\n EditorViewContributionUpdateKind,\n EditorViewSnapshot,\n} from '@singapore-editor/core/extensions'\nimport type {\n LspClient,\n LspNotificationHandler,\n LspServerRequestHandler,\n} from '@singapore-editor/lsp'\nimport type * as lsp from 'vscode-languageserver-protocol'\n\nimport {\n LANGUAGE_SERVER_COMPLETION_EDIT_FEATURE,\n createCompletionEditFeature,\n type LanguageServerCompletionEditFeature,\n} from './completion'\nimport {\n anchoredSurfaceFollowsUpdate,\n isInsideEditorPopup,\n} from '@singapore-editor/plugin-ui/anchored-surface'\nimport { EDITOR_HOVER_PARTICIPANT } from '@singapore-editor/plugin-ui/hover-participant'\nimport { hoverControllerFor } from '@singapore-editor/plugin-ui/hover-registry'\nimport { CodeActionController } from './codeActions'\nimport type { OffsetRange } from '@singapore-editor/plugin-ui/offset-range'\nimport { CompletionController } from './completionController'\nimport {\n COMPLETION_KEY_COMMANDS,\n SIGNATURE_HELP_KEY_COMMANDS,\n type CompletionKeyCommand,\n type SignatureHelpKeyCommand,\n} from './keyCommands'\nimport {\n createLanguageServerCompletionSource,\n LanguageServerCompletionSources,\n} from './completionProviders'\nimport { CompositeDiagnosticsPresenter, DiagnosticsPresenter } from './diagnosticsPresenter'\nimport { activeDocumentForSnapshot, DocumentSync } from './documentSync'\nimport { FormatOnTypeController } from './formatOnType'\nimport { DefinitionLinkController } from './definitionLinkController'\nimport { createLanguageServerHoverParticipant } from './hoverParticipant'\nimport type {\n SignatureHelpController,\n SignatureHelpControllerOptions,\n} from './signatureHelpController'\nimport { signatureHelpTriggerFromTypedText } from './signatureHelp'\nimport { DocumentHighlightController } from './documentHighlightController'\nimport {\n SemanticTokenLayerOwner,\n type LanguageServerSemanticTokensFactory,\n type LanguageServerSemanticTokensOptions,\n type LanguageServerSemanticTokensOwnerOptions,\n} from './semanticTokens'\nimport { createRenameWidgetController, type RenameWidgetController } from './renameWidget'\nimport { parseWorkspaceEdit } from './workspaceEdit'\nimport { currentWorkspaceEditOrigin } from './workspaceEditProvenance'\nimport { wordRangeAtOffset } from '@singapore-editor/core/document'\nimport {\n lspPositionToOffsetInSnapshot,\n offsetToLspPositionInSnapshot,\n type LspTextDocumentSnapshot,\n} from '@singapore-editor/lsp'\nimport { rangeAroundOffset } from './sourceText'\nimport type { LspConnectionProvider, LspConnectionTransportFactory } from './lspConnection'\nimport { resolveLanguageServerLaneOptions, type LanguageServerResolvedLaneOptions } from './lane'\nimport {\n allLanguageServerFeatures,\n captureWorkspaceEditOriginGuard,\n LanguageServerSet,\n rankedLanguageServerLanes,\n type LanguageServerSetLane,\n} from './serverSet'\nimport type {\n ActiveDocument,\n DiagnosticMarkerDirection,\n LanguageServerNavigationCommand,\n} from './pluginTypes'\nimport { formattingChangesText, formattingOptions, prepareFormattingEdits } from './formatting'\nimport type { TextEdit } from '@singapore-editor/core'\nimport type {\n LanguageServerConnectionContext,\n LanguageServerDefinitionTarget,\n LanguageServerDiagnosticActions,\n LanguageServerDiagnosticMarkerClaim,\n LanguageServerDiagnosticMarkerEvent,\n LanguageServerDiagnosticSummary,\n LanguageServerDocumentSyncOptions,\n LanguageServerNavigationOptions,\n LanguageServerPlugin,\n LanguageServerLaneOptions,\n LanguageServerLaneHostOptions,\n LanguageServerPluginOptions,\n LanguageServerRenamePrompt,\n LanguageServerSetPluginOptions,\n LanguageServerReferencesResult,\n LanguageServerStatus,\n WorkspaceEditOriginGuard,\n} from './types'\n// Re-exported so `@singapore-editor/lsp-plugin` keeps handing this out from where it always did; it is\n// defined in `types.ts` because the narrow factory's options need it and a shared vocabulary module\n// that imports the module consuming it is a cycle.\nexport type { LanguageServerConnectionContext } from './types'\n\nexport type { LanguageServerResolvedOptions } from './pluginTypes'\n\nconst DEFAULT_PLUGIN_NAME = 'editor.lsp-plugin'\nconst DEFAULT_NAMESPACE = 'lsp-plugin'\nconst DEFAULT_TIMING_PREFIX = 'lspPlugin'\nconst DEFAULT_DIAGNOSTICS_SOURCE_ID = 'editor.lsp-plugin.diagnostics'\nconst DEFAULT_COMPLETION_ACCEPT_TIMING_NAME = 'lspPlugin.completion.accept'\n\nexport type LanguageServerCommandTarget = {\n goToDefinitionFromSelection(): boolean\n runNavigationCommand(command: LanguageServerNavigationCommand): boolean\n moveDiagnosticMarker(direction: DiagnosticMarkerDirection): boolean\n formatDocument(): boolean\n renameSymbol(): boolean\n applyAutoFix(): boolean\n completionCommand(command: CompletionKeyCommand): boolean\n signatureHelpCommand(command: SignatureHelpKeyCommand): boolean\n}\n\nexport type LanguageServerCommandSpec = {\n readonly id: EditorCommandId\n run(target: LanguageServerCommandTarget): boolean\n}\n\nexport type LanguageServerAdapterPluginOptions = LanguageServerLaneHostOptions & {\n readonly name: string\n /**\n * Asks the host for a new symbol name. Supply this to use the application's own dialog; without\n * it the editor shows its own small input at the symbol.\n */\n readonly onRequestRenameName?: (prompt: LanguageServerRenamePrompt) => Promise<string | null>\n readonly rootUri?: lsp.DocumentUri | null\n readonly initializationOptions?: unknown\n readonly timeoutMs?: number\n /** See LanguageServerPluginOptions.capabilities. */\n readonly capabilities?: lsp.ClientCapabilities\n /** See LanguageServerPluginOptions.clientInfo. */\n readonly clientInfo?: lsp.InitializeParams['clientInfo']\n /** See LanguageServerPluginOptions.notificationHandlers. Merged, never replacing. */\n readonly notificationHandlers?: Readonly<Record<string, LspNotificationHandler<LspClient>>>\n /** See LanguageServerPluginOptions.serverRequestHandlers. */\n readonly serverRequestHandlers?: Readonly<Record<string, LspServerRequestHandler<LspClient>>>\n createTransport(): ReturnType<LspConnectionTransportFactory>\n /** Borrows the connection instead of constructing one per view. See LspConnectionProvider. */\n readonly connectionProvider?: LspConnectionProvider\n readonly documentSync?: LanguageServerDocumentSyncOptions\n readonly diagnostics?: {\n readonly minimapSourceId?: string\n readonly highlightNameNamespace?: string\n readonly markerTimingNamePrefix?: string\n }\n readonly completion?: {\n readonly editFeature?: EditorCapabilityToken<LanguageServerCompletionEditFeature>\n readonly acceptTimingName?: string\n readonly widgetClassNamespace?: string\n /**\n * Accepts the focused suggestion when one of the characters the item declares as committing it is\n * typed, inserting that character too. Off by default: a server whose sets are wrong turns\n * ordinary typing into unwanted completions, which is worse than no shortcut at all.\n */\n readonly acceptOnCommitCharacter?: boolean\n }\n /**\n * Corrects the caret's row as a block-closing delimiter is typed. On by default: without it every\n * closed block is left a level too deep, and the correction is the language's own indentation\n * rules applied to one row, not a formatter deciding how the file should look.\n */\n readonly formatOnType?: boolean\n readonly hoverDefinition?: {\n readonly linkHighlightNameNamespace?: string\n readonly tooltipClassNamespace?: string\n readonly navigationTimingNamePrefix?: string\n }\n readonly commands?: readonly LanguageServerCommandSpec[]\n /**\n * Turns on the semantic token layer. Supplying nothing here creates no layer and fires no demand\n * signal, so a host that paints no semantic colour pays nothing for the feature existing.\n */\n readonly semanticTokens?: LanguageServerSemanticTokensOptions\n onConnectionCreated?(context: LanguageServerConnectionContext): EditorDisposable | void\n onConnected?(context: LanguageServerConnectionContext): void\n readonly onStatusChange?: (status: LanguageServerStatus) => void\n readonly onDiagnostics?: (summary: LanguageServerDiagnosticSummary) => void\n readonly getDiagnosticActions?: LanguageServerDiagnosticActions\n readonly onDidNavigateDiagnostic?: (\n event: LanguageServerDiagnosticMarkerEvent,\n ) => LanguageServerDiagnosticMarkerClaim\n readonly onInteractiveReady?: () => void\n readonly onRequestError?: (serverId: string, method: string, error: unknown) => void\n readonly onDefinitionLinkHover?: (target: LanguageServerDefinitionTarget) => void\n readonly onOpenDefinition?: (\n target: LanguageServerDefinitionTarget,\n options?: LanguageServerNavigationOptions,\n ) => void | boolean\n readonly onOpenReferences?: (result: LanguageServerReferencesResult) => void | boolean\n readonly onError?: (error: unknown) => void\n}\n\ntype LanguageServerResolvedAdapterOptions = {\n readonly name: string\n readonly document?: LanguageServerDocument\n readonly onRequestRenameName?: (prompt: LanguageServerRenamePrompt) => Promise<string | null>\n readonly lanes: readonly LanguageServerResolvedLaneOptions[]\n readonly documentSync: LanguageServerDocumentSyncOptions\n readonly diagnostics: {\n readonly minimapSourceId: string\n readonly highlightNameNamespace: string\n readonly markerTimingNamePrefix: string\n }\n readonly completion: {\n readonly editFeature: EditorCapabilityToken<LanguageServerCompletionEditFeature>\n readonly acceptTimingName: string\n readonly widgetClassNamespace?: string\n readonly acceptOnCommitCharacter: boolean\n }\n readonly formatOnType: boolean\n readonly hoverDefinition: {\n readonly linkHighlightNameNamespace: string\n readonly tooltipClassNamespace: string\n readonly navigationTimingNamePrefix: string\n }\n readonly commands: readonly LanguageServerCommandSpec[]\n readonly semanticTokens?: LanguageServerSemanticTokensFactory\n readonly onDiagnostics?: (summary: LanguageServerDiagnosticSummary) => void\n readonly getDiagnosticActions?: LanguageServerDiagnosticActions\n readonly onDidNavigateDiagnostic?: (\n event: LanguageServerDiagnosticMarkerEvent,\n ) => LanguageServerDiagnosticMarkerClaim\n readonly onInteractiveReady?: () => void\n readonly onRequestError?: (serverId: string, method: string, error: unknown) => void\n readonly onApplyWorkspaceEdit?: LanguageServerLaneHostOptions['onApplyWorkspaceEdit']\n readonly onDefinitionLinkHover?: (target: LanguageServerDefinitionTarget) => void\n readonly onOpenDefinition?: (\n target: LanguageServerDefinitionTarget,\n options?: LanguageServerNavigationOptions,\n ) => void | boolean\n readonly onOpenReferences?: (result: LanguageServerReferencesResult) => void | boolean\n readonly onError?: (error: unknown) => void\n}\n\nexport function createLanguageServerPlugin(\n options: LanguageServerPluginOptions,\n): LanguageServerPlugin\nexport function createLanguageServerPlugin(\n options: LanguageServerDocumentPluginOptions,\n): LanguageServerPlugin\nexport function createLanguageServerPlugin(\n options: LanguageServerPluginOptions | LanguageServerDocumentPluginOptions,\n): LanguageServerPlugin {\n if ('document' in options) return createLanguageServerSetPlugin(options)\n return createLanguageServerSetPlugin({\n lanes: [languageServerLaneFromPluginOptions(options)],\n onApplyWorkspaceEdit: options.onApplyWorkspaceEdit,\n documentSync: options.documentSync,\n semanticTokens: options.semanticTokens ? () => options.semanticTokens! : undefined,\n onDiagnostics: options.onDiagnostics,\n onDidNavigateDiagnostic: options.onDidNavigateDiagnostic,\n getDiagnosticActions: options.getDiagnosticActions,\n onDefinitionLinkHover: options.onDefinitionLinkHover,\n onOpenDefinition: options.onOpenDefinition,\n onOpenReferences: options.onOpenReferences,\n onRequestError: options.onRequestError,\n onError: options.onError,\n })\n}\n\nexport function createLanguageServerSetPlugin(\n options: LanguageServerSetPluginOptions,\n): LanguageServerPlugin {\n return createResolvedLanguageServerPlugin(resolveLanguageServerSetOptions(options))\n}\n\nexport function createLanguageServerAdapterPlugin(\n options: LanguageServerAdapterPluginOptions,\n): LanguageServerPlugin {\n return createResolvedLanguageServerPlugin(resolveAdapterOptions(options))\n}\n\nfunction createResolvedLanguageServerPlugin(\n resolved: LanguageServerResolvedAdapterOptions,\n): LanguageServerPlugin {\n return {\n name: resolved.name,\n activate(context) {\n // This editor's views only: a command reached this editor's router, so a rename or a list\n // open in another editor sharing the plugin is not what it is about.\n const views = new LanguageServerViews()\n return [\n context.registerViewContribution({\n createContribution: (contributionContext) =>\n new LanguageServerContribution(contributionContext, views, resolved),\n }),\n context.registerCommandContribution({\n createContribution: (contributionContext) =>\n new LanguageServerCommandContribution(contributionContext, views, resolved.commands),\n }),\n context.registerEditContribution({\n createContribution: (contributionContext) =>\n new LanguageServerCompletionEditContribution(contributionContext, resolved.completion),\n }),\n ]\n },\n }\n}\n\n/** The views of one editor, answering its commands: the first view that acts claims the key. */\nclass LanguageServerViews implements LanguageServerCommandTarget {\n private readonly views = new Set<LanguageServerContribution>()\n\n public register(view: LanguageServerContribution): void {\n this.views.add(view)\n }\n\n public unregister(view: LanguageServerContribution): void {\n this.views.delete(view)\n }\n\n public goToDefinitionFromSelection(): boolean {\n return this.runNavigationCommand({ kind: 'definition', openMode: 'default' })\n }\n\n public runNavigationCommand(command: LanguageServerNavigationCommand): boolean {\n return this.some((view) => view.runNavigationCommand(command))\n }\n\n public moveDiagnosticMarker(direction: DiagnosticMarkerDirection): boolean {\n return this.some((view) => view.moveDiagnosticMarker(direction))\n }\n\n public formatDocument(): boolean {\n return this.some((view) => view.formatDocument())\n }\n\n public renameSymbol(): boolean {\n return this.some((view) => view.renameSymbol())\n }\n\n public applyAutoFix(): boolean {\n return this.some((view) => view.applyAutoFix())\n }\n\n public completionCommand(command: CompletionKeyCommand): boolean {\n return this.some((view) => view.completionCommand(command))\n }\n\n public signatureHelpCommand(command: SignatureHelpKeyCommand): boolean {\n return this.some((view) => view.signatureHelpCommand(command))\n }\n\n private some(run: (view: LanguageServerContribution) => boolean): boolean {\n for (const view of this.views) {\n if (run(view)) return true\n }\n return false\n }\n}\n\nclass LanguageServerCommandContribution implements EditorDisposable {\n private readonly commands: readonly EditorDisposable[]\n\n public constructor(\n context: EditorCommandContributionContext,\n views: LanguageServerViews,\n commands: readonly LanguageServerCommandSpec[],\n ) {\n this.commands = commands.map((command) =>\n context.registerCommand(command.id, () => command.run(views)),\n )\n }\n\n public dispose(): void {\n for (const command of this.commands) command.dispose()\n }\n}\n\nclass LanguageServerCompletionEditContribution implements EditorEditContribution {\n private readonly completionFeature: EditorDisposable\n\n public constructor(\n context: EditorEditContributionContext,\n options: LanguageServerResolvedAdapterOptions['completion'],\n ) {\n this.completionFeature = context.registerFeature(\n options.editFeature,\n createCompletionEditFeature(context, options.acceptTimingName),\n )\n }\n\n public dispose(): void {\n this.completionFeature.dispose()\n }\n}\n\ntype ViewLanguageServerLane = LanguageServerSetLane & {\n readonly subscription: EditorDisposable\n readonly sync: DocumentSync\n}\n\ntype RenameWorkspaceEditDispatch = {\n readonly active: ActiveDocument\n readonly currentName: string\n readonly edit: unknown\n readonly guard: WorkspaceEditOriginGuard\n readonly nextName: string\n readonly owner: LanguageServerSetLane\n readonly signal: AbortSignal\n}\n\nclass LanguageServerContribution implements EditorViewContribution {\n private readonly document: LanguageServerDocument\n private readonly lanes: readonly ViewLanguageServerLane[]\n private readonly servers: LanguageServerSet\n private readonly diagnostics: CompositeDiagnosticsPresenter\n private readonly completionSources: LanguageServerCompletionSources\n private readonly completion: CompletionController\n private readonly definitionLink: DefinitionLinkController\n private readonly hoverParticipantRegistration: EditorDisposable | null\n /**\n * Loaded on the first `(` or `,` typed, not at boot. The surface it shares with the hover carries\n * a Markdown renderer and its parser, which an editor that never opens an argument list has no\n * reason to download.\n */\n private readonly signatureHelpOptions: SignatureHelpControllerOptions\n private signatureHelp: SignatureHelpController | null = null\n private signatureHelpLoad: Promise<SignatureHelpController> | null = null\n private readonly typedTextRegistration: EditorDisposable | null\n private readonly documentHighlights: DocumentHighlightController\n private readonly codeActions: CodeActionController\n /** Absent rather than idle when switched off, so nothing watches the typing at all. */\n private readonly formatOnType: FormatOnTypeController | null\n /** Absent unless the host asked for semantic colour; see LanguageServerSemanticTokensOptions. */\n private semanticTokens: SemanticTokenLayerOwner | null = null\n private semanticTokensOptions: LanguageServerSemanticTokensOwnerOptions | null = null\n private semanticTokensOwner: ViewLanguageServerLane | null = null\n private rename: RenameWidgetController | null = null\n private renameOperation: AbortController | null = null\n private renameActiveDocument: ActiveDocument | null = null\n /** The symbol an open prompt is renaming, which is what the prompt has to stay beside. */\n private renamePromptRange: OffsetRange | null = null\n private viewDocument: ActiveDocument | null = null\n private disposed = false\n\n public constructor(\n private readonly context: EditorViewContributionContext,\n private readonly views: LanguageServerViews,\n private readonly options: LanguageServerResolvedAdapterOptions,\n ) {\n const presenter = new DiagnosticsPresenter(context, context.highlightPrefix, {\n ...options.diagnostics,\n onDidNavigateDiagnostic: options.onDidNavigateDiagnostic,\n onError: options.onError,\n })\n this.diagnostics = new CompositeDiagnosticsPresenter(\n presenter,\n rankedLanguageServerLanes(options.lanes, 'diagnostics').map((lane) => lane.id),\n options.onDiagnostics,\n )\n this.document =\n options.document ??\n new LanguageServerDocument(\n {\n getSnapshot: () => context.getSnapshot(),\n },\n { lanes: options.lanes, documentSync: options.documentSync },\n )\n this.lanes = this.document.lanes.map((lane) => this.createLane(lane))\n this.servers = new LanguageServerSet(this.lanes)\n this.completionSources = new LanguageServerCompletionSources(\n context,\n this.servers\n .declared('completion')\n .map((lane) =>\n createLanguageServerCompletionSource(\n lane.connection.client,\n () => this.servers.ready('completion').includes(lane),\n lane.onInteractiveReady,\n lane.onRequestError,\n ),\n ),\n )\n this.completion = new CompletionController({\n context,\n completionSources: this.completionSources,\n completionEditFeature: options.completion.editFeature,\n completionWidgetClassNamespace: options.completion.widgetClassNamespace,\n completionAcceptOnCommitCharacter: options.completion.acceptOnCommitCharacter,\n getActiveDocument: () => this.activeDocument(),\n ignorePointerTarget: isInsideEditorPopup,\n onBeforeShow: () => {\n hoverControllerFor(context.scrollElement)?.hide()\n this.definitionLink.clearPointerUi()\n },\n onRequestSuccess: () => options.onInteractiveReady?.(),\n onRequestError: (error) => this.handleRequestError(error),\n })\n this.definitionLink = new DefinitionLinkController({\n context,\n router: this.servers,\n linkHighlightNameNamespace: options.hoverDefinition.linkHighlightNameNamespace,\n navigationTimingNamePrefix: options.hoverDefinition.navigationTimingNamePrefix,\n getActiveDocument: () => this.activeDocument(),\n onDefinitionLinkHover: options.onDefinitionLinkHover,\n onOpenDefinition: options.onOpenDefinition,\n onOpenReferences: options.onOpenReferences,\n onRequestError: (error) => this.handleRequestError(error),\n })\n // Every document: which server answers is the router's call, not the selector's.\n this.hoverParticipantRegistration =\n context.registerProvider(\n EDITOR_HOVER_PARTICIPANT,\n { language: '*' },\n createLanguageServerHoverParticipant({\n router: this.servers,\n requestHover: (params, requestOptions, onUpdate) =>\n this.servers.requestHover(params, requestOptions, onUpdate),\n getActiveDocument: () => this.activeDocument(),\n getDiagnostics: () => this.diagnostics.diagnostics,\n getDiagnosticActions: options.getDiagnosticActions,\n openLocation: (target) => {\n options.onOpenDefinition?.(target)\n },\n onRequestSuccess: () => options.onInteractiveReady?.(),\n onRequestError: (error) => this.handleRequestError(error),\n }),\n ) ?? null\n this.typedTextRegistration = context.onDidType((text) => this.handleTypedText(text))\n this.signatureHelpOptions = {\n router: this.servers,\n context,\n getActiveDocument: () => this.activeDocument(),\n onRequestError: (error) => this.handleRequestError(error),\n onRequestSuccess: () => options.onInteractiveReady?.(),\n tooltipClassNamespace: options.hoverDefinition.tooltipClassNamespace,\n }\n this.documentHighlights = new DocumentHighlightController({\n router: this.servers,\n context,\n getActiveDocument: () => this.activeDocument(),\n highlightName: `${context.highlightPrefix}-document-highlight`,\n onRequestError: (error) => this.handleRequestError(error),\n })\n this.codeActions = new CodeActionController({\n router: this.servers,\n context,\n getActiveDocument: () => this.activeDocument(),\n getDiagnostics: () => this.diagnostics.diagnostics,\n onRequestError: (error) => this.handleRequestError(error),\n })\n this.formatOnType = options.formatOnType\n ? new FormatOnTypeController({ context, editFeature: options.completion.editFeature })\n : null\n this.views.register(this)\n this.update(context.getSnapshot(), 'document', null)\n }\n\n public update(\n snapshot: EditorViewSnapshot,\n kind: EditorViewContributionUpdateKind,\n change?: EditorContributionChange | null,\n ): void {\n if (this.disposed) return\n\n this.updateViewDocument(snapshot, kind)\n this.abortRenameOnDocumentDrift()\n this.definitionLink.update(snapshot, kind)\n if (anchoredSurfaceFollowsUpdate(kind)) this.reanchorRenamePrompt()\n if (!this.options.document) this.document.synchronize(change ?? null, kind)\n this.completion.update(snapshot, kind, change ?? null)\n this.signatureHelp?.update(snapshot, kind)\n this.documentHighlights.update(snapshot, kind)\n this.codeActions.update(kind)\n this.formatOnType?.update(snapshot, kind, change ?? null)\n this.syncSemanticTokens(snapshot, kind)\n if (kind === 'tokens') this.diagnostics.updateTheme(snapshot.theme ?? null)\n }\n\n public dispose(): void {\n if (this.disposed) return\n\n this.disposed = true\n this.views.unregister(this)\n this.definitionLink.dispose()\n this.hoverParticipantRegistration?.dispose()\n this.completion.hide()\n for (const lane of this.lanes) lane.subscription.dispose()\n if (!this.options.document) this.document.dispose()\n this.diagnostics.clear()\n this.completionSources.dispose()\n this.completion.dispose()\n this.typedTextRegistration?.dispose()\n // Disposing twice is a no-op, so a load still in flight is safe to settle into.\n void this.signatureHelpLoad?.then((controller) => controller.dispose())\n this.documentHighlights.dispose()\n this.codeActions.dispose()\n this.formatOnType?.dispose()\n this.semanticTokens?.dispose()\n this.semanticTokensOptions?.dispose?.()\n this.semanticTokensOptions = null\n this.semanticTokensOwner = null\n this.cancelRename()\n this.rename?.dispose()\n }\n\n public goToDefinitionFromSelection(): boolean {\n return this.runNavigationCommand({\n kind: 'definition',\n openMode: 'default',\n })\n }\n\n public runNavigationCommand(command: LanguageServerNavigationCommand): boolean {\n return this.definitionLink.runNavigationCommand(command)\n }\n\n public completionCommand(command: CompletionKeyCommand): boolean {\n return this.completion.runKeyCommand(command)\n }\n\n /** Before the first `(` there is no controller, and so no hint for these to act on. */\n public signatureHelpCommand(command: SignatureHelpKeyCommand): boolean {\n return this.signatureHelp?.runKeyCommand(command) ?? false\n }\n\n public moveDiagnosticMarker(direction: DiagnosticMarkerDirection): boolean {\n return this.diagnostics.moveMarker(this.activeDocument(), direction)\n }\n\n /**\n * Formats the whole document through the language server.\n *\n * Reports handled as soon as the request is on its way: the answer arrives asynchronously, and\n * returning false would let the keystroke fall through to another binding.\n */\n public formatDocument(): boolean {\n const active = this.activeDocument()\n if (!active) return false\n if (!this.servers.hasReady('formatting', 'textDocument/formatting')) return false\n\n void this.requestFormatting(active)\n return true\n }\n\n /**\n * Renames the symbol under the caret.\n *\n * The new name comes from the host when it supplies `onRequestRenameName`, and otherwise from the\n * editor's own input widget, so the engine is usable standalone without dictating a dialog to an\n * application that has one.\n */\n public renameSymbol(): boolean {\n const active = this.activeDocument()\n if (!active) return false\n if (!this.servers.hasReady('rename', 'textDocument/rename')) return false\n\n this.cancelRename()\n const abort = new AbortController()\n this.renameOperation = abort\n this.renameActiveDocument = active\n void this.runRename(active, abort).finally(() => this.finishRename(abort))\n return true\n }\n\n /** Applies the preferred quick fix the oracle already found for the caret. */\n public applyAutoFix(): boolean {\n return this.codeActions.applyAutoFix()\n }\n\n private createLane(documentLane: DocumentLanguageServerLane): ViewLanguageServerLane {\n const options = documentLane.options\n const diagnostics = this.diagnostics.forLane(options.id)\n const subscription = documentLane.attach(\n {\n clear: () => diagnostics.clear(),\n render: (document, items) => diagnostics.render(document, items),\n publishSummary: (uri, version, items, freshness) => {\n diagnostics.publishSummary(uri, version, items, freshness)\n this.codeActions?.diagnosticsChanged()\n },\n },\n () => {\n if (this.disposed) return\n this.completion?.hide()\n this.syncSemanticTokens(this.context.getSnapshot(), 'document')\n },\n )\n return {\n connection: documentLane.connection,\n subscription,\n features: options.features,\n id: options.id,\n onApplyWorkspaceEdit: this.options.onApplyWorkspaceEdit ?? options.onApplyWorkspaceEdit,\n onRequestError: (method, error) => {\n if (options.onRequestError) options.onRequestError(method, error)\n else this.options.onRequestError?.(options.id, method, error)\n },\n onInteractiveReady: () => {\n if (options.onInteractiveReady) options.onInteractiveReady()\n else this.options.onInteractiveReady?.()\n },\n sync: documentLane.sync,\n }\n }\n\n /**\n * Nothing is on screen before the controller exists, so `)` closes a signature that was never\n * shown and loads nothing. An opening `(` or a `,` is the first keystroke that needs it.\n */\n private handleTypedText(text: string): void {\n if (this.signatureHelp) {\n this.signatureHelp.handleTypedText(text)\n return\n }\n\n const trigger = signatureHelpTriggerFromTypedText(text)\n if (!trigger || trigger.kind === 'close') return\n\n void this.loadSignatureHelp().then((controller) => controller.handleTypedText(text))\n }\n\n private loadSignatureHelp(): Promise<SignatureHelpController> {\n this.signatureHelpLoad ??= import('./signatureHelpController').then((module) => {\n const controller = new module.SignatureHelpController(this.signatureHelpOptions)\n this.signatureHelp = controller\n if (this.disposed) controller.dispose()\n return controller\n })\n return this.signatureHelpLoad\n }\n\n private syncSemanticTokens(\n snapshot: EditorViewSnapshot,\n kind: EditorViewContributionUpdateKind,\n ): void {\n const selected = this.options.semanticTokens\n ? (this.servers.ready('semanticTokens')[0] ?? null)\n : null\n const owner = this.lanes.find((lane) => lane === selected) ?? null\n if (owner !== this.semanticTokensOwner) this.replaceSemanticTokensOwner(owner)\n\n this.semanticTokens?.update(snapshot, kind)\n }\n\n private replaceSemanticTokensOwner(owner: ViewLanguageServerLane | null): void {\n this.semanticTokens?.dispose()\n this.semanticTokens = null\n this.semanticTokensOptions?.dispose?.()\n this.semanticTokensOptions = null\n this.semanticTokensOwner = owner\n if (!owner || !this.options.semanticTokens) return\n\n const options = this.options.semanticTokens({\n id: owner.id,\n connection: {\n client: owner.connection.client,\n workspace: owner.connection.workspace,\n },\n })\n this.semanticTokensOptions = options\n this.semanticTokens = new SemanticTokenLayerOwner(this.context, options)\n }\n\n private activeDocument(): ActiveDocument | null {\n return this.viewDocument\n }\n\n private updateViewDocument(\n snapshot: EditorViewSnapshot,\n kind: EditorViewContributionUpdateKind,\n ): void {\n if (kind === 'clear') {\n this.viewDocument = null\n return\n }\n if (this.viewDocument?.textVersion === snapshot.textVersion && kind !== 'document') return\n\n this.viewDocument = activeDocumentForSnapshot(snapshot, this.options.documentSync)\n }\n\n private async runRename(active: ActiveDocument, abort: AbortController): Promise<void> {\n const selection = this.context.getSnapshot().selections[0]\n if (!selection) return\n\n const offset = selection.headOffset\n const owner = this.servers.ready('rename', 'textDocument/rename')[0]\n if (!owner) return\n\n const prepared = await this.prepareRename(active, offset, owner, abort.signal)\n if (!prepared) return\n if (!this.renameIsCurrent(active, abort)) return\n\n const { range, currentName } = prepared\n\n const anchor = this.context.getRangeClientRect(range.start, range.end)\n if (!anchor) return\n\n try {\n this.renamePromptRange = range\n let nextName: string | null\n try {\n nextName = await this.promptRenameName({ anchor, currentName, signal: abort.signal })\n } finally {\n this.renamePromptRange = null\n }\n if (nextName === null || nextName === currentName) return\n if (!this.renameIsCurrent(active, abort)) return\n\n const guard = captureWorkspaceEditOriginGuard(owner.connection.workspace)\n const edit = await this.servers.requestSingle(\n owner,\n 'textDocument/rename',\n {\n newName: nextName,\n position: offsetToLspPositionInSnapshot(active, offset),\n textDocument: { uri: active.uri },\n },\n { signal: abort.signal },\n null as unknown,\n )\n if (edit === null) return\n if (!this.renameIsCurrent(active, abort)) return\n\n await this.dispatchRenameEdit({\n active,\n currentName,\n edit,\n guard,\n nextName,\n owner,\n signal: abort.signal,\n })\n } catch (error) {\n this.handleRequestError(error)\n }\n }\n\n private async prepareRename(\n active: ActiveDocument,\n offset: number,\n owner: LanguageServerSetLane,\n signal: AbortSignal,\n ): Promise<{ readonly range: OffsetRange; readonly currentName: string } | null> {\n const fallback = rangeAroundOffset(active, offset, wordRangeAtOffset)\n const provider = owner.connection.client.serverCapabilities?.renameProvider\n const supportsPrepare = typeof provider === 'object' && provider.prepareProvider === true\n if (!supportsPrepare) return renameTarget(active, fallback)\n\n const result = await this.servers.requestSingle<\n lsp.TextDocumentPositionParams,\n lsp.PrepareRenameResult | null\n >(\n owner,\n 'textDocument/prepareRename',\n {\n position: offsetToLspPositionInSnapshot(active, offset),\n textDocument: { uri: active.uri },\n },\n { signal },\n null,\n )\n if (!result) return null\n if ('defaultBehavior' in result) return renameTarget(active, fallback)\n\n const protocolRange = 'range' in result ? result.range : result\n const range = {\n start: lspPositionToOffsetInSnapshot(active, protocolRange.start),\n end: lspPositionToOffsetInSnapshot(active, protocolRange.end),\n }\n const target = renameTarget(active, range)\n if (!target || !('placeholder' in result)) return target\n\n return { ...target, currentName: result.placeholder }\n }\n\n /**\n * Keeps an open prompt beside the symbol while the view moves under it.\n *\n * A host that supplies its own dialog places it wherever it likes, so there is nothing here to\n * move; a symbol that has scrolled out of the rendered rows has no rect, and the prompt is left\n * where it was rather than thrown at the top of the page.\n */\n private reanchorRenamePrompt(): void {\n const range = this.renamePromptRange\n if (!range) return\n\n const anchor = this.context.getRangeClientRect(range.start, range.end)\n if (anchor) this.rename?.reanchor(anchor)\n }\n\n private promptRenameName(prompt: LanguageServerRenamePrompt): Promise<string | null> {\n if (prompt.signal.aborted) return Promise.resolve(null)\n\n const host = this.options.onRequestRenameName\n if (host) return host(prompt)\n\n return this.renameWidget().prompt(prompt)\n }\n\n /** Built on first use, so a host that supplies its own prompt never creates the element. */\n private renameWidget(): RenameWidgetController {\n if (this.rename) return this.rename\n\n this.rename = createRenameWidgetController({\n classNamespace: this.options.hoverDefinition.tooltipClassNamespace ?? 'lsp-plugin',\n document: this.context.container.ownerDocument,\n themeSource: this.context.scrollElement,\n returnFocus: () => this.context.focusEditor(),\n })\n return this.rename\n }\n\n private async dispatchRenameEdit(request: RenameWorkspaceEditDispatch): Promise<void> {\n const parsed = parseWorkspaceEdit(request.edit)\n if (!parsed.ok) {\n this.reportLaneRequestError(\n request.owner,\n 'textDocument/rename',\n new Error(parsed.error.reason),\n )\n return\n }\n const origin = currentWorkspaceEditOrigin(request.guard, request.active, parsed.value)\n if (!origin) return\n if (request.signal.aborted) return\n\n const apply = request.owner.onApplyWorkspaceEdit\n if (!apply) {\n this.reportLaneRequestError(\n request.owner,\n 'textDocument/rename',\n new Error('Rename cannot be applied without a workspace edit host.'),\n )\n return\n }\n\n const result = await apply({\n guard: request.guard,\n label: `Rename ${request.currentName} to ${request.nextName}`,\n logicalRevisionScope: request.owner.connection.logicalRevisionScope,\n originUri: request.active.uri,\n originVersion: origin.version,\n plan: parsed.value,\n serverId: request.owner.id,\n signal: request.signal,\n source: 'rename',\n })\n if (result.status !== 'failed') return\n this.reportLaneRequestError(\n request.owner,\n 'textDocument/rename',\n new Error(`${result.code}: ${result.message}`),\n )\n }\n\n private renameIsCurrent(active: ActiveDocument, abort: AbortController): boolean {\n if (this.disposed) return false\n if (abort.signal.aborted) return false\n if (this.renameOperation !== abort) return false\n return active === this.activeDocument()\n }\n\n private abortRenameOnDocumentDrift(): void {\n if (!this.renameOperation) return\n if (this.renameActiveDocument === this.activeDocument()) return\n this.cancelRename()\n }\n\n private cancelRename(): void {\n const abort = this.renameOperation\n this.renameOperation = null\n this.renameActiveDocument = null\n this.renamePromptRange = null\n abort?.abort()\n }\n\n private finishRename(abort: AbortController): void {\n if (this.renameOperation !== abort) return\n this.renameOperation = null\n this.renameActiveDocument = null\n }\n\n private reportLaneRequestError(\n owner: LanguageServerSetLane,\n method: string,\n error: unknown,\n ): void {\n if (owner.onRequestError) {\n owner.onRequestError(method, error)\n return\n }\n this.handleRequestError(error)\n }\n\n private async requestFormatting(active: ActiveDocument): Promise<void> {\n try {\n const edits = await this.servers.request<lsp.TextEdit[] | null>('textDocument/formatting', {\n // The view snapshot carries the editor's own tab size, so the formatter is told the same\n // width the document is displayed with.\n options: formattingOptions(this.context.getSnapshot().tabSize),\n textDocument: { uri: active.uri },\n })\n // The document can change while the formatter runs; its edits describe the text it was given.\n if (active !== this.activeDocument()) return\n\n const converted = prepareFormattingEdits(active, edits)\n if (converted.length === 0) return\n if (!formattingChangesText(active.textSnapshot, converted)) return\n\n this.applyFormattingEdits(converted, active.textSnapshot.length)\n } catch (error) {\n this.handleRequestError(error)\n }\n }\n\n /**\n * Applies formatting through the same edit feature completions use, so a format is one\n * transaction and one undo step.\n *\n * The caret is pinned to its offset rather than tracked through the edits: formatting moves text\n * wholesale, and an offset that survives is closer to where the user was looking than a position\n * mapped through a rewrite of the whole file.\n */\n private applyFormattingEdits(edits: readonly TextEdit[], previousLength: number): void {\n const feature = this.context.getFeature(this.options.completion.editFeature)\n if (!feature) return\n\n const length = edits.reduce(\n (size, edit) => size + edit.text.length - (edit.to - edit.from),\n previousLength,\n )\n const head = Math.min(this.context.getSnapshot().selections[0]?.headOffset ?? 0, length)\n feature.applyCompletion({ edits, selection: { anchor: head, head } })\n }\n\n private handleRequestError(error: unknown): void {\n if (isAbortError(error)) return\n this.options.onError?.(error)\n }\n}\n\nfunction renameTarget(\n document: LspTextDocumentSnapshot,\n range: OffsetRange,\n): { readonly range: OffsetRange; readonly currentName: string } | null {\n if (range.end <= range.start) return null\n const currentName = document.textSnapshot.readRange(range.start, range.end)\n if (currentName.length === 0) return null\n return { currentName, range }\n}\n\nfunction resolveAdapterOptions(\n options: LanguageServerAdapterPluginOptions,\n): LanguageServerResolvedAdapterOptions {\n return {\n name: options.name,\n lanes: [resolvedLaneFromAdapterOptions(options)],\n documentSync: options.documentSync ?? {},\n diagnostics: resolveDiagnosticsOptions(options),\n completion: resolveCompletionOptions(options),\n formatOnType: options.formatOnType ?? true,\n hoverDefinition: resolveHoverDefinitionOptions(options),\n commands: options.commands ?? LANGUAGE_SERVER_COMMANDS,\n semanticTokens: options.semanticTokens ? () => options.semanticTokens! : undefined,\n onDiagnostics: options.onDiagnostics,\n onDidNavigateDiagnostic: options.onDidNavigateDiagnostic,\n getDiagnosticActions: options.getDiagnosticActions,\n onDefinitionLinkHover: options.onDefinitionLinkHover,\n onOpenDefinition: options.onOpenDefinition,\n onOpenReferences: options.onOpenReferences,\n onRequestRenameName: options.onRequestRenameName,\n onApplyWorkspaceEdit: options.onApplyWorkspaceEdit,\n onRequestError: options.onRequestError,\n onError: options.onError,\n }\n}\n\nfunction resolveLanguageServerSetOptions(\n options: LanguageServerSetPluginOptions,\n): LanguageServerResolvedAdapterOptions {\n return {\n name: DEFAULT_PLUGIN_NAME,\n document: options.document,\n lanes: options.document\n ? options.document.lanes.map((lane) => lane.options)\n : options.lanes.map((lane) =>\n resolveLanguageServerLaneOptions({\n ...lane,\n onApplyWorkspaceEdit: options.onApplyWorkspaceEdit ?? lane.onApplyWorkspaceEdit,\n onRequestError:\n lane.onRequestError ??\n ((method, error) => options.onRequestError?.(lane.id, method, error)),\n }),\n ),\n documentSync: options.document?.syncOptions ?? options.documentSync ?? {},\n diagnostics: resolveDiagnosticsOptions(),\n completion: resolveCompletionOptions(),\n formatOnType: true,\n hoverDefinition: resolveHoverDefinitionOptions(),\n commands: LANGUAGE_SERVER_COMMANDS,\n semanticTokens: options.semanticTokens,\n onDiagnostics: options.onDiagnostics,\n onDidNavigateDiagnostic: options.onDidNavigateDiagnostic,\n getDiagnosticActions: options.getDiagnosticActions,\n onInteractiveReady: options.onInteractiveReady,\n onDefinitionLinkHover: options.onDefinitionLinkHover,\n onOpenDefinition: options.onOpenDefinition,\n onOpenReferences: options.onOpenReferences,\n onApplyWorkspaceEdit: options.onApplyWorkspaceEdit,\n onRequestError: options.onRequestError,\n onError: options.onError,\n }\n}\n\nfunction languageServerLaneFromPluginOptions(\n options: LanguageServerPluginOptions,\n): LanguageServerLaneOptions {\n return {\n id: DEFAULT_PLUGIN_NAME,\n features: allLanguageServerFeatures(),\n rootUri: options.rootUri,\n initializationOptions: options.initializationOptions,\n timeoutMs: options.timeoutMs,\n capabilities: options.capabilities,\n clientInfo: options.clientInfo,\n notificationHandlers: options.notificationHandlers,\n serverRequestHandlers: options.serverRequestHandlers,\n webSocketRoute: options.webSocketRoute,\n webSocketTransportOptions: options.webSocketTransportOptions,\n connectionProvider: options.connectionProvider,\n onApplyWorkspaceEdit: options.onApplyWorkspaceEdit,\n onConnectionCreated: options.onConnectionCreated,\n onConnected: options.onConnected,\n onStatusChange: options.onStatusChange,\n onInteractiveReady: options.onInteractiveReady,\n onError: options.onError,\n }\n}\n\nfunction resolvedLaneFromAdapterOptions(\n options: LanguageServerAdapterPluginOptions,\n): LanguageServerResolvedLaneOptions {\n return {\n id: options.name,\n features: allLanguageServerFeatures(),\n rootUri: options.rootUri,\n initializationOptions: options.initializationOptions,\n timeoutMs: options.timeoutMs,\n capabilities: options.capabilities,\n clientInfo: options.clientInfo,\n notificationHandlers: options.notificationHandlers,\n serverRequestHandlers: options.serverRequestHandlers,\n createTransport: options.createTransport,\n connectionProvider: options.connectionProvider,\n onApplyWorkspaceEdit: options.onApplyWorkspaceEdit,\n onConnectionCreated: options.onConnectionCreated,\n onConnected: options.onConnected,\n onStatusChange: options.onStatusChange,\n onInteractiveReady: options.onInteractiveReady,\n onRequestError: (method, error) => options.onRequestError?.(options.name, method, error),\n onError: options.onError,\n }\n}\n\nfunction resolveDiagnosticsOptions(\n options?: LanguageServerAdapterPluginOptions,\n): LanguageServerResolvedAdapterOptions['diagnostics'] {\n return {\n minimapSourceId: options?.diagnostics?.minimapSourceId ?? DEFAULT_DIAGNOSTICS_SOURCE_ID,\n highlightNameNamespace: options?.diagnostics?.highlightNameNamespace ?? DEFAULT_NAMESPACE,\n markerTimingNamePrefix:\n options?.diagnostics?.markerTimingNamePrefix ?? `${DEFAULT_TIMING_PREFIX}.marker`,\n }\n}\n\nfunction resolveCompletionOptions(\n options?: LanguageServerAdapterPluginOptions,\n): LanguageServerResolvedAdapterOptions['completion'] {\n return {\n editFeature: options?.completion?.editFeature ?? LANGUAGE_SERVER_COMPLETION_EDIT_FEATURE,\n acceptTimingName:\n options?.completion?.acceptTimingName ?? DEFAULT_COMPLETION_ACCEPT_TIMING_NAME,\n widgetClassNamespace: options?.completion?.widgetClassNamespace,\n acceptOnCommitCharacter: options?.completion?.acceptOnCommitCharacter ?? false,\n }\n}\n\nfunction resolveHoverDefinitionOptions(\n options?: LanguageServerAdapterPluginOptions,\n): LanguageServerResolvedAdapterOptions['hoverDefinition'] {\n return {\n linkHighlightNameNamespace:\n options?.hoverDefinition?.linkHighlightNameNamespace ?? DEFAULT_NAMESPACE,\n tooltipClassNamespace: options?.hoverDefinition?.tooltipClassNamespace ?? DEFAULT_NAMESPACE,\n navigationTimingNamePrefix:\n options?.hoverDefinition?.navigationTimingNamePrefix ?? DEFAULT_TIMING_PREFIX,\n }\n}\n\nconst LANGUAGE_SERVER_COMMANDS: readonly LanguageServerCommandSpec[] = [\n {\n id: 'goToDefinition',\n run: (state) => state.goToDefinitionFromSelection(),\n },\n {\n id: 'editor.action.goToDefinition',\n run: (state) => state.goToDefinitionFromSelection(),\n },\n {\n id: 'editor.action.peekDefinition',\n run: (state) => state.runNavigationCommand({ kind: 'definition', openMode: 'peek' }),\n },\n {\n id: 'editor.action.revealDefinitionAside',\n run: (state) => state.runNavigationCommand({ kind: 'definition', openMode: 'aside' }),\n },\n {\n id: 'editor.action.goToImplementation',\n run: (state) =>\n state.runNavigationCommand({\n kind: 'implementation',\n openMode: 'default',\n }),\n },\n {\n id: 'editor.action.goToTypeDefinition',\n run: (state) =>\n state.runNavigationCommand({\n kind: 'typeDefinition',\n openMode: 'default',\n }),\n },\n {\n id: 'editor.action.goToReferences',\n run: (state) =>\n state.runNavigationCommand({\n kind: 'references',\n openMode: 'peek',\n includeDeclaration: true,\n }),\n },\n {\n id: 'editor.action.rename',\n run: (state) => state.renameSymbol(),\n },\n {\n id: 'editor.action.formatDocument',\n run: (state) => state.formatDocument(),\n },\n {\n id: 'editor.action.autoFix',\n run: (state) => state.applyAutoFix(),\n },\n {\n id: 'editor.action.marker.next',\n run: (state) => state.moveDiagnosticMarker('next'),\n },\n {\n id: 'editor.action.marker.prev',\n run: (state) => state.moveDiagnosticMarker('previous'),\n },\n ...keyCommandSpecs(COMPLETION_KEY_COMMANDS, (target, command) =>\n target.completionCommand(command),\n ),\n ...keyCommandSpecs(SIGNATURE_HELP_KEY_COMMANDS, (target, command) =>\n target.signatureHelpCommand(command),\n ),\n]\n\n/** The completion list and signature hint, driven by the keymap rather than by raw keys. */\nfunction keyCommandSpecs<Command extends string>(\n ids: Readonly<Record<Command, EditorCommandId>>,\n run: (target: LanguageServerCommandTarget, command: Command) => boolean,\n): readonly LanguageServerCommandSpec[] {\n const commands = Object.keys(ids) as Command[]\n return commands.map((command) => ({ id: ids[command], run: (target) => run(target, command) }))\n}\n\nfunction isAbortError(error: unknown): boolean {\n if (error instanceof DOMException && error.name === 'AbortError') return true\n if (!isRecord(error)) return false\n return error.name === 'LspRequestCancelledError'\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHA,IAAM,sBAAsB;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tC,OADiB,OAAO,KAAK,GACtB,CAAA,CAAS,KAAK,aAAa;EAAE,IAAI,IAAI;EAAU,MAAM,WAAW,IAAI,QAAQ,OAAO;CAAE,EAAE;AAChG;AAEA,SAAS,aAAa,OAAyB;CAC7C,IAAI,iBAAiB,gBAAgB,MAAM,SAAS,cAAc,OAAO;CACzE,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO;CAC7B,OAAO,MAAM,SAAS;AACxB;AAEA,IAAM,YAAY,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type VirtualizedTextHighlightStyle } from '@singapore-editor/core/rendering';
|
|
2
|
+
import type { LanguageServerDiagnosticSeverity } from './diagnostics';
|
|
3
|
+
/**
|
|
4
|
+
* Highlight style applied to the identifier range under the pointer while the
|
|
5
|
+
* user holds the navigation modifier (Cmd on macOS, Ctrl elsewhere) over a
|
|
6
|
+
* jumpable definition. Renders as a transparent-background token with an
|
|
7
|
+
* underline so the editor's base syntax colouring stays visible and the
|
|
8
|
+
* affordance matches familiar IDE go-to-definition visuals.
|
|
9
|
+
*/
|
|
10
|
+
export declare const LINK_HIGHLIGHT_STYLE: VirtualizedTextHighlightStyle;
|
|
11
|
+
/**
|
|
12
|
+
* Per-severity highlight styles applied by the Language Server plugin to the
|
|
13
|
+
* ranges produced by `diagnosticHighlightGroups`. Errors get a translucent
|
|
14
|
+
* background plus a wavy underline so they are unmistakable even on noisy
|
|
15
|
+
* syntax colouring; warnings / information / hints get progressively subtler
|
|
16
|
+
* washes with no underline, following the severity ordering the styling is
|
|
17
|
+
* meant to convey.
|
|
18
|
+
*/
|
|
19
|
+
export declare const DIAGNOSTIC_STYLES: Record<LanguageServerDiagnosticSeverity, VirtualizedTextHighlightStyle>;
|
|
20
|
+
export declare const UNNECESSARY_DIAGNOSTIC_OPACITY: string;
|
|
21
|
+
export declare const DEPRECATED_DIAGNOSTIC_STYLE: VirtualizedTextHighlightStyle;
|
|
22
|
+
/**
|
|
23
|
+
* Minimap marker colour per severity.
|
|
24
|
+
*
|
|
25
|
+
* The one place this plugin ships a colour a theme cannot reach: the minimap paints onto a canvas
|
|
26
|
+
* from a worker, which has no element and no style engine to resolve a registered id against, and a
|
|
27
|
+
* value it cannot parse is silently replaced by the selection colour. Deriving the literal is as
|
|
28
|
+
* close to a registration as a worker gets.
|
|
29
|
+
*/
|
|
30
|
+
export declare const DIAGNOSTIC_MARKER_COLORS: Record<LanguageServerDiagnosticSeverity, string>;
|
|
31
|
+
//# sourceMappingURL=plugin.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.styles.d.ts","sourceRoot":"","sources":["../src/plugin.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,6BAA6B,EACnC,MAAM,kCAAkC,CAAA;AAEzC,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAA;AAiFrE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,6BAIlC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,gCAAgC,EAChC,6BAA6B,CAsB9B,CAAA;AAED,eAAO,MAAM,8BAA8B,QAM1C,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,6BAEzC,CAAA;AAWD;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,gCAAgC,EAAE,MAAM,CAKrF,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { darkenEditorColor, editorColorReference, firstEditorColor, lightenEditorColor, registerEditorColor, transparentEditorColor } from "@singapore-editor/core/rendering";
|
|
2
|
+
//#region src/plugin.styles.ts
|
|
3
|
+
var DEFINITION_LINK = registerEditorColor("lsp.definitionLink", {
|
|
4
|
+
dark: "#60a5fa",
|
|
5
|
+
light: "#2563eb"
|
|
6
|
+
});
|
|
7
|
+
var DIAGNOSTIC_HUES = {
|
|
8
|
+
error: "#ef4444",
|
|
9
|
+
warning: "#f59e0b",
|
|
10
|
+
information: "#3b82f6",
|
|
11
|
+
hint: "#94a3b8"
|
|
12
|
+
};
|
|
13
|
+
var DIAGNOSTIC_ERROR = registerEditorColor("lsp.diagnostic.error", {
|
|
14
|
+
dark: DIAGNOSTIC_HUES.error,
|
|
15
|
+
light: "#dc2626"
|
|
16
|
+
});
|
|
17
|
+
registerEditorColor("lsp.diagnostic.warning", {
|
|
18
|
+
dark: DIAGNOSTIC_HUES.warning,
|
|
19
|
+
light: "#b45309"
|
|
20
|
+
});
|
|
21
|
+
registerEditorColor("lsp.diagnostic.information", {
|
|
22
|
+
dark: DIAGNOSTIC_HUES.information,
|
|
23
|
+
light: "#1d4ed8"
|
|
24
|
+
});
|
|
25
|
+
var DIAGNOSTIC_HINT_BASE = firstEditorColor(editorColorReference("gutter.foreground"), DIAGNOSTIC_HUES.hint);
|
|
26
|
+
registerEditorColor("lsp.diagnostic.hint", {
|
|
27
|
+
dark: darkenEditorColor(DIAGNOSTIC_HINT_BASE, .2),
|
|
28
|
+
light: lightenEditorColor(DIAGNOSTIC_HINT_BASE, .2)
|
|
29
|
+
});
|
|
30
|
+
var DIAGNOSTIC_ERROR_BACKGROUND = registerEditorColor("lsp.diagnostic.errorBackground", transparentEditorColor(editorColorReference("lsp.diagnostic.error"), .16));
|
|
31
|
+
var DIAGNOSTIC_WARNING_BACKGROUND = registerEditorColor("lsp.diagnostic.warningBackground", transparentEditorColor(editorColorReference("lsp.diagnostic.warning"), .26));
|
|
32
|
+
var DIAGNOSTIC_INFORMATION_BACKGROUND = registerEditorColor("lsp.diagnostic.informationBackground", transparentEditorColor(editorColorReference("lsp.diagnostic.information"), .22));
|
|
33
|
+
var DIAGNOSTIC_HINT_BACKGROUND = registerEditorColor("lsp.diagnostic.hintBackground", transparentEditorColor(editorColorReference("lsp.diagnostic.hint"), .22));
|
|
34
|
+
var DIAGNOSTIC_ERROR_UNDERLINE = registerEditorColor("lsp.diagnostic.errorUnderline", darkenEditorColor(editorColorReference("lsp.diagnostic.error"), .2));
|
|
35
|
+
/**
|
|
36
|
+
* Highlight style applied to the identifier range under the pointer while the
|
|
37
|
+
* user holds the navigation modifier (Cmd on macOS, Ctrl elsewhere) over a
|
|
38
|
+
* jumpable definition. Renders as a transparent-background token with an
|
|
39
|
+
* underline so the editor's base syntax colouring stays visible and the
|
|
40
|
+
* affordance matches familiar IDE go-to-definition visuals.
|
|
41
|
+
*/
|
|
42
|
+
var LINK_HIGHLIGHT_STYLE = {
|
|
43
|
+
backgroundColor: "transparent",
|
|
44
|
+
color: DEFINITION_LINK,
|
|
45
|
+
textDecoration: `underline solid ${DEFINITION_LINK}`
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Per-severity highlight styles applied by the Language Server plugin to the
|
|
49
|
+
* ranges produced by `diagnosticHighlightGroups`. Errors get a translucent
|
|
50
|
+
* background plus a wavy underline so they are unmistakable even on noisy
|
|
51
|
+
* syntax colouring; warnings / information / hints get progressively subtler
|
|
52
|
+
* washes with no underline, following the severity ordering the styling is
|
|
53
|
+
* meant to convey.
|
|
54
|
+
*/
|
|
55
|
+
var DIAGNOSTIC_STYLES = {
|
|
56
|
+
error: {
|
|
57
|
+
backgroundColor: DIAGNOSTIC_ERROR_BACKGROUND,
|
|
58
|
+
color: DIAGNOSTIC_ERROR,
|
|
59
|
+
textDecoration: `underline wavy ${DIAGNOSTIC_ERROR_UNDERLINE}`,
|
|
60
|
+
zIndex: 3
|
|
61
|
+
},
|
|
62
|
+
warning: { backgroundColor: DIAGNOSTIC_WARNING_BACKGROUND },
|
|
63
|
+
information: { backgroundColor: DIAGNOSTIC_INFORMATION_BACKGROUND },
|
|
64
|
+
hint: { backgroundColor: DIAGNOSTIC_HINT_BACKGROUND }
|
|
65
|
+
};
|
|
66
|
+
var UNNECESSARY_DIAGNOSTIC_OPACITY = registerEditorColor("lsp.diagnostic.unnecessaryOpacity", {
|
|
67
|
+
dark: "#000a",
|
|
68
|
+
light: "#0007"
|
|
69
|
+
});
|
|
70
|
+
var DEPRECATED_DIAGNOSTIC_STYLE = { overlay: { textDecoration: "line-through" } };
|
|
71
|
+
var DIAGNOSTIC_MARKER_ALPHA = {
|
|
72
|
+
error: 1,
|
|
73
|
+
warning: .95,
|
|
74
|
+
information: .9,
|
|
75
|
+
hint: .85
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Minimap marker colour per severity.
|
|
79
|
+
*
|
|
80
|
+
* The one place this plugin ships a colour a theme cannot reach: the minimap paints onto a canvas
|
|
81
|
+
* from a worker, which has no element and no style engine to resolve a registered id against, and a
|
|
82
|
+
* value it cannot parse is silently replaced by the selection colour. Deriving the literal is as
|
|
83
|
+
* close to a registration as a worker gets.
|
|
84
|
+
*/
|
|
85
|
+
var DIAGNOSTIC_MARKER_COLORS = {
|
|
86
|
+
error: diagnosticMarkerColor("error"),
|
|
87
|
+
warning: diagnosticMarkerColor("warning"),
|
|
88
|
+
information: diagnosticMarkerColor("information"),
|
|
89
|
+
hint: diagnosticMarkerColor("hint")
|
|
90
|
+
};
|
|
91
|
+
function diagnosticMarkerColor(severity) {
|
|
92
|
+
const channels = Number.parseInt(DIAGNOSTIC_HUES[severity].slice(1), 16);
|
|
93
|
+
return `rgba(${[
|
|
94
|
+
channels >> 16 & 255,
|
|
95
|
+
channels >> 8 & 255,
|
|
96
|
+
channels & 255
|
|
97
|
+
].join(", ")}, ${DIAGNOSTIC_MARKER_ALPHA[severity]})`;
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
export { DEPRECATED_DIAGNOSTIC_STYLE, DIAGNOSTIC_MARKER_COLORS, DIAGNOSTIC_STYLES, LINK_HIGHLIGHT_STYLE, UNNECESSARY_DIAGNOSTIC_OPACITY };
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=plugin.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.styles.js","names":[],"sources":["../src/plugin.styles.ts"],"sourcesContent":["import {\n darkenEditorColor,\n editorColorReference,\n firstEditorColor,\n lightenEditorColor,\n registerEditorColor,\n transparentEditorColor,\n type VirtualizedTextHighlightStyle,\n} from '@singapore-editor/core/rendering'\n\nimport type { LanguageServerDiagnosticSeverity } from './diagnostics'\n\n/*\n * Every colour this plugin paints with is a registered id, so a host can restyle diagnostics or the\n * navigation affordance through the editor theme instead of forking this file, and the values are\n * enumerable instead of being buried in style literals. Ids that exist only to be derived from are\n * registered as statements; the rest are bound to the value registration hands back, which is what\n * the styles below paint with.\n */\n\nconst DEFINITION_LINK = registerEditorColor('lsp.definitionLink', {\n // Blue reads as \"activatable\" on either canvas, but the same blue cannot: it has to move away from\n // whichever background it sits on to stay legible against the editor's own syntax colouring.\n dark: '#60a5fa',\n light: '#2563eb',\n})\n\n// One hue per severity, in the cut a dark canvas starts from, shared by everything that marks that\n// severity anywhere. Two marks on the same line disagreeing about the colour of a problem would read\n// as two problems.\nconst DIAGNOSTIC_HUES = {\n error: '#ef4444',\n warning: '#f59e0b',\n information: '#3b82f6',\n hint: '#94a3b8',\n} as const satisfies Record<LanguageServerDiagnosticSeverity, string>\n\nconst DIAGNOSTIC_ERROR = registerEditorColor('lsp.diagnostic.error', {\n dark: DIAGNOSTIC_HUES.error,\n light: '#dc2626',\n})\n\nregisterEditorColor('lsp.diagnostic.warning', {\n dark: DIAGNOSTIC_HUES.warning,\n light: '#b45309',\n})\nregisterEditorColor('lsp.diagnostic.information', {\n dark: DIAGNOSTIC_HUES.information,\n light: '#1d4ed8',\n})\n\n// A hint is the quietest severity, so it borrows whatever colour the theme already uses for quiet\n// furniture and is pulled one step further toward the canvas it sits on.\nconst DIAGNOSTIC_HINT_BASE = firstEditorColor(\n editorColorReference('gutter.foreground'),\n DIAGNOSTIC_HUES.hint,\n)\nregisterEditorColor('lsp.diagnostic.hint', {\n dark: darkenEditorColor(DIAGNOSTIC_HINT_BASE, 0.2),\n light: lightenEditorColor(DIAGNOSTIC_HINT_BASE, 0.2),\n})\n\n// Each wash derives from its own severity colour, so restyling one id moves the range background\n// with it, and stays alpha-blended so it composes over any editor background.\nconst DIAGNOSTIC_ERROR_BACKGROUND = registerEditorColor(\n 'lsp.diagnostic.errorBackground',\n transparentEditorColor(editorColorReference('lsp.diagnostic.error'), 0.16),\n)\n\nconst DIAGNOSTIC_WARNING_BACKGROUND = registerEditorColor(\n 'lsp.diagnostic.warningBackground',\n transparentEditorColor(editorColorReference('lsp.diagnostic.warning'), 0.26),\n)\n\nconst DIAGNOSTIC_INFORMATION_BACKGROUND = registerEditorColor(\n 'lsp.diagnostic.informationBackground',\n transparentEditorColor(editorColorReference('lsp.diagnostic.information'), 0.22),\n)\n\nconst DIAGNOSTIC_HINT_BACKGROUND = registerEditorColor(\n 'lsp.diagnostic.hintBackground',\n transparentEditorColor(editorColorReference('lsp.diagnostic.hint'), 0.22),\n)\n\n// The stroke has to read as a separate mark on top of the wash it shares a range with, which a\n// darker cut of the same red gives without introducing a second colour to keep in sync.\nconst DIAGNOSTIC_ERROR_UNDERLINE = registerEditorColor(\n 'lsp.diagnostic.errorUnderline',\n darkenEditorColor(editorColorReference('lsp.diagnostic.error'), 0.2),\n)\n\n/**\n * Highlight style applied to the identifier range under the pointer while the\n * user holds the navigation modifier (Cmd on macOS, Ctrl elsewhere) over a\n * jumpable definition. Renders as a transparent-background token with an\n * underline so the editor's base syntax colouring stays visible and the\n * affordance matches familiar IDE go-to-definition visuals.\n */\nexport const LINK_HIGHLIGHT_STYLE: VirtualizedTextHighlightStyle = {\n backgroundColor: 'transparent',\n color: DEFINITION_LINK,\n textDecoration: `underline solid ${DEFINITION_LINK}`,\n}\n\n/**\n * Per-severity highlight styles applied by the Language Server plugin to the\n * ranges produced by `diagnosticHighlightGroups`. Errors get a translucent\n * background plus a wavy underline so they are unmistakable even on noisy\n * syntax colouring; warnings / information / hints get progressively subtler\n * washes with no underline, following the severity ordering the styling is\n * meant to convey.\n */\nexport const DIAGNOSTIC_STYLES: Record<\n LanguageServerDiagnosticSeverity,\n VirtualizedTextHighlightStyle\n> = {\n error: {\n backgroundColor: DIAGNOSTIC_ERROR_BACKGROUND,\n color: DIAGNOSTIC_ERROR,\n textDecoration: `underline wavy ${DIAGNOSTIC_ERROR_UNDERLINE}`,\n // The only diagnostic style that declares a `color`, and therefore the only one that contends\n // for one. Left implicit it sat at 0 alongside every syntax token highlight, so whether an\n // error's red text survived over a syntax-coloured identifier came down to which style key the\n // document's shared registry had seen first — a function of session history. Declaring it puts\n // the error above the semantic layer and below every find highlight, which is the order the five\n // producers of a `color` are meant to paint in.\n //\n // It carries a background and an underline as well, and find's three styles all carry a\n // background too — so this number has to differ from all of theirs, not just from the one that\n // also declares a colour. Sharing a number with the find match would leave *that* contest to\n // registration order, which is the thing being fixed rather than a different question.\n zIndex: 3,\n },\n warning: { backgroundColor: DIAGNOSTIC_WARNING_BACKGROUND },\n information: { backgroundColor: DIAGNOSTIC_INFORMATION_BACKGROUND },\n hint: { backgroundColor: DIAGNOSTIC_HINT_BACKGROUND },\n}\n\nexport const UNNECESSARY_DIAGNOSTIC_OPACITY = registerEditorColor(\n 'lsp.diagnostic.unnecessaryOpacity',\n {\n dark: '#000a',\n light: '#0007',\n },\n)\n\nexport const DEPRECATED_DIAGNOSTIC_STYLE: VirtualizedTextHighlightStyle = {\n overlay: { textDecoration: 'line-through' },\n}\n\n// Opacity descends with severity, so a line carrying several diagnostics still reads as its worst\n// one once the marks overlap.\nconst DIAGNOSTIC_MARKER_ALPHA = {\n error: 1,\n warning: 0.95,\n information: 0.9,\n hint: 0.85,\n} as const satisfies Record<LanguageServerDiagnosticSeverity, number>\n\n/**\n * Minimap marker colour per severity.\n *\n * The one place this plugin ships a colour a theme cannot reach: the minimap paints onto a canvas\n * from a worker, which has no element and no style engine to resolve a registered id against, and a\n * value it cannot parse is silently replaced by the selection colour. Deriving the literal is as\n * close to a registration as a worker gets.\n */\nexport const DIAGNOSTIC_MARKER_COLORS: Record<LanguageServerDiagnosticSeverity, string> = {\n error: diagnosticMarkerColor('error'),\n warning: diagnosticMarkerColor('warning'),\n information: diagnosticMarkerColor('information'),\n hint: diagnosticMarkerColor('hint'),\n}\n\nfunction diagnosticMarkerColor(severity: LanguageServerDiagnosticSeverity): string {\n const channels = Number.parseInt(DIAGNOSTIC_HUES[severity].slice(1), 16)\n const rgb = [(channels >> 16) & 0xff, (channels >> 8) & 0xff, channels & 0xff].join(', ')\n return `rgba(${rgb}, ${DIAGNOSTIC_MARKER_ALPHA[severity]})`\n}\n"],"mappings":";;AAoBA,IAAM,kBAAkB,oBAAoB,sBAAsB;CAGhE,MAAM;CACN,OAAO;AACT,CAAC;AAKD,IAAM,kBAAkB;CACtB,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;AACR;AAEA,IAAM,mBAAmB,oBAAoB,wBAAwB;CACnE,MAAM,gBAAgB;CACtB,OAAO;AACT,CAAC;AAED,oBAAoB,0BAA0B;CAC5C,MAAM,gBAAgB;CACtB,OAAO;AACT,CAAC;AACD,oBAAoB,8BAA8B;CAChD,MAAM,gBAAgB;CACtB,OAAO;AACT,CAAC;AAID,IAAM,uBAAuB,iBAC3B,qBAAqB,mBAAmB,GACxC,gBAAgB,IAClB;AACA,oBAAoB,uBAAuB;CACzC,MAAM,kBAAkB,sBAAsB,EAAG;CACjD,OAAO,mBAAmB,sBAAsB,EAAG;AACrD,CAAC;AAID,IAAM,8BAA8B,oBAClC,kCACA,uBAAuB,qBAAqB,sBAAsB,GAAG,GAAI,CAC3E;AAEA,IAAM,gCAAgC,oBACpC,oCACA,uBAAuB,qBAAqB,wBAAwB,GAAG,GAAI,CAC7E;AAEA,IAAM,oCAAoC,oBACxC,wCACA,uBAAuB,qBAAqB,4BAA4B,GAAG,GAAI,CACjF;AAEA,IAAM,6BAA6B,oBACjC,iCACA,uBAAuB,qBAAqB,qBAAqB,GAAG,GAAI,CAC1E;AAIA,IAAM,6BAA6B,oBACjC,iCACA,kBAAkB,qBAAqB,sBAAsB,GAAG,EAAG,CACrE;;;;;;;;AASA,IAAa,uBAAsD;CACjE,iBAAiB;CACjB,OAAO;CACP,gBAAgB,mBAAmB;AACrC;;;;;;;;;AAUA,IAAa,oBAGT;CACF,OAAO;EACL,iBAAiB;EACjB,OAAO;EACP,gBAAgB,kBAAkB;EAYlC,QAAQ;CACV;CACA,SAAS,EAAE,iBAAiB,8BAA8B;CAC1D,aAAa,EAAE,iBAAiB,kCAAkC;CAClE,MAAM,EAAE,iBAAiB,2BAA2B;AACtD;AAEA,IAAa,iCAAiC,oBAC5C,qCACA;CACE,MAAM;CACN,OAAO;AACT,CACF;AAEA,IAAa,8BAA6D,EACxE,SAAS,EAAE,gBAAgB,eAAe,EAC5C;AAIA,IAAM,0BAA0B;CAC9B,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;AACR;;;;;;;;;AAUA,IAAa,2BAA6E;CACxF,OAAO,sBAAsB,OAAO;CACpC,SAAS,sBAAsB,SAAS;CACxC,aAAa,sBAAsB,aAAa;CAChD,MAAM,sBAAsB,MAAM;AACpC;AAEA,SAAS,sBAAsB,UAAoD;CACjF,MAAM,WAAW,OAAO,SAAS,gBAAgB,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE;CAEvE,OAAO,QADK;EAAE,YAAY,KAAM;EAAO,YAAY,IAAK;EAAM,WAAW;CAAI,CAAC,CAAC,KAAK,IACrE,EAAI,IAAI,wBAAwB,UAAU;AAC3D"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { LspLineStarts, LspTextSnapshot, LspWebSocketTransportOptions } from '@singapore-editor/lsp';
|
|
2
|
+
import type * as lsp from 'vscode-languageserver-protocol';
|
|
3
|
+
import type { LanguageServerDefinitionTarget, LanguageServerDiagnosticMarkerClaim, LanguageServerDiagnosticMarkerEvent, LanguageServerDiagnosticSummary, LanguageServerNavigationKind, LanguageServerNavigationOpenMode, LanguageServerNavigationOptions, LanguageServerReferencesResult, LanguageServerStatus, OnApplyWorkspaceEdit } from './types';
|
|
4
|
+
export type LanguageServerResolvedOptions = {
|
|
5
|
+
readonly rootUri: lsp.DocumentUri | null;
|
|
6
|
+
readonly initializationOptions: unknown;
|
|
7
|
+
readonly timeoutMs: number;
|
|
8
|
+
readonly webSocketRoute: string | URL;
|
|
9
|
+
readonly webSocketTransportOptions?: LspWebSocketTransportOptions;
|
|
10
|
+
readonly onStatusChange?: (status: LanguageServerStatus) => void;
|
|
11
|
+
readonly onDiagnostics?: (summary: LanguageServerDiagnosticSummary) => void;
|
|
12
|
+
readonly onDidNavigateDiagnostic?: (event: LanguageServerDiagnosticMarkerEvent) => LanguageServerDiagnosticMarkerClaim;
|
|
13
|
+
readonly onInteractiveReady?: () => void;
|
|
14
|
+
readonly onApplyWorkspaceEdit?: OnApplyWorkspaceEdit;
|
|
15
|
+
readonly onDefinitionLinkHover?: (target: LanguageServerDefinitionTarget) => void;
|
|
16
|
+
readonly onOpenDefinition?: (target: LanguageServerDefinitionTarget, options?: LanguageServerNavigationOptions) => void | boolean;
|
|
17
|
+
readonly onOpenReferences?: (result: LanguageServerReferencesResult) => void | boolean;
|
|
18
|
+
readonly onError?: (error: unknown) => void;
|
|
19
|
+
};
|
|
20
|
+
export type LanguageServerNavigationCommand = {
|
|
21
|
+
readonly kind: LanguageServerNavigationKind;
|
|
22
|
+
readonly openMode: LanguageServerNavigationOpenMode;
|
|
23
|
+
readonly includeDeclaration?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type DiagnosticMarkerDirection = 'next' | 'previous';
|
|
26
|
+
export type ActiveDocument = {
|
|
27
|
+
readonly uri: lsp.DocumentUri;
|
|
28
|
+
readonly languageId: string;
|
|
29
|
+
readonly textSnapshot: LspTextSnapshot;
|
|
30
|
+
readonly lineStarts: LspLineStarts;
|
|
31
|
+
readonly textVersion: number;
|
|
32
|
+
readonly lspVersion: number;
|
|
33
|
+
};
|
|
34
|
+
export type DocumentDescriptor = {
|
|
35
|
+
readonly uri: lsp.DocumentUri;
|
|
36
|
+
readonly languageId: string;
|
|
37
|
+
readonly textSnapshot: LspTextSnapshot;
|
|
38
|
+
readonly lineStarts: LspLineStarts;
|
|
39
|
+
readonly textVersion: number;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=pluginTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginTypes.d.ts","sourceRoot":"","sources":["../src/pluginTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,4BAA4B,EAC7B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,KAAK,GAAG,MAAM,gCAAgC,CAAA;AAE1D,OAAO,KAAK,EACV,8BAA8B,EAC9B,mCAAmC,EACnC,mCAAmC,EACnC,+BAA+B,EAC/B,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,8BAA8B,EAC9B,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAA;IACxC,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAA;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,GAAG,CAAA;IACrC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,4BAA4B,CAAA;IACjE,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAChE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,IAAI,CAAA;IAC3E,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CACjC,KAAK,EAAE,mCAAmC,KACvC,mCAAmC,CAAA;IACxC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC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Aa,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { LspClient } from '@singapore-editor/lsp';
|
|
2
|
+
import type * as lsp from 'vscode-languageserver-protocol';
|
|
3
|
+
export type PullDiagnosticsDocument = {
|
|
4
|
+
readonly uri: lsp.DocumentUri;
|
|
5
|
+
readonly version: number;
|
|
6
|
+
};
|
|
7
|
+
export type PullDiagnosticsControllerOptions = {
|
|
8
|
+
readonly client: LspClient;
|
|
9
|
+
getDocument(): PullDiagnosticsDocument | null;
|
|
10
|
+
publish(document: PullDiagnosticsDocument, diagnostics: readonly lsp.Diagnostic[]): void;
|
|
11
|
+
onRequestError(error: unknown): void;
|
|
12
|
+
/** A request started or settled; called after any result it brought was published. */
|
|
13
|
+
onPendingChange?(pending: boolean): void;
|
|
14
|
+
};
|
|
15
|
+
/** Keeps one active document's pull-diagnostic result current for one language-server lane. */
|
|
16
|
+
export declare class PullDiagnosticsController {
|
|
17
|
+
#private;
|
|
18
|
+
private readonly options;
|
|
19
|
+
constructor(options: PullDiagnosticsControllerOptions);
|
|
20
|
+
synchronize(): void;
|
|
21
|
+
get pending(): boolean;
|
|
22
|
+
refresh(): void;
|
|
23
|
+
cancel(): void;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
private accept;
|
|
26
|
+
private reject;
|
|
27
|
+
private notifyPending;
|
|
28
|
+
private reset;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=pullDiagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pullDiagnostics.d.ts","sourceRoot":"","sources":["../src/pullDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,KAAK,GAAG,MAAM,gCAAgC,CAAA;AAE1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,WAAW,CAAA;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,WAAW,IAAI,uBAAuB,GAAG,IAAI,CAAA;IAC7C,OAAO,CAAC,QAAQ,EAAE,uBAAuB,EAAE,WAAW,EAAE,SAAS,GAAG,CAAC,UAAU,EAAE,GAAG,IAAI,CAAA;IACxF,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;IACpC,sFAAsF;IACtF,eAAe,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACzC,CAAA;AAED,+FAA+F;AAC/F,qBAAa,yBAAyB;;IAOjB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,gCAAgC;IAEtE,WAAW,IAAI,IAAI;IA+B1B,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,OAAO,IAAI,IAAI;IAIf,MAAM,IAAI,IAAI;IAMd,OAAO,IAAI,IAAI;IAOtB,OAAO,CAAC,MAAM;IAoBd,OAAO,CAAC,MAAM;IAOd,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,KAAK;CAKd"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
//#region src/pullDiagnostics.ts
|
|
2
|
+
/** Keeps one active document's pull-diagnostic result current for one language-server lane. */
|
|
3
|
+
var PullDiagnosticsController = class {
|
|
4
|
+
options;
|
|
5
|
+
#abort = null;
|
|
6
|
+
#disposed = false;
|
|
7
|
+
#pending = false;
|
|
8
|
+
#resultId = null;
|
|
9
|
+
#uri = null;
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.options = options;
|
|
12
|
+
}
|
|
13
|
+
synchronize() {
|
|
14
|
+
if (this.#disposed) return;
|
|
15
|
+
const document = this.options.getDocument();
|
|
16
|
+
const provider = diagnosticProvider(this.options.client.serverCapabilities);
|
|
17
|
+
if (!document || !provider) {
|
|
18
|
+
this.reset();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (document.uri !== this.#uri) {
|
|
22
|
+
this.#uri = document.uri;
|
|
23
|
+
this.#resultId = null;
|
|
24
|
+
}
|
|
25
|
+
this.#abort?.abort();
|
|
26
|
+
const abort = new AbortController();
|
|
27
|
+
this.#abort = abort;
|
|
28
|
+
const params = diagnosticParams(document.uri, provider.identifier, this.#resultId);
|
|
29
|
+
this.options.client.request("textDocument/diagnostic", params, { signal: abort.signal }).then((report) => this.accept(document, abort, report), (error) => this.reject(abort, error)).finally(() => this.notifyPending());
|
|
30
|
+
this.notifyPending();
|
|
31
|
+
}
|
|
32
|
+
get pending() {
|
|
33
|
+
return this.#pending;
|
|
34
|
+
}
|
|
35
|
+
refresh() {
|
|
36
|
+
this.synchronize();
|
|
37
|
+
}
|
|
38
|
+
cancel() {
|
|
39
|
+
this.#abort?.abort();
|
|
40
|
+
this.#abort = null;
|
|
41
|
+
this.notifyPending();
|
|
42
|
+
}
|
|
43
|
+
dispose() {
|
|
44
|
+
if (this.#disposed) return;
|
|
45
|
+
this.#disposed = true;
|
|
46
|
+
this.reset();
|
|
47
|
+
}
|
|
48
|
+
accept(requested, abort, report) {
|
|
49
|
+
if (abort.signal.aborted || this.#abort !== abort) return;
|
|
50
|
+
this.#abort = null;
|
|
51
|
+
if (!sameDocument(this.options.getDocument(), requested)) return;
|
|
52
|
+
if (report.kind === "unchanged") {
|
|
53
|
+
this.#resultId = report.resultId;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.#resultId = report.resultId ?? null;
|
|
57
|
+
this.options.publish(requested, report.items);
|
|
58
|
+
}
|
|
59
|
+
reject(abort, error) {
|
|
60
|
+
if (abort.signal.aborted || this.#abort !== abort) return;
|
|
61
|
+
this.#abort = null;
|
|
62
|
+
this.options.onRequestError(error);
|
|
63
|
+
}
|
|
64
|
+
notifyPending() {
|
|
65
|
+
const pending = this.#abort !== null;
|
|
66
|
+
if (pending === this.#pending) return;
|
|
67
|
+
this.#pending = pending;
|
|
68
|
+
this.options.onPendingChange?.(pending);
|
|
69
|
+
}
|
|
70
|
+
reset() {
|
|
71
|
+
this.cancel();
|
|
72
|
+
this.#resultId = null;
|
|
73
|
+
this.#uri = null;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
function diagnosticProvider(capabilities) {
|
|
77
|
+
const provider = capabilities?.diagnosticProvider;
|
|
78
|
+
if (!provider || typeof provider !== "object") return null;
|
|
79
|
+
return provider;
|
|
80
|
+
}
|
|
81
|
+
function diagnosticParams(uri, identifier, previousResultId) {
|
|
82
|
+
return {
|
|
83
|
+
textDocument: { uri },
|
|
84
|
+
...identifier ? { identifier } : {},
|
|
85
|
+
...previousResultId ? { previousResultId } : {}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function sameDocument(current, requested) {
|
|
89
|
+
return current?.uri === requested.uri && current.version === requested.version;
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { PullDiagnosticsController };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=pullDiagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pullDiagnostics.js","names":[],"sources":["../src/pullDiagnostics.ts"],"sourcesContent":["import type { LspClient } from '@singapore-editor/lsp'\nimport type * as lsp from 'vscode-languageserver-protocol'\n\nexport type PullDiagnosticsDocument = {\n readonly uri: lsp.DocumentUri\n readonly version: number\n}\n\nexport type PullDiagnosticsControllerOptions = {\n readonly client: LspClient\n getDocument(): PullDiagnosticsDocument | null\n publish(document: PullDiagnosticsDocument, diagnostics: readonly lsp.Diagnostic[]): void\n onRequestError(error: unknown): void\n /** A request started or settled; called after any result it brought was published. */\n onPendingChange?(pending: boolean): void\n}\n\n/** Keeps one active document's pull-diagnostic result current for one language-server lane. */\nexport class PullDiagnosticsController {\n #abort: AbortController | null = null\n #disposed = false\n #pending = false\n #resultId: string | null = null\n #uri: lsp.DocumentUri | null = null\n\n public constructor(private readonly options: PullDiagnosticsControllerOptions) {}\n\n public synchronize(): void {\n if (this.#disposed) return\n\n const document = this.options.getDocument()\n const provider = diagnosticProvider(this.options.client.serverCapabilities)\n if (!document || !provider) {\n this.reset()\n return\n }\n\n if (document.uri !== this.#uri) {\n this.#uri = document.uri\n this.#resultId = null\n }\n\n this.#abort?.abort()\n const abort = new AbortController()\n this.#abort = abort\n const params = diagnosticParams(document.uri, provider.identifier, this.#resultId)\n void this.options.client\n .request<lsp.DocumentDiagnosticReport>('textDocument/diagnostic', params, {\n signal: abort.signal,\n })\n .then(\n (report) => this.accept(document, abort, report),\n (error) => this.reject(abort, error),\n )\n .finally(() => this.notifyPending())\n this.notifyPending()\n }\n\n public get pending(): boolean {\n return this.#pending\n }\n\n public refresh(): void {\n this.synchronize()\n }\n\n public cancel(): void {\n this.#abort?.abort()\n this.#abort = null\n this.notifyPending()\n }\n\n public dispose(): void {\n if (this.#disposed) return\n\n this.#disposed = true\n this.reset()\n }\n\n private accept(\n requested: PullDiagnosticsDocument,\n abort: AbortController,\n report: lsp.DocumentDiagnosticReport,\n ): void {\n if (abort.signal.aborted || this.#abort !== abort) return\n\n this.#abort = null\n const current = this.options.getDocument()\n if (!sameDocument(current, requested)) return\n\n if (report.kind === 'unchanged') {\n this.#resultId = report.resultId\n return\n }\n\n this.#resultId = report.resultId ?? null\n this.options.publish(requested, report.items)\n }\n\n private reject(abort: AbortController, error: unknown): void {\n if (abort.signal.aborted || this.#abort !== abort) return\n\n this.#abort = null\n this.options.onRequestError(error)\n }\n\n private notifyPending(): void {\n const pending = this.#abort !== null\n if (pending === this.#pending) return\n this.#pending = pending\n this.options.onPendingChange?.(pending)\n }\n\n private reset(): void {\n this.cancel()\n this.#resultId = null\n this.#uri = null\n }\n}\n\nfunction diagnosticProvider(\n capabilities: lsp.ServerCapabilities | null,\n): lsp.DiagnosticOptions | null {\n const provider = capabilities?.diagnosticProvider\n if (!provider || typeof provider !== 'object') return null\n return provider\n}\n\nfunction diagnosticParams(\n uri: lsp.DocumentUri,\n identifier: string | undefined,\n previousResultId: string | null,\n): lsp.DocumentDiagnosticParams {\n return {\n textDocument: { uri },\n ...(identifier ? { identifier } : {}),\n ...(previousResultId ? { previousResultId } : {}),\n }\n}\n\nfunction sameDocument(\n current: PullDiagnosticsDocument | null,\n requested: PullDiagnosticsDocument,\n): boolean {\n return current?.uri === requested.uri && current.version === requested.version\n}\n"],"mappings":";;AAkBA,IAAa,4BAAb,MAAuC;CAOD;CANpC,SAAiC;CACjC,YAAY;CACZ,WAAW;CACX,YAA2B;CAC3B,OAA+B;CAE/B,YAAmB,SAA4D;EAA3C,KAAA,UAAA;CAA4C;CAEhF,cAA2B;EACzB,IAAI,KAAK,WAAW;EAEpB,MAAM,WAAW,KAAK,QAAQ,YAAY;EAC1C,MAAM,WAAW,mBAAmB,KAAK,QAAQ,OAAO,kBAAkB;EAC1E,IAAI,CAAC,YAAY,CAAC,UAAU;GAC1B,KAAK,MAAM;GACX;EACF;EAEA,IAAI,SAAS,QAAQ,KAAK,MAAM;GAC9B,KAAK,OAAO,SAAS;GACrB,KAAK,YAAY;EACnB;EAEA,KAAK,QAAQ,MAAM;EACnB,MAAM,QAAQ,IAAI,gBAAgB;EAClC,KAAK,SAAS;EACd,MAAM,SAAS,iBAAiB,SAAS,KAAK,SAAS,YAAY,KAAK,SAAS;EACjF,KAAU,QAAQ,OACf,QAAsC,2BAA2B,QAAQ,EACxE,QAAQ,MAAM,OAChB,CAAC,CAAC,CACD,MACE,WAAW,KAAK,OAAO,UAAU,OAAO,MAAM,IAC9C,UAAU,KAAK,OAAO,OAAO,KAAK,CACrC,CAAC,CACA,cAAc,KAAK,cAAc,CAAC;EACrC,KAAK,cAAc;CACrB;CAEA,IAAW,UAAmB;EAC5B,OAAO,KAAK;CACd;CAEA,UAAuB;EACrB,KAAK,YAAY;CACnB;CAEA,SAAsB;EACpB,K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document: Document;
|
|
3
|
+
/** Element whose computed style carries the editor theme variables. */
|
|
4
|
+
readonly themeSource: HTMLElement;
|
|
5
|
+
readonly classNamespace?: string;
|
|
6
|
+
/** Called when the prompt closes while it holds focus, which hiding it would otherwise strand. */
|
|
7
|
+
readonly returnFocus?: () => void;
|
|
8
|
+
};
|
|
9
|
+
type RenameWidgetPrompt = {
|
|
10
|
+
readonly anchor: DOMRect;
|
|
11
|
+
readonly currentName: string;
|
|
12
|
+
readonly signal: AbortSignal;
|
|
13
|
+
};
|
|
14
|
+
export type RenameWidgetController = {
|
|
15
|
+
/** Shows the input and resolves with the new name, or null when dismissed. */
|
|
16
|
+
prompt(options: RenameWidgetPrompt): Promise<string | null>;
|
|
17
|
+
/** Moves an open prompt to where the symbol is drawn now. */
|
|
18
|
+
reanchor(anchor: DOMRect): void;
|
|
19
|
+
containsTarget(target: EventTarget | null): boolean;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The editor's own rename input: a small floating field anchored at the symbol.
|
|
24
|
+
*
|
|
25
|
+
* It exists so the engine is usable on its own. A host with its own dialog language passes
|
|
26
|
+
* `onRequestRenameName` instead and this is never built.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createRenameWidgetController(options: RenameWidgetOptions): RenameWidgetController;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=renameWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renameWidget.d.ts","sourceRoot":"","sources":["../src/renameWidget.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,kGAAkG;IAClG,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CAClC,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,8EAA8E;IAC9E,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC3D,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;IAC/B,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAAA;IACnD,OAAO,IAAI,IAAI,CAAA;CAChB,CAAA;AAkBD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,mBAAmB,GAAG,sBAAsB,CA2FjG"}
|