You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
most header file of C++ has the '.h' suffix, which is treated as a C header file. As a consequence of this, many C++ keywords (class, public, private, template) in the .h file get a wrong highlight.
In a ordinary .cpp file, everything in color is alright:
After putting same piece of code to the .h file, color got issues:
Using ctrl-shift-L to change grammar, I found .h file has been recognized as a C file by default. After changing the grammar to C++, it still has a problem around 'class':
Every C++ keywords in .h files is supposed to be recognized,
it seems there are two issues here:
The .h file hasn't been treated as a cpp header file by default.
Keywords in .h files can not be recognized after changing the file grammar to C++.
It's very werid syntax highlight: keyword 'class' hasn't be recognized:
everything get alright if a single simicolon is added after 'NAMESPACE_BEGIN' in line 1.
After removing the simicolon and add the definition of NAMESPACE_BEGIN/END, I find syntax highlight error in '#endif' of line 3 but 'class' seems correct now !
The text was updated successfully, but these errors were encountered:
most header file of C++ has the '.h' suffix, which is treated as a C header file. As a consequence of this, many C++ keywords (class, public, private, template) in the .h file get a wrong highlight.
In a ordinary .cpp file, everything in color is alright:
After putting same piece of code to the .h file, color got issues:
Using ctrl-shift-L to change grammar, I found .h file has been recognized as a C file by default. After changing the grammar to C++, it still has a problem around 'class':
Every C++ keywords in .h files is supposed to be recognized,
it seems there are two issues here:
It's very werid syntax highlight: keyword 'class' hasn't be recognized:
everything get alright if a single simicolon is added after 'NAMESPACE_BEGIN' in line 1.
After removing the simicolon and add the definition of NAMESPACE_BEGIN/END, I find syntax highlight error in '#endif' of line 3 but 'class' seems correct now !
The text was updated successfully, but these errors were encountered: