Coder Social home page Coder Social logo

Folding Herodoc about vscode-auto-fold HOT 10 CLOSED

bobmagicii avatar bobmagicii commented on June 15, 2024
Folding Herodoc

from vscode-auto-fold.

Comments (10)

bobmagicii avatar bobmagicii commented on June 15, 2024 1

can code fold them normally? all this extension is doing is calling the fold.level built into the editor.

from vscode-auto-fold.

bobmagicii avatar bobmagicii commented on June 15, 2024 1

i feel pretty confident that the cause is code does not like that select being on the far left margin, then from and dual being one space over. the folding system in code seems to be purely based on detecting consistent indenting.

here is an example heredoc i'm using in a production project, and no matter what, code will just never ever fold it right.

image

image

from vscode-auto-fold.

bobmagicii avatar bobmagicii commented on June 15, 2024 1

Heredoc is inherently messy, it is often better we avoid them. Obviously though, neither of us are.

All we can do is accept that Code cannot fold them properly since Heredoc close /must/ be on the right margin, or just not use them. I personally only use them within the Database migration scripts, never in the main application, because they are so messy.

This is not a problem unique to Code, most editors including Sublime text suffer the same issue. When I folded that method it lost its mind as well, it shows it folded and yet clearly is not.

image

from vscode-auto-fold.

bobmagicii avatar bobmagicii commented on June 15, 2024 1

writing SQL in code is really hard, got so mad at trying to format it well wrote an entire library so i didn't have to write the SQL ;)

image

from vscode-auto-fold.

vitordm avatar vitordm commented on June 15, 2024 1

Yes, i can see.

Sometimes we cannot avoid Heredoc.
Thank you so much. I can see this plugin is very useful;

PS: Sorry for my English.

from vscode-auto-fold.

vitordm avatar vitordm commented on June 15, 2024

If there is a heredoc inside the code, the fold does not working normally. It folds the code, but let heredoc showing.

from vscode-auto-fold.

bobmagicii avatar bobmagicii commented on June 15, 2024

which language? in php i see that vscode cannot do heredoc at all unless its contents are indented. doesn't even show the little icon to manually fold it without the indent.

here1

here2

from vscode-auto-fold.

vitordm avatar vitordm commented on June 15, 2024

PHP.

image

from vscode-auto-fold.

bobmagicii avatar bobmagicii commented on June 15, 2024

even trying to fold the entire class makes code lose its mind.

image

from vscode-auto-fold.

vitordm avatar vitordm commented on June 15, 2024

If I have a Heredoc String within my method. Should not It hide the string when I fold method?

from vscode-auto-fold.

Related Issues (19)

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.