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.
-
-
@ekopalypse hm… as I see, PHP and JS have common code to folding blocks, but array folding doesn’t work in PHP files.