[clang] 9982d48 - Updates to the 'CLion Integration' section in ClangFormat docs

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 09:28:55 PDT 2020


Author: Ilya Biryukov
Date: 2020-06-08T19:27:25+03:00
New Revision: 9982d48a92beb35525c50890ae3a96ece3cf8de1

URL: https://github.com/llvm/llvm-project/commit/9982d48a92beb35525c50890ae3a96ece3cf8de1
DIFF: https://github.com/llvm/llvm-project/commit/9982d48a92beb35525c50890ae3a96ece3cf8de1.diff

LOG: Updates to the 'CLion Integration' section in ClangFormat docs

This commit updates the 'CLion Integration' section in ClangFormat docs.
Key changes:
- clang-format is enabled automatically when there is a config file;
- formatting now works for indentations;
- if clang-format is enabled without a config file, CLion suggests creating it based on the IDE settings or uses the LLVM style by default.

Patch by Marina Kalashina!

Reviewers: sylvestre.ledru, ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: ilya-biryukov, klimek, MyDeveloperDay, sammccall, gribozavr2

Differential Revision: https://reviews.llvm.org/D80721

Added: 
    

Modified: 
    clang/docs/ClangFormat.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/ClangFormat.rst b/clang/docs/ClangFormat.rst
index cc1ef38dbb9d..b09f48b0027b 100644
--- a/clang/docs/ClangFormat.rst
+++ b/clang/docs/ClangFormat.rst
@@ -176,13 +176,14 @@ CLion Integration
 =================
 
 :program:`clang-format` is integrated into `CLion <https://www.jetbrains
-.com/clion/>`_ as an alternative code formatter. It is disabled by default and
-can be turned on in Settings/Preferences | Editor | Code Style.
-
-If :program:`clang-format` support is enabled, CLion detects config files when
-opening a project and suggests overriding the current IDE settings. Code style
-rules from the ``.clang-format`` files are then applied automatically to all
-editor actions, including auto-completion, code generation, and refactorings.
+.com/clion/>`_ as an alternative code formatter. CLion turns it on
+automatically when there is a ``.clang-format`` file under the project root.
+Code style rules are applied as you type, including indentation,
+auto-completion, code generation, and refactorings.
+
+:program:`clang-format` can also be enabled without a ``.clang-format`` file.
+In this case, CLion prompts you to create one based on the current IDE settings
+or the default LLVM style.
 
 
 Visual Studio Integration


        


More information about the cfe-commits mailing list