Comments (8)
I finally found the reason. It's related to the option --rules=@PSR12
.
My project has included a custom php-cs-fixer rules package by composer, I think this option conflicts with it.
I set the php-cs-fixer.rules
to an empty string, it works now.
Thank you for your help.
from coc-php-cs-fixer.
Can you please run this to isolate the problem? Are you getting any error messages?
- Run
:CocCommand workspace.showOutput
- In "Choose by number:" enter the number of
php-cs-fixer
- Run
:CocCommand php-cs-fixer.fix
from coc-php-cs-fixer.
No error messages are found. The output is:
########## php-cs-fixer
Run: php vendor/bin/php-cs-fixer fix --using-cache=no --rules=@PSR12 /var/folders/px/rtcpjkg56j36pvt4ymn33r_40000gn/T/vMCguK8/tmp-236845cx81xUpi0ID
Cwd: /Users/don/my-project-root
from coc-php-cs-fixer.
There doesn't seem to be any problem.
coc-php-cs-fixer will use vendor/bin/php-cs-fixer
if found. https://github.com/yaegassy/coc-php-cs-fixer#note
Has it been formatted?
from coc-php-cs-fixer.
No, as I said, no changes have been made to the file.
I'm not sure why the file path is a temporary one in the output above, shouldn't it be the real path? Or is that the content of the formatted temporary file will be put back to the vim buffer?
from coc-php-cs-fixer.
tmp file to perform the formatting and replace the results.
You have also reported an issue related to "php-cs-fixer" on coc-diagnostic
, so it is probably something wrong with your environment...
Is the file you are trying to format a large file?
from coc-php-cs-fixer.
For large files, "coc.nvim" may have a timeout.
If you change this setting to a larger value, will there be any change in behavior?
"coc.preferences.willSaveHandlerTimeout": 1000,
from coc-php-cs-fixer.
OK, I'm glad to hear that the problem has been resolved. :)
from coc-php-cs-fixer.
Related Issues (9)
- Format on save does (sometimes) not work with Pint HOT 6
- How does this work with coc-format-selected HOT 2
- Using wrong configuration HOT 3
- --standard option HOT 2
- Error on request (format): Format provider not found for buffer: 1 HOT 2
- PHP 8.1 gives an error because php-cs-fixer is not yet supported HOT 1
- How to fix current file only? HOT 2
- How can I make the plugin autosave the changes? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-php-cs-fixer.