Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove deno/applyCodeActionCommand #315

Merged
merged 1 commit into from
Feb 4, 2021
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
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