lkcampbell / brackets-indent-guides

A Brackets extension to show indent guides in the code editor
149 stars 34 forks source link

Only show indent guides when text is present on line #15

Closed lkcampbell closed 10 years ago

lkcampbell commented 10 years ago

Per https://github.com/lkcampbell/brackets-indent-guides/issues/13, add an extension preference to only show indent guides when text is present on line.

lkcampbell commented 10 years ago

@LeinardoSmith, I looked into adding this enhancement this weekend.

I can add an extension preference that does not draw indent guides on a current line until it contains non-whitespace characters, but I can't back up to previous lines and make them draw the guides as well. Assuming you want this functionality to function the same as Sublime Text, it cannot be done using CodeMirror overlays.

Same problem as the one in issue https://github.com/lkcampbell/brackets-indent-guides/issues/11.

CodeMirror overlays only function within the context of the current line that is being parsed. There is no way that I know of to jump to previous lines and parse them again after subsequent line text has been changed.

I am closing this issue as a code challenge. It is a new issue category I created for issues and enhancements that I have unsuccessfully attempted to solve.

What this means is I am stuck and I am asking for help from the community. A link to this issue will go into the extension README.md file so that others can find it and offer ideas and solutions as well. I think this is a better solution than just leaving the issue open forever or closing it as wont fix.

If, at any point in the future, a good solution emerges, I will reopen and add this enhancement.