{"id":50962014,"url":"https://github.com/veaba/esp32-include-helper","last_synced_at":"2026-06-18T15:02:09.428Z","repository":{"id":362987867,"uuid":"1261536113","full_name":"veaba/esp32-include-helper","owner":"veaba","description":"【WIP】esp32 嵌入式开发函数 API 索引快速导入 vscode 插件。","archived":false,"fork":false,"pushed_at":"2026-06-06T20:52:47.000Z","size":445,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T22:18:03.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T20:28:26.000Z","updated_at":"2026-06-06T20:53:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/veaba/esp32-include-helper","commit_stats":null,"previous_names":["veaba/esp32-include-helper"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/veaba/esp32-include-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fesp32-include-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fesp32-include-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fesp32-include-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fesp32-include-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veaba","download_url":"https://codeload.github.com/veaba/esp32-include-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fesp32-include-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34495380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T15:02:03.730Z","updated_at":"2026-06-18T15:02:09.416Z","avatar_url":"https://github.com/veaba.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP-IDF Include Helper\n\nSmart detection of undefined symbols in C/C++ code and quick-add of corresponding ESP-IDF header files via VSCode Quick Fix.\n\n![snapshot](snapshot.png)\n\n## Features\n\n- **Quick Fix (Lightbulb 💡)** — When clangd detects an undefined symbol like `esp_chip_info_t`, a lightbulb appears offering `Add #include \"esp_chip_info.h\"`\n- **Symbol Cache** — Local SQLite database indexing 13,000+ symbols from ESP-IDF headers\n- **Multi-chip Support** — Separate indexes for ESP32, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2\n- **Status Bar** — Shows cache status (symbol count) at a glance; yellow warning when cache is empty\n- **First-run Guidance** — Prompts to set IDF path and rebuild cache on first activation\n\n## Requirements\n\n- [clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd) VSCode extension (provides diagnostics that trigger Quick Fix)\n- ESP-IDF v5.x installed locally\n- Python 3.x (for index building script)\n\n## Quick Start\n\n1. Install the extension\n2. Set your ESP-IDF path in VSCode Settings:\n\n   ```\n   espIdfIncludeAssistant.idfPath → D:\\programs-dev\\Espressif\\frameworks\\esp-idf-v5.5.4\n   ```\n\n3. Run `Ctrl+Shift+P` → **ESP-IDF: Rebuild Symbol Cache**\n4. Open a `.c` / `.cpp` file, use an undefined symbol — clangd marks it red → click the lightbulb → **Add #include**\n\n## How It Works\n\n```\nclangd: \"Unknown type name 'esp_chip_info_t'\"\n    ↓\nerrorMatcher.ts: extracts symbol \"esp_chip_info_t\"\n    ↓\nSymbolCache.findSymbol(\"esp_chip_info_t\") → { header: \"esp_chip_info.h\", ... }\n    ↓\nQuick Fix: \"Add #include \"esp_chip_info.h\" (esp_chip_info_t)\"\n```\n\n## Configuration\n\n| Key | Description | Type | Default |\n|-----|-------------|------|---------|\n| `espIdfIncludeAssistant.idfPath` | ESP-IDF installation path | `string` | `\"\"` |\n| `espIdfIncludeAssistant.chipTarget` | Target chip type (`esp32`, `esp32s3`, `esp32c3`, `esp32c6`, `esp32h2`) | `string` | `\"esp32\"` |\n| `espIdfIncludeAssistant.idfVersion` | ESP-IDF version | `string` | `\"v5.5.4\"` |\n| `espIdfIncludeAssistant.enableQuickFix` | Enable Quick Fix feature | `boolean` | `true` |\n| `espIdfIncludeAssistant.autoDetectChip` | Auto detect chip type from project config | `boolean` | `true` |\n\n## Commands\n\n| Command | Title |\n|---------|-------|\n| `esp-idf-include-assistant.rebuildCache` | ESP-IDF: Rebuild Symbol Cache |\n| `esp-idf-include-assistant.showCacheStatus` | ESP-IDF: Show Cache Status |\n\n## Manual Index Build\n\n```bash\npython scripts/build_index.py \\\n  --idf-path \"D:/programs-dev/Espressif/frameworks/esp-idf-v5.5.4\" \\\n  --chip-target esp32 \\\n  --idf-version v5.5.4 \\\n  --output ~/.esp-idf-include-assistant/symbols.db\n```\n\nYou can also scan headers without building an index:\n\n```bash\npython scripts/scan_headers.py \\\n  --idf-path \"D:/programs-dev/Espressif/frameworks/esp-idf-v5.5.4\" \\\n  --chip-target esp32 \\\n  --filter wifi\n```\n\n## Project Structure\n\n```\nsrc/\n  extension.ts          # Plugin entry — status bar, commands, Quick Fix registration\n  cache/\n    database.ts         # SQLite (sql.js WASM) database layer\n    symbolIndex.ts      # SymbolCache facade\n  diagnostics/\n    errorMatcher.ts     # Regex patterns to extract undefined symbols from clangd\n  quickfix/\n    includeFixer.ts     # CodeActionProvider — generates \"Add #include\" fixes\n  lsp/\n    clangdClient.ts     # clangd LSP client (optional integration)\n  config/\n    settings.ts         # VSCode settings via reactive-vscode\n  constants.ts          # Chip targets, diagnostic patterns, DB name\n  utils.ts              # Logger\nscripts/\n  build_index.py        # Python script to build symbol index from ESP-IDF headers\n  scan_headers.py        # Lightweight header scanner (no DB)\nstatic/\n  sql-wasm.wasm         # sql.js WASM binary\ntests/\n  constants.test.ts\n  database.test.ts\n  errorMatcher.test.ts\n```\n\n## Development\n\n```bash\npnpm install          # Install dependencies\npnpm run dev          # Watch mode with sourcemaps\npnpm run build        # Production build\npnpm run test         # Run tests\npnpm run typecheck    # TypeScript type check\npnpm run lint         # ESLint\n```\n\nPress `F5` in VSCode to launch Extension Development Host.\n\n## Tech Stack\n\n| Component | Technology | Why |\n|-----------|-----------|-----|\n| Plugin framework | VSCode Extension API + reactive-vscode | Reactive config, type-safe |\n| LSP integration | vscode-languageclient → clangd | Leverages clangd diagnostics |\n| Local cache | sql.js (WASM SQLite) | No native compilation, cross-platform |\n| Index builder | Python + sqlite3 | Fast parsing of ESP-IDF headers |\n| Build | tsdown | Fast bundling, CJS output |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveaba%2Fesp32-include-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveaba%2Fesp32-include-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveaba%2Fesp32-include-helper/lists"}