Skip to content

[Feature Request]: Better support for clangd extenstion out of the box (VSC-1527) #1352

@mmrein

Description

@mmrein

Is your feature request related to a problem? Please describe.

  1. clangd extension does not recognize correct system headers

    • Temporary workaround is to add Arguments for clangd server with path to xtensa compiler, for example: --query-driver=/home/user/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.
    • This command has to be changed manually every time target or IDF version changes
  2. clangd extension only works correctly with clangd path set to espressif one

    • For example: /home/user/.espressif/tools/esp-clang/esp-18.1.2_20240912/esp-clang/bin/clangd
    • This path has to be changed manually every time IDF version changes

Describe the solution you'd like

I would prefer to use clangd for code navigation over MS C/C++ extension. Main reason being that it supports Inactive code block background highlight. AFAIK this is at this point the only IDE option for Espressif devices that supports this feature.

As new user of ESP-IDF in VSCode and clang in general, it took me far too much time to find at least those workarounds so I could work on my project in a way I was used to.

There is c_cpp_properties.json file for MS C/C++ extension - I would expect something simillar could be done for clangd support too?

Describe alternatives you've considered

  • MS C/C++ extension highlights just the text background, not whole block
  • Eclipse based Espressif IDE currently only colours inactive code as comment. It used to have this feature, but recently had to update to LSP based editor, which has very limited functionality and configuration options.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions