oderwat / vscode-indent-rainbow

Extension which shows indentation with a faint rainbow colored background to make them more readable
MIT License
407 stars 55 forks source link

Docblocks are colored #108

Closed Moukrea closed 3 years ago

Moukrea commented 3 years ago

I don't understand why docblocks are being coloured like that Capture d’écran de 2021-06-07 13-02-40

Isn't there a way to ignore " " and " /" ?

I've tried various patterns to ignore, but they doesn't seem to have any effect:

    "indentRainbow.ignoreLinePatterns": [
        "/[ \t]* [*] .*/g",
        "/[ \t]* [*] ./g",
        "/[ \t]* [*]/g",
        "/[ \t] [*] .*/g",
        "/[ \t] [*] ./g",
        "/[ \t] [*]/g",
        "/ [*] .*/g",
        "/ [*] ./g",
        "/ [*]./g",
    ],
oderwat commented 3 years ago

They are highlighted like that because that is what the extension is supposed to do. It can't work differently for different parts of the file as it does not know anything about the syntax or semantic of the document.

The patterns are for suppressing error highlighting. Your screenshot does not show errors.

Everything works as intended by me.

Moukrea commented 3 years ago

So it higlights " * anything" but doesn't higlight "anything"?

Dockblocks are the only place where I could see highlights bellow characters, which does seem a little odd to me. Maybe it should highlight the single space before "*" but why would it keep highlighting anything from the space to the first character after the "*"?

oderwat commented 3 years ago

First of all: There is no "highlighting" anywhere. It is the normal background coloring for the indentation. You only see it in your documentation comments because you don't break your indentation at other places. If you did, it would look the same, and you will be "happy" because you see: Opsi, I did something different here and may want to change that.

As I said: It works as intended. It shows you that in the doc block, you are not following the indentation rule. It should not do anything else.

Moukrea commented 3 years ago

Of course I'd like to see the ~highlighting~ background coloring when I do something wrong, and I definitely use this (although I mostly use it for its main purpose, get the code more readable).

Regarding docblocks, it's maybe not following your indentation rule, but it's following the docblock "rule" as in any docblock starting with /** with a whitespace in the following lines.

I'll edit the extension on my own to correct this on my setup so I won't bother you any longer 😉

oderwat commented 3 years ago

That's a good thing. You may also consider a donation or just don't as the 2,023,112 (yeah, this is over two million) other users who don't give a shit on showing their gratitude to a developer.