0

When editing Python files over tramp, elpy continues to use my local python distribution for completion, which is fine by be for what I need.

However, when editing C++, it uses clang output from the remote host and the round-trip is constantly hanging my editor. Right now I just manually disable company-mode, but I am wondering how I can include a hook that says, when editing C++ over tramp, turn off company-mode. Any ideas?

1

Completely untested:

(add-hook
 'c++-mode-hook
 (lambda () (when (file-remote-p default-directory) (company-mode -1))))
| improve this answer | |
  • you sir... rock – Vince W. Mar 31 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.