|
|
|
|
|
by david-j-vujic
635 days ago
|
|
I’m using Elpy because it comes with great code evaluating features (sending expressions to the REPL and such). In this config there’s also auto discovery of virtual environments. Adding to that: black, flake8 (not yet added ruff). In the docs, you will find more about this setup with IPython integration, if the code evaluation things is something you look for too. https://github.com/DavidVujic/my-emacs-config |
|
It’s definitely not as advanced as Elpy, but it’s worth noting that the built-in Python-mode also has basic support for this: C-c C-p to start an interpreter (can be reconfigured to run IPython), C-c C-e to send one statement to the interpreter, and C-c C-c to send the entire file to the interpreter.
If you install code-cells.el you can get another keybinding to send one “code cell” (delimited by “# %%” comments like VSCode does) to the interpreter. There’s also the “comint-mime” package that enables Matplotlib support in the interpreter so you can see inline plots.
An alternative to all this, is the emacs-jupyter package which integrates a Jupyter kernel as the Python REPL in Emacs.
> not yet added ruff
This was pretty plug-and-play for me if you’re interested: https://github.com/erickgnavar/flymake-ruff