Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

benneti/spacemacs-jupyter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jupyter layer

Table of Contents

TODOs

Keybindings to send code to repl for compatible modes

more keybindings for repl

Change spacemacs load babel languages function such that it first changes the order to make sure jupyter is the last element

Add this at a fitting position

(spacemacs|use-package-add-hook org
  :post-config (add-to-list 'org-babel-load-languages ((jupyter . t))))

Description

Spacemacs layer for https://github.com/dzop/emacs-jupyter

Features:

  • Interactive REPL
  • Jupyter kernels support for org-babel
  • auto-completion using Company in REPL and org-src-blocks

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add jupyter to the existing dotspacemacs-configuration-layers list in this file.

Additionally you need to have jupyter available in your PATH.

The jupyter package also provides integration with org-babel via ob-jupyter. To use the kernels in jupyter just add (jupyter . t) to your org-babel-load-languages list as the last element. If no auto-completion is used adding to the variable is sufficient as spacemacs provides a hook that loads it the first time org-mode is started.

An example would be adding

(with-eval-after-load 'org
  (setq org-babel-load-languages
        (append org-babel-load-languages
                '((latex . t)
                  ;; jupyter has to be the last element
                  (jupyter . t))))
  ;; Execute load languages once, else autocompletion will only work in the
  ;; second org file one opens
  (spacemacs//org-babel-do-load-languages))

to your dotspacemacs/user-config.

Key bindings

To start a REPL use SPC a j j or SPC a j r and to connect to one SPC a j c.

Key BindingDescription
SPC x x xDoes thing01