Comments (9)
@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)
from intellij-indent-rainbow.
@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
from intellij-indent-rainbow.
@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
from intellij-indent-rainbow.
Looks like the only option is to use "simple highlighter", since non-default formatter is used (Prettier)
from intellij-indent-rainbow.
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
from intellij-indent-rainbow.
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)
from intellij-indent-rainbow.
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
from intellij-indent-rainbow.
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
from intellij-indent-rainbow.
It would be a nice to have the possibility to have the other languages (C#/Java) show the spacing from the default formatter though.
The option to use different highlighters for different languages was added in the latest release 1.7.0:
from intellij-indent-rainbow.
Related Issues (20)
- Different indent size in one file
- Plugin consider loop codes after a label in JavaScript as error indent HOT 2
- log4j issue HOT 2
- Support Gateway HOT 1
- Code inside (...) treated as one line HOT 1
- Severe logspam due to calling a deprecated method HOT 5
- strange effect on YAML arrays HOT 3
- "Never highlight indent as error for languages" option not working HOT 3
- Non-error indentation being highlighted as error HOT 2
- Custom color scheme not working HOT 2
- Incapable of installing HOT 4
- "Indent rainbow now shows on empty lines" feature has no option to disable it HOT 2
- Indents don't appear on soft wraps
- please restore `Never highlight indent as error(in red color)` HOT 3
- How to disable rainbow indent for django template language ? HOT 4
- Update to rider 2022.3 HOT 1
- how to disable indent highlight in git diff mode(such as "Compare with Clipboard" right-click menu)?
- Feature request: add a toggle to disable highlight incorrect indentation HOT 2
- Add "Transparent"/"Opaque" for scope highlighting HOT 4
- Doesn't work in Java files with Material Theme UI 9.2.0, Indent Rainbow 2.2.0, on IntelliJ 2024.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intellij-indent-rainbow.