semshi
semshi copied to clipboard
Support from foo import *
I know it's already stated in the README that currently Semshi does not support highlighting module from from foo import *
.
But is there any progress on this aspect, is it possible to support that in Semshi as well?
My current solution is to add unresolved
to the non-highlights group, but I would love to see it supported.
Thanks for the great plugin.
It bothers me too! And it can certainly be done. However, there are a few things to consider. Off the top of my head:
-
Semshi reparses the code on every change. This is fast when just looking at the current file. But resolving imports (potentially recursively), may take quite long. So we'd need to think of a smart mechanism to do that without affecting usability. Also, how do we detect if an imported name has become available, etc.? Do we re-check at certain intervals?
-
How complex and error-prone is static resolving of Python imports? (I'm thinking of different
PATH
s and entry points. How much time does it take? (Maybe we should look at other completion/refactoring plugins that do that. Maybe we can even hook them?)
Also, right now, I got some important refactorings/improvements regarding Semshi in mind, so I'm not sure how soon I will be able to tackle this given I'm currently the only author. :)
Thank you. Please keep on writing any news about it here. I will try to look at the code and see what can I do to help out, or maybe someone with more experience decide to help :).