Skip to content

RicardoRyn/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

332 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Neovim Config Preview

πŸš€ My Neovim Configuration

🍰 To be jj cake hand βœ‹.

Neovim Lua License

⚠️ Important: This is NOT a Neovim distribution. It's my personal configuration that uses many plugins and custom settings. I'm sharing it to inspire others to build their own Neovim setup. Hope it helps!


✨ Features

🎨 Beautiful UI

  • Catppuccin theme
  • Dashboard animations
  • Colorful window separators
  • Enhanced lualine
UI Preview
Editing Experience

⚑ Superior Editing Experience

  • Autocompletion with blink.cmp
  • Code navigation with Treesitter
  • Motions with Flash & Hop
  • Text objects & Surround operations

πŸ€– AI-Powered Development

  • AI code suggestions & NES
  • AI-assisted refactoring
  • AI snippet generation
  • AI sidekick integration
AI Features
Debugging

πŸ” Professional Debugging

  • DAP integration with UI
  • Python debugging support
  • Breakpoints & watch expressions
  • Step-through debugging

🌟 Highlights

  • πŸ’» VSCode-Native Editing - Bring Neovim's modal editing to VSCode with motion plugins (Flash, Hop) for Jupyter notebooks and other workflows
  • 🌳 JJ-Powered Version Control - Deep integration with Jujutsu (jj), featuring animated status display with conflict detection, bookmark management, and seamless Git compatibility
  • πŸ”§ Cross-Platform Intelligence - Auto-detects system environment (Windows/Mac/Linux) and adapts behavior accordingly
  • ✨ Dynamic Dashboard - Animated ASCII art with glitch effects
  • 🐍 Python-First Documentation - Custom Neogen templates with Chinese support, auto-extracting parameter defaults, type hints, and return values
  • πŸ““ Full Jupyter Notebook Support - Complete .ipynb editing experience with cell management, kernel control, inline output preview, and REPL integration

πŸ“Έ Screenshots

AI Suggestions Copilot AI Intelligent Completion & Next Edit Suggestions
File Picker Snacks Picker Fuzzy File Search
JJ Integration Jujutsu Version Control System Integration
Diff Viewer Visual Diff Viewer
Jupyter Notebook Jupyter Notebook Integration (Bugs)

πŸ—‚οΈ Project Structure

~/.config/nvim/
β”œβ”€β”€ init.lua                            # Entry point
β”œβ”€β”€ lazy-lock.json                      # Plugin version lock file
β”œβ”€β”€ stylua.toml                         # Lua formatter config
β”œβ”€β”€ .luarc.json                         # Lua language server config
β”‚
β”œβ”€β”€ lua/
β”‚   β”œβ”€β”€ config/                         # Core configuration
β”‚   β”‚   β”œβ”€β”€ autocmds.lua                # Auto commands
β”‚   β”‚   β”œβ”€β”€ keymaps.lua                 # Key mappings
β”‚   β”‚   β”œβ”€β”€ lazy.lua                    # Lazy.nvim loader
β”‚   β”‚   β”œβ”€β”€ lsp.lua                     # LSP configuration
β”‚   β”‚   └── options.lua                 # Neovim options
β”‚   β”‚
β”‚   β”œβ”€β”€ plugins/                        # Plugin specifications
β”‚   β”‚   β”œβ”€β”€ ai/                         # AI-related plugins
β”‚   β”‚   β”œβ”€β”€ core/                       # Core plugins (blink, conform, mason, etc.)
β”‚   β”‚   β”œβ”€β”€ dap/                        # Debug adapter protocol
β”‚   β”‚   β”œβ”€β”€ disabled/                   # Disabled plugin configs
β”‚   β”‚   β”œβ”€β”€ editor/                     # Editor enhancements
β”‚   β”‚   β”œβ”€β”€ tools/                      # Development tools
β”‚   β”‚   β”œβ”€β”€ ui/                         # UI plugins
β”‚   β”‚   └── vcs/                        # Version control (git, jj)
β”‚   β”‚
β”‚   β”œβ”€β”€ neogen/                         # Neogen annotation templates
β”‚   β”‚   └── python/                     # Python-specific templates with Chinese support
β”‚   β”‚
β”‚   └── utils/                          # Utility modules
β”‚       β”œβ”€β”€ ascii_arts.lua              # ASCII art for dashboard
β”‚       β”œβ”€β”€ dashboardAnimation.lua      # Dashboard glitch animation
β”‚       β”œβ”€β”€ debug.lua                   # Debug utilities
β”‚       β”œβ”€β”€ icons.lua                   # Icon mappings
β”‚       β”œβ”€β”€ jj_status.lua               # JJ status display
β”‚       β”œβ”€β”€ snacks_dashboard.lua        # Snacks dashboard config
β”‚       β”œβ”€β”€ snacks_explorer_preview.lua # Snacks explorer preview
β”‚       └── system.lua                  # System detection
β”‚
β”œβ”€β”€ after/                              # After plugins loaded
β”œβ”€β”€ lsp/                                # LSP server custom configs
β”œβ”€β”€ snippets/                           # Custom snippets
└── docs/                               # Screenshots & images

