Syntax highlighting disappears when typing

已完成

When a project (in C, not C++) is loaded, the variables are highlighted in the correct colours. However, as soon as a key is pressed on the keyboard (i.e. when typing code), all the variable colours change to white. The only pieces of code left in colour are keywords (for, while, if etc.) and strings. This problem does not occur with C++ programs, only C. I've tried changing the CMakeLists.txt file, but nothing helps. I've also tried disabling clang-tidy (Settings - Languages & Frameworks - C/C++ - Clangd - uncheck "Use clang-tidy via clangd"), but this results in only some of the variables/parameters to be highlighted, seemingly randomly. As there's no highlighting, errors are also not being identified, even ones as simple as misspelt variables. 

0

Hello!

Probably clangd crashes on your project. Reproduce the issue and after that send the idea.log file (`Help | Show Log in ...`) to clion-support at jetbrains.com. Also open the problematic file in the editor, do Find Action | clangd: preprocess current TU and send the result to us.

Note that logs might contain private user's information (like file paths and names). 

0

请先登录再写评论。