Member-only story

Neovim PDE for Data Science (Part 2)

Configure a PDE for data science — Python, R, and Julia.

Neovim PDE for Data Science (Part 2)

We will continue our journey to configure a PDE for data science.

This article is part of the Neovim PDE series.

The Neovim configuration files are available in this repository.

Getting Started

We configured a development environment to edit Jupyter Notebook in the previous article. The environment can also be used to edit regular Python files. With this configuration, we can have a familiar experience using Jupyter, from within Neovim.

Neovim PDE for Data Science

Context Menu using hydra.nvim

To have a better user experience, we will configure a context menu using hydra.nvim.

In the lua/base/editor.lua file, we configure the plugin.

  {
"anuvyklack/hydra.nvim",
event = { "VeryLazy" },
opts = {
specs = {},
},
config = function(_, opts)
local hydra = require "hydra"
for s, _ in pairs(opts.specs) do
hydra(opts.specs[s]())
end
end,
},

In the lua/pde/jupyter.lua file, we configure the menu.

With this configuration, we now have a context menu that provides quick access to manipulate the REPL.

We can trigger the menu using <A-n>, as shown below.

REPL Menu

Let’s continue to configure the environment with other programming languages.

R

We configure R in the lua/pde/r.lua file.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

alpha2phi
alpha2phi

Written by alpha2phi

Software engineer, Data Science and ML practitioner.

No responses yet

Write a response