Neovim 101 — Literate Programming

Literate programming using Neovim and Tree-sitter.

alpha2phi
3 min readOct 2, 2022
Neovim 101 — Literate Programming

Literate programming is a methodology that combines a programming language with a documentation language, thereby making programs more robust, more portable, more easily maintained, and arguably more fun to write than programs that are written only in a high-level language.

In this article, we will use the Markdown language to write the documentation, and leverage Tree-sitter to generate the output of the code snippets.

This article is part of the Neovim 101 series.

The Neovim configuration files are available in this repository.

Getting Started

In the articles related to Emacs, we showed you how to execute source code within Org documents using Babel, which is an extension of Org Mode.

The Markdown language is still the most widely used format for technical documentation. Using Neovim and Tree-sitter, we can easily generate the code output as part of the documentation.

--

--

alpha2phi
alpha2phi

Written by alpha2phi

Software engineer, Data Science and ML practitioner.

Responses (2)