CLM Field Map IntelliSense
Intelligent auto-completion, hover tooltips, real-time diagnostics, and reverse lookup for MongoDB field abbreviation systems built on the CLM field-map pattern.
Designed for teams using abbreviated MongoDB field names with bidirectional mapping dictionaries (*.field-map.ts files), this extension eliminates guesswork by surfacing full field names, categories, descriptions, and collection context directly in the editor.
Features
Auto-Completion
Start typing any field abbreviation and receive instant suggestions enriched with full field names, collection names, and categories. Context-aware prioritization ensures the most relevant fields appear first based on the file you are editing.
Hover over any abbreviated field name to see its full mapping, category, description, and source collection. Nested dot-path fields (e.g., prc.sp) are resolved segment by segment into their human-readable equivalents.
Real-Time Diagnostics
Field-map files are validated in real time. The extension warns about abbreviation collisions with reserved common fields and flags duplicate abbreviations within the same file.
Collection Context Detection
The extension detects @CollectionContext decorators and module import paths to determine which collection you are working with, then prioritizes fields from that collection and shared common fields above unrelated entries.
Reverse Lookup
Search by full field name to find its abbreviation. Open the Command Palette and run CLM: Find Field Abbreviation, then type the readable name to locate and navigate to its definition.
Live Index
Field-map files are indexed on activation and re-indexed automatically when files change. No manual rebuild required during normal development.
Commands
| Command |
Description |
CLM: Find Field Abbreviation |
Search by full field name to find the abbreviation |
CLM: Rebuild Field Map Index |
Force a complete re-index of all field-map files |
CLM: Show Field Map Index Statistics |
Display total entries, files, and collections indexed |
Configuration
All settings are under the clmFieldMap namespace in VS Code Settings.
| Setting |
Default |
Description |
clmFieldMap.fieldMapsPath |
src/common/field-maps |
Relative path to the field-maps directory |
clmFieldMap.enableCompletions |
true |
Enable auto-completion suggestions |
clmFieldMap.enableHover |
true |
Enable hover tooltips |
clmFieldMap.enableValidation |
true |
Enable real-time diagnostics |
clmFieldMap.showCollectionInCompletions |
true |
Show collection name in completion details |
Snippets
Available in *.field-map.ts files:
| Prefix |
Description |
field-map |
Scaffold a complete field-map module |
field-entry |
Add a field entry with documentation comment |
fe |
Add a simple field entry |
Requirements
- VS Code 1.85.0 or later
- A workspace containing
*.field-map.ts files in the configured path
- Index build completes in under 500ms for 100+ field-map files
- IntelliSense responses in under 200ms
- Incremental updates in under 100ms per file change
Support
License
MIT - DevOps Infinity