Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code formatting error #531

Closed
rezamarandi opened this issue Nov 18, 2017 · 3 comments
Closed

Code formatting error #531

rezamarandi opened this issue Nov 18, 2017 · 3 comments

Comments

@rezamarandi
Copy link

rezamarandi commented Nov 18, 2017

Hi,
i'm using php-intelliSense in VSCode (macOS)
when i format code for first time , everything looks good , but if i format it again , i get these error messages :

[Error - 13:38:06] Request textDocument/formatting failed.
Message: Exception: Unable to format file in /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/felixfbecker/language-server/src/Formatter.php:52
Stack trace:
#0 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/felixfbecker/language-server/src/PhpDocument.php(179): LanguageServer\Formatter::format('<?php if (!defi...', 'file:///Users/r...')
#1 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/felixfbecker/language-server/src/Server/TextDocument.php(172): LanguageServer\PhpDocument->getFormattedText()
#2 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/sabre/event/lib/Promise.php(242): LanguageServer\Server\TextDocument->LanguageServer\Server{closure}(Object(LanguageServer\PhpDocument))
#3 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/sabre/event/lib/Loop/Loop.php(261): Sabre\Event\Promise->Sabre\Event{closure}()
#4 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/sabre/event/lib/Loop/Loop.php(215): Sabre\Event\Loop\Loop->runNextTicks()
#5 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/sabre/event/lib/Loop/Loop.php(194): Sabre\Event\Loop\Loop->tick(true)
#6 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/sabre/event/lib/Loop/functions.php(122): Sabre\Event\Loop\Loop->run()
#7 /Users/code-ma/.vscode/extensions/felixfbecker.php-intellisense-1.5.4/vendor/felixfbecker/language-server/bin/php-language-server.php(102): Sabre\Event\Loop\run()
#8 {main}
Code: -32603

Any option to solve this ?
but the way i updated extension directory using composer

@jens1o
Copy link
Contributor

jens1o commented Nov 18, 2017

Code Formatting has been dropped as of the newest(yet unpublished) version.

@rezamarandi
Copy link
Author

@jens1o woops , any idea what we can use as alternative in vscode ?

@felixfbecker
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants