Visual Studio C语法着色问题。

时间:2021-07-07 21:12:57

I used to work with Eclipse for my C firmware for a STM32-based board, and now I'm switching to Visual Studio 2017 + VisualGDB.

我曾经为一个基于stm32的板的C固件工作过Eclipse,现在我转到Visual Studio 2017 + VisualGDB。

The project is working, but there's something strange for the syntax highlighting and coloring.

这个项目正在运行,但是语法高亮和着色有些奇怪。

Pictures to understand better:

图片来更好地理解:

Highlighting totally lost [I placed the cursor in the variable "timer"]

高亮显示完全丢失[我将光标放在变量“timer”中]

Visual Studio C语法着色问题。

Syntax Coloring when the file is saved [No colors]

保存文件时的语法着色[没有颜色]

Visual Studio C语法着色问题。

Syntax Coloring when editing the file [OK!]

编辑文件时的语法着色[OK!]

Visual Studio C语法着色问题。

If I edit the file and press Ctrl+S, the Colors go away!

如果我编辑文件并按Ctrl+S,颜色就会消失!

I already reset the editor colors to default in Options, repaired the VS installation and rebooted PC, etc.

我已经将编辑器的颜色重置为默认选项,修复了VS安装和重新启动的PC,等等。

In other C++ and C# projects, everything is fine.

在其他c++和c#项目中,一切都很好。

1 个解决方案

#1


0  

Well, setting Options > VisualGDB > General > Enable Clang Intellisense by Default to False solved it.

好,设置选项> VisualGDB > >使Clang Intellisense默认为False解决了它。

Until now didn't see what I've lost by disabling it, but at least the colors and the selections are back to normal!

直到现在我还没有看到我失去了什么,但至少颜色和选择都恢复正常了!

Thanks for the help!

谢谢你的帮助!

#1


0  

Well, setting Options > VisualGDB > General > Enable Clang Intellisense by Default to False solved it.

好,设置选项> VisualGDB > >使Clang Intellisense默认为False解决了它。

Until now didn't see what I've lost by disabling it, but at least the colors and the selections are back to normal!

直到现在我还没有看到我失去了什么,但至少颜色和选择都恢复正常了!

Thanks for the help!

谢谢你的帮助!