My modern, modular Neovim setup optimized for performance, productivity, and aesthetics. Built entirely in Lua with the elegant Rose Pine colorscheme.
- Performance-Optimized: Lazy-loading plugins and deferred initialization for <100ms startup
- Rose Pine Theme: Clean, minimal aesthetic with light/dark mode toggle
- Modern LSP Experience: Intelligent code completion, diagnostics, and navigation
- AI-Powered Assistant: Inline LLM integration with local Ollama for code explanation and assistance
- TypeScript Power Tools: First-class support for TS/TSX with typescript-tools.nvim
- Git Integration: Seamless workflow with gitsigns and fugitive
- Distraction-Free Writing: Markdown support with Goyo
- Robust Error Handling: Prevention of LSP semantic tokens errors in TypeScript files
- Plugin Management: lazy.nvim for performance-focused plugin loading
- Fuzzy Finding: Telescope for files, buffers, and project-wide search
- Quick Navigation: Hop.nvim for efficient cursor movement
- File Browser: NvimTree for directory exploration
- Language Support: TypeScript/JS, Lua, Go, Rust, Python, and more
git clone https://github.com/phrazzld/neovim-config ~/.config/nvimThe first time you run Neovim, lazy.nvim will automatically install all plugins.
The AI-powered assistant requires Ollama for local LLM inference.
-
Install Ollama: Download from ollama.ai or use package manager
# macOS brew install ollama # Linux curl -fsSL https://ollama.ai/install.sh | sh
-
Pull a model: Download your preferred model
ollama pull gemma3:4b # Default model (4B parameters) ollama pull llama3.2:3b # Alternative: smaller, faster ollama pull codellama:7b # Alternative: code-specialized
-
Start Ollama: Ensure the service is running
ollama serve # Or start the Ollama app
The LLM plugin works out-of-the-box with sensible defaults. To customize, add this to your init.lua:
-- Default configuration (no setup needed)
require("user.llm").setup()
-- Custom configuration example
require("user.llm").setup({
model = "llama3.2:3b", -- Model name (default: "gemma3:4b")
url = "http://localhost:11434", -- Ollama URL (default: "http://localhost:11434")
timeout = 60000, -- Timeout in ms (default: 30000)
keymap = "<leader>ai" -- Visual mode keymap (default: "<leader>ll")
})Fast responses (smaller model):
require("user.llm").setup({
model = "llama3.2:3b",
timeout = 15000 -- 15 seconds
})Code-specialized model:
require("user.llm").setup({
model = "codellama:7b",
timeout = 45000 -- 45 seconds for larger model
})Remote Ollama server:
require("user.llm").setup({
url = "http://192.168.1.100:11434",
timeout = 60000 -- Higher timeout for network requests
})- Select text in visual mode (
v,V, or<C-v>) - Press
<leader>ll(or your custom keymap) - Wait for the blockquoted response to appear
- "curl not found": Install curl via your package manager
- Connection errors: Ensure Ollama is running (
ollama serve) - Model errors: Pull the model first (
ollama pull modelname) - Timeouts: Increase timeout for complex queries or larger models
| Key | Action |
|---|---|
<leader>th |
Toggle light/dark theme |
<leader>u |
Find files (Telescope) |
<leader>s |
Search in files (Telescope) |
<leader>ll |
Query LLM with selection |
<leader>to |
Organize TS imports |
<leader>e |
Toggle file explorer |
<leader>gs |
Git status |
<leader>xx |
Toggle diagnostics panel |
<C-f>f |
Format current file |
init.lua: Entry point that loads configuration moduleslua/user/: Modular configuration files:lazy.lua: Plugin manager setup (loads first)options.lua: Core Neovim settingslsp/: Language Server Protocol configurationcolorscheme.lua: Theme configurationkeymappings.lua: Global key bindings
This configuration is available under the MIT License. See the LICENSE file for more details.