Neovim 101 — Coding Assistant

Integrate a coding assistant into Neovim.

3 min readSep 11, 2022


Neovim 101 — Coding Assistant

Previously we integrated a cheat sheet & coding assistant, and other 3rd party utilities with Neovim to help us in coding.

In this article, we will integrate the so command-line tool, which is a terminal interface for Stack Overflow written in Rust.

This article is part of the Neovim 101 series.

The Neovim configuration files are available in this repository.

Getting Started

As developers, we need to learn and code constantly. As Neovim users we want to do it all from within Neovim.

so — A Terminal Interface for Stack Overflow

The so utility provides an interface to the Stack Exchange network. Using this command-line tool, we can simultaneously search any number of sites in the Stack Exchange network.

so is developed in Rust, and available for Linux, Windows, and macOS.

Integration using a Lua Module

Lua Module

In the lua/utils/cht.lua file, we add the functions to launch this tool.

  • We use the vim.ui.input API to request input.
  • We create a vertical split and open a terminal.
  • From the terminal, we launch the so command.
  • We set the file type of the buffer to cheat.

Auto Command

In the after/plugin/autocmds.lua file, we create an auto command to make it easy to exit the cheatsheet window (line 22) by pressing q.

Terminal Scrollback Size




Software engineer, Data Science and ML practitioner.