A production-ready Neovim configuration built specifically for PyTorch development and mixed-mode C++/Python debugging. Optimized for working on PyTorch source code, C++ extensions, pybind11 bindings, and Python frontends with seamless debugging across both languages.
Built on Kickstart.nvim and enhanced with professional tooling for deep learning systems work.
# Backup any old config, then clone this repo as your Neovim config
mv ~/.config/nvim ~/.config/nvim.backup-$(date +%Y%m%d) 2>/dev/null || true
git clone https://github.com/hinriksnaer/nvim ~/.config/nvim
# Start Neovim; plugins will install automatically
nvimTip: Run
:Masononce to see installable tools and:LspInfoto confirm LSPs are attached.
- debugpy for Python debugging with full DAP UI integration
- codelldb for C++ debugging with LLDB backend
- Seamless transitions between Python and C++ stack frames
- Attach to running Python processes and step into C++ extensions
- Specialized configurations for PyTorch development workflows
- C++ (clangd): Semantic indexing, cross-file navigation, code actions, IntelliSense
- Python (pyright): Type checking, intelligent completion, import resolution
- Treesitter: Advanced syntax highlighting for C, C++, Python, CMake, CUDA, JSON, TOML, Markdown
- Auto-formatting: clang-format (C++), conform.nvim (Python)
- Telescope: Fuzzy file finding, live grep, LSP symbols, diagnostics
- Flash.nvim: Lightning-fast cursor navigation with jump labels
- Harpoon: Quick file bookmarking for frequent files
- Oil.nvim: File explorer with vim-like buffer editing
- smart-splits.nvim: Seamless navigation between Neovim and tmux panes
- persistence.nvim: Automatic session management
- Smart window operations under <leader>w
- blink.cmp: Fast, modern completion engine
- Which-key: Discoverable keybindings with instant hints
- Gitsigns: Inline git hunks, blame, and staging
- Spectre: Project-wide search and replace
- Noice.nvim: Beautiful command-line and notification UI
- Snacks.nvim: Utility functions for buffers, notifications, and pickers
- Todo-comments: Highlight and search TODO/FIXME/NOTE comments
- Indent-blankline: Visual indent guides
The base kickstart README in this repo was replaced to document these language-specific defaults. (Previously it contained the generic Kickstart install text.) ([GitHub][1])
This configuration excels at debugging PyTorch development scenarios:
- 
Python β C++ debugging: - Set breakpoints in your Python code - Press <leader>ds to start debugging with debugpy - Step through Python until you hit pybind11/C API calls - Attach codelldb to the Python process (<F8> - custom config) - Step into C++ implementation seamlessly
- 
Debugging PyTorch operators: - Debug Python tests that call custom operators
- Step into ATen/C++ kernel implementations
- Inspect tensors at both Python and C++ levels
 
- 
Standalone C++ debugging: - Launch native binaries directly with codelldb
- Debug libtorch applications
- Test C++ kernels in isolation
 
- CMake/Meson integration: Run builds in terminal splits
- Hot reload: Rebuild C++ extensions and reload Python modules without restarting Neovim
- Quick iteration: Edit C++, compile, test Python in one environment
- Automatic UI toggle: Debug UI opens on start, closes on exit
- Two-panel layout: Variables/watches on left, stack/breakpoints at bottom
- Evaluate expressions: <leader>dein visual mode to inspect selected code
- Hover values: See variable values inline while debugging
- <leader>ff- Find files
- <leader>fg- Live grep (ripgrep)
- <leader>fb- Browse buffers
- <leader>fs- Grep word under cursor
- <leader>ft- Theme picker (colorscheme)
- <C-h/j/k/l>- Navigate windows (tmux-aware)
- s- Flash jump to any visible location
- gd- Go to definition
- gr- Find references
- K- Hover documentation
- <leader>ca- Code actions
- <leader>cn- Rename symbol
- <leader>cf- Format buffer
- [d/- ]d- Previous/next diagnostic
- <leader>ds- Start/continue debugging
- <leader>db- Toggle breakpoint
- <leader>dn- Step over
- <leader>di- Step into
- <leader>du- Step out
- <leader>dx- Toggle DAP UI
- <leader>de- Evaluate expression
- <leader>gs- Stage hunk
- <leader>gr- Reset hunk
- <leader>gb- Blame line
- <leader>gD- Open diffview
- <leader>gh- File history
- <leader>gtb- Toggle blame line
- <leader>wv- Split vertically
- <leader>ws- Split horizontally
- <leader>wc- Close window
- <leader>we- Equalize windows
- <leader>bd- Delete buffer
- <leader><leader>- Switch to alternate buffer
- <leader>ml- Last message
- <leader>mh- Message history
- <leader>ss- Restore session
- <leader>sl- Restore last session
- No completion / LSP not attached: :LspInfoβ check server status; run:Masonto install missing tools.
- Formatter not running: ensure the tool is installed and project config exists (.clang-format,pyproject.toml).
- Debugging fails to start: verify codelldb/debugpyare installed and the DAP configuration points to the right program.
MIT (see LICENSE.md).