-
Notifications
You must be signed in to change notification settings - Fork 153
.h C++ header recognized as C header #89
Comments
All |
This update produces syntax error notification when the For example, C does not define The issue is worst when using inline functions in C headers (which is important for some performance optimizations), since I understand that C++ is prevalent, but C developers are made to suffer unless a better heuristic / control flow is provided. |
This package only provides syntax highlighting, so another community package is causing the syntax error notifications that you're experiencing. You can define custom file types by following this FAQ. |
@50Wliu , I am thankful for the package and for the Atom development environment. However, I hope you could consider my point of view. Please consider that this might not be a specific project that is affected, but rather a whole community convention that is questioned. This syntax highlighting issue was resolved by changing the association of It's true that It's true that I can keep writing project specific configuration files for every project I handle... but I believe that the community convention should be the norm rather than the exception to the rule. |
The FAQ entry I linked you to is global, not project-specific. Here is @thomasjo's comments on this: #156 (comment) |
Hi @50Wliu , thanks for the quick reply. Three points to think about:
Thank you for your consideration. |
Ok, can you please open a new issue? While there's not much we can do about it short-term except to revert the PR, it'll still help to serve as a reminder when we have more capable tools to deal with this. |
Done. I opened issue #204 to both explain and remind. By the way, although heuristic recognition might be nice to have, the highlighting issue could be simply resolved by being opinionated about the use of a C++ specific extension, such as |
C++ headers can have *.h file extension. Can some additional heuristic be applied to recognize C++ headers from C headers. E.g. checking if
class
keyword is used in the file.I'm willing to fix that, but I don't know where to start. I've scanned the source but the package is quite declarative. Where can I find logic behind language recognition?
The text was updated successfully, but these errors were encountered: