Neovim DAP Enhanced

alpha2phi
5 min readJun 19, 2021

Enhance your debugging experience using DAP in Neovim for Python, Golang, Rust, Node.js, Javascript/Typescript, and Lua.

Neovim DAP Enhanced

Overview

In my previous articles, I walked through with you how to configure LSP and DAP for Neovim using both nvim-dap and vimspector. In this article, let’s continue to enhance the debugging experience using nvim-dap. I am going to focus on Python, Node.js/Javascript/Typescript, Golang, Rust, and Lua.

Getting Started

Let’s get started with Python before we delve into other languages.

Install Plugins

Using your favorite plugin managers, install the following plugins

I am going to install them using packer.nvim.

use {'mfussenegger/nvim-dap'}
use {'nvim-telescope/telescope-dap.nvim'}
use {'mfussenegger/nvim-dap-python'}

Run :luafile % and :PackerInstall to install them.

Configuration

Create the following files

  • lua/dbg/init.lua
  • lua/dbg/python.lua

In init.lua, add the following lines to configure the plugins and the key bindings. Change the key mappings based on your preferences.

alpha2phi

Software engineer, Data Science and ML practitioner.