My first package released (Coloured brackets)


#1

So I just earlier today released Swackets (Coloured brackets based on indention)

Since decorations/markers cannot be applied to text-color I had to use a (horrible) jquery dom manipulation to achieve moderately well sucess (for first release)

However I’m looking for feedback/other approaches…

I know there is grammar, so i’m wondering if it would be possible to similarly regex match patterns based on nesting-level. I’m no wix at regex so thats why I went with the jquizzle attempt. But just wondering if it would be possible any other way?

Any feedback greatly appreicated!


#2

Thank you for taking care of that, given the number of topics on that subject here and on github I think your package will definitely have a big success.

I must admit I haven’t tried it yet, since I mostly write coffeescript and ruby these days, but I’ll give it a shot soon.

Keep up the good work!


#3

Works great so far! Although I do have some suggestions for improvement. In the first image it would be nice if the second opening bracket would be something other than green to improve distinguishability. The same for the brackets of the methods of object f in the second image.


I’m not entirely sure, but I don’t think two different grammars can apply to a document at the same time, so I don’t think that’s the way to go.


#4

Very nice. Tried it out here and it looks pretty good.

I noticed it doesn’t currently work in preview tabs, only when they are promoted to full, active editor, tabs.

Maybe a different shade of the same colour could be used for those brackets on the same line/different methods of the same object? To help keep the meaning assigned to each colour.

Edit: also I’d recommend changing the title of this topic to identify the package :blush: Likely be quite a few people looking for this and be glad to find it.


#5

Thanks for your feedback. I am looking into different shades of colours for same nested methods, good idea. I think it should be plausible :smile: Good suggestion.


#6

You should also add a link to the package on atom.io in your post. Maybe even an image showing off the awesome :smile:
I’ve also found an issue with coffeescript string interpolation, but I’ve made an issue on the github repo for that. Keep up the good work!


#7

Good suggestion thanks done, and once again am looking into issue :smile:


#8

It doesn’t seem to work for me. It changes the colors of some brackets, but they don’t match up, or make any sense to me.


#9

Thats interesting i’ll look into it thanks.

Could be the line break symbols you have enabled on your (.js?) file… How do I enable that so I can reproduce this issue?

Thanks :smile:


#10

If you go to “Settings > Editor Settings section > Show invisibles”, along with “Show Indent Guide” it should display those symbols. Though I haven’t been able to reproduce briefly, I see all “{” highlighted as expected.

Maybe it could be another package interfering?


#11

Would it be possible to also colour the round brackets not only the curly ones? In the picture below, I would like for the brackets in sort (( x )) to be coloured in the same manner as the { and } below. Presumably, this behaviour should be optional.


#12

0.12.0 released


#13

What are the changes in the new version?

I had some issues where it would glitch out on me and the brackets would change colours as you would scroll but if you scrolled up they would go back to the original colours.