πŸ’‘ Installation & Usage

Try It

If you want to try this configuration:

# required
mv ~/.config/nvim{,.bak}

# optional but recommended
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}

# Clone this configuration
jj git clone https://github.com/RicardoRyn/nvim.git ~/.config/nvim

# Start Neovim
nvim

After the first launch:

  1. Check plugins with :Lazy to ensure all plugins are installed correctly
  2. Check health with :checkhealth to verify system dependencies and LSP configuration
  3. Customize it for your own needs!

πŸ’» VSCode Neovim Integration

This configuration is fully compatible with VSCode Neovim (an extension of VSCode), enabling Neovim-style modal editing in VSCode with compatible Neovim plugins.

Personally, I need to edit Jupyter Notebooks, but Neovim's support for them is quite limited, so I have to use VSCode for that purpose. However, I've become so accustomed to Neovim's modal editing that I can't work efficiently without it. So I tried using Neovim within VSCode, and it works quite well.

Diff Viewer Cursor Jumping in VSCode
Jupyter Notebook Nvim Plugins in VSCode

Setup

  1. Install the VSCode Neovim extension from the VSCode Marketplace.

  2. Configure the extension in your VSCode settings (settings.json):

    {
      // vscode-neovim
      "vscode-neovim.neovimClean": false, // Don't clear Neovim configuration
      "extensions.experimental.affinity": {
        "asvetliakov.vscode-neovim": 1 // Neovim extension affinity
      },
      "vscode-neovim.compositeKeys": {
        "jk": {
          "command": "vscode-neovim.escape" // Composite key jk mapped to Escape
        }
      }
    }
  3. For a better experience, some keybindings need to be configured in VSCode's keybindings.json. You can refer to my settings for reference.

Available Features in VSCode

Since VSCode has its own built-in UI, terminal, and keybinding system, this configuration only enables efficiency-focused plugins that enhance the editing experience without conflicting with VSCode's native features:

  • lazy.nvim - Plugin manager for lazy loading
  • mini.ai - Enhanced text objects for smarter editing
  • mini.surround - Quick surround operations (add/delete/change)
  • nvim-spider - Smart word-wise navigation
  • nvim-treesitter-textobjects - Treesitter-based text objects
  • flash.nvim & hop.nvim - Fast cursor jumping
  • treesj - Code splitting and joining utilities
  • yanky.nvim - Enhanced clipboard with history

For the complete list of VSCode-specific keymaps, see the VSCode Keymaps section below.


⌨️ Keymaps

Leader Keymaps

