Hi, since the latest update I am missing the syntax highlighting for 'PHP/PHP'. I checked an there is only the highlighting for 'PHP (HTML)' remaining. (Which I am currently using as a workaround, though it is not as nice.) I already figured out that the PHP highlighting files are automatically generated froma base highliting definition, maybe there went something wrong with that? STEPS TO REPRODUCE 1. Install Kate 20.08 and ktexteditor-katepart 5.75 OBSERVED RESULT The syntax highlighting 'PHP/PHP' is not available. The only available PHP highlighting is 'PHP (HTML)' EXPECTED RESULT The syntax highlighting 'PHP/PHP' is available. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Neon 20.04 KDE Plasma Version: 5.20 KDE Frameworks Version: 5.75 Qt Version: 5.15 ADDITIONAL INFORMATION
Can confirm missing from Kate built from git master.
The "PHP/PHP" highlighter is hidden, since it is used to generate "PHP (HTML)". Using "PHP (HTML)" is equivalent to "PHP/PHP" only it includes the HTML tags.
Thanks Nibaldo, I am actually currently using "PHP (HTML)". However "PHP (HTML)" and "PHP/PHP" are not equivalent to each other. For example on "PHP (HTML)" I do not get any keyword highlighting.
In the "PHP/PHP" highlighter, the main context is: <context name="start" lineEndContext="#stay" attribute="Normal Text"> <RegExpr context="phpsource" attribute="Keyword" String="<\?(?:=|php)?" insensitive="true" /> <Detect2Chars attribute="Keyword" context="#pop" char="?" char1=">" /> </context> The script that generates "PHP (HTML)" inserts these rules in all contexts of the "HTML" highlighter. Basically, in both "PHP/PHP" and "PHP (HTML)", to write PHP code you have to start with <? , <?= or <?php. The difference between "PHP (HTML)" and "PHP" is that outside the blocks <? ... ?>, the first one also highlights the HTML code. I guess the following: You may be using a custom "PHP/PHP" highlighter and after updating KDE Frameworks you are using the major version, which is the built-in one. Check the directories "$HOME/.local/share/org.kde.syntax-highlighting/syntax" and "/usr/share/org.kde.syntax-highlighting/syntax" if there are any XML file for PHP. Also check the old directories: "$HOME/.local/share/katepart5/syntax" and "/usr/share/katepart5/syntax". I make this assumption since KDE Frameworks 5.75 was released on Oct 10, 2020 and prior to that date only minor updates have been made to the "PHP/PHP" highlighter: https://invent.kde.org/frameworks/syntax-highlighting/-/commits/master/data/syntax/php.xml Also, I remember 2 years ago there was a bug that showed hidden highlighters in the syntax highlighting selection menu. https://invent.kde.org/frameworks/ktexteditor/-/commit/bb5f34d7224d0b4d891cdf5d804e2fe515d8dc79 You could also attach example files where you experience the problem along with snapshots, so it could be more clear about the problem.
Created attachment 135200 [details] Kate highlighting with 'PHP (HTML)'
(In reply to Nibaldo G. from comment #4) > In the "PHP/PHP" highlighter, the main context is: > > <context name="start" lineEndContext="#stay" attribute="Normal Text"> > <RegExpr context="phpsource" attribute="Keyword" > String="<\?(?:=|php)?" insensitive="true" /> > <Detect2Chars attribute="Keyword" context="#pop" char="?" char1=">" /> > </context> > > > The script that generates "PHP (HTML)" inserts these rules in all contexts > of the "HTML" highlighter. > > Basically, in both "PHP/PHP" and "PHP (HTML)", to write PHP code you have to > start with <? , <?= or <?php. The difference between "PHP (HTML)" and "PHP" > is that outside the blocks <? ... ?>, the first one also highlights the HTML > code. Yes, my PHP files start with '<?php' and I do get some PHP style highlighting when I select 'PHP (HTML)' but for some reason I do not get Keyword highlighting. Some other highlighting, like for variables, does work though. I attached a screenshot of how syntax highligting currently looks for me with Kate and 'PHP (HTML)' for you to have a reference. I also double checked that I use a default highlighting text style. > > I guess the following: > You may be using a custom "PHP/PHP" highlighter and after updating KDE > Frameworks you are using the major version, which is the built-in one. Check > the directories "$HOME/.local/share/org.kde.syntax-highlighting/syntax" and > "/usr/share/org.kde.syntax-highlighting/syntax" if there are any XML file > for PHP. Also check the old directories: > "$HOME/.local/share/katepart5/syntax" and "/usr/share/katepart5/syntax". I checked the locations that you pointed out and the folders do not exist or are empty.
You don't have a font that supports the bold face. What font are you using? There were KDE versions that propagated broken fonts by default quite some time ago. Maybe you are hit by this issue?
Oh wow using a different font fixes it. I'm using "Noto Mono" as a font. It worked before so I would not have guessed that this is the problem. Also all other fonts from the Noto family appear to work. I guess this fixes my problem then. Thank you.