Php using VSCode

・1 min read

I am learning Php and trying to get VSCode to Format and code complete my files. I have the Extensions recomended by VSC and have looked around but it seems that I have everything that they suggest. Is there a setting I am missing?
The issue for me is when saving it doesn't format or tab anything properly.(Even when Formatting the file from menu) I do have that set to on_save in settings not on_type. It doesn't even have an auto complete for a Php block.
Am I missing soemthing here? I set up my own snippet and that works but wondering why when you type <? VSC doesn't auto complete the rest. Any help would be awesome.


    "Php IF Statement": {
        "prefix": "pif",
        "body": [
                "if ( $1 ) : ",
                " $2;",
                " endif;",

Maybe you should install php-cs-fixer and this extension php-cs-fixer Extension) for formatting. Have you set this "editor.tabCompletion": "on" to your settings.json?

Classic DEV Post from Sep 1 '18

On Dealing with Anxiety and Depression as a Developer

I've dealt with anxiety and depression for most of my life. Its been a constant battle, both personally and professionally as a software developer. Here's a look into my journey and some things I've taken away from it so far.


New dev posts every day.