Click this
<leader>
β”œβ”€β”€ <Space> (Smart Files)
β”œβ”€β”€ a (AI)
β”‚   β”œβ”€β”€ a - Toggle Sidekick CLI
β”‚   β”œβ”€β”€ c - Toggle Sidekick Copilot
β”‚   β”œβ”€β”€ d - Detach CLI Session
β”‚   β”œβ”€β”€ f - Send File
β”‚   β”œβ”€β”€ i - Toggle Sidekick iFlow
β”‚   β”œβ”€β”€ p - Select Sidekick Prompt (including Visual mode)
β”‚   β”œβ”€β”€ s - Select CLI
β”‚   β”œβ”€β”€ t - Send This (including Visual mode)
β”‚   └── v - Send Visual Selection (including Visual mode)
β”œβ”€β”€ b (Buffer)
β”‚   β”œβ”€β”€ a - Delete All Buffers
β”‚   β”œβ”€β”€ b - Delete Picked Buffer
β”‚   β”œβ”€β”€ d - Delete Buffer
β”‚   β”œβ”€β”€ l - Delete Buffers Left
β”‚   β”œβ”€β”€ o - Delete Other Buffers
β”‚   β”œβ”€β”€ p - Toggle Pin
β”‚   β”œβ”€β”€ P - Delete Unpined Buffers
β”‚   β”œβ”€β”€ r - Delete Buffers Right
β”‚   β”œβ”€β”€ < - Move Buffer Left
β”‚   └── > - Move Buffer Right
β”œβ”€β”€ c (Copy/CSV)
β”‚   β”œβ”€β”€ c - Copy Absolute Path (in Mini Files)
β”‚   β”œβ”€β”€ d - Copy Directory Path (in Mini Files)
β”‚   β”œβ”€β”€ f - Copy File Name (in Mini Files)
β”‚   β”œβ”€β”€ r - Copy Relative Path (in Mini Files)
β”‚   └── sv - Toggle CSV View
β”œβ”€β”€ d (Debug)
β”‚   β”œβ”€β”€ b - Breakpoint
β”‚   β”œβ”€β”€ B - Conditional Breakpoint
β”‚   β”œβ”€β”€ c - Run to Cursor
β”‚   β”œβ”€β”€ C - Clear Breakpoints
β”‚   β”œβ”€β”€ d - Disconnect
β”‚   β”œβ”€β”€ D - Disconnect (Terminate Debuggee)
β”‚   β”œβ”€β”€ h - Hover
β”‚   β”œβ”€β”€ i - Step Into
β”‚   β”œβ”€β”€ k - Step Back
β”‚   β”œβ”€β”€ o - Step Over
β”‚   β”œβ”€β”€ O - Step Out
β”‚   β”œβ”€β”€ q - Terminate Session
β”‚   β”œβ”€β”€ r - Restart
β”‚   β”œβ”€β”€ R - Toggle REPL
β”‚   β”œβ”€β”€ s - Start/Continue
β”‚   β”œβ”€β”€ u - Toggle UI
β”‚   └── f (Float)
β”‚       β”œβ”€β”€ e - Float Expression
β”‚       β”œβ”€β”€ f - Float Frames
β”‚       β”œβ”€β”€ s - Float Scopes
β”‚       β”œβ”€β”€ S - Float Sessions
β”‚       └── t - Float Threads
β”œβ”€β”€ D (Dev)
β”‚   └── r (Run lua)
β”œβ”€β”€ e (Explorer)
β”‚   β”œβ”€β”€ e - Mini Files
β”‚   β”œβ”€β”€ f - Mini Files (Current File)
β”‚   └── s - File Explorer (for Picture Preview)
β”œβ”€β”€ f (Find)
β”‚   β”œβ”€β”€ c - Find Config Files
β”‚   β”œβ”€β”€ f - Find Files
β”‚   β”œβ”€β”€ g - Find Git Files
β”‚   β”œβ”€β”€ p - Projects
β”‚   β”œβ”€β”€ r - Recent Files
β”‚   β”œβ”€β”€ t - Todo (Buffers)
β”‚   └── T - Todo/Fix (Buffers)
β”œβ”€β”€ g (Git)
β”‚   β”œβ”€β”€ b - Blame Line
β”‚   β”œβ”€β”€ B - Blame Buffer
β”‚   β”œβ”€β”€ p - Preview Hunk Inline
β”‚   β”œβ”€β”€ P - Preview Hunk (Float)
β”‚   β”œβ”€β”€ r - Reset Hunk
β”‚   β”œβ”€β”€ R - Reset Buffer
β”‚   β”œβ”€β”€ t - Toggle Current Line Blame
β”‚   β”œβ”€β”€ w - Toggle Word Diff
β”‚   β”œβ”€β”€ g - LazyGit
β”‚   └── h (Github)
β”‚       β”œβ”€β”€ i - GitHub Issues (Open)
β”‚       β”œβ”€β”€ I - GitHub Issues (All)
β”‚       β”œβ”€β”€ p - GitHub Pull Requests (Open)
β”‚       └── P - GitHub Pull Requests (All)
β”œβ”€β”€ h (Home)
β”œβ”€β”€ j (Jujutsu)
β”‚   β”œβ”€β”€ a - JJ Annotate File
β”‚   β”œβ”€β”€ A - JJ Abandon
β”‚   β”œβ”€β”€ b (Bookmark)
β”‚   β”‚   β”œβ”€β”€ c - JJ Bookmark Create
β”‚   β”‚   β”œβ”€β”€ d - JJ Bookmark Delete
β”‚   β”‚   └── m - JJ Bookmark Move
β”‚   β”œβ”€β”€ C - Conflict
β”‚   β”œβ”€β”€ d - JJ Diff Current Buffer
β”‚   β”œβ”€β”€ D - JJ Describe
β”‚   β”œβ”€β”€ e - JJ Edit
β”‚   β”œβ”€β”€ f - JJ Fetch
β”‚   β”œβ”€β”€ l - JJ Log (All)
β”‚   β”œβ”€β”€ L - JJ Log
β”‚   β”œβ”€β”€ n - JJ New
β”‚   β”œβ”€β”€ r - JJ Rebase
β”‚   β”œβ”€β”€ R - JJ Redo
β”‚   β”œβ”€β”€ s - JJ Status
β”‚   β”œβ”€β”€ S - JJ Squash
β”‚   β”œβ”€β”€ U - JJ Undo
β”‚   β”œβ”€β”€ p (Push/PR)
β”‚   β”‚   β”œβ”€β”€ l - JJ open PR from bookmark in current revision or parent
β”‚   β”‚   β”œβ”€β”€ p - JJ Push
β”‚   β”‚   └── r - JJ open PR from bookmark in current revision or parent
β”‚   └── t - JJ Tug
β”œβ”€β”€ k (Kernel) (Only in Jupyter Notebook)
β”‚   β”œβ”€β”€ 0 - Restart Kernel
β”‚   β”œβ”€β”€ a - Insert Cell Above
β”‚   β”œβ”€β”€ b - Insert Cell Below
β”‚   β”œβ”€β”€ c - Clear Current Cell Output
β”‚   β”œβ”€β”€ C - Clear All Outputs
β”‚   β”œβ”€β”€ f - Toggle Cell Fold
β”‚   β”œβ”€β”€ h - Inspect Variable at Cursor
β”‚   β”œβ”€β”€ H - Toggle Auto-Hover
β”‚   β”œβ”€β”€ i - Interrupt Kernel
β”‚   β”œβ”€β”€ j - Open Cell Picker
β”‚   β”œβ”€β”€ m - Convert to Markdown Cell
β”‚   β”œβ”€β”€ n - Show Kernel Info
β”‚   β”œβ”€β”€ o - Open Cell Output in Float
β”‚   β”œβ”€β”€ r - Convert to Raw Cell
β”‚   β”œβ”€β”€ s - Start Kernel
β”‚   β”œβ”€β”€ S - Shutdown Kernel
β”‚   β”œβ”€β”€ v - Show All Variables in Cell
β”‚   β”œβ”€β”€ x - Execute Cell (Menu)
β”‚   β”œβ”€β”€ X - Execute and Next (Menu)
β”‚   └── y - Convert to Code Cell
β”œβ”€β”€ l (LSP)
β”‚   β”œβ”€β”€ a - Code Actions
β”‚   β”œβ”€β”€ d - Show Diagnostics (Line)
β”‚   β”œβ”€β”€ D - Show Diagnostics (Buffer)
β”‚   β”œβ”€β”€ f - Code Format
β”‚   β”œβ”€β”€ m - Toggle Code Block
β”‚   β”œβ”€β”€ n - Generate Docstring
β”‚   β”œβ”€β”€ r - Rename Symbol
β”‚   β”œβ”€β”€ v - Virtual Env Selector
β”‚   └── sp - Restart LSP
β”œβ”€β”€ L (Lazy)
β”œβ”€β”€ n (Noice)
β”‚   β”œβ”€β”€ a - All
β”‚   β”œβ”€β”€ e - Error
β”‚   β”œβ”€β”€ h - History
β”‚   β”œβ”€β”€ l - Last Message
β”‚   β”œβ”€β”€ m - Messages
β”‚   └── n - Noice Picker
β”œβ”€β”€ p (Paste)
β”œβ”€β”€ s (Search/System)
β”‚   β”œβ”€β”€ b - Buffers
β”‚   β”œβ”€β”€ c - Commands
β”‚   β”œβ”€β”€ d - Diagnostics (Buffer)
β”‚   β”œβ”€β”€ D - Diagnostics
β”‚   β”œβ”€β”€ h - Help Pages
β”‚   β”œβ”€β”€ i - Icons
β”‚   β”œβ”€β”€ I - Incoming Calls
β”‚   β”œβ”€β”€ j - JJ Picker Status
β”‚   β”œβ”€β”€ J - Jumps
β”‚   β”œβ”€β”€ k - Keymaps
β”‚   β”œβ”€β”€ l - LSP Info
β”‚   β”œβ”€β”€ L - Search for Plugin Spec
β”‚   β”œβ”€β”€ m - Marks
β”‚   β”œβ”€β”€ O - Outgoing Calls
β”‚   β”œβ”€β”€ p - Spelling
β”‚   β”œβ”€β”€ P - Pickers
β”‚   β”œβ”€β”€ r - Resume
β”‚   β”œβ”€β”€ R - Search and Replace (Grug-far)
β”‚   β”œβ”€β”€ s - LSP Symbols (Buffer)
β”‚   β”œβ”€β”€ S - LSP Symbols (Workspace)
β”‚   β”œβ”€β”€ t - Todo Comments
β”‚   β”œβ”€β”€ T - Todo/Fix Comments
β”‚   β”œβ”€β”€ u - Undotree
β”‚   β”œβ”€β”€ v - Clipboard History
β”‚   β”œβ”€β”€ " - Registers
β”‚   β”œβ”€β”€ . - Scratch Select
β”‚   β”œβ”€β”€ / -
β”‚   └── : - Command Select
β”œβ”€β”€ S (Session)
β”‚   β”œβ”€β”€ d - Don't Save Current Session
β”‚   β”œβ”€β”€ l - Restore Last Session
β”‚   β”œβ”€β”€ s - Restore Session
β”‚   └── S - Select Session
β”œβ”€β”€ t (Tab/Toggle)
β”‚   β”œβ”€β”€ d - Close Tab
β”‚   β”œβ”€β”€ n - New Tab
β”‚   └── s - Tab Split
β”œβ”€β”€ u (UI Toggle)
β”‚   β”œβ”€β”€ b - Toggle Dark Background
β”‚   β”œβ”€β”€ c - Colorschemes
β”‚   β”œβ”€β”€ d - Toggle Diagnostics
β”‚   β”œβ”€β”€ D - Toggle Dim
β”‚   β”œβ”€β”€ g - Toggle Git Signs
β”‚   β”œβ”€β”€ h - Toggle Inlay Hints
β”‚   β”œβ”€β”€ l - Toggle Relative Number
β”‚   β”œβ”€β”€ L - Toggle Line Number
β”‚   β”œβ”€β”€ m - Markdown Preview
β”‚   β”œβ”€β”€ n - Noice Dismiss
β”‚   β”œβ”€β”€ r - Redraw / Clear hlsearch / Diff Update
β”‚   β”œβ”€β”€ w - Toggle Wrap
β”‚   β”œβ”€β”€ z - Toggle Zoom
β”‚   └── Z - Toggle Zen Mode
β”œβ”€β”€ x (Trouble/QuickFix)
β”‚   β”œβ”€β”€ l - LSP Definitions/References (Trouble)
β”‚   β”œβ”€β”€ L - Location List (Trouble)
β”‚   β”œβ”€β”€ Q - Quickfix List (Trouble)
β”‚   β”œβ”€β”€ s - Symbols (Trouble)
β”‚   β”œβ”€β”€ x - Diagnostics (Trouble)
β”‚   └── X - Buffer Diagnostics (Trouble)
β”œβ”€β”€ z (Zoxide)
β”œβ”€β”€ . - Scratch
β”œβ”€β”€ : - Command History
β”œβ”€β”€ ? - Buffer Local Keymaps
└── / (Grep)
    β”œβ”€β”€ b - Grep Buffers
    β”œβ”€β”€ l - Lines
    β”œβ”€β”€ w - Grep Word
    └── / - Grep

