Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong color for function call #104

Open
wpbishoy opened this issue May 28, 2016 · 7 comments
Open

Wrong color for function call #104

wpbishoy opened this issue May 28, 2016 · 7 comments

Comments

@wpbishoy
Copy link

wpbishoy commented May 28, 2016

I have an issue that happened after a couple of sublimes updates ago where the function call color (supposed to be yellow) has been lost and it turned into the same color as a variable, in PHP. This is also the case for me in JS.

See screenshot: http://i.imgur.com/uTVJkwG.png

In the screenshot current_time should be in yellow, right? Can a package conflict or something do that?

@wesbos
Copy link
Owner

wesbos commented May 28, 2016

Sublime updated their definitions for php and a few people have been saying it looks odd. This this most likely an issue with the php package as the theme does very little for language specific stuff

@wpbishoy
Copy link
Author

Any suggestion we could go around this?

@wesbos
Copy link
Owner

wesbos commented May 30, 2016

I'm investigating here:

sublimehq/Packages#410

@FichteFoll
Copy link

You have a meta.function-call selector and support.function. I don't know which one has been used previously, but I suspect meta.function-call, which is now being overridden for PHP function valls because of the variable.function scope that they get on top of it. This more appropriate since it specifically refers to the identifier whereas meta.function-call is the scope of the entire call, including parameters and parenthesis.

Thus, the first selector should probably be replaced with variable.function. Alternatively, meta.function-call variable.function.
I can't evaluate how this would affect other syntaxes however.

@wbond
Copy link

wbond commented Jun 1, 2016

Just a note that we are currently standardizing on meta.function-call variable.function across different languages in the default packages. So far we've done significant work on the following syntaxes:

  • PHP
  • Python
  • JavaScript
  • Go
  • C/C++
  • Rust
  • Objective-C
  • TCL

Our intent is to continue working on getting these standardized and then I'm going to write up official docs on what scopes are recommended for syntax authors and what scopes should be handled by color schemes.

My work to date has been focused on trying to preserve existing scope names where possible, but making changes where some existing languages may use one scope and others use a different scope. This, of course, will result in some things breaking along the way, but hopefully in the end we will have a much better experience for package developers and users in terms of syntaxes and color schemes.

@FichteFoll
Copy link

The forum thread https://forum.sublimetext.com/t/a-convention-for-scope-naming/17105 could also be of interest in this regard, since it also contains scope name analysis of common color schemes or syntax definitions, together with a hand ful recommendations. It does not contain all the discussion however since part of that has taken place in the sublimehq/Packages issues.

@gerardroche
Copy link

gerardroche commented Aug 19, 2016

I've added a test where the function color should be #ffee80.

This test passes on st linux build 3120 with the default PHP package.

Added a fix as per @FichteFoll information.

screenshot from 2016-08-19 17 09 48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants