Closed archerdave closed 2 years ago
@archerdave Looks like you've got everything set up correctly. Do you mind if I log into your server to take a look?
@susanBuck Go right ahead.
Cool, taking a look now, will report back shortly.
When I first logged in, I saw the issue you were describing - it wouldn't format.
I spent a couple minutes double checking the settings, trying some files, and then it just started working without me actually changing anything.
I did notice that when it wasn't working that there was a message in the status bar about intelephense indexing the project. It's possible the formatter couldn't work until that was complete.
Can you try it again on your end to see if it's resolved or if you're still seeing the same issue?
Issue is still present. Working from your comment, I have further noticed the following:
Ah, ok - interesting.
In my local settings config file, I have the default formatter for PHP set to junstyle.php-cs-fixer:
"[php]": {
"editor.defaultFormatter": "junstyle.php-cs-fixer"
},
That would explain why it worked for me but not you.
Go ahead and choose php cs fixer as your default formatter and report back on whether that resolves the issue.
If it does, I'm trying to figure out why this issue hasn't been faced/reported by students in past semesters. 🤔
Yep, that did resolve the issue.
My first thoughts wonder if it is related to
This is a minor issue, but an annoyance. Visual Studio Code (VSC) is not actually formatting my PHP code.
if
and(issset
and that the next line$results = ...
has no indentation.Any thoughts?