-
Notifications
You must be signed in to change notification settings - Fork 0
Guide Auto Imports
GitHub Actions edited this page Jan 25, 2026
·
2 revisions
VelinScript LSP Server unterstützt automatisches Import-Management für bessere Developer Experience.
Wenn du einen Typ verwendest, der nicht importiert ist, bietet der LSP Server automatisch an, den fehlenden Import hinzuzufügen.
Beispiel:
// Du verwendest User, aber es ist nicht importiert
fn processUser(user: User) {
// ...
}
Der LSP Server erkennt den Fehler "undefined type: User" und bietet eine Code Action an:
- "Add import: use module::User;"
Der LSP Server kann Imports automatisch organisieren:
- Sortierung - Alphabetische Sortierung
- Gruppierung - std, extern, local Imports werden gruppiert
- Bereinigung - Ungenutzte Imports werden entfernt
- Öffne eine
.velinDatei - Wenn ein "undefined type" Fehler auftritt, siehst du eine Glühbirne 💡
- Klicke auf die Glühbirne oder drücke
Ctrl+.(Windows/Linux) oderCmd+.(Mac) - Wähle "Add missing import"
- Rechtsklick im Editor
- Wähle "Organize Imports" oder verwende den Command:
-
Ctrl+Shift+P→ "Organize Imports"
-
Vorher:
use std::collections::HashMap;
use crate::models::Product;
use std::io::Read;
use crate::utils::helpers;
Nach "Organize Imports":
use std::collections::HashMap;
use std::io::Read;
use crate::models::Product;
use crate::utils::helpers;
Die Auto-Import Features sind standardmäßig aktiviert. In zukünftigen Versionen können sie in der VS Code Extension konfiguriert werden.
- Regelmäßig organisieren - Nutze "Organize Imports" vor Commits
- Code Actions nutzen - Nutze Quick Fixes für fehlende Imports
- Manuelle Kontrolle - Prüfe automatisch hinzugefügte Imports
- Compiler Architecture
- Pass-Verlauf
- Type Inference
- Code Ordering
- IR Representation
- Borrow Checker
- Code Generation
- Multi-Target Compilation
- Module Resolution
- Framework Integration
- Parallelization
- AI Compiler Passes
- Prompt Optimizer
- System Generation
- Basics
- APIs
- Security
- Database
- Validation
- Authentication
- ML/LLM
- Intelligence Features
- Type Inference
- ML Training
- Pattern Matching
- Closures
- Collections
- HTTP Client
- String Interpolation
- Debugger
- Vektor-Datenbanken
- CLI Reference
- API Keys Setup
- Advanced
- Backend
- Security Best Practices
- AI/ML
- Auto Imports
- Plugin Development