-
Notifications
You must be signed in to change notification settings - Fork 86
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
Autocomplete in prelude #293
Comments
Hi, thanks for giving anaconda-mode a try. Probably method search of the models isn't supported because the model itself was built with tricky metaclass magic? What library do you use to work with the model? Regards, Artem. |
Hi, thanks for writing it! The object that's not suggesting is from from django_otp.plugins.otp_totp.models import TOTPDevice and the code where it's not suggesting (although it's happening everywhere in the file): def create_device(user, confirmed=False):
key = default_key()
device = TOTPDevice.objects.create(
key=key,
user=user,
name='Default',
tolerance=10,
digits=6,
Confirmed=confirmed
)
device.<no methods suggested here>
return device Thanks! |
@ahonnecke Thing is - Django models are created with dark metaclass magic, that's why Jedi (completion library anaconda-mode uses under the hood) can't work with them properly. device = TOTPDevice(
key=key,
user=user,
name='Default',
tolerance=10,
digits=6,
Confirmed=confirmed
) and then try if |
That did not change the behavior, however, I think that I wasn't activating the pipenv virtual environment correctly (and honestly, I'm not entirely sure what I did that fixed it) as after getting that fixed it's working now. Thank you! |
Ok, closing then. |
I'm currently attempting to set up anaconda-mode through prelude in an environment that uses pipenv, I've
created a company anaconda init file
I can get anaconda-mode-find-definitions to follow definitions into files that are in my pipenv venv (so it seems that emacs has found the venv), but can't get anaconda-mode-complete to do suggest any context aware matches (like the methods of an object). (ie type in model_name.sa and no list appears, when I run C-M-i, the mini buffer prints "no matches")
I am seeing suggestions of python built in methods
So autocomplete seems to be working, just not the contextual part.
Maybe I'm just not setting it up right?
I'm happy to check out dev, debug, qa, help however I can.
anaconda-mode
I don't have anaconda-response or anaconda-socat
The text was updated successfully, but these errors were encountered: