How create UDL by defined/default langunge(PHP)?
-
I’m want extend PHP style to add folding for arrays ``/
array(...)as in JS. How/where get current PHP definition to create UDL? -
Sorry to bear bad news rather than a gift today, but the UDL system cannot start from one of the built-in lexers – the two systems are separate.
You would have to start from scratch to do it in the UDL.
The other option is to grab the source code of the original PHP parser, then tweak it to become a lexer plugin (see the npp-user-manual.org plugins page), and compile your own plugin to do exactly what you want.
-
@peterjones can you help me? I’m can’t find php lexer in git repo.
-
It is hidden within the html lexer.
-
P PeterJones referenced this topic on
-
@ekopalypse hm… as I see, PHP and JS have common code to folding blocks, but array folding doesn’t work in PHP files.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login