A hand-rolled, uv-native Neovim setup for Python and AI/ML work, wrapped in a cute pink light theme with a Nyan-cat statusline. Neovim 0.12+, lazy.nvim.
- 🧠 LSP — pyrefly (Meta's type checker) for types & hover + ruff for lint / code actions / import sorting
- 🔍 Hover-on-idle — rest on a symbol for 3s (or
<leader>ch) to pop its definition in a corner window that never covers your code;<leader>cHtoggles it - 🎨 Format — ruff via conform.nvim, format-on-save
- ⚡ Completion — blink.cmp with GitHub Copilot in the menu
- 🤖 AI — copilot.lua + CopilotChat (browser login, no API key)
- 📓 Jupyter / data science — molten + jupytext + image.nvim (inline plots)
- 🐞 Debug / test — nvim-dap + dap-python + neotest (pytest), all on the uv venv
- 📝 Markdown — render-markdown live rendering (tables, callouts, LaTeX math), vim-table-mode auto-tables, marksman LSP
- 🪟 Windows · tabs · terminal — quick splits (
<leader>w), tabs (<leader><Tab>), and a toggleable bottom-split terminal on~ - 🌳 Treesitter, Telescope, oil, gitsigns, which-key, trouble, todo-comments, mini.*
- 📦 uv everywhere — every Python tool targets the project's
.venvautomatically
Theme: a faithful port of webfreak's "Cute Pink Light" VS Code theme. Nyan cat: the position indicator is based on nyan-modoki.vim (a port of nyan-mode.el).
| Tool | Why | Install (macOS) |
|---|---|---|
| Neovim ≥ 0.12 | nvim-treesitter main branch |
brew upgrade neovim |
| tree-sitter CLI | builds TS parsers (main branch) |
prebuilt binary → ~/.local/bin (brew formula is library-only) |
| uv | Python env + running | curl -LsSf https://astral.sh/uv/install.sh | sh |
| ripgrep, fd | Telescope | brew install ripgrep fd |
| Node ≥ 22 | Copilot | brew install node |
| A Nerd Font | icons | brew install --cask font-jetbrains-mono-nerd-font |
| ImageMagick | inline images | brew install imagemagick |
| Graphics terminal | inline plots | brew install --cask ghostty (or kitty) |
| marksman (optional) | Markdown LSP (links/headings) | brew install marksman |
| pylatexenc / utftex (optional) | render-markdown math | uv tool install pylatexenc |
Inline images (notebook plots) need a terminal speaking the kitty graphics protocol — Ghostty or kitty (WezTerm needs the
sixelbackend). In Terminal.app / iTerm2 images won't render, but text output still works.
# This repo IS your nvim config — clone it to ~/.config/nvim
git clone <your-repo-url> ~/.config/nvim
# Python language tools (uv puts them on PATH)
uv tool install pyrefly
uv tool install ruff
# Optional: richer Markdown (LSP completion + math rendering)
brew install marksman # link / heading / reference completion
uv tool install pylatexenc # `latex2text` → renders LaTeX math (or utftex)
# First launch installs all plugins, then:
nvim
# :Lazy sync — install/update plugins
# :Copilot auth — sign in to GitHub Copilot (browser)
# :checkhealth — verify rg / fd / node / providersThe config resolves one interpreter for every Python tool — the active
$VIRTUAL_ENV, else the project's .venv (uv's default), found by walking up
for .venv / pyproject.toml / uv.lock / .git. No source .venv/bin/activate
needed; just launch nvim from inside the project.
uv init my-project && cd my-project
uv add numpy pandas # runtime deps
uv add --dev debugpy pytest ipython ipykernel # dev tooling used by this config
nvim main.py| Key | Action |
|---|---|
<leader>rr |
Run current file via uv run (bottom terminal) |
<leader>ri |
Open uv run ipython REPL |
<leader>rs |
uv sync |
<leader>ra |
uv add <pkg> (prompts) |
After creating/changing the venv (
uv sync), run:LspRestartso pyrefly/ruff re-resolve it. To pin the interpreter explicitly, add topyproject.toml:[tool.pyrefly] python-interpreter-path = ".venv/bin/python"
molten is a Python remote plugin; its host needs pynvim + jupyter_client.
Use a dedicated venv (kept separate from your projects). Until you do this,
:UpdateRemotePlugins will warn — that's expected.
# 1. Dedicated Neovim Python host (init.lua auto-detects this path)
python3 -m venv ~/.virtualenvs/neovim
~/.virtualenvs/neovim/bin/python -m pip install \
pynvim jupyter_client cairosvg pnglatex plotly kaleido nbformat ipykernel pillow
# 2. Per-project kernel (run inside your uv project)
uv add --dev ipykernel
uv run python -m ipykernel install --user --name my-project --display-name "Python (my-project)"Then in Neovim: :UpdateRemotePlugins (once), restart, open a .py/.ipynb,
<localleader>mi to pick the kernel, and evaluate cells with <localleader>e /
<localleader>rl. .ipynb files open as # %%-delimited Python (full LSP) via
jupytext, and saved cell outputs round-trip.
Open any .md and it renders in-buffer — headings, lists, code blocks, tables,
callouts, and LaTeX math ($…$ / $$…$$). Prose soft-wraps with spell-check on.
| Key | Action |
|---|---|
<leader>mr |
Toggle live rendering (render-markdown) |
<leader>mt |
Toggle table mode — then typing a pipe auto-builds & aligns tables |
<leader>mT |
Tableize a visual selection (CSV/TSV → table) |
Two optional installs unlock the extras (everything else works without them):
brew install marksman # LSP: link / heading / reference completion
uv tool install pylatexenc # `latex2text` → renders math formulas (or utftex)Math also needs the
latextreesitter parser — built by thetree-sitterCLI (required for all parsers on themainbranch). Without these, math just shows as raw$…$source.
Leader = Space, localleader = \. <leader>? shows buffer-local maps; which-key
hints every prefix.
| Prefix | Group | Highlights |
|---|---|---|
<leader>f |
find | ff files · fg grep · fb buffers · fr recent · / in-buffer |
<leader>c |
code / lsp | cr rename · ca action · co organize · cf format · cd diag · ch/cH hover popup |
<leader>r |
run / uv | rr run · ri ipython · rs sync · ra add |
<leader>t |
test | tt nearest · tf file · td debug · ts summary · to output |
<leader>d |
debug | db breakpoint · dc continue · du UI · dn test method |
<leader>a |
AI (copilot) | aa chat · am models · ap prompts · aq quick · (visual) ae/af/at/ar |
<leader>h |
git hunk | hs stage · hr reset · hp preview · hb blame · ]c/[c nav |
<leader>x |
diagnostics | xx Trouble · xX buffer · ]d/[d jump |
<leader>w |
window | wv split-v · ws split-h · wc close · wo only |
<leader><Tab> |
tabs | n new · c close · ]/[ next/prev · o only |
<leader>m |
markdown | mr render · mt table-mode · mT tableize |
~ |
terminal | toggle a bottom-split shell — persists, respawns after exit |
<localleader> |
Jupyter | mi init · e eval-op · rl line · rr re-eval · os output · ]x/[x cells |
gd K grn gra |
LSP | definition · hover · rename · code action (0.11 defaults) |
- |
oil | edit the filesystem as a buffer |
init.lua leaders, host, load config/, bootstrap lazy, apply theme
lua/config/ options · keymaps · autocmds · python (uv resolver + run/repl)
lua/cute/ colorscheme (init) · lualine theme · nyan component
lua/plugins/ one file per concern (lsp, completion, copilot, dap, …)
colors/cute.lua :colorscheme cute entrypoint
- Theme: edit the palette in
lua/cute/init.lua. Prefer a maintained theme? Swap thecolorschemecall ininit.luafor catppuccin (latte) or rose-pine (dawn). - Per-machine tweaks: create
lua/config/local.lua(git-ignored) andrequire("config.local")frominit.lua. - More LSP servers: add
vim.lsp.config(name, {...})+vim.lsp.enable(name)inlua/plugins/lsp.lua.
MIT.