Neovim PDE — C/C++, Go, Python and Rust
In this article, we will set up the development environments for C/C++, Go, Python, and Rust.
This article is part of the Neovim PDE series.
The Neovim configuration files are available in this repository.
Getting Started
In the previous article, we configured a baseline configuration that allows us to set up a personalized development environment based on the programming language we want to use. We also configured the development environment for Lua.
In this article, we will continue to set up development environments for Python, Go, Rust, and C/C++ that can be used as baselines for further customization.
Python
The Python language development environment is configured in the lua/pde/python.lua
file.
- For
nvim-treesitter
, we install thepython
parser (line 2— line 7). - Using
mason.nvim
, we installdebugpy
(debugger) andblack
(code formatted), and Ruff (linter) (line 15 — line 20). - We configure
null-ls.nvim
to use theblack
formatter (line 8 — line 14). - For
nvim-lspconfig
, we configure Pyright and Ruff (line 22— line 39). We also configure Python-specific keymappings (line 51 — line 56). - For debugging, we install
nvim-dap-python
(line 63— line 69).
LSP should work now, as shown below.
Debugging should work now, as shown below,