Fast, feature-rich setup for NeoVim 0.11.4+. Uses lazy.nvim and Mason for easy management. Includes optimized LSP, linting, and debugging for Python and its frameworks. Boost your coding speed!
-
🐍 Python-focused tools
-
🚀 Lazy loading
-
🛠️ Mason for LSPs/tools
-
⚡ Fast performance
-
🔧 Python Debugger
NOTE: *(If all prerequisites are already installed this step can be skipped.)
-
Install Nvim binary:
- Download Nvim binary from the Nvim official repository: https://github.com/neovim/neovim/releases
- Install the binary:
-
In Linux:
Execute these commands sequentially:mv ~/Downloads/<your_nvim> /usr/local/bin/nvim sudo chmod x+o /usr/local/bin/nvim
-
-
Install npm:
NOTE: NPM is required for Node.js
sudo apt install npm -
Install nodejs:
NOTE: NodeJS is required for LSP servers.
Execute these commands sequentially:sudo apt install nodejs npm install -g n sudo n lts -
Install required system packages:
sudo apt install ripgrep
-
BackUp your current NVim config:
mv ~/.config/nvim{,.bak}. -
Clone this repo:
git clone git@github.com:chabrovs/nvim-py.git ~/.config/nvim. -
Run Nvim:
nvim .
NOTE: The lazy.vim package manager will take care of plugins, and Mason will take care of LSP servers aumatically.
There two options on how to setup a Python debugger in this configuration.
0️⃣ Execute pip install debugpy in your project's virtual environment.
1️⃣ Or, Install Python debugger globally for NVim:
- Go to the nvim directory:
cd ~/.config/nvim; - Create a new directory called
.virtualenvsand cd in itcd ~/.config/nvim/.virtualenvs; - Create a new virtual environment called
debugpyin the.virualenvsdirectory:python3 -m venv debugpyand activate it:. .virtualenvs/debugpy/bin/activate - Execute
pip install debugpy - It's done! Now Python debugger is available globally for your NVim configuration.
| KeyMap | Descripton | Remender |
|---|---|---|
<leader>pf |
Open Fuzzy Finder | Project Find |
<leader>ps |
Open Fuzzy Grep String | Project Search |
<leader>pg |
Open Fuzzy Live Grep | Progect Grep |
<leader><C-p> |
Open Fuzzy Finder for Git project | |
<leader><pv> |
Open File Explorer | Project View |
| KeyMap | Description |
|---|---|
<leader>t |
New tab |
<leader>tt |
Open Terminal |
<leader>right arrow |
Switch Tab |
<leader>left arrow |
Switch Tab |
| KeyMap | Descripton |
|---|---|
<leader>do |
Open Diagnostics |
<leader>dl |
List Diagnostics |
<leader>dp |
Go to Previous Message |
<leader>dn |
Go to New Message |
| KeyMap | Descripton |
|---|---|
<leader>m |
Hover |
<leader>df |
Do to Definiiton |
<leader>i |
Implemnetation |
<leader>fx |
Show fix suggestiosn |
<leader>rf |
Show References |
<leader>mv |
Remane |
<leader>f |
Format |
| KeyMap | Descripton |
|---|---|
<leader>Db |
Set break point |
<leader>Ds |
Debugger Start |
<leader>Do |
Debugger Open |
<leader>Dc |
Debugger Close |