Closed 2dotslash closed 2 years ago
Closing this because really what annoyed me was the whitespace error plugin I'm using, I turned it off for haskell files and moved on with my life.
What I did realise is line 8 in my screenshot is indented 4 spaces relative to the "P" in Project
, not the start of the line. This probably has all sorts of reasons why and all I seen was my beautiful rainbow indentation being destroyed.
Thank you
@2dotslash, what is the "whitespace plugin" and how to turn it off?
Also, is it possible to force 2 spaces?
@AleXoundOS
I'm using indent-rainbow
in vscode
https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow
It has a feature to highlight where whitespace was not indented correctly, I disabled it for haskell and markdown in my vscode settings.json with the following line
"indentRainbow.ignoreErrorLanguages": ["haskell", "markdown"]
Here's the colours I'm using for indent-rainbow if you're interested, also set in vscode settings.json
"indentRainbow.colors": [
"rgba(123, 248, 197,0.08)",
"rgba(130, 209, 204,0.08)",
"rgba(136, 170, 211,0.08)",
"rgba(143, 132, 218,0.08)",
"rgba(150, 93, 225,0.08)",
"rgba(162, 84, 219,0.08)",
"rgba(177, 89, 206,0.08)",
"rgba(191, 94, 194,0.08)",
"rgba(206, 99, 181,0.08)",
"rgba(210, 111, 169,0.08)",
"rgba(193, 137, 157,0.08)",
"rgba(175, 162, 146,0.08)",
"rgba(158, 188, 134,0.08)",
"rgba(140, 213, 122,0.08)"
],
Also, is it possible to force 2 spaces?
Just realised what you're asking, the indent-rainbow plugin uses your vscode indent settings I think, so yes it will work for you.
I use 4 spaces for everything else it's just my preference.
Apologies if this is my mistake
I'm using
I expect indentation to only ever be 4 spaces, not to mix and match 4 and 2 spaces.
Here's a screenshot.
Lines 8-13 are indented by 10 spaces ? I expect it to be 8, and to never indent with anything other than a multiple of 4 spaces.
Here's how I expect it to be formatted.
Here's my full config, I've changed random things trying to get this to work how I expect. ~/.config/brittany/config.yaml