Unexpected Language Server Errors

justinmreina
Posts: 71
Joined: Tue Jul 18, 2017 10:39 pm
Location: Snohomish, WAt
Contact:

Unexpected Language Server Errors

Postby justinmreina » Thu Jun 05, 2025 5:46 pm

Hi,
I am now getting drv_unknown_argument errors for my recent project builds -

Unexpected Problems:

Example Problems.png
Example Problems.png (65.18 KiB) Viewed 925 times


What is this, can it be removed? Here is the example project which displays this (see test\ in this proj for detail) -

Here is the config for that demo

kondalkolipaka
Espressif staff
Espressif staff
Posts: 269
Joined: Wed Jul 17, 2019 5:26 pm

Re: Unexpected Language Server Errors

Postby kondalkolipaka » Fri Jun 06, 2025 1:29 am

Hello,

Looks like .clangd configuration file is missing in your project with the below settings. Could you please check?

Code: Select all

CompileFlags:
  CompilationDatabase: build
  Remove: [-m*, -f*]

kondalkolipaka
Espressif staff
Espressif staff
Posts: 269
Joined: Wed Jul 17, 2019 5:26 pm

Re: Unexpected Language Server Errors

Postby kondalkolipaka » Fri Jun 06, 2025 2:20 am

Ok, imported your project and recompiled and I could reproduce the problem!

> set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../core)

Since you’ve configured core as an external component, clangd expects every external component to have its own .clangd file to avoid these errors. This is a limitation of clangd, and we hope it will eventually handle this recursively for all components added to the project.

For now, you can resolve the issue by adding a .clangd file inside your core component. For example, here’s the .clangd configuration I used in the core component, which resolved the errors:

Code: Select all

CompileFlags:
  Remove: [-m*, -f*]
Screenshot 2025-06-06 at 7.44.50 AM.png
Screenshot 2025-06-06 at 7.44.50 AM.png (1.42 MiB) Viewed 914 times
I hope that helps!

Who is online

Users browsing this forum: No registered users and 3 guests