2016-06-12 1 views
7

Я хотел бы, чтобы мои файлы конфигурации IntelliJ в моем репо, но точечных файлов мой ~/.IntelliJIdea2016.1 вес папки> 1.3G :(Какие файлы конфигурации IntelliJ следует сохранять в моих dotfiles?

~/.IntelliJIdea2016.1/config/ еще веса> 215m ...

~/.IntelliJIdea2016.1/config/plugins/ содержит много двоичных файлов ... не лучшие кандидаты для точечных файлов :(

Любой пытался сохранить IntelliJ конфигурации без опции Export/Import settings меню?

ответ

0

К сожалению, это не так просто. Папки конфигурации пользователя плохо документированы и исторически включали кучу стандартного мусора, который медленно удаляется (см. https://youtrack.jetbrains.com/issue/IDEA-128660 и https://youtrack.jetbrains.com/issue/IDEA-163616). Документация файлов настроек также очень плохая; мой запрос об улучшении был отклонен https://youtrack.jetbrains.com/issue/IDEA-154157).

I версия контроль мои настройки. Если вы запрашиваете доступ, вы можете увидеть его на https://gitlab.com/jcrben-staples/dotfiles-group/dotfiles/tree/master/config/intellij-idea-latest с нотами по адресу https://gitlab.com/jcrben-staples/dotfiles-group/dotfiles/tree/master/config/intellij-idea-latest/MY_CONFIG_DOCS.md).

Я установил свой .gitignore, чтобы игнорировать все по умолчанию, а затем я переименовываю файлы, которые я хочу. С IntelliJ я не знал, с чего начать, поэтому я выделил всю папку и затем занес в черный список кучу файлов.

Мой черный список точно не отвечает на ваш вопрос о файлах включает, но это дает вам представление о том, что исключить. Я попытаюсь обновить это, если я выясню, какие из них включить в какой-то момент, но это мишмарт из файлов плагинов и т. Д.

Прямо сейчас черный список выглядит примерно так:

# IntelliJ IDEA stuff 
    .idea 
    !config/intellij-idea-latest/** 
    !projects/bi-idea/workspace.xml 

    # statistics files 
    config/intellij-idea-latest/options/statistics* 
    config/intellij-idea-latest/options/feature.usage.statistics.xml 
    config/intellij-idea-latest/options/usage.statistics.xml 
    config/intellij-idea-latest/options/statistics.application.usages.xml 

    # user files ?? 
    config/intellij-idea-latest/user* 

    # other 
    config/intellij-idea-latest/options/atlassian-ide-plugin.app.xml 
    config/intellij-idea-latest/options/cachedDictionary.xml 
    config/intellij-idea-latest/options/customization.xml 
    # has my autobracket disable 
    config/intellij-idea-latest/options/CodeGlance.xml 
    # config/intellij-idea/options/editor.codeinsight.xml 
    config/intellij-idea-latest/options/databaseDrivers.xml 
    config/intellij-idea-latest/options/debugger.xml 
    config/intellij-idea-latest/options/dimensions.xml 
    config/intellij-idea-latest/options/extensionsRootType.xml 
    config/intellij-idea-latest/options/filetypes.xml 
    config/intellij-idea-latest/options/find.xml 
    config/intellij-idea-latest/options/find.recents.xml 
    config/intellij-idea-latest/options/jdk.table.xml 
    config/intellij-idea-latest/options/gemmanager.xml 
    config/intellij-idea-latest/options/github_settings.xml 
    config/intellij-idea-latest/options/gradle.run.settings.xml 
    config/intellij-idea-latest/options/extensionsRootType.xml 
    config/intellij-idea-latest/options/hg.xml 
    config/intellij-idea-latest/options/ignore.xml 
    config/intellij-idea-latest/options/markdown.xml 
    config/intellij-idea-latest/options/multimarkdown.local.xml 
    config/intellij-idea-latest/options/multimarkdown.shared.xml 
    config/intellij-idea-latest/options/options.xml 
    config/intellij-idea-latest/options/other.xml 
    config/intellij-idea-latest/options/packages.xml 
    config/intellij-idea-latest/options/pomodoro.state.xml 
    config/intellij-idea-latest/options/project.default.xml 
    config/intellij-idea-latest/options/proxy.settings.pwd 
    config/intellij-idea-latest/options/recentProjects.xml 
    config/intellij-idea-latest/options/recentProjectDirectories.xml 
    config/intellij-idea-latest/options/remote-servers.xml 
    config/intellij-idea-latest/options/runner.layout.xml 
    config/intellij-idea-latest/options/scratches.xml 
    config/intellij-idea-latest/options/stubIndex.xml 
    config/intellij-idea-latest/options/updates.xml 
    config/intellij-idea-latest/options/usageView.xml 
    config/intellij-idea-latest/options/vcs.xml 
    config/intellij-idea-latest/options/window.manager.xml 
    config/intellij-idea-latest/options/window.state.xml 

    # turn off those auto-update messages... 
    config/intellij-idea-latest/port 
    config/intellij-idea-latest/plugins/* 
    config/intellij-idea-latest/tasks/* 
    config/intellij-idea-latest/extensions/ 
    config/intellij-idea-latest/jdbc-drivers/* 

    # region START UNIGNORE IntelliJ 
    !config/intellij-idea-latest/scratches/ 
    !config/intellij-idea-latest/consoles/ 
    config/intellij-idea-latest/consoles/.history/* 

    # General settings 
    # config/intellij-idea-latest/sonarlint/ 
    config/intellij-idea-latest/javascript/nodejs/** 
    # config/intellij-idea-latest/options/editor.codeinsight.xml # has my autobracket disable 
    # endregion END UNIGNORE Intellij 

Это оставляет значительное количество файлов, которые не в черном списке - плюс я симлинок мои .idea файлов иногда и контроль версий этих параметры, хотя workspace.xml имеет много и он постоянно меняется (см. https://youtrack.jetbrains.com/issue/IDEA-163348).

Также следите за кнопками «Поделиться», как показано на рисунке ниже, поскольку они, похоже, контролируют, является ли параметр общим для конфигурации.

enter image description here

Самый элегантный набор для конфигурации настроек происходит от VSCode - надеюсь, в какой-то момент JetBrains будет понять это и скопировать их:

enter image description here