externalcodeformatter_for_netbeans icon indicating copy to clipboard operation
externalcodeformatter_for_netbeans copied to clipboard

Support formatting of PHP files

Open markiewb opened this issue 11 years ago • 4 comments

markiewb avatar Sep 26 '14 17:09 markiewb

I wasn't able to find the necessary Eclipse libraries, please comment or raise a PR if someone knows where to find those.

funfried avatar Dec 22 '19 10:12 funfried

So far I could not find a promising Java implementation of a PHP formatter, please let me know if someone knows any.

funfried avatar May 18 '22 21:05 funfried

So far I could not find a promising Java implementation of a PHP formatter, please let me know if someone knows any.

what about using 3rd party tools executed on the shell, like phpcbf ?

phpcbf can reformat the whole file, but not the selected line.

steamboatid avatar Dec 02 '22 23:12 steamboatid

Hi @steamboatid,

first of all, thanks for sharing your idea!

The problem with that solution would be that NetBeans needs a way to now how to indent the next line when you are editing a file and you could of course just hardcode that or ignore it somehow, but that would mean to reformat the whole file after each new line and that's not really a good idea. Anyway I have a look at phpcbf as I have never heard of it before and check if there might be a possibility to include it into my NetBeans plugin.

Cheers, Fabian

funfried avatar Dec 04 '22 20:12 funfried