Giter Site home page Giter Site logo

vscode-phpstorm-formatter's People

Contributors

dependabot[bot] avatar soymanuvalle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-phpstorm-formatter's Issues

Error VSCODE

PHPStorm Formatter: Failed to format the document

Performance issues

Hi, I don't know if this is intended/inevitable, but formatting with this plugin makes my PC fans turn on and takes ~10 seconds time. I love the simplicity of customization of PHPstorm formatter, and that it covers all web-related languages (no more 10 different formatters, yay!), but is there any way to make this run faster and without overheating the CPU?

[QUESTION] Does this plugin work on macOS?

Hi, i tried it on macOS with a fresh installation of PHPStorm, i have wrote the path to the bin folder of /Applications/PHPStorm/.../bin path but it doesn't work. On Windows 10 is working correctly without filling the style guide field, do i need to fill it on macOS? What is the correct "bin" path on macOS?

Need an example of where the paths should be

Hi,

I have been trying to search for these paths, on my computer and even for information on Google about them. I find nothing.
phpstormFormatter.ideBinPath: The full path to the PHPStorm <IDE_HOME>/bin directory.
phpstormFormatter.styleGuidePath: Format code according to this code style settings file.

  • Where is the PHPStorm <IDE_HOME>/bin directory?
  • Where is the code style settings file?
  • On a Mac? On Windows?

It would be really helpful to include that information in the VSCode exensions

How do I set it up?

I installed this extension in VS Code. I use a Mac and it's not so clear how this should be setup to work.
I have a licensed PHPStorm installed, but what should I write in:
phpstormFormatter.ideBinPath: The full path to the PHPStorm <IDE_HOME>/bin directory.
phpstormFormatter.styleGuidePath: Format code according to this code style settings file.

In phpstormFormatter.ideBinPath I have written: /Applications/PhpStorm.app/Contents/bin
Is this correct and what should I write in phpstormFormatter.styleGuidePath ?

PHPStorm Formatter: Failed to format the document

PhpStorm 2021.3.2/bin

vsCode
Version: 1.65.1 (user setup)
Commit: 8908a9ca0f221f36507231afb39d2d8d1e182702
Date: 2022-03-08T02:06:27.846Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000

Settings
"phpstormFormatter.ideBinPath": "C:\Program Files\JetBrains\PhpStorm 2021.3.2\bin",
"phpstormFormatter.styleGuidePath": "C:\Users\andre\codestyle.xml",

I can find no information what could be causing this issue, nor can I find any installation documentation to see if this is a user error.

It appears everything is set up properly but I keep getting "PHPStorm Formatter: Failed to format the document" with no further data

How to set wrap length / dont wrap

I dont want to wrap mycode after formatted, so I have try to export code style per info in here : [https://www.jetbrains.com/help/idea/command-line-formatter.html#options] and change the phpstorm format.bat to include -s codestyle.xml, but doesnt work, any hint please, thx

"phpstormFormatter.styleGuidePath" is not working

While the extension at least detects my 2018 phpstorm verion it somehow cannot detect the XML file which is giving the rules for formatting like so:
`-

... ...` I placed the code style xml file in the same folder where my phpstorm exe lies (Program Files\\JetBrains\\PhpStorm 2018.1.6\\bin) So my path for the xml file is Program Files\\JetBrains\\PhpStorm 2018.1.6\\bin\\CodeStyle.xml .. I know that this xml file works on phpstorm itself!

But everytime I use "Fomat Document with..." and choose phpstorm fomatter it immediately delivers a "Command 'Format Document With...' resulted in an error." and "Failed to format document" message... I also tried leaving out .xml and also just specifying the folder but nothing works.. (phpstorm is closed as well btw)

edit: okay apparently xml code is being ignored.. does not matter for this question, anyway

Why save is needed ?

Why do we need to save the file before formatting ? Many other formatting extensions also use external formatters, but as far as i know - they grab the file content, create a tmp file, run it through the external formatter and then inject the result back. Just check some of them and do the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.