Other Keymaps

Motion & Navigation

  • jk - Exit insert mode
  • s - Flash jump/search
  • xw / xr - Flash words/resume
  • xj / xk / xl / xh - Hop navigation
  • Shift+h / Shift+l - Previous/next buffer
  • Ctrl+h / Ctrl+j / Ctrl+k / Ctrl+l - Navigate tmux windows
  • gd / gD / gr / gI / gy - Goto definition/declaration/references/implementation/type
  • ]d / [d - Next/previous diagnostic
  • ]g/ gh / [g / gH - Next/previous git hunk

Text Objects

  • ciq, dab, yiw - Enhanced text objects
  • gsaiw", gsr'", gsd' - Surround operations

Copilot

  • Tab - Goto/Apply next edit suggestion
  • Ctrl+y / Ctrl+w - Accept Copilot suggestion/word
  • Alt+] / Alt+[ - Next/previous Copilot suggestion
  • Ctrl+] - Dismiss Copilot suggestion

Terminal

  • Ctrl+/ / Ctrl+_ - Open terminal

VSCode Keymaps

<leader>
β”œβ”€β”€ <Space> (Files) - Quick open file
β”œβ”€β”€ ff / <Space> (Files) - Quick open file
β”œβ”€β”€ aa (UI) - Toggle auxiliary bar
β”œβ”€β”€ b (Buffer)
β”‚   β”œβ”€β”€ d - Close buffer
β”‚   β”œβ”€β”€ o - Close other buffers
β”‚   β”œβ”€β”€ a - Close all buffers
β”‚   β”œβ”€β”€ l - Close buffers to the left
β”‚   β”œβ”€β”€ r - Close buffers to the right
β”‚   β”œβ”€β”€ < - Move buffer left
β”‚   └── > - Move buffer right
β”œβ”€β”€ l (LSP)
β”‚   β”œβ”€β”€ f - Format code
β”‚   β”œβ”€β”€ r - Rename symbol
β”‚   └── a - Code actions
└── o (Outline)
    β”œβ”€β”€ o - Focus outline
    └── v - Toggle outline visibility

