tamzinblake / js3-mode

A chimeric fork of js2-mode and js-mode
GNU General Public License v3.0
181 stars 13 forks source link

weird . tabbing #52

Closed deedubs closed 12 years ago

deedubs commented 12 years ago

Great work on this mode. I've been using it steady for 2 weeks, once I've got it tweaked and setup I'll consider using it to transition my team to emacs!

I'm having the follow tab errors though: https://gist.github.com/2041394

My particular config is here https://gist.github.com/2041407

Hope you can shed some light on this, might be a config err on my part :/

EDIT: This issue refers to the improper lining up of dots in the first link. -thomblake /EDIT

tamzinblake commented 12 years ago

The second one should be fixed by setting js3-lazy-commas t

The first is a bug.

deedubs commented 12 years ago

if I turn on js3-lazy-commas t I get

var a = b
, c = d
, e = f;

instead of

var a = b
  , c = d
  , e = f;
tamzinblake commented 12 years ago

Hmm... that's a separate style setting that doesn't exist. lazy-commas assumes you always start comma-first lists with a hanging indent, so:

var
    a = b
  , c = d
  , e = f

Of course, that's just default behavior, I don't think anyone actually does that. I'll have to look into a config setting for that.

tamzinblake commented 12 years ago

Also, the dots not lining up was hard to reproduce - I couldn't get it until I actually replaced all my settings with yours. Going to have to do some work to track it down.

deedubs commented 12 years ago

Let me know if there is anything I can help with. I'm curious to see the commit's you use to solve these as I'd love to be able to help.

tamzinblake commented 12 years ago

See if that works for the dots

deedubs commented 12 years ago

Yep perfect! Thanks for the quick fix!

tamzinblake commented 12 years ago

@deedubs check out issue #53 - I think it's fixed.