Giter Site home page Giter Site logo

Comments (13)

re-ovo avatar re-ovo commented on June 2, 2024 1

Will be fixed in 1.4.2, and supports some customization of folding behavior (placeholders, minimum length, default folding)

from unocss-intellij.

re-ovo avatar re-ovo commented on June 2, 2024 1

@re-ovo I tested the latest update and it looks awesome, thanks a lot for such a quick implementation and release. If I may add a couple of suggestions for improvement, it would be great if:

  • clicking on the folded version would unfold only this specific item and not all in the file
  • it could be a shortcut to toggle folding
  • truncated text would hide classes partially, e.g. "flex pl-3 [UnoCSS]" instead of "[UnoCSS]" (don't know if this is even possible withing Intellej products)
    thanks again 👍🏻
  • Collapse by group is the expected behavior, imagine that when you need to read all the code completely, you can easily expand all Unocss
  • The shortcut keys are provided by Intellij. Please read the relevant documentation. On Windows, it should be
    Control + - (When the editing cursor is on the Unocss class)
  • This can be done, but I don't think it's useful

from unocss-intellij.

re-ovo avatar re-ovo commented on June 2, 2024
截屏2024-01-17 17 24 37

Code folding is already supported

from unocss-intellij.

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on June 2, 2024

interesting. Could you explain how it can be enabled?

from unocss-intellij.

re-ovo avatar re-ovo commented on June 2, 2024

interesting. Could you explain how it can be enabled?

It uses the folding shortcut provided by Intellij, which you can view in the Code > Folding menu

from unocss-intellij.

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on June 2, 2024

Can you specify which exact option? I use Webstorm and I don't see anything specific to class names
image

from unocss-intellij.

re-ovo avatar re-ovo commented on June 2, 2024

image
I mean this, or use shortcut Ctrl+Numpad-

from unocss-intellij.

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on June 2, 2024

If I understand correctly these settings only allow to manually toggle specific portions, what I'm looking for is a default behavior. When I enter a file I would like classes to be folded by default and expanded only on click. Is there a way to fold them by default in Webstorm?

from unocss-intellij.

re-ovo avatar re-ovo commented on June 2, 2024

I guess there is no such aggressive folding behavior in Intellij, even if the default folding is set to true, it still requires you to manually fold after editing, or reopen the file. Is that enough?

from unocss-intellij.

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on June 2, 2024

Essentially, I want the same behavior for classes as for inline styles. When I open a file I see styles truncated like this
image

from unocss-intellij.

re-ovo avatar re-ovo commented on June 2, 2024

Sure

from unocss-intellij.

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on June 2, 2024

Great, thanks a lot

from unocss-intellij.

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on June 2, 2024

@re-ovo I tested the latest update and it looks awesome, thanks a lot for such a quick implementation and release. If I may add a couple of suggestions for improvement, it would be great if:

  • clicking on the folded version would unfold only this specific item and not all in the file
  • it could be a shortcut to toggle folding
  • truncated text would hide classes partially, e.g. "flex pl-3 [UnoCSS]" instead of "[UnoCSS]" (don't know if this is even possible withing Intellej products)
    thanks again 👍🏻

from unocss-intellij.

Related Issues (20)

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.