🧮 CalcDocs - Formula Hover, Definition and C/C++ SyncFormula navigation and evaluation for YAML engineering formulas and C/C++ constants directly inside Visual Studio Code.
CalcDocs helps firmware, embedded, and software teams keep formulas, documentation, and source constants aligned.
📑 Index
📦 Install from
|
| Command | What it does |
|---|---|
CalcDocs: Forza aggiornamento formule |
Rebuilds index, recalculates formulas, and writes back YAML (dati, value) |
CalcDocs: Imposta intervallo scansione |
Sets periodic scan interval in seconds (0 disables periodic scan/watchers) |
Status bar button CalcDocs |
Manual quick refresh |
⚙️ Configuration
Available workspace settings:
calcdocs.scanInterval(number, default0)calcdocs.ignoredDirs(string array, folders excluded from analysis)calcdocs.enableCppProviders(boolean, defaultfalse, keeps C/C++ tools as primary)
🔍 File Scanning Rules
Formula files:
formula*.yamlformula*.ymlformulas*.yamlformulas*.yml
Code files:
.c,.h,.cpp,.hpp,.cc,.hh
Activation events:
onStartupFinishedonLanguage:yaml
🧪 Quick Example
MAX_SPEED:
formula: RPM * WHEEL_RADIUS * 0.10472
unit: m/s
value: 12.5
RPM:
value: 1000
WHEEL_RADIUS:
value: 0.2
#define SPEED_LIMIT_FACTOR (RPM / 2 + 10)
const int MAX_SPEED = SPEED_LIMIT_FACTOR * 2;
CalcDocs can expand and resolve these symbols, show computed values in hover/CodeLens, and navigate to their definitions.
🤝 Contributing
Contributions are welcome, especially for:
- parser improvements
- diagnostics
- tests
- developer experience
❤️ Sponsor
If you find this extension useful, consider sponsoring the project.
🗺️ Roadmap
Planned improvements:
- YAML schema validation
- stronger expression parsing
- more automated tests for YAML write-back
- configurable include/exclude paths
