A modern Neovim configuration using lazy.nvim plugin manager with LSP support, code formatting, and intelligent completion.
~/.config/nvim/
├── init.lua # Main configuration entry point
├── lazy-lock.json # Plugin version lockfile
├── after/
│ └── lsp/ # LSP server-specific configurations
│ ├── denols.lua # Deno TypeScript runtime
│ └── ts_ls.lua # TypeScript language server
└── lua/
├── config/ # Core configuration modules
│ ├── lazy.lua # Plugin manager bootstrap
│ └── keybindings.lua # Global keybindings
└── plugins/ # Plugin specifications
├── conform.lua # Code formatting
├── lsp.lua # Language server setup
├── oil.lua # File explorer
├── telescope.lua # Fuzzy finder
├── theme.lua # Color scheme
├── treesitter.lua # Syntax highlighting
├── trouble.lua # Diagnostics display
└── which-key.lua # Keybinding help
- Plugin Management: lazy.nvim for fast startup and plugin management
- LSP Support: Full language server protocol support with Mason for server management
- Completion: blink.cmp with fuzzy matching
- File Navigation: Telescope fuzzy finder and Oil file explorer
- Code Formatting: conform.nvim with automatic formatting
- Syntax Highlighting: Treesitter with advanced parsing
- Workspace Detection: Automatic LSP server selection based on project type
- Lua:
lua_lsfor Neovim configuration - TypeScript/JavaScript:
ts_lswith Vue.js support - Deno:
denolsfor Deno projects (detected bydeno.json) - Vue.js:
vue_lsfor Vue components - Rust:
rust_analyzerfor Rust development
- Neovim 0.10+ (required for LSP and lazy.nvim)
- Git (for plugin installation)
- A C compiler (for telescope-fzf-native compilation)
- Node.js (for TypeScript/JavaScript LSP servers)
- Rust (optional, for Rust development)
- Deno (optional, for Deno projects)
-
Backup existing configuration (if any):
mv ~/.config/nvim ~/.config/nvim.backup
-
Clone this configuration:
git clone <repository-url> ~/.config/nvim
-
Start Neovim:
nvim
-
Install plugins: lazy.nvim will automatically install all plugins on first startup
-
Install LSP servers: Run
:Masonand install desired language servers, or they'll be installed automatically when opening supported file types
The leader key is set to comma (,). Most custom keybindings use the <leader> prefix.
<leader>ff- Find files<leader>fg- Live grep<leader>fb- Find buffers<leader>fh- Find help tags<leader>th- Toggle inlay hints<leader>e- Open file explorer
- Add plugins: Create new files in
lua/plugins/following existing patterns - LSP settings: Add server-specific configurations in
after/lsp/{server_name}.lua - Keybindings: Modify
lua/config/keybindings.lua - Core settings: Edit
init.luafor Neovim options
The configuration automatically detects project types:
- TypeScript projects: Detected by
package.json - Deno projects: Detected by
deno.json - Rust projects: Detected by
Cargo.toml
LSP servers activate only in appropriate workspaces to avoid conflicts.
- Plugins not loading: Run
:Lazy syncto update plugins - LSP not working: Check
:LspInfofor server status and:Masonfor installation - Performance issues: Run
:Lazy profileto identify slow plugins - Keybinding conflicts: Use
:WhichKeyto see available bindings
To update plugins and configuration:
# Update plugins
nvim --headless -c "Lazy! sync" -c "qa"
# Update configuration
cd ~/.config/nvim && git pull