Modern Neovim— Debugging and Testing
Configure a modern debugging and test-driven development environment with Neovim.
In this article, we will focus on setting up a test-driven development environment with Neovim, with an integrated debugging user interface to debug the application and test cases.
This article is part of the Modern Neovim series.
The Neovim configuration files are available in this repository.
We already have a fully functional development environment using the current Neovim setup and using
lazy.nvim, we can easily extend the setup to support any other programming languages.
For a better development experience, and as part of standard software development practice, we will integrate test-driven development and debugging features into our current setup.
Debugging using DAP
For debugging, we will use the
nvim-dap plugin and other DAP-related plugins.
We covered DAP extensively in the beginners series so we will not go through the basics here.
To install the DAP plugins using
lazy.nvim, we create the
lua/plugins/dap/init.lua file with the following code snippet.
nvim-dap, we configure the following plugins.
nvim-dap-ui— a better user interface for
nvim-dap-virtual-text— adds virtual text support to
telescope-dap.nvim— integration for
one-small-step-for-vimkind— a debug adapter for the Neovim Lua language.
For our configuration,
- We configure the key…