Phase 3: Editor Enhancement Migration Guide
Phase 3 introduces a modern Neovim configuration while preserving all your existing preferences and workflow patterns.
🎯 What's New in Phase 3
Enhanced Neovim Configuration
- Modern Plugin System: Lazy.nvim for fast, efficient plugin management
- LSP Integration: Full Language Server Protocol support with completion and diagnostics
- Git Integration: Advanced git tools (gitsigns, fugitive, diffview) integrated with delta/difftastic
- Modern UI: Beautiful themes, status line, and enhanced visual experience
- Claude Code Optimization: Special keybindings and workflows for AI development
Your Preferences Preserved
✅ Comma Leader Key: All configurations use , as leader key
✅ hjkl Navigation: Window navigation with C-hjkl preserved
✅ Netrw Integration: - still opens netrw file explorer
✅ jk Escape: jk in insert mode still exits to normal mode
✅ Visual Mode: All your visual mode keybindings preserved
🚀 Quick Start
Switch to Enhanced Configuration
# Switch to the enhanced Neovim setup
./scripts/toggle-neovim.sh enhanced
# The first startup will automatically install all plugins
nvimSwitch Back if Needed
# Return to your original configuration anytime
./scripts/toggle-neovim.sh originalCheck Current Status
# See which configuration is active
./scripts/toggle-neovim.sh status🔧 Enhanced Features
LSP and Completion
Language Server Support:
- Automatic LSP server installation via Mason
- Intelligent code completion with nvim-cmp
- Real-time diagnostics and error detection
- Go-to-definition, references, and hover documentation
Key Bindings (LSP):
gd # Go to definition (via Telescope)
gr # Go to references (via Telescope)
K # Hover documentation
<leader>rn # Rename symbol
<leader>ca # Code actions
<leader>ds # Document symbolsModern Git Integration
Enhanced Git Workflow:
- Gitsigns: Real-time git status in sign column
- Fugitive: Full git integration with
:Gitcommands - Diffview: Beautiful diff and merge conflict resolution
- Delta Integration: Your existing delta config works seamlessly
Git Key Bindings:
# Git hunks (gitsigns)
]c # Next hunk
[c # Previous hunk
<leader>hs # Stage hunk
<leader>hr # Reset hunk
<leader>hp # Preview hunk
# Git operations (fugitive)
<leader>gs # Git status
<leader>gc # Git commit
<leader>gd # Git diff split
<leader>gb # Git blame
# Advanced git (diffview)
<leader>gv # Open diffview
<leader>gh # File historyTelescope Fuzzy Finding
Powerful Search and Navigation:
<leader>sf # Find files
<leader>sg # Live grep
<leader>sb # Find buffers
<leader>sh # Search help
<leader>sk # Search keymaps
<leader>sw # Search word under cursor
# Git integration
<leader>gf # Git files
<leader>gc # Git commits
<leader>gb # Git branchesEnhanced Text Objects and Navigation
Better Movement:
# Improved navigation (your existing keys enhanced)
<C-d> # Half page down and center
<C-u> # Half page up and center
n # Next search and center
N # Previous search and center
# Text objects (mini.ai)
af/if # Around/inside function
ac/ic # Around/inside class
at/it # Around/inside HTML tagsClaude Code Workflow Integration
AI Development Features:
<F1> # Open terminal
<F2> # Launch Claude Code in tmux pane
<F3> # Quick git status
<F4> # Quick git log
# Enhanced clipboard (works with Claude Code)
<leader>y # Yank to system clipboard
<leader>Y # Yank line to system clipboard
<leader>p # Paste without overwriting register🎨 Visual Enhancements
Modern Theme and UI
- Tokyo Night Theme: Beautiful, modern colorscheme with excellent syntax highlighting
- Lualine Status Bar: Informative status line with git integration
- Dashboard: Welcome screen with quick actions
- Better Notifications: Non-intrusive notification system
Enhanced File Explorer
- Neo-tree: Modern file explorer (available alongside netrw)
- Tree View:
<leader>efor tree view,-for netrw (your preference) - Git Integration: Visual git status in file explorer
🔄 Migration Strategy
Phase 3A: Parallel Testing (Recommended)
- Test Enhanced Config: Switch to enhanced for testing
- Learn New Features: Explore LSP, Telescope, and git tools
- Fallback Available: Switch back to original anytime
- Gradual Adoption: Use new features as you learn them
Phase 3B: Full Migration (When Ready)
- Comfort with New Features: LSP and modern tools become natural
- Workflow Integration: Claude Code workflows fully adopted
- Performance Benefits: Faster editing and navigation
📚 Learning Path
Week 1: Core Features
- [ ] LSP Basics: Learn
gd,gr,Kfor navigation - [ ] Telescope: Master
<leader>sfand<leader>sg - [ ] Git Integration: Use
<leader>hsand<leader>hpfor hunks - [ ] Completion: Get comfortable with nvim-cmp
Week 2: Advanced Features
- [ ] Diffview: Use
<leader>gvfor reviewing changes - [ ] Text Objects: Learn
af,acfor better selection - [ ] Sessions: Use
<leader>qsfor session management - [ ] Claude Code Integration: Master F-key shortcuts
Week 3: Workflow Optimization
- [ ] Custom Keybindings: Add your own shortcuts
- [ ] LSP Configuration: Customize for your languages
- [ ] Git Workflows: Integrate with your development process
- [ ] Performance Tuning: Optimize for your needs
🛠️ Customization
Adding Language Servers
Edit the LSP configuration to add more language servers:
-- In ~/.config/nvim/lua/plugins/lsp.lua
local servers = {
-- Add your language servers here
pyright = {}, -- Python
tsserver = {}, -- TypeScript/JavaScript
rust_analyzer = {}, -- Rust
gopls = {}, -- Go
}Custom Keybindings
Add your own keybindings to ~/.config/nvim/lua/user/keymaps.lua:
-- Your custom mappings
map('n', '<leader>mm', ':MyCustomCommand<CR>', { desc = 'My custom command' })Plugin Configuration
Modify plugin configurations in ~/.config/nvim/lua/plugins/:
colorscheme.lua- Theme settingstelescope.lua- Search configurationgit.lua- Git tool settingslsp.lua- Language server settings
🐛 Troubleshooting
Common Issues
LSP Not Working:
# Check Mason installation
:Mason
# Install language server manually
:MasonInstall lua-language-serverPlugins Not Loading:
# Check lazy.nvim status
:Lazy
# Sync all plugins
:Lazy syncGit Integration Issues:
# Ensure git tools are available
which git delta difft
# Check git configuration
git config --list | grep -E "(core.pager|diff.external)"Performance Issues
Slow Startup:
# Check startup time
nvim --startuptime startup.log
# Profile plugins
:Lazy profileLarge Files:
- LSP automatically disables for files >40k lines
- Treesitter handles large files gracefully
- Use
:set syntax=offfor very large files
🔒 Rollback Strategy
Immediate Rollback
# Switch back to original immediately
./scripts/toggle-neovim.sh originalEmergency Recovery
# Restore from backup if something goes wrong
./scripts/restore.sh neovim
# Or restore latest backup manually
cp -r ~/backups/nvim-backup-* ~/.config/nvimClean Installation
# Start fresh if needed
rm -rf ~/.local/share/nvim/lazy
./scripts/toggle-neovim.sh enhanced
# Plugins will reinstall on next startup📈 Benefits You'll Experience
Immediate Improvements
- LSP Integration: Instant go-to-definition and documentation
- Better Completion: Context-aware code completion
- Git Visualization: See changes directly in the editor
- Fuzzy Finding: Instantly find files and text across projects
Long-term Benefits
- Faster Development: Reduced context switching
- Better Code Quality: Real-time diagnostics and formatting
- Enhanced Git Workflow: Visual diff and merge tools
- Claude Code Integration: Optimized for AI-assisted development
🎓 Advanced Usage
Project-Specific Configuration
Create project-specific settings with .nvim.lua files:
-- .nvim.lua in project root
vim.opt_local.colorcolumn = "120"
vim.keymap.set('n', '<leader>r', ':!npm run dev<CR>')Custom Snippets
Add your own snippets to enhance productivity:
-- In lua/snippets/
local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
ls.add_snippets("javascript", {
s("log", t("console.log()"))
})Integration with External Tools
The enhanced configuration integrates seamlessly with:
- Claude Code: F-key shortcuts and clipboard integration
- Tmux: Smart window navigation between vim and tmux
- Git Tools: Delta, difftastic, and modern git workflows
- Modern CLI Tools: Integration with bat, fd, ripgrep from Phase 2
🚀 Next Steps
- Try Enhanced Configuration:
./scripts/toggle-neovim.sh enhanced - Explore Features: Start with basic LSP and Telescope
- Learn Gradually: Master one feature at a time
- Customize: Add your own keybindings and preferences
- Integrate: Combine with Phase 1 & 2 features for complete workflow
Phase 3 represents a significant leap forward in editing capabilities while maintaining the familiar, efficient workflow you've built. The safety-first approach ensures you can always return to your original setup while exploring these powerful new features.
Ready to enhance your development experience? Your comma-leader, hjkl-navigating, netrw-using workflow is preserved and enhanced with modern power tools.