feat: update ESP32 board version and add LSP configs

This commit is contained in:
2026-02-18 16:07:31 -08:00
parent 9f7a383b38
commit 34ca86d771
6 changed files with 3669 additions and 24 deletions

View File

@@ -33,3 +33,38 @@ BOARD=esp32-32e-4 mise run install # Install libs (shared + board)
## Known Fixes
- dashboard/off admin commands now reset inactivity timer (DoorbellLogic.cpp:234,240)
## Reverted Changes Log
Track changes that were reverted to avoid flapping:
- 2025-02-18: Initially configured LSP via neovim/mason (`.config/nvim/lua/plugins/arduino.lua`) — user clarified they wanted Crush-native LSP config instead
## Documentation Lookup Rule
When uncertain about CLI tool flags or argument syntax:
1. Run the tool with `-h` or `--help` first
2. If unclear, search for official documentation matching the tool version
3. Prefer checking the tool's own help/docs over guessing
4. For Arduino CLI, check `arduino-cli <command> --help` or official Arduino CLI docs
## Neovim LSP Configuration
For Neovim projects:
- Use Mason + mason-lspconfig to manage LSP installations
- Add LSP configs to `~/.config/nvim/lua/plugins/` as separate plugin files
- Use `on_new_config` for dynamic settings (e.g., BOARD env var → FQBN mapping)
- Example: `~/.config/nvim/lua/plugins/arduino.lua` (arduino-language-server)
## Crush LSP Configuration
- Configure via `.crush.json` in project root (or `$HOME/.config/crush/crush.json` globally)
- Supports env var interpolation: `$BOARD` or `${BOARD}`
- Supports command substitution: `$(cat boards/$BOARD/board-config.sh | grep '^FQBN=' | cut -d'"' -f2)`
- Example for Arduino (auto-detects FQBN from BOARD):
```json
{
"lsp": {
"arduino": {
"command": "arduino-language-server",
"args": ["-fqbn", "$(cat boards/${BOARD:-esp32-32e-4}/board-config.sh | grep '^FQBN=' | cut -d'\"' -f2)"]
}
}
}
```
- Run `mise run gen-crush-config` to regenerate static config