dcasella / monokai-plusplus

A modern Monokai theme for Sublime Text 3 and Visual Studio Code
MIT License
46 stars 10 forks source link

One more scope for JS Next function call? #13

Closed dsl101 closed 4 years ago

dsl101 commented 4 years ago

None of the console function calls get highlighted with JS Next (the default JS syntax does get this case right):

image

The scope is source.js meta.group.braces.curly support.function.console.js—could you include that one too?

I had wondered if this should include meta.function-call.method.js, which the default JS syntax does, but the TM docs say (with my italics):

Function names, including the full path, and all parameters should receive the following scope. The name of the function or method should be variable.function, unless the function is scoped with support.function.

meta.function-call

So that suggested to me that support.function... should be enough?

dcasella commented 4 years ago

The problem with using support.function is that it usually applies to the whole function signature (or call), meaning parenthesis and parameters all receive the same color. I might experiment in the future with adding support.function to https://github.com/dcasella/monokai-plusplus/blob/7af9d5d10ef11de4d3d63700c6c907d36268b347/themes/Monokai%2B%2B.tmTheme#L289-L299 and verify how each language syntax (that I usually test) in both VS Code and Sublime Text reacts.

For now I simply added support.function.console.js to the list of exceptions.