-
Notifications
You must be signed in to change notification settings - Fork 11
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
Built-in types are highlighted as support.function and not support.type if called #16
Comments
I think part of the problem is that they currently need to be treated like a function in order to have parameters get highlighted. I agree that they aren't really functions though. So I think that the current implementation is the easy way to get parameters etc. working; just make them functions. But the other way would be to add parameter support to these class objects; that would be more work, but it would more correct. I have thought about doing the latter approach myself, but I am also very lazy at times when I have something working. I would be interested to hear what @MattDMo thinks as well. |
I'm not as busy as I was last time in #8. I also realize now, after seeing the screenshots in there, that this is an issue directly caused by that change. I'll start working on the "fix" that I had in mind back then which should also cover this issue and hopefully also make the syntax definition itself a bit more manageable. |
Meh, I think in this case there was a net positive increase in the highlighting via #8, but yeah, it could be done better. I look forward to seeing this improve even more; I'll keep an eye out for your fix. |
So after a hiatus, I'm trying to get back to work on this again. I've merged @FichteFoll's changes into a testing branch in my repo, and I'll see what makes sense to use. |
Any updates? 🐼 |
@aldanor as a matter of fact, yes! PythonImproved 2.0 is going to be released in the very near future, and this is fixed there. |
@MattDMo wow, very cool -- and a good timing! Thanks! |
Consider the above snippets,
str
is once highlighted assupport.type
and once highlighted assupport.function
, as well aslist
. This is probably because they are actually used like a function, but in fact they are classes. The default Python syntax def does not treat these built-in type calls differently to the literal references.Here is the same snippet with the default Python syntax:
![2014-09-02_22 44 56](https://cloud.githubusercontent.com/assets/931051/4125436/11c2c160-32e2-11e4-99d7-ff172942e954.png)
I prefer the default version over the current, but what do you think?
The text was updated successfully, but these errors were encountered: