Open vikaskhunteta opened 8 months ago
Hi @vikaskhunteta. I use it on my regular basis on Sublime Text, and seems fine. May you please share some of this big files with me to check if there's any infinite loop? The code behind both vscode-phpfmt and the sublime plugin it's the same (https://github.com/driade/phpfmt8).
@driade Thanks for prompt response, the files on which the extension hangs into sublime doesn't have even 200 lines, I believe there must be some conflict with other extension installed. Here is the list of extension installed
Better Completion, Bootstrap 3 Snippets, BracketHighlighter, Brackets Color Scheme, Color Highlighter, CSS Lint, DocBlockr, DotENV, Emmet, Emmet CSS Snippets, Formatter, Git, HTML, HTML-CSS-JS Prettify, HTML5, HTMLBeautify, jQuery, JSHint, JSHint Gutter, JsPrettier, Minifier, Minify, Monokai Extended, PyV8, Rails, Sass, SCSS, SCSS Compiler, SideBarEnhancements, SideBarGit, SublimeCodeIntel, SublimeLinter, SublimeLinter-csslint, SublimeLinter-phplint, Tailwind CSS Autocomplete, WordPress
I removed PHPFMT package because of the issue mentioned earlier, I have two PHP installed, default is PHP7.4 also set Path env, but for PHPFMT I configured PHP8.2 as it was not working at all with PHP7.4 into sublime, however into VS Code it working with PHP7.4 without issue.
Thanks. I'll check the comment formating issue.
@driade Any update on this? Also did you get chance to debug the issue on Sublime Text with all packages that I have installed on my system?
No chance to check it, sorry.
me too. troubling question
comments moves to beginning, is there any solution?
@lutyne The only working solution I found is to use of multi line comments instead of single line comments above the if condition
@vikaskhunteta multi comments cause another problem, the comments are not only moved to the head, but also separated......
Sorry, I'll try to find a solution next month
@lutyne Multi line comments are written like this
A matter of habit.... It seems I need to adapt.
@driade Did you get chance to look into this? Other than issue with comments above if
and foreach
syntax,
if the comment is placed after the closing curly braces like below
{
some code
} // comment
then after formatting it would go down like this
{
some code
}
// comment
sometimes comments after the syntax like this also move to new line below the syntax
$value = functionName( [
'Id' => $id // REQUIRED
] );
Hi,
Everything works fine except the comments before the control structure, see the screenshot
Other than above issue, the extension works great into VS code even for large files but doesn't work into sublime text, only very small files are formatted. For medium to large size files, it hangs the editor and I have to end the process to resume working. I don't use VS code for development purpose, so I have to switch between editors just for formatting.