Because spending 40 hours configuring your editor is clearly more efficient than learning to use it properly.
Welcome to my Neovim configuration - a carefully crafted, battle-tested setup that took approximately forever to get right. This config is designed for developers who want a powerful, productive editing experience without the carpal tunnel.
This configuration works seamlessly across all platforms:
| Platform | LSP Installation | Auto-Setup |
|---|---|---|
| macOS | Mason (automatic) | ✅ |
| Linux | Mason (automatic) | ✅ |
| Windows | Mason (automatic) | ✅ |
| Termux (Android) | Smart auto-installer | ✅ |
Termux Users: On first launch, you'll be prompted to install missing LSP servers automatically. No manual setup required!
Because typing code manually is so 2023, this config includes multiple AI options:
| Plugin | What It Does | Privacy |
|---|---|---|
| Copilot.lua | GitHub Copilot integration | ☁️ Cloud |
| bropilot.nvim | Local Copilot alternative | 🔒 Local (Ollama) |
| gp.nvim | Chat with LLMs (Ollama, OpenAI, Anthropic) | 🔒/☁️ Both |
Pro tip: If you're using Ollama, bropilot gives you Copilot-like completions without sending code to the cloud. Your secrets remain... secret.
- Tokyonight theme - The only theme that makes 3 AM look productive
- Neo-tree - File explorer that doesn't make you want to use VS Code
- Lualine - Status line with auto theme switching and tabline for multi-tab editing
- Alpha-nvim - Dashboard so pretty you'll forget you're in a terminal
- Theme Picker - Pick from 9 themes (Tokyonight, Catppuccin, Gruvbox, Kanagawa, Rose Pine, Everforest, Nightfox, Tender, Tokyodark)
- No clutter - End-of-buffer ~ characters removed for clean look
- LSP Support: Lua, Python, TypeScript, Rust, Go, C/C++, JSON, YAML, HTML, CSS, Bash, and more
- Smart LSP Detection: Automatically finds and uses installed language servers
- Completion: nvim-cmp with LuaSnip for snippet magic
- Treesitter: Syntax highlighting that actually makes sense
- Git Integration: gitsigns, telescope git commands
- Diagnostics: Trouble v3 for beautiful error/warning lists
- Formatting: Conform.nvim for consistent code formatting
- Debugging: nvim-dap for when
print()just isn't enough
| Plugin | Purpose |
|---|---|
| lazy.nvim | Plugin manager (the only one that doesn't make you wait) |
| nvim-lspconfig | Language Server Protocol configuration |
| mason.nvim | LSP/DAP/Linter installer |
| nvim-cmp | Completion engine (the good kind) |
| nvim-treesitter | Syntax highlighting done right |
| telescope.nvim | Fuzzy finder (faster than finding things manually) |
| Plugin | Purpose |
|---|---|
| which-key.nvim | Shows you what keys do before you press them |
| conform.nvim | Fast, flexible code formatting |
| todo-comments.nvim | Highlights TODO, FIXME, and your broken promises |
| indent-blankline.nvim | Visual indentation guides (no more counting spaces) |
| nvim-surround | Manipulate surrounding characters like a wizard |
| Plugin | Purpose |
|---|---|
| gitsigns.nvim | Git signs in the gutter (no more guessing) |
| trouble.nvim | Diagnostics list v3 (when things go wrong) |
| nvim-dap | Debug Adapter Protocol (for actual debugging) |
- Neovim 0.11.0+ (uses native LSP config API)
- Git (for cloning things)
- A terminal (unless you enjoy pain)
- Node.js (for many LSP servers)
# Backup existing config (if any)
mv ~/.config/nvim ~/.config/nvim.backup
# Clone this config
git clone https://github.com/yourusername/nvim-config ~/.config/nvim
# Start Neovim (Lazy will install everything)
nvim
# Go make coffee (first startup takes a moment)Note: On first launch, Lazy will clone and install all plugins. This is normal. The plugins are not judging you for the time it takes.
Mason will automatically install all configured LSP servers. No additional setup required.
On first launch, you'll see a prompt:
┌──────────────────────────────────┐
│ Missing LSP servers detected: │
│ • Bash LSP │
│ • TypeScript/JavaScript LSP │
│ • Python LSP │
│ │
│ Install now? │
│ [Yes] [Later] [Never] │
└──────────────────────────────────┘
Select "Yes" to install everything automatically. Or run :TermuxLspInstall later.
For a comprehensive list of all keybindings and commands, see: 👉 KEYBINDINGS.md
Warning: This cheat sheet is extensive. Possibly longer than some actual documentation.
nvim/
├── init.lua # Entry point
├── lua/
│ ├── config/
│ │ ├── lazy.lua # Plugin manager setup
│ │ ├── options.lua # Neovim options
│ │ └── termux.lua # Termux LSP auto-installer
│ └── plugins/
│ ├── lsp.lua # Cross-platform LSP configuration
│ ├── completions.lua # nvim-cmp setup
│ ├── conform.lua # Code formatting
│ ├── trouble.lua # Diagnostics (v3)
│ ├── telescope.lua # Fuzzy finder
│ ├── treesitter.lua # Syntax highlighting
│ ├── which.lua # Keybinding hints
│ └── ... # Other plugin configs
├── README.md # You are here
└── KEYBINDINGS.md # Complete keybinding reference
The LSP setup uses Neovim 0.11's native vim.lsp.config() and vim.lsp.enable() API:
-- Adding a new LSP server
-- In lua/plugins/lsp.lua, add to the servers table:
servers = {
your_server = {
args = { "--stdio" },
filetypes = { "yourfiletype" },
settings = {
-- your settings
},
},
}
-- Then add to lsp_executables for cross-platform support:
lsp_executables = {
your_server = { "your-server-binary", "alternative-name" },
}Want to change the theme? Use the built-in theme picker:
:lua pick_theme() " or <leader>TTTheme is saved automatically and persists across sessions.
Want to check LSP status?
:LspStatus " Shows available/missing LSP servers
:LspInfo " Built-in Neovim LSP infoWant to format code?
<leader>cf " Format with conform.nvim| Command | Description |
|---|---|
:LspStatus |
Show which LSP servers are available/missing |
:LspInfo |
Show attached LSP clients for current buffer |
:LspRestart |
Restart all attached LSP clients |
| Command | Description |
|---|---|
:TermuxLspInstall |
Install all missing LSP servers |
:TermuxLspStatus |
Show LSP installation status |
:TermuxLspReset |
Re-enable installation prompt |
| Command | Description |
|---|---|
:ConformInfo |
Show formatter status |
<leader>cf |
Format current buffer |
| Command | Description |
|---|---|
:Trouble diagnostics |
Open workspace diagnostics |
:Trouble diagnostics filter.buf=0 |
Open buffer diagnostics |
:Trouble symbols |
Open document symbols |
:Trouble qflist |
Open quickfix list |
This config is optimized for speed:
- Lazy loading: Plugins only load when needed
- Native LSP API: Uses Neovim 0.11's built-in LSP configuration
- Smart LSP detection: Only enables LSPs that are actually installed
- Disabled runtime plugins: gzip, tarPlugin, tohtml, tutor, zipPlugin
- Bytecode compilation:
vim.loader.enable()for faster Lua loading
Run profiling to see startup time:
:Lazy profileThis configuration has first-class support for Termux on Android.
- Automatic Detection: The config detects when running on Termux
- Smart PATH Handling: Adds Termux-specific paths and environment variables
- LSP Auto-Installer: Prompts to install missing LSP servers on first launch
- Optimized Settings: Reduces resource usage for mobile devices
If the auto-installer doesn't work, you can install LSPs manually:
# Install base packages
pkg install nodejs npm python clang
# Install Node-based LSPs
npm install -g bash-language-server
npm install -g typescript typescript-language-server
npm install -g vscode-langservers-extracted # json, css, html
npm install -g yaml-language-server
npm install -g pyright
# Install pkg-based LSPs
pkg install lua-language-server gopls rust-analyzer| LSP | Language | Install Method |
|---|---|---|
| lua-language-server | Lua | pkg |
| bash-language-server | Bash/Shell | npm |
| typescript-language-server | TypeScript/JavaScript | npm |
| pyright | Python | npm |
| vscode-langservers-extracted | JSON/HTML/CSS | npm |
| yaml-language-server | YAML | npm |
| clangd | C/C++ | pkg (clang) |
| gopls | Go | pkg |
| rust-analyzer | Rust | pkg |
- Restart Neovim (yes, really)
- Run
:Lazy cleanthen:Lazy sync - Check your Neovim version:
nvim --version(need 0.11+) - Run
:checkhealthfor diagnostics
- Run
:LspStatusto see which servers are available - Run
:LspInfoto see attached clients - Check if the executable is in PATH:
:!which lua-language-server - On Termux: Run
:TermuxLspInstallto install missing servers
Make sure you're using the correct Trouble v3 commands:
:Trouble diagnostics toggle(workspace):Trouble diagnostics toggle filter.buf=0(current buffer)
- Copilot: Run
:Copilot statusto check authentication - Ollama: Make sure
ollama serveis running - gp.nvim: Check
lua/plugins/gp.luafor correct endpoint
- Run
:ConformInfoto see formatter status - Make sure the formatter is installed (e.g.,
stylua,prettier) - Check if there's a config file in your project
- 🚀 Neovim 0.11 Native LSP: Migrated to
vim.lsp.config()andvim.lsp.enable()API - 🌍 Cross-Platform LSP: Intelligent executable detection for all platforms
- 📱 Termux Auto-Installer: Automatic LSP installation on Android
- 🔧 Trouble v3: Updated to new Trouble API with better diagnostics
- ⚡ Performance: Removed accidental JIT disable, faster startup
- 🔄 Fixed: Correct VSCode language server names (vscode-json-language-server, etc.)
- 🗑️ Removed: Deprecated lsp-inlayhints.nvim (using native inlay hints)
- 📋 Commands: Added
:LspStatus,:TermuxLspInstall,:TermuxLspStatus
- @folke - For lazy.nvim, which-key, tokyonight, trouble.nvim, and basically making Neovim usable
- @williamboman - For mason.nvim, making LSP installation painless
- @stevearc - For conform.nvim, making formatting just work
- The Neovim team - For making the best text editor better
- Stack Overflow - For all the answers I copied without understanding
- Coffee - The real plugin powering this config
MIT License - Because sharing is caring.
Found a bug? Have a suggestion? Want to tell me about a plugin I missed?
- Open an issue
- Or better yet, fix it and PR
- Or even better, just use it and enjoy
"I used to think Neovim was difficult. Then I spent 6 hours configuring it. Now I think it's even more difficult but at least it looks pretty."
— Everyone who has ever configured Neovim
Happy hacking! 🚀
P.S. If you're reading this, you probably should have been working instead of configuring your editor.