Closed t-ricci-delta closed 3 years ago
@t-ricci-delta thanks for report!
Plugin highlights indent in red based on default IntelliJ formatter. If some line is highlighted in red, it means that after "Reformat Code" action this line indent will be changed. So you have four options:
1) Reformat your code 2) Configure your code style 3) Enable checkbox "Never highlight indent as error" in settings 4) Use "simple highlighter" (not recommended)
@t-ricci-delta thanks for report!
Plugin highlights indent in red based on default IntelliJ formatter. If some line is highlighted in red, it means that after "Reformat Code" action this line indent will be changed. So you have four options:
- Reformat your code
- Configure your code style
- Enable checkbox "Never highlight indent as error" in settings
- Use "simple highlighter" (not recommended)
I tried to run "Reformat Code" but the coding style remained the same. Also I'm using the Prettier extension as well: https://plugins.jetbrains.com/plugin/10456-prettier
@t-ricci-delta thanks for report!
Plugin highlights indent in red based on default IntelliJ formatter. If some line is highlighted in red, it means that after "Reformat Code" action this line indent will be changed. So you have four options:
- Reformat your code
- Configure your code style
- Enable checkbox "Never highlight indent as error" in settings
- Use "simple highlighter" (not recommended)
Regarding point 2. I haven't found any option to allow to indent if the parameter destructuring is carried over multiple lines instead of in the same line.
I'd avoid solutions 3 and 4
Looks like the only option is to use "simple highlighter", since non-default formatter is used (Prettier)
Seems a problem of the default formatter for typescript (I disabled Prettier), this is what formatting the code looked like (ugly alignment of destructured parameter)
I'm still tinkering with the default code style to find out which option is behaving like that exactly
The error color to me was useful if the number of spaces was not even (multiple of configured tab width), but it's not what the plugin implementation is checking, if it relies on the formatter
(maybe it's the simple highlighter for this use case)
The error color to me was useful if the number of spaces was not even (multiple of configured tab width)
This is exactly how simple highlighter works, if I remember correctly
The error color to me was useful if the number of spaces was not even (multiple of configured tab width)
This is exactly how simple highlighter works, if I remember correctly
Then I'll stick to it since for js/ts using Prettier is far more useful. It would be a nice to have the possibility to have the other languages (C#/Java) show the spacing from the default formatter though.
For now I'm content with the "simple highligher option" since I only care if there are mixed tabs/spaces or uneven number of spaces
Intent rainbow does not seem to like when I destructure typed parameters on methods in TypeScript
The indentation is configured as two spaces, and you can see a bright red background if any space is added at the start of the line after the open brackets and before the closing brackets {}
This is verified in Rider on windows 10, but I remember it happening in macOS and other jetbrains products as well