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

Heredoc code folding working on free, but not Premium #2885

Open
johnny-solargard opened this issue May 24, 2024 · 4 comments
Open

Heredoc code folding working on free, but not Premium #2885

johnny-solargard opened this issue May 24, 2024 · 4 comments
Labels

Comments

@johnny-solargard
Copy link

Describe the bug
I would like to use code folding on Heredoc blocks and purchased the Premium version which states support for Heredoc code folding.

Unfortunately, it's not working and strangely enough, it works on the free version, but NOT the Premium version.

To Reproduce
Open VS code with Intelephense Premium installed and create a Heredoc block in PHP, folding does not work

Expected behavior
I would expect code folding to only work on the Premium version.

Screenshots

prem-disabled

prem-enabled

Platform and version
OS: Windows 10
Intelephense version: 1.10.4

@bmewburn
Copy link
Owner

The first is using the built in vscode indent folding that can be controlled with editor.foldingStrategy . What's the reasoning behind placing html in a heredoc rather than just placing it directly in the file? Is there some advantage to this?

@johnny-solargard
Copy link
Author

Yes, this particular form field is used in multiple views in the application. I wanted a simple way to reuse it without trying to integrate a templating engine or create a form function/class.

Could you help me understand how to get Heredoc code folding to work when Premium is enabled? Right now, I have to disable Premium features for it to work.

Thanks for your help!

@bmewburn
Copy link
Owner

Set editor.foldingStrategy to indentation for now until this can be implemented in the intelephense folding provider. Alternatively just move your html out of the heredoc and put it directly in the file. I don't understand the reasoning for putting a chunk of html in a heredoc only to immediately echo it out.

@johnny-solargard
Copy link
Author

That worked perfectly. Thanks Ben!

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

No branches or pull requests

2 participants