Complete ZED IDE integration for the Open Bank Project API
This folder contains everything needed to set up ZED IDE with full Scala language server support, automated build tasks, and streamlined development workflows for OBP-API.
- Java 17+ (OpenJDK recommended)
- Maven 3.6+
- ZED IDE (latest version)
cd OBP-API
./zed/setup-zed-ide.shThis unified script automatically:
- ✅ Installs missing dependencies (Coursier, Bloop)
- ✅ Compiles the project and resolves dependencies
- ✅ Generates dynamic Bloop configurations
- ✅ Sets up Metals language server
- ✅ Copies ZED configuration files to
.zed/folder - ✅ Configures build and run tasks
- ✅ Sets up manual-only code formatting
zed/
├── README.md # This comprehensive guide
├── setup-zed-ide.sh # Single unified setup script
├── generate-bloop-config.sh # Dynamic Bloop config generator
├── settings.json # ZED IDE settings template
├── tasks.json # Pre-configured build/run tasks
├── .metals-config.json # Metals language server config
└── setup-zed.bat # Windows setup script
| Action | Linux | macOS/Windows | Purpose |
|---|---|---|---|
| Command Palette | Ctrl+Shift+P |
Cmd+Shift+P |
Access all tasks |
| Go to Definition | F12 |
F12 |
Navigate to symbol definition |
| Find References | Shift+F12 |
Shift+F12 |
Find all symbol usages |
| Quick Open File | Ctrl+P |
Cmd+P |
Fast file navigation |
| Format Code | Ctrl+Shift+I |
Cmd+Shift+I |
Auto-format Scala code |
| Symbol Search | Ctrl+T |
Cmd+T |
Search symbols project-wide |
Access via Command Palette (Ctrl+Shift+P on Linux, Cmd+Shift+P on macOS/Windows) → "task: spawn" (Linux) or "Tasks: Spawn" (macOS/Windows):
| Task | Purpose | Duration | When to Use |
|---|---|---|---|
| Quick Build Dependencies | Build only dependencies | 1-3 min | First step, after dependency changes |
| [1] Run OBP-API Server | Start development server | 3-5 min | Daily development |
| 🔨 Build OBP-API | Full project build | 2-5 min | After code changes |
| Run Tests | Execute test suite | 5-15 min | Before commits |
| [3] Compile Only | Quick syntax check | 30s-1 min | During development |
| Task | Purpose |
|---|---|
| [4] Clean Target Folders | Remove build artifacts |
| 🔄 Continuous Compile (Scala) | Auto-recompile on changes |
| [2] Test API Root Endpoint | Verify server status |
| 🔧 Kill Server on Port 8080 | Stop stuck processes |
| 🔍 Check Dependencies | Verify Maven dependencies |
-
Start Development Session
- Linux:
Ctrl+Shift+P→"task: spawn"→"Quick Build Dependencies" - macOS:
Cmd+Shift+P→"Tasks: Spawn"→"Quick Build Dependencies"
- Linux:
-
Start API Server
- Use task
"[1] Run OBP-API Server" - Server runs on:
http://localhost:8080 - Test endpoint:
http://localhost:8080/obp/v5.1.0/root
- Use task
-
Code Development
- Edit Scala files in
obp-api/src/main/scala/ - Use
F12for Go to Definition - Auto-completion with
Ctrl+Space - Real-time error highlighting
- Format code with
Ctrl+Shift+I
- Edit Scala files in
-
Testing & Validation
- Quick compile:
"[3] Compile Only"task - Run tests:
"Run Tests"task - API testing:
"[2] Test API Root Endpoint"task
- Quick compile:
- Format on Save: DISABLED (manual formatting only - use
Ctrl+Shift+I) - Scala LSP: Optimized Metals configuration
- Maven Integration: Proper MAVEN_OPTS for Java 17+
- UI Preferences: One Dark theme, consistent layout
- Inlay Hints: Enabled for better code understanding
All tasks include proper environment variables:
MAVEN_OPTS="-Xss128m --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED"- Build Tool: Maven
- Bloop Integration: Dynamic configuration generation
- Scala Version: 2.12.20
- Java Target: Java 11 (compatible with Java 17)
| Problem | Symptom | Solution |
|---|---|---|
| Language Server Not Working | No go-to-definition, no autocomplete | Restart ZED, wait for Metals initialization |
| Compilation Errors | Red squiggly lines, build failures | Check Problems panel, run "Clean Target Folders" |
| Server Won't Start | Port 8080 busy | Run "Kill Server on Port 8080" task |
| Out of Memory | Build fails with heap space error | Already configured in tasks |
| Missing Dependencies | Import errors | Run "Check Dependencies" task |
-
Full Reset:
./zed/setup-zed-ide.sh # Re-run complete setup -
Regenerate Bloop Configurations:
./zed/generate-bloop-config.sh # Regenerate configs -
Clean Restart:
- Clean build with "Clean Target Folders" task
- Restart ZED IDE
- Wait for Metals to reinitialize (2-3 minutes)
- Use
"task: spawn"in command palette (not"Tasks: Spawn") - Ensure proper Java permissions for Maven
- Use
"Tasks: Spawn"in command palette - Windows users can also use
setup-zed.bat
OBP-API/
├── obp-api/ # Main API application
│ └── src/main/scala/ # Scala source code
│ └── code/api/ # API endpoint definitions
│ ├── v5_1_0/ # Latest API version
│ ├── v4_0_0/ # Previous versions
│ └── util/ # Utility functions
├── obp-commons/ # Shared utilities and models
│ └── src/main/scala/ # Common Scala code
└── .zed/ # ZED IDE configuration (generated)
- Navigate to
obp-api/src/main/scala/code/api/v5_1_0/ - Find appropriate API trait (e.g.,
OBPAPI5_1_0.scala) - Follow existing endpoint patterns
- Use
F12to navigate to helper functions - Test with API test task
# Root API information
curl http://localhost:8080/obp/v5.1.0/root
# Health check
curl http://localhost:8080/obp/v5.1.0/config
# Banks list (requires proper setup)
curl http://localhost:8080/obp/v5.1.0/banks- Quick file access:
Ctrl+Pthen type filename - Symbol search:
Ctrl+Tthen type function/class name - Project-wide text search:
Ctrl+Shift+F
Ctrl+/- Toggle line commentCtrl+D- Select next occurrenceCtrl+Shift+L- Select all occurrencesF2- Rename symbolAlt+←/→- Navigate back/forward
- Close unused files to reduce memory usage
- Use "Continuous Compile" for faster feedback
- Limit test runs to specific modules during development
- OBP-API Project: https://github.com/OpenBankProject/OBP-API
- API Documentation: https://apiexplorer.openbankproject.com
- Community Forums: https://openbankproject.com
- Scala: https://docs.scala-lang.org/
- Lift Framework: https://liftweb.net/
- Maven: https://maven.apache.org/guides/
- ZED IDE: https://zed.dev/docs
# Check Java version
java -version
# Check Maven
mvn -version
# Check Bloop status
bloop projects
# Test compilation
bloop compile obp-commons obp-api
# Check ZED configuration
ls -la .zed/| Error | Cause | Solution |
|---|---|---|
| "Java module system" errors | Java 17+ module restrictions | Already handled in MAVEN_OPTS |
| "Port 8080 already in use" | Previous server still running | Use "Kill Server" task |
| "Metals not responding" | Language server crashed | Restart ZED IDE |
| "Compilation failed" | Dependency issues | Run "Check Dependencies" |
- Install Java 17+, Maven 3.6+, ZED IDE
- Clone OBP-API repository
- Run
./zed/setup-zed-ide.sh(single setup script) - Open project in ZED IDE
- Wait for Metals initialization (2-3 minutes)
- Run "Quick Build Dependencies" task
- Start server with "[1] Run OBP-API Server" task
- Test API at http://localhost:8080/obp/v5.1.0/root
- Try "Go to Definition" (F12) on Scala symbol
- Format code manually with
Ctrl+Shift+I(auto-format disabled) - Make a small code change and test compilation
Welcome to productive OBP-API development with ZED IDE! 🚀
This setup provides a complete, optimized development environment for the Open Bank Project API using ZED IDE with full Scala language server support.