lkcampbell / brackets-indent-guides

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

Conflict with extension "Show Whitespace in Brackets" #2

Closed Gounlaf closed 11 years ago

Gounlaf commented 11 years ago

Hi,

I have just installed your extension and it works perfectly. But I Notice that it create a "conflict" with "Show Whitespace in Brackets" (https://github.com/DennisKehrig/brackets-show-whitespace)

Yours is "overriden" by the other extension.

I have created an Issue to the other on too. I looked your code (and the other on), but I'm too novice to help you =/

Thanks

lkcampbell commented 11 years ago

@Gounlaf and @DennisKehrig, I think this might be a CodeMirror bug.

I put together a simpler repro and file an issue at: https://github.com/marijnh/CodeMirror/issues/1547

Let's see what he has to say about it.

lkcampbell commented 11 years ago

@Gounlaf and @DennisKehrig, after discussing this problem with Marijn, this does not appear to be a CodeMirror bug. The mode tokenizer uses a stream model, not a tree model, so if one overlay (i.e. Dennis's Show White Space) has to break the line into single space tokens, another overlay (i.e. my Indent Guides) must be applied to every space as well. I was hoping that my less specific overlay would act like a parent node to Dennis's overlay, but this is not how CodeMirror is designed.

I am going to try and come up with a new overlay that only applies my style to every n-th space instead of applying it to a span of n spaces. I have a feeling this might cause a bit of a performance hit but I can't really think of another solution.

lkcampbell commented 11 years ago

@Gounlaf, fixed, and doesn't really affect the performance as far as I can tell.

Please verify the fix, then close this bug and Dennis's bug:

https://github.com/DennisKehrig/brackets-show-whitespace/issues/7

lkcampbell commented 11 years ago

@Gounlaf, I'm going to go ahead and close this issue.

Please double check that it is working whenever you have the time and let me know either way.

Gounlaf commented 11 years ago

@lkcampbell, I will check asap ; (probably tonight)

Gounlaf commented 11 years ago

@lkcampbell, yeap, it's seems working ! Thanks for the time you spent !