Neovim PDE— init.lua

A modular approach to configure a PDE for different programming languages.

5 min readMay 15


Neovim PDE — init.lua

In the Modern Neovim series, we use lazy.nvim to manage the plugins. One key feature of lazy.nvim is the ability to use different configuration files to set up the same plugin.

In this article, we will go through a modular approach to set up a development environment for different languages. Each language will have its stand-alone configuration file covering Tree-sitter, LSP, and DAP configurations, making it easier to enable or disable the environment.

This article is part of the Neovim PDE series.

The Neovim configuration files are available in this repository.

Getting Started

For beginners, we suggest going through the following article to understand the different approaches to setting up a Neovim environment.

Here is the folder layout for the sample configuration we will be setting up in this article.

Neovim PDE
  • Under the base folder, we set up the common configuration for all programming languages.
  • The color scheme is configured in the lua/base/ui.lua file.
  • nvim-cmp, LuaSnip, and other coding plugins are configured in the lua/base/coding.lua file.
  • telescope.nvim and which-key.nvim are configured in the lua/base/editor.lua file.
  • Under the pde folder, we will have one single file per language.
  • Under the config folder, we set up the auto commands, key mappings, and various Neovim options.

This is a very minimal setup adapted from LazyVim.

For example, here is a sample configuration of the Lua programming language.




Software engineer, Data Science and ML practitioner.