vysker / vscode-php-formatter

Visual Studio Code extension. A wrapper for the Sensiolabs PHP CS Fixer. Analyzes some PHP source code and tries to fix coding standards issues (PSR-1 and PSR-2 compatible).
MIT License
93 stars 11 forks source link

Auto detect the configure file in workspace #16

Open NewFuture opened 7 years ago

NewFuture commented 7 years ago

Can it auto detect the .php_cs or .php_cs.dist in the (all) workspace ?

Or just switch to the works pace folder , and the run the php-cs-fixer command? it will auto load the configure file.

vysker commented 7 years ago

So if understand this right, you'd like to be able to put a .php_cs file in your workspace, and have the extension automatically use it if present?

That is a good suggestion. I might add this in the future. In the mean time, you could use VSCode's workspace configurations and set the phpformatter.arguments setting accordingly.

NewFuture commented 7 years ago

Yeah, I do this manually now.

The configuration files (.php_cs.dist or .php_cs) are used in many PHP projects. Automatically using it will be convenient when we switch projects. Thanks~

You have done a good job. 👍

wkiril commented 7 years ago

I would also like to see this implemented or try to implement it myself and submit a PR if the owner has no availability

sgehrman commented 5 years ago

Seems like an obvious feature that needs to work. I was wondering why this wasn't working.