Repository navigation
Replies: 1 comment 1 reply
|
Thanks for this question, @marisam99! What you're seeing is expected behavior from the What's happening is that the static indentation guides are computed purely from each line's leading whitespace, with no language or syntax awareness. For lines with content, the guide level is just the indentation divided by the indent size. For blank lines, the level is interpolated from the nearest content lines above and below. In your example, the blank line after This also explains why wrapping the chain in brackets "fixes" it. It's not the brackets themselves, but when the block ends with a closing bracket at column 0, the last content line above the blank line is unindented, so the blank line computes to level 0 and no guide is drawn. Any block whose final line is unindented behaves the same way. Your reading of the settings is correct; We'll use this discussion post to gather thoughts/feedback on that idea! |
Uh oh!
There was an error while loading. Please reload this page.
When a code block has no enclosing brackets — e.g. a multi-line R pipe (|>) chain — the vertical indentation guide extends one line past the chain's actual last line. For example, the below code...
...has this indent guide as in this screenshot:

Ideally for me I'd expect the indent guide for the piped block to end at arrange(article_id). Wrapping the same chain in brackets or parentheses fixes it, but that looks odd and I dislike unnecessary visual clutter (hence the question). I've tried toggling editor.guides.highlightActiveIndentation, but it doesn't affect the static gray indentation guides. And I'd rather not turn the indentation guides completely off, as I like seeing how specific code blocks are strung/"grouped" together.
Question: Is there a setting I'm missing that would make indentation guides terminate correctly for unbracketed multi-line code blocks (like R pipe chains), or is adding a bracket pair the only way to get it to end on the correct line? Or is this VS Code core limitation rather than something Positron controls?
All reactions