Complement python with emacs using company-jedi

Click here for an introductory article on company-mode

Overview

jedi is a complementary tool for python. company-jedi is a backend for using jedi completion in company-mode.

python_screencast.gif

Installation

Can be installed from MELPA.

M-x package-install RET company-jedi RET

Note that company-jedi requires the jedi-core package and not the jedi package. The jedi package is for auto-complete and is rather annoying.

Setting

(require 'jedi-core)
(setq jedi:complete-on-dot t)
(setq jedi:use-shortcuts t)
(add-hook 'python-mode-hook 'jedi:setup)
(add-to-list 'company-backends 'company-jedi) ;Add to backend

If you set jedi: complete-on-dot to t, it will complete (method) even when you enter .. The following shortcut keys can be used by setting jedi: use-shortcuts to t

--Jump to M-. definition --Return from M-, definition jump

How to use

Only at the first execution

M-x jedi:install-server RET

Install the jedi server with. The location where the jedi server is installed can be specified with jedi: environment-root.

Recommended Posts

Complement python with emacs using company-jedi
[S3] CRUD with S3 using Python [Python]
Using Quaternion with Python ~ numpy-quaternion ~
[Python] Using OpenCV with Python (Basic)
Using OpenCV with Python @Mac
Send using Python with Gmail
Harmonic mean with Python Harmonic mean (using SciPy)
[Python] Using OpenCV with Python (Image Filtering)
Using Rstan from Python with PypeR
[Python] Using OpenCV with Python (Image transformation)
[Python] Using OpenCV with Python (Edge Detection)
Notes on using rstrip with python.
When using MeCab with virtualenv python
Precautions when using six with Python 2.5
[AWS] Using ini files with Lambda [Python]
Try mathematical formulas using Σ with python
Behind the flyer: Using Docker with Python
Using Python and MeCab with Azure Databricks
Socket communication using socketserver with python now
Try using Python with Google Cloud Functions
Check stock prices with slackbot using python
Working with OpenStack using the Python SDK
Tips for using python + caffe with TSUBAME
I'm using tox and Python 3.3 with Travis-CI
FizzBuzz with Python3
Scraping with Python
Statistics with python
Scraping with Python
Python with Go
Twilio with Python
Integrate with Python
Start using Python
Play with 2016-Python
AES256 with python
Tested with Python
python starts with ()
with syntax (Python)
Bingo with python
Zundokokiyoshi with python
Scraping using Python
Excel with Python
Microcomputer with Python
Cast with python
[Personal memo] julia --Using Python library with julia using PyCall
Debug with VS Code using boost python numpy
I tried using mecab with python2.7, ruby2.3, php7
Automatically format Python code into PEP8-compliant code with Emacs
Recent ranking creation using Qiita API with Python
What are you using when testing with Python?
Zip, unzip with python
Django 1.11 started with Python3.6
Primality test with Python
Python with eclipse + PyDev.
Socket communication with Python
Data analysis with python 2
Scraping with Python (preparation)
Try scraping with Python.
Learning Python with ChemTHEATER 03
Sequential search with Python
"Object-oriented" learning with python
Operate Redmine using Python Redmine