elpy
yasnippet を調べてたらこのビデオで知った。このおじさんはたくさん screencast 作っててすごい。 https://youtu.be/4aYMa8f6B0o
システムのデフォルトの python を使うので、ちゃんと python3 を使うようにする必要がある。
.emacs に以下のように書く。
code: lisp
(use-package elpy
:ensure t
:init
(elpy-enable)
(setq elpy-rpc-python-command "python3"
python-shell-interpreter "jupyter"
python-shell-interpreter-args "console --simple-prompt"
python-shell-prompt-detect-failure-warning nil)
(add-to-list 'python-shell-completion-native-disabled-interpreters
"jupyter")
)
M-x elpy-config で設定を確認。以下のように出る。
code:plain
Elpy Configuration
Emacs.............: 26.3
Elpy..............: 1.32.0
Virtualenv........: None
Interactive Python: jupyter 4.5.0 (/usr/local/bin/jupyter)
RPC virtualenv....: rpc-venv (/Users/oka/.emacs.d/elpy/rpc-venv)
Python...........: python3 3.7.5 (/Users/oka/.emacs.d/elpy/rpc-venv/bin/python3)
Jedi.............: 0.15.1
Rope.............: 0.14.0
Autopep8.........: 1.4.4
Yapf.............: 0.28.0
Black............: 19.10b0
Syntax checker....: Not found (flake8)