Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Generic-highlighter: how to switch/reset it to a different configuration
QtWS25 Last Chance

Generic-highlighter: how to switch/reset it to a different configuration

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 680 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John.Curious
    wrote on last edited by
    #1

    I am trying to take advantage of good QT Creator's editor for working on PHP/HTML files. There is a pretty good documentation on how generic-highlighter works, see, for example, http://doc.qt.digia.com/qtcreator-2.3/creator-highlighting.html, but somehow I could not find a way to switch from one highlighter to another, once one was assigned, and how to figure out which exactly highlighter is in use for a particular file. Specifically, I have good and helpful highlighting for *.js files, but I keep failing to make highlighter work for *.php files. I found/downloaded, per instructions mentioned above, a few files, which seems to be relevant:

    %USERPROFILE%\AppData\Roaming\QtProject\qtcreator\generic-highlighter\html-php.xml and php.xml

    Both of them list *.php extension inside the <language> tag. How do I check which one is in use? Or maybe none of them, since I do not get any highlighting at all? Then why? How do I make a specific xml highlighter configuration file to be used over the other file? It must have something to do with MIME types in Options->Environment, but all changes I tried did not work for me.

    In the beginning, QT Creator warned me that highlighter is not determined and I downloaded PHP/HTML, etc., then QT Creator stopped complaining, but highlighting did not appear. If I could make it ask again, then I could play with different xml files to find out what is needed, but I could not figure out a way to reset it, so that it would start asking again.

    Does anyone know a location of more extensive documentation, which would explain all those details at length?

    Thank you very much in advance for any hint of help.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved