code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Bug]:PHP document formater,

Open codlj opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: chrome
  • Local OS: ubuntu 22.04
  • Remote OS: ubuntu server 22.04
  • Remote Architecture: --
  • code-server --version: v4.17.0

Steps to Reproduce

2.install extension 3.

Expected

after installation of prettier-vscode this should be format document

Actual

prettier-vscode is not working in the vs code server it is asking { "php.validate.executablePath": "" }

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • [X] I tested this in native VS Code.
  • [X] This does not happen in native VS Code.
  • [ ] I tested this in GitHub Codespaces.
  • [ ] This does not happen in GitHub Codespaces.

Are you accessing code-server over a secure context?

  • [X] I am using a secure context.

Notes

No response

codlj avatar Dec 24 '23 17:12 codlj

Is PHP installed and on your PATH? What does which php give you in code-server's terminal?

I experimented and it worked for me after I installed the Prettier PHP plugin, added it to the Prettier config, then added this to my settings:

    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "prettier.documentSelectors": [
        "**/*.{php}"
    ]

code-asher avatar Jan 05 '24 20:01 code-asher

Closing as stale but feel free to comment if you come back to this.

code-asher avatar Jul 12 '24 00:07 code-asher