Some keywords (type, CONSTANT) are not properly coloured in editor
Describe the problem
The IDE uses a standard C++ syntax highlighting system. The result is that some keywords/types/CONSTANTS that are specific to the Arduino programming language do not get syntax highlighting in the Arduino IDE editor.
Examples include:
byteOUTPUTINPUTINPUT_PULLUPLOWHIGH
To Reproduce
Steps to reproduce the behavior:
- Create a Sketch
- Replace its content with the following
byte myNumber = 0; void setup() { pinMode(LED_BUILTIN, OUTPUT); pinMode(3, INPUT); } void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(500); digitalWrite(LED_BUILTIN, LOW); delay(500); }
Expected behavior
Syntax highlighting is provided for all keywords of the Arduino programming language.
Arduino IDE version
2.0.0-beta.7
Operating system
All
Additional context
Note that highlighting for many of the Arduino language keywords are already provided by the C++ highlighter. No special treatment for those keywords is necessary.
Also reported at:
- https://github.com/arduino/arduino-ide/issues/1785
- https://github.com/arduino/arduino-ide/issues/1485
- https://github.com/arduino/arduino-ide/issues/890
- https://github.com/arduino/arduino-ide/issues/108
- https://forum.arduino.cc/t/pinmode-output-input-and-input-pullup-do-not-change-color/861049/1
- https://forum.arduino.cc/t/pinmode-output-input-and-input-pullup-do-not-change-color/861049/3
- https://forum.arduino.cc/t/pinmode-output-input-and-input-pullup-do-not-change-color/861049/11
- https://forum.arduino.cc/t/code-colouring-boolean-vs-char/1033122
- https://forum.arduino.cc/t/arduino-ide-2-0-editor-text-color-mismatch-on-keyword-byte/1033975
- https://forum.arduino.cc/t/disimproved-editor-2-x/1049962
- https://forum.arduino.cc/t/ide-v2-0-2-program-interface-functions/1055809/3
- https://forum.arduino.cc/t/ide-2-1-1-colores-de-palabras-reservadas/1150024
- https://forum.arduino.cc/t/arduino-ide-2-2-1-vs-ide-1-8-13/1189218/5
- https://forum.arduino.cc/t/kodning-i-sketch/1212686
- https://forum.arduino.cc/t/pinmode-not-working/1244177
Issue checklist
- [X] I searched for previous reports in the issue tracker
- [X] I verified the problem still occurs when using the latest nightly build
- [X] My report contains all necessary details
Any progress on this one? It has been almost a year.
Is this a feature or a bug? The Arduino 2.0.0 stable version now released on the Arduino official website still has this problem. Any progress on this? @fstasi @ubidefeo
It would be nice to fix this issue, I am using it for teaching and I miss this syntax color :)