DamnWidget / anaconda

Anaconda turns your Sublime Text 3 in a full featured Python development IDE including autocompletion, code linting, IDE features, autopep8 formating, McCabe complexity checker Vagrant and Docker support for Sublime Text 3 using Jedi, PyFlakes, pep8, MyPy, PyLint, pep257 and McCabe that will never freeze your Sublime Text 3
http://damnwidget.github.io/anaconda/
GNU General Public License v3.0
2.22k stars 259 forks source link

Auto-complete For PyGObject [with suggested fix] #652

Open ghost opened 7 years ago

ghost commented 7 years ago

Expected Behaviour

Import Gtk from PyGObject and get proper Auto-completion.

Actual Behaviour

Auto-completion does not work at all.

Steps to Reproduce

Try importing Gtk from PyGObject using "from gi.repository import Gtk" and then try typing "Gtk." . You will not get any completions.

Reasoning

This is NOT really an issue caused by Anaconda. It is actually caused by PyGObject lazy-loading its functionalities. But there is still a way to get Auto-complete to work.

Possible Fix

Wing IDE's documentation defines a way to get Auto-complete to work with Gtk using Fakegir. Surprisingly, this works very well in Wing IDE. It would be great if the same would be possible in Anaconda as well.

Thank you. I <3 your IDE.

ghost commented 7 years ago

Is this really just gonna be left like that? or is there already a way to do it?

DamnWidget commented 7 years ago

I did not had time to look into it, I am really busy, if you think you can investigate this I will be more than happy to accept a PR.

mufeedali commented 7 years ago

It's a simple matter of adding the fake package generated by 'fakegir' to the PYTHONPATH of Anaconda. Should be simple. But how do you do it with no obvious flaws?

xrogaan commented 5 years ago

It's a simple matter of adding the fake package generated by 'fakegir' to the PYTHONPATH of Anaconda. Should be simple. But how do you do it with no obvious flaws? Perhaps by adding the cache directory (~/.cache/fakegir/) into the extra_paths of anaconda, either in the project configuration or the anaconda hook file.

https://damnwidget.github.io/anaconda/anaconda_settings/#environment-hook-files