🌐
GitHub
github.com › google › styleguide › blob › gh-pages › intellij-java-google-style.xml
styleguide/intellij-java-google-style.xml at gh-pages · google/styleguide
<codeStyleSettings language="JAVA"> <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" /> <option name="KEEP_BLANK_LINES_IN_CODE" value="1" /> <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" /> <option name="ALIGN_MULTILINE_PARAMETERS" value="false" /> <option name="ALIGN_MULTILINE_RESOURCES" value="false" /> <option name="ALIGN_MULTILINE_FOR" value="false" /> <option name="CALL_PARAMETERS_WRAP" value="1" /> <option name="METHOD_PARAMETERS_WRAP" value="1" /> <option name="EXTENDS_LIST_WRAP" value="1" /> <option name="THROWS_KEYWORD_W
Author: google
🌐
GitHub
github.com › google › google-java-format
GitHub - google/google-java-format: Reformats Java source code to comply with Google Java Style. · GitHub
August 14, 2026 - This is a deliberate design decision to unify our code formatting on a single format. A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and ...
Author: google
🌐
GitHub
github.com › pmendelski › intellij-codestyle
GitHub - pmendelski/intellij-codestyle: Google based java code style for IntelliJ
This repository provides two code style schemes for IntelliJ (required version >= 2017.1) GoogleStyle - Close copy of Google Java style guide
Starred by 6 users
Forked by 5 users
🌐
GitHub
raw.githubusercontent.com › google › styleguide › gh-pages › intellij-java-google-style.xml
<?xml version="1.0" encoding="UTF-8"?> <code_scheme name="GoogleStyle">
<?xml version="1.0" encoding="UTF-8"?> <code_scheme name="GoogleStyle"> <option name="OTHER_INDENT_OPTIONS"> <value> <option name="INDENT_SIZE" value="2" /> <option name="CONTINUATION_INDENT_SIZE" value="4" /> <option name="TAB_SIZE" value="2" /> <option name="USE_TAB_CHARACTER" value="false" ...
🌐
GitHub
github.com › going-magic › google-java-style-intellij
GitHub - going-magic/google-java-style-intellij: Installing the coding style settings in Intellij
Download the intellij-java-google-style.xml file from the http://code.google.com/p/google-styleguide/ repository.
Author: going-magic
🌐
Medium
medium.com › swlh › configuring-google-style-guide-for-java-for-intellij-c727af4ef248
Configuring Google Style Guide for Java for IntelliJ | by Reed Odeneal | The Startup | Medium
November 16, 2020 - Next to the Scheme drop-down menu select the gear icon then Import Scheme > IntelliJ IDEA code style XML then select the intellij-java-google-style.xml file you downloaded from GitHub.
Author: frellan
🌐
Google
google.github.io › styleguide › intellij-java-google-style.xml
intellij-java-google-style.xml
xmlns:android · xmlns:.* · BY_NAME · *:id · http://schemas.android.com/apk/res/android · style · *:.*Style
Find elsewhere
🌐
GitHub
github.com › darcyliu › google-styleguide › blob › master › intellij-java-google-style.xml
google-styleguide/intellij-java-google-style.xml at master · darcyliu/google-styleguide
<code_scheme name="GoogleStyle"> <option name="JAVA_INDENT_OPTIONS"> <value> <option name="INDENT_SIZE" value="2" /> <option name="CONTINUATION_INDENT_SIZE" value="4" /> <option name="TAB_SIZE" value="8" /> <option name="USE_TAB_CHARACTER" value="false" /> <option name="SMART_TABS" value="false" /> <option name="LABEL_INDENT_SIZE" value="0" /> <option name="LABEL_INDENT_ABSOLUTE" value="false" /> <option name="USE_RELATIVE_INDENTS" value="false" /> </value> </option> <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
Author: darcyliu
🌐
GitHub
github.com › BrightProgrammer7 › FORMAT-JAVA-CI › issues › 4
Guide: Reformat Java Code with Google Style Guide in IntelliJ IDE · Issue #4 · BrightProgrammer7/FORMAT-JAVA-CI
August 21, 2024 - To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox.
Author: BrightProgrammer7
🌐
GitHub
github.com › HPI-Information-Systems › Metanome › wiki › Installing-the-google-styleguide-settings-in-intellij-and-eclipse
Installing the google styleguide settings in intellij and eclipse
May 12, 2019 - Under File->Settings -> Editor -> Code Style, click on the little gear next to Scheme. Click on import Scheme and select the google-styleguide file as the current code style for the Metanome project.
Author: HPI-Information-Systems
🌐
GitHub
github.com › google › styleguide › issues › 687
eclipse-java-google-style.xml and intellij-java-google-style.xml are obsolete and should be removed · Issue #687 · google/styleguide
April 25, 2022 - Google has moved its focus to google-java-format because “Eclipse and IntelliJ IDEA weren’t flexible enough to meet all the requirements of the Google Java Style Guide,” as described in google/google-java-format#695. The existence of these two files is misleading (e.g., the Language Support for Java extension for VS Code still refers to eclipse-java-google-style.xml), and thus they should be removed.
Author: google
Top answer
1 of 2
4

