is there any option how to add a new keyword? Because I dont know, how to solve my problem, that keyword “byte” is not colored blue as other data types keywords. Maybe it would be useful, if I can add new category for if,while, ect keywords like in visual studio. Thanks a lot
Are you properly doing
#include <Arduino.h> in your header file so that the IntelliSense sees the
I think so, because this part of code is in main.cpp file and in Arduino.h file are these lines you sent, but I dont know why, only C++ keywords are blue, keywords from arduino not, for example word vs bool, because word is another keyword, that is not blue.
This issue suggests VSCode’s syntax highlighting is a bit dumb in this respect, and doesn’t have support for custom keywords… with the suggestion from one the devs being to edit
%localappdata%\Programs\Microsoft VS Code\resources\app\extensions\cpp\syntaxes\cpp.tmLanguage.json to add the keyword… with the caveat it may be lost on an update.
Okay, I see you have Ardino.h included. You might have conflicting VSCode extensions installed. Try to only use PlatformIO, C/C++ by Microsoft, Python and Jupyter as the installed extensions.