Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/common/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,8 @@ export abstract class BaseLanguageClient implements FeatureClient<Middleware, La
this.registerFeature(new InlayHintsFeature(this));
this.registerFeature(new DiagnosticFeature(this));
this.registerFeature(new NotebookDocumentSyncFeature(this));
this.registerFeature(new InlineCompletionItemFeature(this));
this.registerFeature(new TextDocumentContentFeature(this));
}

public registerProposedFeatures() {
Expand Down Expand Up @@ -2522,8 +2524,6 @@ function createConnection(input: MessageReader, output: MessageWriter, errorHand
export namespace ProposedFeatures {
export function createAll(_client: FeatureClient<Middleware, LanguageClientOptions>): (StaticFeature | DynamicFeature<any>)[] {
const result: (StaticFeature | DynamicFeature<any>)[] = [
new InlineCompletionItemFeature(_client),
new TextDocumentContentFeature(_client)
];
return result;
}
Expand Down
9 changes: 2 additions & 7 deletions server/src/common/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand All @@ -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<_, _, _, _, _, _, _, _>;
}
10 changes: 6 additions & 4 deletions server/src/common/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(value: T | null): T | undefined {
if (value === null) {
Expand Down Expand Up @@ -644,7 +646,7 @@ export interface _RemoteWorkspace extends FeatureBase {
applyEdit(paramOrEdit: ApplyWorkspaceEditParams | WorkspaceEdit): Promise<ApplyWorkspaceEditResponse>;
}

export type RemoteWorkspace = _RemoteWorkspace & Configuration & WorkspaceFolders & FileOperationsFeatureShape;
export type RemoteWorkspace = _RemoteWorkspace & Configuration & WorkspaceFolders & FileOperationsFeatureShape & TextDocumentContentFeatureShape;

class _RemoteWorkspaceImpl implements _RemoteWorkspace, Remote {

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down