EDITED The file from Google uses an old (I suppose) key for filetype (java instead of Java). I have made the following changes and it works.

<ADDITIONAL_INDENT_OPTIONS fileType="JAVA">
  <option name="INDENT_SIZE" value="2" />
  <option name="CONTINUATION_INDENT_SIZE" value="4" />
  <option name="TAB_SIZE" value="8" />
  <option name="USE_TAB_CHARACTER" value="false" />
  <option name="SMART_TABS" value="false" />
  <option name="LABEL_INDENT_SIZE" value="0" />
  <option name="LABEL_INDENT_ABSOLUTE" value="false" />
  <option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>

I have made a fork of the GitHub repository with the file corrected (https://github.com/nhenneaux/styleguide/blob/gh-pages/intellij-java-google-style.xml).


The easiest way is to import the style file into ~/.IntelliJIdea2016.2/config/codestyles. Then you have to restart Intellij and go in the style settings to select GoogleStyle.

2 of 2
0

It seems that the format used in the configuration file differes from what IntelliJ (at least the version I'm using) expects.

I changed my code setting, exported them and looked for differences.
The ident setting were in the output file like so:

<code_scheme name="MyTestStyle">
    ...
    <codeStyleSettings language="JAVA">
        <indentOptions>
          <option name="INDENT_SIZE" value="2" />
          <option name="CONTINUATION_INDENT_SIZE" value="4" />
          <option name="TAB_SIZE" value="8" />
        </indentOptions>
    </codeStyleSettings>
</code_scheme>

Importing this file worked as expected.

🌐
Jianshu
jianshu.com › p › a44329bf5935
Intellij IDEA 配置 Code Style - 简书
July 17, 2018 - 这次,就简单介绍下 Intellij ... 在 GitHub 上有一个专门放置编码规范的仓库,地址在: https://github.com/google/styleguide。 · 可以随时在该网站获得最新的代码规范(但大部分规范...
🌐
GitHub
gist.github.com › gcnit › c93c41d0e531bb66672bd24420dde986
Add Google Style Guide to Intellij · GitHub
Those settings can’t completely mimic the format enforced by the google-java-format plugin but try to be as close as possible. So before submitting code, please make sure to run Reformat Code. ... Go to File → Settings → Editor → Code Style. ...
🌐
GitHub
github.com › google › google-java-format › issues › 325
Unable to import Code "IntelliJ Java Google Style" · Issue #325 · google/google-java-format
November 29, 2018 - Running into error following the below step -> "The import ordering is not handled by this plugin, unfortunately. To fix the import order, download the IntelliJ Java Google Style file and import it into File→Settings→Editor→Code Style." ...
Author: google
🌐
Github-wiki-see
github-wiki-see.page › m › HPI-Information-Systems › Metanome › wiki › Installing-the-google-styleguide-settings-in-intellij-and-eclipse
Installing the google styleguide settings in intellij and eclipse - HPI-Information-Systems/Metanome GitHub Wiki
May 12, 2019 - Download the intellij-java-google-style.xml file from https://raw.githubusercontent.com/google/styleguide/gh-pages/intellij-java-google-style.xml. Under File->Settings -> Editor -> Code Style, click on the little gear next to Scheme. Click on import Scheme and select the google-styleguide file ...