Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

906 B
Raw Blame
/**
 * Run Anything (⌃⌃, IDEA's RunAnything): one popup to run a shell command in
 * the project directory, a run configuration or a build tool goal. Features
 * add entries with `registerRunAnythingProvider`.
 */
import { registerActions } from "@/platform/actions";
import { registerOverlay } from "@/workbench/contributions";
import { RunAnythingHost, showRunAnything } from "./RunAnything";

export function activate(): () => void {
  const disposers = [
    registerOverlay({ id: "runAnything.popup", component: RunAnythingHost }),
    registerActions([
      {
        id: "runAnything.show",
        title: "Run Anything…",
        category: "Run",
        icon: "run-anything",
        keywords: ["command", "shell", "execute", "npm", "mvn", "gradle"],
        when: "projectOpen",
        run: showRunAnything,
      },
    ]),
  ];
  return () => disposers.reverse().forEach((d) => d());
}