using emacs CEDET completion for python
Asked Answered
A

1

10

In default installation of cedet-1.0 completion can only track global scope symbols in current file. This is not much differs from built-in completion functions (dabbrev-expand or hippie-expand).

It can complete symbols from neither imported modules, nor class properties. Not saying it cannot handle 'self'.

Is it possible to tweak semantic to do the things?

P.S. ECB code browser sucesfully sees all imports/base classess and stuff. It is symbol completion workd incorrectly, or not properly set up.

Antenna answered 23/4, 2011 at 20:46 Comment(0)
H
8

CEDET support for each language is slightly different. In the case of python, the 1.0 release for CEDET hadn't been configured to convert a python import into a file-name. In addition, 'self' is similar to 'this' in c++, which needs to be added by completion logic since it isn't declared. These two features were added to the bzr repository in January of this year. I am not a python programmer, but I recall reports that this fixed a range of the most basic features of smart completion so that symbols from imported libraries works. There was also new code in bzr for python system paths.

Thus, I recommend downloading CEDET from bzr to get these features to see if it now does what you would expect for smart completion.

Hysteroid answered 24/4, 2011 at 12:14 Comment(2)
qMax, could you say whether you tried it, and if so, how it worked for you?Idol
btw, https://mcmap.net/q/474706/-emacs-tab-completion-of-local-python-variables – it works quite well, just be sure to use the github code, the blog post is slightly outdated.Idol

© 2022 - 2024 — McMap. All rights reserved.