Closed themetaschemer closed 9 years ago
@themetaschemer can you check if you have the same problems with master
? Quite a few fixes were merged since the latest stable release.
@ap4y Thanks for the suggestion, but, the problem is present in the latest build as as well (I'm assuming that melpa is in sync with the master .. I have swift-mode-20150611.1440).
I have isolated the problem some more: The issue is that any '{' that does not have a space in front of it is skipped over by the paren-matcher (In my example above, it is the '{' right after the else in the 6th line from the bottom.
I will see what I can do, though I want to encourage you to use spaces a bit more.
Sadly, I cannot undo 30 years of programming practice as easily :-) I am trying to debug the issue some more before I give up.
One other issue, for example, if I skip spaces before braces is that the font-lock mode starts to misbehave as well. E.g Double{ will get highlighted the same as Double (i.e., the { will absorb the color of the type) which leads me to wonder: is this is a syntax-table issue?
I'm not sure right now but I suspect that it's either smie
related problem (as far as I know sexp
movements depend on smie
) or this small hack that was applied to the syntax-table. I will try to fix this once I have some time.
Ok. Sounds good. In the mean time, I'll keep trying to investigate as much as I can.
I use M-C-f and M-C-v to navigate across matching parentheses. These seem to be broken in 0.3.0. The symptom is that they will put me in the middle of a codeblock instead of at a matching '}'.
e.g. try a sequence of M-C-f starting at the first character of this code block:
You'll find your cursor ends up before the final '}' at the beginning of that line