Motion & Navigation

  • s - Flash jump/search
  • xw / xr - Flash words/resume
  • xj / xk / xl / xh - Hop navigation
  • Shift+h - Previous buffer
  • Shift+l - Next buffer
  • Ctrl+w Ctrl+h / Ctrl+w Ctrl+j / Ctrl+w Ctrl+k /Ctrl+w Ctrl+l - Navigate left/right windows (requires VSCode keybinding config)
  • Ctrl+o - Navigate back
  • Ctrl+i - Navigate forward
  • ]d - Go to next diagnostic
  • [d - Go to previous diagnostic

Editing

  • Ctrl+d / Ctrl+u - Move cursor down/up 5 lines
  • Ctrl+y - Accept inline suggestion

Text Objects

  • ciq, dab, yiw - Enhanced text objects
  • gsaiw", gsr'", gsd' - Surround operations

Jupyter Notebook Cell Operations

  • l - Edit current cell
  • y - Copy cell
  • p - Paste cell
  • Ctrl+Backspace - Clear all cell outputs
  • Alt+Backspace - Clear current cell outputs
  • Ctrl+j Ctrl+k - Expand/collapse cell input
  • Ctrl+Shift+Alt+C - Collapse all cell inputs
  • Shift+Alt+Backspace - Restart kernel
  • Alt+h / Alt+l - Fold/unfold notebook cell

Terminal

  • Ctrl+/ - Toggle built-in terminal
  • Ctrl+Shift+= - Toggle maximized panel

⭐ If you find this config helpful, please give it a star! ⭐

πŸ’¬ Feel free to open an issue or submit a PR if you have any ideas or suggestions! πŸ’¬

Releases

No releases published

Packages

No packages published

Languages