pythonic-emacs / anaconda-mode

Code navigation, documentation lookup and completion for Python.
GNU General Public License v3.0
706 stars 87 forks source link

[FR] Add option to disable anaconda-mode's RPC calls completely when on TRAMP #413

Closed NightMachinery closed 1 year ago

NightMachinery commented 3 years ago

anaconda-mode's RPC calls completely break my TRAMP python files, as there are lots of slow RPC calls. I have for now completely disabled anaconda-mode, but I would like to just disable it for TRAMP buffers. Thanks!

falloutphil commented 3 years ago

My guess from inspecting the code is that we need a new defcustom called anaconda-mode-disable-rpc which should have 3 states - never, remote, always

Then here: https://github.com/pythonic-emacs/anaconda-mode/blob/344727c9e07e108896740c782689bf3588edcce5/anaconda-mode.el#L358

We need to test the new custom variable and in combination with pythonic-remote-p we can decide whether to proceed with the call or not.

If my guess is right it's probably a simple addition. If I get time over the next few weeks I will try to look at this if nobody else implements first.

Shout if you think I'm missing the point and I'll refine this.