feat: update ESP32 board version and add LSP configs
This commit is contained in:
30
mise.toml
30
mise.toml
@@ -193,5 +193,35 @@ clang-format -i --style=file \
|
||||
libraries/KlubhausCore/*.properties
|
||||
"""
|
||||
|
||||
[tasks.gen-compile-commands]
|
||||
description = "Generate compile_commands.json for LSP (uses BOARD env var)"
|
||||
run = """
|
||||
rm -rf /tmp/arduino-build
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
arduino-cli compile --only-compilation-database --fqbn "$FQBN" --build-path /tmp/arduino-build ./boards/$BOARD
|
||||
cp /tmp/arduino-build/compile_commands.json .
|
||||
echo "[OK] compile_commands.json generated"
|
||||
"""
|
||||
|
||||
[tasks.gen-crush-config]
|
||||
description = "Generate .crush.json with BOARD-based FQBN"
|
||||
run = """
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
cat > .crush.json << EOF
|
||||
{
|
||||
"lsp": {
|
||||
"arduino": {
|
||||
"command": "arduino-language-server",
|
||||
"args": ["-fqbn", "$FQBN"]
|
||||
},
|
||||
"cpp": {
|
||||
"command": "clangd"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
echo "[OK] Generated .crush.json with FQBN: $FQBN"
|
||||
"""
|
||||
|
||||
[env]
|
||||
BOARD = "esp32-32e-4"
|
||||
|
||||
Reference in New Issue
Block a user