Coder Social home page Coder Social logo

Comments (10)

oderwat avatar oderwat commented on May 25, 2024 1

Indent Rainbow makes no assumptions about what is "pretty". Just disable error markers for the language or altogether, like so:

"indentRainbow.ignoreErrorLanguages" : [ "*" ]

from vscode-indent-rainbow.

moeriki avatar moeriki commented on May 25, 2024

Nice ignoreErrorLanguages is perfect for my needs.

from vscode-indent-rainbow.

gbrunow avatar gbrunow commented on May 25, 2024

There is a slightly annoying thing that ignoring errors doesn't solve though, the highlight behind the first two characters.

image

from vscode-indent-rainbow.

oderwat avatar oderwat commented on May 25, 2024

That doesn't annoy me as I would not have such kind of indent in my projects. But I guess I would accept a PR for an optional behavior if it doesn't degrade performance too much.

from vscode-indent-rainbow.

gbrunow avatar gbrunow commented on May 25, 2024

Personally I don't like that indentation either, but prettier is opinionated and won't let me change that, believe me, I tried.
I will take a look at the code and see if I can submit a PR request when I have time.

from vscode-indent-rainbow.

gbrunow avatar gbrunow commented on May 25, 2024

@oderwat I'm currently working on this and will probably submit other changes if that's okay with you.
I'm submitting a simple one in a few minutes just so it's not too much at once.

from vscode-indent-rainbow.

oderwat avatar oderwat commented on May 25, 2024

After some more thinking about it, I decided that the current behavior is what I want. Resizing the bars to "fit" the code in the last example just looks wrong to me. Change the tab size to two if you write code in this style. You very obviously don't use an indentation of four spaces there.

from vscode-indent-rainbow.

gbrunow avatar gbrunow commented on May 25, 2024

It is 4 spaces but prettier isn't consistent when indenting chained methods.
This is what it looks with 2 spaces:

image

from vscode-indent-rainbow.

keidarcy avatar keidarcy commented on May 25, 2024

Does anyone know what's logic how rainbow-indent decides the space(2 or 4)?

from vscode-indent-rainbow.

oderwat avatar oderwat commented on May 25, 2024

It uses what the editor uses. So it is either a "tab size" or count of "spaces". You can see that in the bottom status bar of the editor window.

from vscode-indent-rainbow.

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.