Important: Please read the Qt Code of Conduct -

How to specify specific syntax/language to highlight for a given file in QtC?

  • Problem: I have a .S assembly file which also has some C defines/includes. Highlight for "pure" .S files works fine, but for this specific file QtC mistakenly interprets it as a C/C++ source. Most regular text editors (sublime, vscode, np++, gedit) allow choosing syntax/language for a given file manually, but I can't find such setting for QtC. Setting MIME-types doesn't help (and probably shouldn't - what if two languages have same MIME type, i.e. if the conflict can only be resolved manually?).

Log in to reply