coffee-script-tmbundle icon indicating copy to clipboard operation
coffee-script-tmbundle copied to clipboard

Improper highlighting of multi-line function definitions

Open kumarharsh opened this issue 10 years ago • 2 comments

I'm writing some big coffee files, and as the program is growing in complexity, my function & argument names have become a little longer, thus for readability's sake, i've to break the function declaration line into two or more lines like so:

testFunctionWhichBecameLong = (opt_1, opt_2,
                               opt_3, opt_4) ->
    return opt1 * opt2 - opt3 / opt4

These kinds of functions are not being highlighted, and thus the function starts to look like an ugly duckling...

Look at this image for more details: broken coffee-script bundle

kumarharsh avatar Feb 10 '14 12:02 kumarharsh

It is not the theme which has the problem, as Sublime Text is not even showing the fold-markers for the second function...

https://github.com/daylerees/colour-schemes/issues/95

kumarharsh avatar Feb 10 '14 12:02 kumarharsh

The scopes for the single-line function are: source.coffee meta.function.coffee entity.name.function.coffee For the multi-line function, it is: source.coffee variable.assignment.coffee variable.assignment.coffee

kumarharsh avatar Feb 10 '14 12:02 kumarharsh