Файли
openidea/docs/data-directories.md
T
LU XIANGRUIтаLU XIANGRUI 5f970d97d5 feat(data): move rebuildable local data with OPENIDEA_LOCAL_DATA_DIR (#2373)
- The local data directory (tools, language servers, index caches) is resolved in one place, ide_host::data_dirs::local_data_dir
- The variable must be an absolute path; a missing directory is created, and an unwritable one exits with an error instead of falling back to the system default
- Config and log directories still follow the system
- Add docs/data-directories.md

Co-authored-by: LU XIANGRUI <[email protected]>
2026-11-09 23:01:11 +08:00

1.1 KiB

Data directories

OpenIDEA keeps its rebuildable data, such as downloaded tools, language servers, JDKs and index caches, in the operating system's local data directory:

  • Windows: %LOCALAPPDATA%\ai.l0ng.openidea
  • macOS: ~/Library/Application Support/ai.l0ng.openidea
  • Linux: ~/.local/share/ai.l0ng.openidea

To keep this data elsewhere, for example on another drive, set OPENIDEA_LOCAL_DATA_DIR to an absolute path before starting OpenIDEA. The IDE then uses <OPENIDEA_LOCAL_DATA_DIR>/ai.l0ng.openidea and creates it when missing. If the path is relative or cannot be written, OpenIDEA shows an error and exits instead of falling back to the default location.

setx OPENIDEA_LOCAL_DATA_DIR "E:\OpenIDEA"

Settings, plugins, scratches and other user data stay in the operating system's data and configuration directories. Logs stay in their usual location, so they are still written when the variable is wrong. Existing data is not moved: quit OpenIDEA and move the old directory's contents to the new location, or let the IDE download tools and rebuild indexes again.