Skip to main content
AHend
Visitor II
May 28, 2019
Solved

STM32CubeIDE dark mode preprocessor highlighting bug

  • May 28, 2019
  • 6 replies
  • 4410 views

I'm running STM32CubeIDE on a Ubuntu 18.04 system. I've switched it to dark mode for programming, but any "#if" preprocessor directives in the code have a light background. Which, makes it impossible to read. I've looked through all the properties on syntax coloring, and I don't even see a place where I can choose a background color for preprocessor directives.

I'd happily install another theme, but I'm not sure how I'm supposed to do that.

Here's a screen shot: https://i.imgur.com/CuaDg4E.png

This topic has been closed for replies.
Best answer by Yuk117

I recommend "Darkest Dark Theme with DevStyle​" plugin that configure all to dark mode.

It can be installed from Eclipse Marketplace​.

6 replies

DNowa.10
Visitor II
August 1, 2019

I've had the same issue. Instead of "General -> Appearance -> Colors and Fonts", try "C/C++ -> Editor". In "Appearance color options" choose "Inactive code highlight" on the list and select a color of your choice. Or just untick "Highlight inactive code" on "General Behavior" form above.

Yuk117
Yuk117Best answer
Associate II
August 3, 2019

I recommend "Darkest Dark Theme with DevStyle​" plugin that configure all to dark mode.

It can be installed from Eclipse Marketplace​.

FMenk.1
Visitor II
September 26, 2020

Fantastic theme, with great new icons and it fixed the same problem 8)

salar.yunis
Visitor II
October 5, 2019

I had the same problem, you can find it in General -> Preferences -> Editors -> Text Editors -> Annotations -> C/C++ Occurrences.

embeddedt
Visitor II
October 6, 2019

I think it's an Eclipse issue, not necessarily an STM32CubeIDE one. Eclipse has had a number of issues with dark themes for years. As far as I know, the best workaround is to manually fix the color like others have shown above.

MRay.1
Visitor II
November 29, 2022

I think it had an issue with the dark theme. That might be the issue, in this case as well.

MAbra.4
Visitor II
January 17, 2023

Hi, i have found a solution.

Go to Window -> Preferences -> General -> Editors -> Text Editors -> Annotations and then C/C++ Occurrences and change the colour.