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.

6.7 KB
Raw Blame
import { LanguageServerTargetsPage } from "../languages/LanguageServerTarget";
import { PluginFormattersPage } from "../languages/PluginFormattersPage";
/**
 * PyCharm's top-level "Python" group (Interpreter), "Project Structure", and
 * Languages & Frameworks › Go / Java / Markdown / Node.js / PHP / Rust / TypeScript. Pages live in
 * `../languages/`; settings are `languages.*` / `projectStructure.*`.
 */
import { GoPage, JavaPage, NodePage, PhpPage, RubyPage, RustPage, TypeScriptPage } from "../languages/LanguagePages";
import { MarkdownPage } from "../languages/MarkdownPage";
import { OxfmtPage, PrettierPage, RuffPage } from "../languages/FormatterPage";
import { ProjectStructurePage } from "../languages/ProjectStructurePage";
import { PythonInterpreterPage } from "../languages/PythonInterpreterPage";
import { GoBuildTagsPage, GO_BUILD_TAG_SECTIONS } from "../languages/GoBuildTags";
import { GoModulesPage, GO_MODULE_SECTIONS } from "../languages/GoModules";
import type { PageSpec } from "./spec";

export const LANGUAGES_GROUP = "Languages & Frameworks";

export const LANGUAGE_PAGES: PageSpec[] = [
  {
    id: "languages.serverTargets",
    title: "Language server targets",
    group: LANGUAGES_GROUP,
    projectScope: true,
    defaultScope: "project",
    order: 451,
    keywords: ["lsp", "container", "target"],
    component: LanguageServerTargetsPage,
  },
  {
    id: "languages.pluginFormatters",
    title: "Plugin Formatters",
    group: LANGUAGES_GROUP,
    projectScope: true,
    order: 450,
    keywords: ["format", "plugins"],
    component: PluginFormattersPage,
  },
  {
    id: "python.interpreter",
    projectScope: true,
    defaultScope: "project",
    title: "Python Interpreter",
    group: LANGUAGES_GROUP,
    order: 403,
    keywords: [
      "python interpreter",
      "sdk",
      "virtualenv",
      "venv",
      "conda",
      "pyenv",
      "packages",
      "pip",
      "install package",
      "add interpreter",
      "activate virtualenv",
      "docstrings",
      "documentation string format",
      "reStructuredText",
      "Epytext",
      "NumPy",
      "Google",
    ],
    component: PythonInterpreterPage,
  },
  {
    id: "projectStructure",
    title: "Project Structure",
    // IntelliJ IDEA order: … Version Control, Project Structure, Build, Execution, Deployment, Languages & Frameworks …
    order: 350,
    keywords: [
      "project structure",
      "content root",
      "sources root",
      "test sources",
      "resources",
      "excluded",
      "mark directory as",
      "project sdk",
      "language level",
      "modules",
      "libraries",
      "facets",
      "artifacts",
      "sdks",
    ],
    component: ProjectStructurePage,
  },
  {
    id: "languages.go",
    projectScope: true,
    defaultScope: "project",
    title: "Go",
    group: LANGUAGES_GROUP,
    order: 390,
    keywords: ["goroot", "gopath", "go sdk", "gopls"],
    component: GoPage,
  },
  {
    id: "languages.go.buildTags",
    title: "Build Tags",
    group: LANGUAGES_GROUP,
    order: 391,
    projectScope: true,
    defaultScope: "project",
    ownScopeSwitch: true,
    sections: GO_BUILD_TAG_SECTIONS,
    component: GoBuildTagsPage,
  },
  {
    id: "languages.go.modules",
    title: "Go Modules",
    group: LANGUAGES_GROUP,
    order: 392,
    projectScope: true,
    defaultScope: "project",
    ownScopeSwitch: true,
    sections: GO_MODULE_SECTIONS,
    component: GoModulesPage,
  },
  {
    id: "languages.java",
    projectScope: true,
    defaultScope: "project",
    title: "Java",
    group: LANGUAGES_GROUP,
    order: 395,
    keywords: [
      "jdk",
      "project sdk",
      "java home",
      "jdtls",
      "language server jdk",
      "jdk for importer",
      "jvm options",
      "vmargs",
      "lombok",
      "javaagent",
      "eclipse jdt",
      "shared jdtls",
      "linked builds",
      "server process",
    ],
    component: JavaPage,
  },
  {
    id: "languages.node",
    projectScope: true,
    defaultScope: "project",
    title: "Node.js",
    group: LANGUAGES_GROUP,
    order: 402,
    keywords: ["node interpreter", "package manager", "npm", "pnpm", "yarn", "bun", "nvm"],
    component: NodePage,
  },
  {
    // Global only, like IDEA's application-level Markdown settings.
    id: "languages.markdown",
    title: "Markdown",
    group: LANGUAGES_GROUP,
    order: 400,
    keywords: ["markdown", "preview", "font size", "jupyter", "notebook"],
    component: MarkdownPage,
  },
  {
    id: "languages.prettier",
    projectScope: true,
    defaultScope: "project",
    title: "Prettier",
    group: LANGUAGES_GROUP,
    order: 403.5,
    keywords: ["formatter", "prettier", "markdown", "yaml", "css", "format on save", "node_modules"],
    component: PrettierPage,
  },
  {
    id: "languages.oxfmt",
    projectScope: true,
    defaultScope: "project",
    title: "oxfmt",
    group: LANGUAGES_GROUP,
    order: 403.6,
    keywords: ["formatter", "oxfmt", "oxc", ".oxfmtrc.json", "format on save", "node_modules"],
    component: OxfmtPage,
  },
  {
    id: "languages.ruff",
    projectScope: true,
    defaultScope: "project",
    title: "Ruff",
    group: LANGUAGES_GROUP,
    order: 403.7,
    keywords: [
      "formatter",
      "ruff",
      "python",
      "configuration directory",
      "pyproject.toml",
      "ruff.toml",
      "format on save",
    ],
    component: RuffPage,
  },
  {
    id: "languages.php",
    projectScope: true,
    defaultScope: "project",
    title: "PHP",
    group: LANGUAGES_GROUP,
    order: 403.2,
    keywords: [
      "php interpreter",
      "cli interpreter",
      "language level",
      "php version",
      "xdebug",
      "php",
      "composer",
      "phpunit",
      "phpstan",
      "phpstan.neon",
      "xampp",
      "herd",
      "homebrew",
      "phpbrew",
    ],
    component: PhpPage,
  },
  {
    id: "languages.ruby",
    projectScope: true,
    defaultScope: "project",
    title: "Ruby",
    group: LANGUAGES_GROUP,
    order: 403.8,
    keywords: ["ruby interpreter", "rbenv", "rvm", "chruby", "bundler", "gems", "rake", "rspec"],
    component: RubyPage,
  },
  {
    id: "languages.rust",
    projectScope: true,
    defaultScope: "project",
    title: "Rust",
    group: LANGUAGES_GROUP,
    order: 404,
    keywords: [
      "toolchain",
      "rustup",
      "standard library",
      "external linter",
      "clippy",
      "cargo check",
      "rustfmt",
      "rust-analyzer",
    ],
    component: RustPage,
  },
  {
    id: "languages.typescript",
    projectScope: true,
    defaultScope: "project",
    title: "TypeScript",
    group: LANGUAGES_GROUP,
    order: 405,
    keywords: ["typescript version", "tsdk", "tsserver", "node_modules", "vtsls"],
    component: TypeScriptPage,
  },
];