Open vspinu opened 8 years ago
BTW, the same rationale is valid for anaconda-mode-eldoc-function
. It can fall back on python-eldoc-function
when no completion was found.
I don't think this is doable in easy way. All anconda-mode
commands implemented as asynchronous callbacks executed on the server response. So there is a physical separation from the moment you hit M-.
and actual go to definition action. That's why anaconda-mode
override C-M-i
key binding instead of providing its own complete at point function. The same technique applied to the eldoc
mechanics.
How about checking for native python completion first and only when there is nothing on that end dispatch to the server side? I think there is little to lose here. Process completion is faster and if an object is defined emacs completion does a pretty good job there (at least it seems so to me).
Does this mean anaconda-mode completion will not shows up if there is alive *Python*
process? Also note that you can customize anaconda-mode-eldoc-callback
and anaconda-mode-complete-callback
. You can extend jedi
result with inferior python completions.
Does this mean anaconda-mode completion will not shows up if there is alive Python process?
If there is a completion from python process then indeed, jedi is not queried. In all other case it does. I think it's not a big deal. Python objects will reflect the state of the most recent evaluation. This is what I personally always want. I mostly work interactively with data and my scratch buffers are so messy that jedi usually chokes.
Also note that you can customize anaconda-m
Aha. Thanks for the pointer. The python.el eldoc is not a big deal. It's worse than anaconda's one but it's still better than nothing when jedi fails for whatever reason.
Is this still an issue?
I cannot dwell into this ATM as I am not working with python for a while, but I would believe this to be still the case unless something radical changed on some of the parties involved.
Anaconda completion is static by definition. While working with shell interactively it's useful to have completions and eldoc for objects what are created interactively. Fortunately that's is already done by
python-shell-completion-at-point
in inferior andpython-completion-at-point
in script buffers. Both of these functions are incompletion-at-point-functions
lists.Now, the problem is that
anaconda
overwritesC-M-i
without falling back oncompletion-at-point-functions
. Would you consider fixing this by either falling back on default completions, merging with default completions or adding anaconda completion tocompletion-at-point-functions
?There is a similar problem with
anaconda-company
which inhibit defaultcompany-capf
. I am reporting this separately.