Skip to content

Commit

Permalink
fix: remove deno/applyCodeActionCommand (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk authored Feb 4, 2021
1 parent b1a069b commit 3ed17f7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
14 changes: 1 addition & 13 deletions client/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import {
workspace,
} from "vscode";
import { LanguageClient, Location, Position } from "vscode-languageclient";
import {
applyCodeAction as applyCodeActionReq,
cache as cacheReq,
} from "./lsp_extensions";
import { cache as cacheReq } from "./lsp_extensions";

// deno-lint-ignore no-explicit-any
export type Callback = (...args: any[]) => unknown;
Expand All @@ -24,15 +21,6 @@ export type Factory = (
client: LanguageClient,
) => Callback;

export function applyCodeAction(
_context: ExtensionContext,
client: LanguageClient,
): Callback {
// deno-lint-ignore ban-types
return (arg: { commands: {}[] }) =>
client.sendRequest(applyCodeActionReq, arg);
}

/** For the current document active in the editor tell the Deno LSP to cache
* the file and all of its dependencies in the local cache. */
export function cache(
Expand Down
1 change: 0 additions & 1 deletion client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export async function activate(

// Register any commands.
const registerCommand = createRegisterCommand(context);
registerCommand("applyCodeAction", commands.applyCodeAction);
registerCommand("cache", commands.cache);
registerCommand("showReferences", commands.showReferences);
registerCommand("status", commands.status);
Expand Down
11 changes: 0 additions & 11 deletions client/src/lsp_extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@
import { RequestType } from "vscode-languageclient";
import type { TextDocumentIdentifier } from "vscode-languageclient";

export interface ApplyCodeActionCommandsParams {
// deno-lint-ignore ban-types
commands: {}[];
}

export const applyCodeAction = new RequestType<
ApplyCodeActionCommandsParams,
void,
void
>("deno/applyCodeAction");

export interface CacheParams {
textDocument: TextDocumentIdentifier;
}
Expand Down

0 comments on commit 3ed17f7

Please sign in to comment.