Configure clangd for ESP-IDF development

Enable PlatformIO compilation database generation and configure
toolchain discovery for Clang-based editors.
This commit is contained in:
2026-09-07 09:35:37 +02:00
parent 0b86fd9c70
commit 17520b15b7
3 changed files with 30 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
CompileFlags:
Add:
- -isystem
- /home/mscholz/.platformio/packages/toolchain-xtensa-esp-elf/xtensa-esp-elf/include
Remove:
- -mlongcalls
- -mdisable-hardware-atomics
- -fstrict-volatile-bitfields
- -fno-tree-switch-conversion
- -fno-shrink-wrap
+17
View File
@@ -0,0 +1,17 @@
// Folder-specific settings
//
// For a full list of overridable settings, and general information on folder-specific settings,
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
{
"lsp": {
"clangd": {
"binary": {
"path": "/usr/bin/clangd",
"arguments": [
"--background-index",
"--query-driver=/home/mscholz/.platformio/packages/**/bin/*"
]
}
}
}
}
+3
View File
@@ -0,0 +1,3 @@
Import("env")
env.Replace(COMPILATIONDB_INCLUDE_TOOLCHAIN=True)