Skip to content

Commit

Permalink
Prettify in all other files
Browse files Browse the repository at this point in the history
  • Loading branch information
skakker committed Sep 20, 2023
1 parent 5505c4b commit df14ca2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
5 changes: 4 additions & 1 deletion packages/completion-theme/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export class CompletionThemeManager implements ILSPCompletionThemeManager {
private icon_overrides: Map<string, CompletionItemKindStrings>;
private trans: TranslationBundle;

constructor(protected themeManager: IThemeManager, trans: TranslationBundle) {
constructor(
protected themeManager: IThemeManager,
trans: TranslationBundle
) {
this.themes = new Map();
this.icons_cache = new Map();
this.icon_overrides = new Map();
Expand Down
5 changes: 4 additions & 1 deletion packages/jupyterlab-lsp/src/adapters/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ export abstract class WidgetAdapter<T extends IDocumentWidget> {
// note: it could be using namespace/IOptions pattern,
// but I do not know how to make it work with the generic type T
// (other than using 'any' in the IOptions interface)
protected constructor(protected extension: ILSPExtension, public widget: T) {
protected constructor(
protected extension: ILSPExtension,
public widget: T
) {
this.app = extension.app;
this.connection_manager = extension.connection_manager;
this.adapterConnected = new Signal(this);
Expand Down
16 changes: 8 additions & 8 deletions packages/jupyterlab-lsp/src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ export interface IClientResult {
export type ServerNotifications<
T extends keyof IServerNotifyParams = keyof IServerNotifyParams
> = {
readonly // ISignal does not have emit, which is intended - client cannot emit server notifications.
[key in T]: ISignal<LSPConnection, IServerNotifyParams[key]>;
// ISignal does not have emit, which is intended - client cannot emit server notifications.
readonly [key in T]: ISignal<LSPConnection, IServerNotifyParams[key]>;
};

export type ClientNotifications<
T extends keyof IClientNotifyParams = keyof IClientNotifyParams
> = {
readonly // Signal has emit.
[key in T]: Signal<LSPConnection, IClientNotifyParams[key]>;
// Signal has emit.
readonly [key in T]: Signal<LSPConnection, IClientNotifyParams[key]>;
};

export interface IClientRequestHandler<
Expand All @@ -173,15 +173,15 @@ export interface IServerRequestHandler<
export type ClientRequests<
T extends keyof IClientRequestParams = keyof IClientRequestParams
> = {
readonly // has async request(params) returning a promise with result.
[key in T]: IClientRequestHandler<key>;
// has async request(params) returning a promise with result.
readonly [key in T]: IClientRequestHandler<key>;
};

export type ServerRequests<
T extends keyof IServerRequestParams = keyof IServerRequestParams
> = {
readonly // has async request(params) returning a promise with result.
[key in T]: IServerRequestHandler<key>;
// has async request(params) returning a promise with result.
readonly [key in T]: IServerRequestHandler<key>;
};

class ClientRequestHandler<
Expand Down
5 changes: 4 additions & 1 deletion packages/jupyterlab-lsp/src/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export class FeatureSettings<T> implements IFeatureSettings<T> {
public changed: Signal<FeatureSettings<T>, void>;
private _ready = new PromiseDelegate<void>();

constructor(protected settingRegistry: ISettingRegistry, featureID: string) {
constructor(
protected settingRegistry: ISettingRegistry,
featureID: string
) {
this.changed = new Signal(this);
if (!(featureID in settingRegistry.plugins)) {
this._ready.reject(
Expand Down
7 changes: 4 additions & 3 deletions packages/jupyterlab-lsp/src/features/jump_to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,10 @@ const COMMANDS = (trans: TranslationBundle): IFeatureCommand[] => [
character: virtual_position.ch
}
};
const targets = await connection.clientRequests[
'textDocument/definition'
].request(positionParams);
const targets =
await connection.clientRequests['textDocument/definition'].request(
positionParams
);
await jumpFeature.handleJump(targets, positionParams);
},
is_enabled: ({ connection }) =>
Expand Down

0 comments on commit df14ca2

Please sign in to comment.