Comments (8)
That is the expected and correct behavior, as there is no indentation in this line. I wonder how your "Expected behavior" image was created. If there is a regular line, it should have the lines with and without word wrap enabled. If it means that you expect that lines are drawn in the "middle" of the line, then that expectation is wrong. The plugin cares only about the start of the line. It was mostly made for Python, Nim, Haskell or Yaml. Which means, languages where the indentation of the start of the line matters.
from vscode-indent-rainbow.
VSCode will keep the indentation the same for word wrapped lines.
if True:
while True:
print("This is a very long string that will get separated up by word wrap.")
While yes, this would theoretically mean in the middle of the line, visually it's the same line, and still the same indentation level. So it'd make sense to also mark it.
I wonder how your "Expected behavior" image was created.
Image editing.
from vscode-indent-rainbow.
The indentation of the line can be by definition only at the start of the line. Your line continuation does not count as an indentation for this plugin.
Image editing.
Yeah, I figured that. My question was more related to the authority that decided about the "expected behavior". It is what you expect, and your expectation is wrong for what this plugin does. I believe I got a similar request before. But most of the 5.5 million installations seem to share my expectation (or don't care).
from vscode-indent-rainbow.
@oderwat I personally would prefer the behaviour describe here. In #57 it makes sense to not colorize but this is different. I use the lines as an indicator of what range of code is going to get folded and so the colouring being non-continuous doesn't make sense to me. Also I think it looks worse. So an optional toggle might be nice. Obviously if it is needlessly complex to add due to the text wrapping not actually containing characters don't bother.
EDIT: To clarify in this mode the expected behaviour being the recoloration of the lines already present in VSCode by default is not strange. Notably these lines do continue during a text wrap.
from vscode-indent-rainbow.
It looks like the VSCode API doesn't actually support this. If they were to ever implement this, then this would be a great feature still.
from vscode-indent-rainbow.
I would not want it even if the VSCode API could do something like that. This indentation is not relevant for the code functionality, and it would harm not to see that it actually is not the indentation of the line itself. I think people who actually were originally targeted with this: Python, Haskell, Nim, Yaml and the ones that I have forgotten would also not like it because it would make reading code harder. This plugin was never about "beauty" even if people like it for that (I suppose). It was created, so you can indent and check your "code indentation language" with less cognitive burden.
from vscode-indent-rainbow.
Obviously if it is needlessly complex to add due to the text wrapping not actually containing characters don't bother.
If you make a PR I consider adding it as optional functionality. We had this before for other things I didn't need myself. I also cannot get tired of telling everybody and his dog, that, despite 5.6 million "installations" I got about 40 coffees from this.
from vscode-indent-rainbow.
I'd argue it's actually a functionality problem, as these are styled the exact same way as when indentation stops.
from vscode-indent-rainbow.
Related Issues (20)
- How can show only color lines not color bars? HOT 2
- Option to follow theme's bracket colors HOT 4
- Option to only colour in active code block
- How can i change the indent Rainbow Style from default to this as shown in Pic? HOT 1
- Don't color indents when making a brace aligned parameter list HOT 1
- Colorize pseudo-indent of wrapped lines HOT 1
- Language List HOT 1
- Not sure how to make indent into blocks to lines HOT 5
- Highlighted space in vscode HOT 3
- where is the documentation ? HOT 1
- Installing correctly but not working on VSCodium HOT 1
- How to enable the additional line like in picture 1 HOT 2
- Pale colors on light themes make indents difficult to see HOT 1
- Inline Editor Indent Rainbow Requires Focus for Proper Functioning HOT 4
- When pasting a new file, the color is confused HOT 2
- oderwat.indent-rainbow_performance issue
- Lists with wrapped text in Markdown have incorrect tab highlighting HOT 5
- Never nester option HOT 2
- indentSetter is not described and does not work 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 vscode-indent-rainbow.