UNPKG

colson-nvim

Version:

Colson Nvim: Neovim Code Editor/IDE for Software Engineers!

297 lines (226 loc) 7.34 kB
# 📁 Java Development Files Summary ## Configuration Files ### Main Configuration | File | Location | Description | |------|----------|-------------| | **java.lua** | `~/.config/nvim/after/plugin/java.lua` | Main Java configuration (600+ lines) | | **packer.lua** | `~/.config/nvim/lua/colson/packer.lua` | Plugin definitions with Java plugins | **Keybindings Location**: Lines 481-655 in `java.lua` --- ## Documentation Files ### Quick Reference (Start Here!) | File | Location | Best For | |------|----------|----------| | **JAVA_CHEATSHEET.txt** | `~/.config/nvim/JAVA_CHEATSHEET.txt` | **Print this!** One-page reference | | **JAVA_QUICKREF.md** | `~/.config/nvim/JAVA_QUICKREF.md` | Quick command lookup | ### Complete Documentation | File | Location | Best For | |------|----------|----------| | **JAVA_KEYBINDINGS.md** | `~/.config/nvim/JAVA_KEYBINDINGS.md` | Complete keybindings with examples | | **JAVA_SETUP.md** | `~/.config/nvim/JAVA_SETUP.md` | Full installation & configuration guide | | **JAVA_INSTALLATION_COMPLETE.md** | `~/.config/nvim/JAVA_INSTALLATION_COMPLETE.md` | Setup summary & next steps | ### This File | File | Location | Best For | |------|----------|----------| | **JAVA_FILES_SUMMARY.md** | `~/.config/nvim/JAVA_FILES_SUMMARY.md` | Finding all documentation | --- ## Test Project | Location | Contents | |----------|----------| | `/tmp/java-test-project/` | Complete Maven project with tests | | `/tmp/java-test-project/pom.xml` | Maven configuration | | `/tmp/java-test-project/src/main/java/com/example/demo/Application.java` | Main application | | `/tmp/java-test-project/src/test/java/com/example/demo/ApplicationTest.java` | JUnit 5 tests | **Open it with:** ```bash cd /tmp/java-test-project nvim . ``` --- ## Quick Access Commands ### View Documentation ```bash # Cheat sheet (print this!) cat ~/.config/nvim/JAVA_CHEATSHEET.txt # Quick reference cat ~/.config/nvim/JAVA_QUICKREF.md # Complete keybindings cat ~/.config/nvim/JAVA_KEYBINDINGS.md # Full setup guide cat ~/.config/nvim/JAVA_SETUP.md # Installation summary cat ~/.config/nvim/JAVA_INSTALLATION_COMPLETE.md ``` ### Edit Configuration ```bash # Edit Java config nvim ~/.config/nvim/after/plugin/java.lua # Edit plugin list nvim ~/.config/nvim/lua/colson/packer.lua ``` --- ## Keybindings Summary All keybindings are defined in `/home/colson/.config/nvim/after/plugin/java.lua` (lines 481-655) ### Prefix System - `<Space>j` Java operations (build, run, test, etc.) - `<Space>jt` Java Testing - `<Space>jd` Java Debugging - `<Space>jr` Java Refactoring (visual mode) - `<Space>d` General Debugging (DAP) - `<Space>v` LSP/View operations - `<F5-F12>` Debug execution control ### Top 10 Keybindings 1. `<Space>jr` - Run main class 2. `<Space>jb` - Build project 3. `<Space>jt` - Run all tests 4. `<Space>jm` - Run single test 5. `gd` - Go to definition 6. `K` - Show documentation 7. `<Space>vca` - Code actions 8. `<Space>db` - Toggle breakpoint 9. `<F5>` - Start/Continue debug 10. `<Space>jn` - New Spring Boot project --- ## Installation Verification ### Check Configuration ```bash # Run verification script /tmp/test-java-setup.sh # Manual checks nvim --version java --version mvn --version gradle --version ``` ### Check LSP Status ```vim :LspInfo :Mason :checkhealth java :JavaProjectInfo ``` --- ## Directory Structure ``` ~/.config/nvim/ ├── after/ └── plugin/ └── java.lua Main Java config ├── lua/ └── colson/ ├── packer.lua Plugin definitions ├── remap.lua General keybindings └── set.lua Vim settings ├── JAVA_SETUP.md Complete guide (1000+ lines) ├── JAVA_KEYBINDINGS.md All keybindings with examples ├── JAVA_QUICKREF.md Quick reference card ├── JAVA_CHEATSHEET.txt One-page cheat sheet (PRINT THIS!) ├── JAVA_INSTALLATION_COMPLETE.md Installation summary └── JAVA_FILES_SUMMARY.md This file ~/.cache/nvim/ └── jdtls/ JDTLS cache (auto-created) /tmp/ ├── java-test-project/ Test project └── test-java-setup.sh Verification script ``` --- ## Reading Order ### For Quick Start (5 minutes) 1. **JAVA_CHEATSHEET.txt** - Print and keep handy 2. **JAVA_QUICKREF.md** - Essential commands 3. Open test project and try keybindings ### For Complete Understanding (30 minutes) 1. **JAVA_INSTALLATION_COMPLETE.md** - Setup overview 2. **JAVA_KEYBINDINGS.md** - All keybindings with examples 3. **JAVA_SETUP.md** - Complete configuration guide 4. **java.lua** - Review actual configuration --- ## File Sizes | File | Lines | Purpose | |------|-------|---------| | java.lua | ~700 | Main configuration | | JAVA_SETUP.md | ~1,000 | Complete documentation | | JAVA_KEYBINDINGS.md | ~600 | Keybindings guide | | JAVA_QUICKREF.md | ~150 | Quick reference | | JAVA_CHEATSHEET.txt | ~120 | One-page cheat sheet | | JAVA_INSTALLATION_COMPLETE.md | ~300 | Installation summary | **Total Documentation**: ~2,200 lines! --- ## Printing Recommendations ### Must Print 1. **JAVA_CHEATSHEET.txt** - Keep next to keyboard (1 page) ### Good to Print 2. **JAVA_QUICKREF.md** - Keep in view (2-3 pages) 3. **JAVA_KEYBINDINGS.md** - Reference book (10-15 pages) ### Keep Digital - JAVA_SETUP.md (full guide) - JAVA_INSTALLATION_COMPLETE.md (summary) - JAVA_FILES_SUMMARY.md (this file) --- ## Common Locations to Remember | What | Where | |------|-------| | Java config | `~/.config/nvim/after/plugin/java.lua` | | Keybindings | Lines 481-655 in java.lua | | Cheat sheet | `~/.config/nvim/JAVA_CHEATSHEET.txt` | | Test project | `/tmp/java-test-project/` | | JDTLS cache | `~/.cache/nvim/jdtls/` | | All docs | `~/.config/nvim/JAVA_*.md` | --- ## Quick Tips ### View All Java Docs ```bash ls -lh ~/.config/nvim/JAVA_* ``` ### Search All Docs ```bash grep -r "specific_keybinding" ~/.config/nvim/JAVA_* ``` ### Edit Java Config ```bash nvim ~/.config/nvim/after/plugin/java.lua ``` ### View Cheat Sheet Anytime ```bash cat ~/.config/nvim/JAVA_CHEATSHEET.txt ``` ### From Within Neovim ```vim :e ~/.config/nvim/JAVA_CHEATSHEET.txt :e ~/.config/nvim/JAVA_KEYBINDINGS.md :e ~/.config/nvim/after/plugin/java.lua ``` --- ## Support & Help ### Check Health ```vim :checkhealth :checkhealth java :LspInfo :Mason ``` ### View Logs ```vim :messages :echo stdpath('cache') . '/lsp.log' ``` ### Restart Services ```vim :JavaRestart :LspRestart :PackerSync ``` --- ## Update History | Date | Version | Changes | |------|---------|---------| | 2025-11-11 | 1.0.0 | Initial setup with complete Java development environment | --- **Pro Tip**: Bookmark this file location in your terminal for quick access: ```bash # Add to ~/.bashrc or ~/.zshrc alias jdocs="cat ~/.config/nvim/JAVA_CHEATSHEET.txt" alias jedit="nvim ~/.config/nvim/after/plugin/java.lua" alias jtest="cd /tmp/java-test-project && nvim ." ``` Then just type `jdocs` to see the cheat sheet anytime!