This repository contains my personal Neovim (v0.11.3) configuration optimized for Java and Rust development. It leverages lazy.nvim for plugin management and includes language-specific LSP, debugging, testing, AI integration, and modern productivity tools.
Originally started as a Java-focused config, it has evolved into a polyglot development environment. Feel free to use this as a reference or starting point for your own Neovim setup!
Inspiration: This configuration was inspired by Melkeydev's Neovim repo, the YouTube talk "How I use Neovim in 2024", and LazyVim's language extras.
Don't know the keybindings? Multiple ways to access help:
- Press
<Space>and wait! The which-key popup shows all available commands organized by category - Press
<Space>?or<Space><Space>for which-key popup - Press
<Space>ckto toggle a persistent keymaps sidebar on the right - Press
<Space>csfor a searchable cheatsheet via Telescope - Organized groups: Find, File Explorer, Split Windows, Tabs, Git, Code actions, and more
- See Quick Reference for complete list
- Java: Full jdtls LSP integration with debugging (DAP) and testing support
- Rust: rustaceanvim with rust-analyzer LSP, crates.nvim for Cargo.toml management, codelldb debugger, and neotest integration
- AI Integration: CodeCompanion with Ollama and Gemini support for AI-assisted coding
- Smart Completion: nvim-cmp with LSP, buffer, path, and snippet sources
- UI Enhancements: Bufferline, lualine, colorschemes, indent guides
- Theme Switcher: Telescope-based theme picker with live preview and persistence (8 lazy-loaded themes: tokyonight, ayu_dark, catppuccin, gruvbox, onedark, nord, nightfox, kanagawa)
- File Explorer: Nvim-tree with custom icons and keymaps
- Fuzzy Finder: Telescope for fast file and text search
- Terminal Integration: ToggleTerm for embedded terminals with Lazygit support
- Syntax Highlighting: Treesitter-based syntax highlighting with LSP semantic tokens disabled for colorful highlighting
- Plugin Management: lazy.nvim for fast startup with lazy-loaded plugins
- Neovim 0.11.3 or later
- A terminal with true color (24-bit) support (iTerm2, Alacritty, Kitty, WezTerm, etc.) for proper theme display
rust-analyzerfor Rust developmentjdtlsfor Java development (auto-installed via nvim-java)
- Open a file:
nvim yourfile.rsornvim YourClass.java - Press
<Space>and wait to see all available keybindings - Essential keybindings:
<Space>ck- Toggle keymaps sidebar (persistent)<Space>?- Show all keybindings (popup)<Space>ne- Toggle file explorer<Space>ff- Find files<Space>fs- Search in files<Space>ct- Change theme<Space>gg- Open LazygitCtrl+7- Toggle terminalgd- Go to definitionK- Show documentation<Space>ca- Code actions
See Quick Reference for complete keybinding list.
Full documentation is available in the docs directory, including:
- Installation guide
- Step-by-step tutorials for Java and Rust
- Plugin reference
- Complete keybinding list
The configuration is organized in a modular structure:
lua/neovim4j/core/keymaps.lua- General keybindingslua/neovim4j/plugins/java.lua- Java-specific toolinglua/neovim4j/plugins/rust.lua- Rust-specific toolinglua/neovim4j/plugins/lsp/lspconfig.lua- General LSP configurationlua/neovim4j/plugins/which-key.lua- Keybinding reference popuplua/neovim4j/plugins/cheatsheet.lua- Searchable cheatsheetlua/neovim4j/plugins/- Other plugin configurationslua/neovim4j/utils/- Custom utilities (keymaps sidebar, etc.)
Note: The
neovim4jdirectory name is historical from when this was Java-focused. It now supports multiple languages.
