lkcampbell / brackets-indent-guides

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

Brackets indent guide appears with dashed lines instead of straight #36

Open frankny opened 7 years ago

frankny commented 7 years ago

Any ideas how to fix this? Image attached displaying behavior. Thanks e25039ce-49d8-11e7-87a2-b4cddb252ec5

lkcampbell commented 7 years ago

@frankny, I know @tweakimp has been looking at ways to dynamically size the guide segments for issue #34 but I haven't investigated his solution yet. Maybe he can tell us if it is applicable to this problem as well.

The only workaround I know of right now is to use different fonts or themes. The gaps are being caused by the extra space between the lines, probably a style of the theme.

tweakimp commented 7 years ago

Please tell us the theme and the settings fonts.fontSize and fonts.fontFamily you are using. Maybe a theme could widen the space between lines while the font stays the same so that these gaps are created.

frankny commented 7 years ago

@lkcampbell @tweakimp Yes, depending on what themes I use the problem does go away. I'm using 'smart theme dark' and my font is 'Andale Mono'. I'm kind of a stickler for editor appearance and spent a decent amount of time getting it to look how I want, so changing the appearance so that the extension works wouldn't be an option for me. Either way, I appreciate the help!

tweakimp commented 7 years ago

In smart theme dark settings file theme.less you can set .CodeMirror, .CodeMirror-scroll { line-height: 15px; } which will fix the problem but obviously make each line height smaller.

frankny commented 7 years ago

@tweakimp thanks ill try it out.

lkcampbell commented 7 years ago

@tweakimp, thanks for your input.

@frankny, the Indent Guides extension is built on CodeMirror Overlay API. Unfortunately, I am limited by that API. It has constantly introduced problems with the overlap or spread of the indent guide segments, something I have struggled with for years.

Your request is reasonable, but it is beyond my ability to solve, so I am am going to close this bug as a Code Challenge. Maybe someday I will convince the creator of CodeMirror to create Native Indent Guides, but until that happens, this is the hack job you get from me :).

frankny commented 7 years ago

@lkcampbell no worries, thanks anyways.

lkcampbell commented 7 years ago

I have a couple of ideas on how to solve this problem, so I am reopening the issue to investigate.

netoper commented 6 years ago

problem solved ;) no matter on the font size or line height.. i use line-height: 1.5px; on screenshot.

lk

thank you, you made my day :)

Michael-Luxus commented 6 years ago

waw, thank you!

lkcampbell commented 5 years ago

@netoper I know I used that border solution some time in the past and ran into problems. Unfortunately, it was so long ago that I can't remember what the problems were. At any rate, I will be glad to take a look at it again and see if it will solve the problem now.