From f811f2c1ed52d507fec8d17d5c955b4e0d739754 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 15 Jun 2026 16:28:55 +0200 Subject: [PATCH] Fixes #1795 --- client/src/common/client.ts | 4 ++-- server/src/common/api.ts | 9 ++------- ...nlineCompletion.proposed.ts => inlineCompletion.ts} | 0 server/src/common/server.ts | 10 ++++++---- 4 files changed, 10 insertions(+), 13 deletions(-) rename server/src/common/{inlineCompletion.proposed.ts => inlineCompletion.ts} (100%) diff --git a/client/src/common/client.ts b/client/src/common/client.ts index ea2016134..7eb374e25 100644 --- a/client/src/common/client.ts +++ b/client/src/common/client.ts @@ -2054,6 +2054,8 @@ export abstract class BaseLanguageClient implements FeatureClient): (StaticFeature | DynamicFeature)[] { const result: (StaticFeature | DynamicFeature)[] = [ - new InlineCompletionItemFeature(_client), - new TextDocumentContentFeature(_client) ]; return result; } diff --git a/server/src/common/api.ts b/server/src/common/api.ts index 5bf884dec..74bd7f07d 100644 --- a/server/src/common/api.ts +++ b/server/src/common/api.ts @@ -7,9 +7,6 @@ import { _, Features, _Connection, _LanguagesImpl } from './server'; import { SemanticTokensBuilder } from './semanticTokens'; import type { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter } from './progress'; -import * as ic from './inlineCompletion.proposed'; -import * as tdc from './textDocumentContent'; - export * from 'vscode-languageserver-protocol'; export { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter }; export { SemanticTokensBuilder }; @@ -20,11 +17,9 @@ export { NotebookDocuments }; export * from './server'; export namespace ProposedFeatures { - export const all: Features<_, _, _, _, _, tdc.TextDocumentContentFeatureShape, ic.InlineCompletionFeatureShape, _> = { + export const all: Features<_, _, _, _, _, _, _, _> = { __brand: 'features', - workspace: tdc.TextDocumentContentFeature, - languages: ic.InlineCompletionFeature }; - export type Connection = _Connection<_, _, _, _, _, tdc.TextDocumentContentFeatureShape, ic.InlineCompletionFeatureShape, _>; + export type Connection = _Connection<_, _, _, _, _, _, _, _>; } \ No newline at end of file diff --git a/server/src/common/inlineCompletion.proposed.ts b/server/src/common/inlineCompletion.ts similarity index 100% rename from server/src/common/inlineCompletion.proposed.ts rename to server/src/common/inlineCompletion.ts diff --git a/server/src/common/server.ts b/server/src/common/server.ts index 0989bcfee..9f68da04b 100644 --- a/server/src/common/server.ts +++ b/server/src/common/server.ts @@ -47,6 +47,8 @@ import { DiagnosticFeatureShape, DiagnosticFeature } from './diagnostic'; import { NotebookSyncFeatureShape, NotebookSyncFeature } from './notebook'; import { MonikerFeature, MonikerFeatureShape } from './moniker'; import type { ConnectionState } from './textDocuments'; +import { InlineCompletionFeature, type InlineCompletionFeatureShape } from './inlineCompletion'; +import { TextDocumentContentFeature, type TextDocumentContentFeatureShape } from './textDocumentContent'; function null2Undefined(value: T | null): T | undefined { if (value === null) { @@ -644,7 +646,7 @@ export interface _RemoteWorkspace extends FeatureBase { applyEdit(paramOrEdit: ApplyWorkspaceEditParams | WorkspaceEdit): Promise; } -export type RemoteWorkspace = _RemoteWorkspace & Configuration & WorkspaceFolders & FileOperationsFeatureShape; +export type RemoteWorkspace = _RemoteWorkspace & Configuration & WorkspaceFolders & FileOperationsFeatureShape & TextDocumentContentFeatureShape; class _RemoteWorkspaceImpl implements _RemoteWorkspace, Remote { @@ -680,7 +682,7 @@ class _RemoteWorkspaceImpl implements _RemoteWorkspace, Remote { } } -const RemoteWorkspaceImpl: new () => RemoteWorkspace = FileOperationsFeature(WorkspaceFoldersFeature(ConfigurationFeature(_RemoteWorkspaceImpl))) as (new () => RemoteWorkspace); +const RemoteWorkspaceImpl: new () => RemoteWorkspace = TextDocumentContentFeature(FileOperationsFeature(WorkspaceFoldersFeature(ConfigurationFeature(_RemoteWorkspaceImpl)))) as (new () => RemoteWorkspace); /** * Interface to log telemetry events. The events are actually send to the client @@ -830,8 +832,8 @@ export class _LanguagesImpl implements Remote, _Languages { } } -export type Languages = _Languages & CallHierarchy & SemanticTokensFeatureShape & LinkedEditingRangeFeatureShape & TypeHierarchyFeatureShape & InlineValueFeatureShape & InlayHintFeatureShape & DiagnosticFeatureShape & MonikerFeatureShape & FoldingRangeFeatureShape; -const LanguagesImpl: new () => Languages = FoldingRangeFeature(MonikerFeature(DiagnosticFeature(InlayHintFeature(InlineValueFeature(TypeHierarchyFeature(LinkedEditingRangeFeature(SemanticTokensFeature(CallHierarchyFeature(_LanguagesImpl))))))))) as (new () => Languages); +export type Languages = _Languages & CallHierarchy & SemanticTokensFeatureShape & LinkedEditingRangeFeatureShape & TypeHierarchyFeatureShape & InlineValueFeatureShape & InlayHintFeatureShape & DiagnosticFeatureShape & MonikerFeatureShape & FoldingRangeFeatureShape & InlineCompletionFeatureShape; +const LanguagesImpl: new () => Languages = InlineCompletionFeature(FoldingRangeFeature(MonikerFeature(DiagnosticFeature(InlayHintFeature(InlineValueFeature(TypeHierarchyFeature(LinkedEditingRangeFeature(SemanticTokensFeature(CallHierarchyFeature(_LanguagesImpl)))))))))) as (new () => Languages); export interface _Notebooks extends FeatureBase { connection: Connection;