CLion 2020.1 EAP: Improvements to Code Completion, the Formatter, and More

Anastasia Kazakova

A new CLion 2020.1 EAP build is now available for download!

You can download the build (201.5616.31) from our website, via the Toolbox App or as a snap package (for Ubuntu) and install it side by side with the stable release build.


Let’s take a look at the highlights!

Code completion

Clangd-based code completion has been improved in several ways:

  • The rules for showing private and protected methods in code completion have been updated. Now CLion:
    • Doesn’t show private and protected methods for the first completion call, though it does show them for the second one
    • Shows private and protected methods for the first completion call if there are no public methods
  • We’ve also fixed an issue with non-existent constructors being suggested when completing type names (CPP-18970).

The formatter and naming

In the naming settings, CLion now has separate settings for struct and class fields:
CLion currently has two formatters – a built-in one and ClangFormat. You can easily switch to ClangFormat if you have a .clang-format config file. And even if you don’t, you can still switch, and CLion will offer to create the config file for you. Now, when you first open a project with a .clang-format config file in the project root, CLion will detect it and switch to ClangFormat for you automatically. Note that in this case CLion enables the Settings/Preferences | Editor | Code Style | Enable ClangFormat option, which is applied either to the individual project (if code style scheme per project is selected) or globally (if code style scheme per IDE is selected).

There are also various performance improvements and fixes for regressions.

Additionally, we recently shared an update on Makefile projects support in CLion. Check out how you can help us test our prototype on a variety of projects or request a private build from us to give it a try on your own!

Check the full release notes here.


Your CLion team
The Drive to Develop

Comments below can no longer be edited.

12 Responses to CLion 2020.1 EAP: Improvements to Code Completion, the Formatter, and More

  1. Md says:

    February 20, 2020

    I noticed that you upgraded CMake for this version (to 3.16) but it seems you don’t support it completely.
    For example, you don’t support `target_precompile_headers`.
    When support for it will arrive?

    • Anastasia Kazakova says:

      February 20, 2020

      What would you expect from such a support?

  2. Tano says:

    February 23, 2020

    Maybe stupid question: is there any chance that CLion can reformat all my code from snake case to camel case?
    I have an old project with uses snake case.

    • Tano says:

      February 23, 2020

      Can I just put a clang-format file there and use Code-Format from CLion? (I am still using 2019.3)

      • Anastasia Kazakova says:

        February 23, 2020

        In 2019.3 you can switch to the clang-format config from your project in the bottom right style switcher. Since 2020.1 the switch will be automatic.

    • Anastasia Kazakova says:

      February 23, 2020

      Seems no automatic and easy way for now, as Rename which is a quick-fix for Inconsistent Naming inspection is not available in a batch mode, so you can’t fix all the places at once. Will check if there is still some hidden path or maybe smth planned..

    • js says:

      February 24, 2020

      Have you looked at clang-tidy? Here is the documentation for the feature:

  3. Sam H says:

    February 24, 2020

    The last EAP (201.4865.10) was working, but this one changed the JDK detection somehow such that it broke on RHEL6 (it tried to use built-in JBR JDK, which gives a GLIBC_2.14 error). I was able to fix it by setting the JDK manually: “export CLION_JDK=/usr/lib/jvm/adoptopenjdk-11-hotspot-jre”.

    • Maxim says:

      February 25, 2020

      Hi Sam. Indeed JBR doesn’t support RHEL 6.x cause it bundled with JavaFX which cannot be built on RHEL 6.x in spite of RHEL x64 6.x is included into the list of Oracle JDK 11 Certified System Configurations. Please feel free to leave your opinion in the corresponding ticket

      The “JDK detection” is platform-wide (for all IDEs) and it could be changed recently. Thanks we’ll take a look.

  4. Kam says:

    February 26, 2020

    When can we expect C++ 20 modules support? right now the syntax isn’t recognized

    • Anastasia Kazakova says:

      February 28, 2020

      As soon as it gets to the compilers. When Clang has it, CLion will get it automatically, we’ll just need to double-check.


Subscribe for updates