Skip to main content
FMarr.2
Associate III
Question

How can i have syntax highlight for funtion like HAL_Init(); as in the attached files? Thanks

..

This topic has been closed for replies.

6 replies

CMcD12
Associate II

Does anyone know of the reason for this. I have the same issue when I start a new project from .ioc file. If i imported an example project the syntax highlighting works fine.

FMarr.2
FMarr.2Author
Associate III

Hi,

I still have the same problem. But I have seen that if you add the file as "link" to your project, the colour changes.

CMcD12
Associate II

Hi,

Thanks for your reply. Its a useful workaround but still a silly bug for a major IDE.

FMarr.2
FMarr.2Author
Associate III

Hi,

recently I was using Eclipse 2022-12 for C++, and I tried to use the same trick but it did not work.

But still there were some functions with different color. In this case they were functions from a library which I have only the header file and the compiled.

But if you change theme, in my case dark, all functions had the same color. Interesting.

CMcD12
Associate II

Hi,

Found a way of helping highlight the functions normally:

go to 'Window' tab > Preferences > C/C++ > Editor > Syntax Coloring Then go into 'Code > Functions' and enable it and choose your highlighting colour etc.

Pavel A.

Then it looks like the project that you've imported has local settings that affect the coloring. It overrides the workspace level settings.