diff --git a/topics/tutorials/custom_language_support/formatter.md b/topics/tutorials/custom_language_support/formatter.md index 49cb30750..6904df7f3 100644 --- a/topics/tutorials/custom_language_support/formatter.md +++ b/topics/tutorials/custom_language_support/formatter.md @@ -1,6 +1,6 @@ -# 16. Formatter + - +# 16. Formatter Sample implementation of Simple language formatter. @@ -23,7 +23,7 @@ The formatter controls spaces, indents, wrap, and alignment. ## Define a Block -The formatting model represents the formatting structure of a file as a tree of [`Block`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/Block.java) objects, with associated indent, wrap, alignment and spacing settings. +The formatting model represents the formatting structure of a file as a tree of [`Block`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/Block.java) objects, with associated indent, wrap, alignment, and spacing settings. The goal is to cover each PSI element with such a block. Since each block builds its children's blocks, it can generate extra blocks or skip any PSI elements. Define [`SimpleBlock`](%gh-sdk-samples%/simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleBlock.java) based on [`AbstractBlock`](%gh-ic%/platform/code-style-impl/src/com/intellij/psi/formatter/common/AbstractBlock.java). @@ -69,7 +69,7 @@ The `SimpleFormattingModelBuilder` implementation is registered with the Intelli Run the plugin by using the Gradle [`runIde`](creating_plugin_project.md#running-a-plugin-with-the-runide-gradle-task) task. -Open the example Simple Language [properties file ](lexer_and_parser_definition.md#run-the-project) in the IDE Development Instance. +Open the example Simple Language [properties file](lexer_and_parser_definition.md#run-the-project) in the IDE Development Instance. Add some extra spaces around the `=` separator between `language` and `English`. Reformat the code by invoking Code | Reformat File... dialog and choose Run.