User-defined language is ignored since 8.4.6
-
Dear all,
before I updated Notepad++ to v8.4.6 my user-defined language with extension “php” was used for all *.php files instead of the default php style.
Now, with v8.4.6, Notepad++ uses always the default styling for *.php and ignores my user language definition.
How can I change this behavior back?I already tried to delete the extensions for php from the langs.xml in the AppData folder. It doesn’t helped.
Best regards,
Martin -
It’s using shebang/prolog/first-line detection (seeing the
<?php...
line), which is incorrectly overriding your extension definition.That should be fixed in v8.4.7, which is in Release Candidate now (item 14 from that list). If you’d like to try it to confirm the new version works for you, that’s great. If it doesn’t, report in that thread with your Debug Info, and an exact set of the steps so that they can reproduce your problem.
-
@PeterJones said in User-defined language is ignored since 8.4.6:
If you’d like to try it to confirm the new version works for you
I didn’t hear back from @Martin-Guttmann , and today I was able to find time: I created a UDL “MyPHP” in v8.4.7-RC that was associated with .php files, and verified that when I opened a .php, it used that, not the builtin PHP lexer, even when it started with
<?php
. So now file extension identification is properly taking priority over first-line detection. -
Thanks Peter,
v8.4.7 works for me.
-
I need to upgrade my version also, but I’ve just recently noted that using NPP to open a file one has right-clicked on and selected NPP to use, that it pulls up the new file, which it’s supposed to, but have noticed also, that when I switch to the previous document that came up with the right-clicked file, that my dBASEPlus UDL’s autoCompletion was not working on that file…until NPP is closed and then opened itself…and then the file would work with the autoCompletion again. Was going to write about it, but I’ll upgrade first and see it’s fixed according to your post. Thanks.