Qt Creator automatically parses some files as C-style
-
Have asked on StackOverflow ("http://stackoverflow.com/questions/20470674/qt-creator-parses-sp-file-as-c-code":http://stackoverflow.com/questions/20470674/qt-creator-parses-sp-file-as-c-code) but as there have been no answers as of yet I'm asking here as well.
I'm trying to use Qt Creator to write "SourcePawn":https://wiki.alliedmods.net/index.php/Category:SourceMod_Development scripting files for SourceMod server plugins. Even without any syntax definition file, the IDE will interpret .sp source files as C/C++, resulting in a lot of green/red underlining as the code parser doesn't understand what's going on. Is there a way to stop this from happening? There doesn't seem to be anything in the options relating to it; I'd rather not exclude *.sp files as I was looking to write my own syntax highlighting definition and this would void that option.
Thanks.
-
Hi,
You can add *.sp to the ignored file pattern in the Generic Syntax Highlighter tab in the Text Editor panel or maybe try to add an empty (or minimal) Syntax Highlight Definition
Hope it helps
-
The ignored file patterns are what I was referring to in the last sentence of the previous post, but it didn't work anyway. What did work was creating a skeleton highlighting definition, which I thought I'd checked before (but evidently got the syntax wrong for, or something similar). Thanks!
-
Oops, I didn't understood you right about the exclusion. Glad you could work it out.
However it's still strange that the exclude didn't work. Out of curiosity, did you restart Creator to see if it would apply only after that ?
-
You could have a look at the "bug report system":http://bugreports.qt-project.org to see whether this is something known. You can also try with the latest version of Creator (3.0)