neo vim configurations this is configured with NV chad
- Pyright: Static type checking and code intelligence
- Ruff: Fast Python linter with auto-fixes
- MyPy: Optional stricter type checking
- Black: PEP8-compliant code formatter
- isort: Import sorting and organization
- Full debugpy integration with breakpoints and variable inspection
- Three debug configurations (normal, with args, pytest)
- Virtual environment auto-detection
- jupytext: Edit Jupyter notebooks as Python files
- jupynium: Connect and control Jupyter notebooks within Neovim
- iron.nvim: Integrated Python/IPython REPL
- magma-nvim: TUI interface for Jupyter with inline outputs
- Defines plugins to be installed by Lazy (plugin manager)
- Configures Mason's
ensure_installed
tools - Sets up plugin dependencies and configurations
- Location for adding new plugins like Python debugger and Jupyter support
- Configures Language Server Protocols (LSPs)
- Important: Uses NVChad-specific paths (
require("nvchad.configs.lspconfig")
) - Sets up Python LSPs (pyright and ruff)
- Inherits NVChad's default LSP configurations
- Configures formatters by file type
- Setup for Python: isort + black for complete formatting
Run these commands in order:
-
:Lazy sync
- Downloads and installs all plugins defined in
init.lua
- Updates existing plugins
- Must be run after modifying
init.lua
- Downloads and installs all plugins defined in
-
:MasonInstallAll
- Installs all tools specified in Mason's
ensure_installed
- Includes LSP servers, formatters, and debuggers
- Must be run after Lazy sync completes
- Installs all tools specified in Mason's
-
Install Python dependencies:
pip install jupytext jupyter ipython mypy black isort pynvim
-
Check LSP Status:
:LspInfo
Should show pyright and ruff as active for Python files
-
Test LSP Features:
gd
- Go to definitionK
- Hover documentation<leader>ca
- Code actions
-
Verify Debugger:
- Set breakpoint:
<leader>db
- Start debugger:
<leader>dpd
(debug current Python file)
- Set breakpoint:
-
Test Python REPL:
- Start REPL:
<leader>pr
- Send selection to REPL:
<leader>sc
(visual mode) - Send current line:
<leader>sl
- Start REPL:
-
Test Jupyter Integration:
- Open a Jupyter notebook (.ipynb file) with Neovim
- Start Jupynium:
<leader>jn
- Run cell:
<leader>jr
-
Test Magma TUI Integration:
- Open a Python file with cell markers (# %%)
- Initialize Magma:
<leader>mi
- Evaluate a cell:
<leader>mc
then motion (likeip
for paragraph) - Evaluate current line:
<leader>ml
- Show output:
<leader>mo
- Always use
require("nvchad.configs.lspconfig")
instead ofrequire("plugins.configs.lspconfig")
- NVChad uses its own path structure for core configurations
- Watch for error messages about missing modules - they often indicate incorrect paths
- If plugins aren't working, check
:checkhealth
- Ensure you ran
:Lazy sync
after modifyinginit.lua
- Verify Mason installed all tools with
:Mason
and check the list
- Ensure Python and pip are installed system-wide
- debugpy requires a Python environment to be available
- Jupyter features need both jupytext and jupyter installed
- For Python REPL functionality, make sure ipython is installed
- Auto-formatting requires both black and isort to be available
-
If LSP isn't working:
- Check
:LspInfo
in a Python file - Verify Mason installed the servers
- Look for path-related errors in
:checkhealth
- Check
-
If plugins aren't loading:
- Run
:Lazy sync
again - Check
:Lazy
for plugin status - Verify plugin paths in
init.lua
- Run
-
If Jupyter integration isn't working:
- Ensure jupytext and jupyter are installed
- Run
:checkhealth jupynium
to check dependencies - Make sure the Python path is correctly set
-
If Magma-nvim isn't working:
- Ensure pynvim is installed (
pip install pynvim
) - Run
:checkhealth provider
to verify Python support - You may need to run
:UpdateRemotePlugins
after installation
- Ensure pynvim is installed (
-
If REPL isn't working:
- Make sure ipython is installed
- Try
:IronRepl
manually to see any error messages - Check if your virtual environment is properly detected
-
For formatting issues:
- Verify black and isort are installed
- Check the output of
:ConformInfo
for formatter status