Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code completion: "Error while computing completion" (IEP-1351) #1074

Open
zamek42 opened this issue Oct 31, 2024 · 5 comments
Open

Code completion: "Error while computing completion" (IEP-1351) #1074

zamek42 opened this issue Oct 31, 2024 · 5 comments

Comments

@zamek42
Copy link

zamek42 commented Oct 31, 2024

Describe the bug
Code completion does not work, I see " Error while computing completion"
To Reproduce
Steps to reproduce the behavior:

  1. open an Esp 32 IDF project,
  2. open a .c file
  3. go to a function and pres any key (l) and Ctrl+Space
  4. See error: "Error while computing completion"

Expected behavior
I want to see the completion list including function names, variables and code templates.

Screenshots

Espressif-IDE Product Information:
Espressif > Product Information (Copy content from the console and attach as a file)
product_info.txt

Eclipse Error log:
Window > Show View > Other > Search for "Error Log" (Attach as a file)
code_completion_error.log
Please attach the error log as described here https://github.com/espressif/idf-eclipse-plugin#error-log

@github-actions github-actions bot changed the title Code completion: "Error while computing completion" Code completion: "Error while computing completion" (IEP-1351) Oct 31, 2024
@sigmaaa
Copy link
Collaborator

sigmaaa commented Nov 1, 2024

Hi @zamek42,

Could you please check if the LSP editor settings are configured correctly? To do this go to Preferences -> C/C++ -> Editor(LSP) ->clangd. My settings for esp32 look like this:
image

If you are using the latest ESP-IDF IDE or plugin, these settings should be configured automatically after installing the tools, setting the target, and building the project. Here are some specifics:

  • Path Options: This should be set up automatically after tool installation. If it's not, try clicking Restore Defaults on the clangd preference page.
  • Drivers: This setting depends on the target selected in the launch bar. If it’s empty, try reselecting the target; for example, select ESP32-S2, then switch back to ESP32.
  • Additional Settings: These options are used for source navigation and are configured automatically after building the project.

Let me know if that helped. Thanks

@zamek42
Copy link
Author

zamek42 commented Nov 1, 2024

Hi Sigmaaa,

Thx for your replay. When I click to clangd settings I've got an error: "The currently displayed page contains invalid values".
And then when I click somewhere else and click back it displayed but every fields are empty. And when I fill everything as you suggested, and save it, it seems it does not save it.

thx,
Zamek

@sigmaaa
Copy link
Collaborator

sigmaaa commented Nov 4, 2024

Hi @zamek42,

I haven't been able to reproduce this issue. It could be due to missing dependencies. Are you currently using Espressif-IDE or the IDF plugin? If you're using the IDF plugin, I recommend trying the Espressif-IDE instead. You can download it here: Espressif-IDE v3.1.0. Please check if the issue persists there.

@Pastovky
Copy link

Pastovky commented Nov 7, 2024

Hello, I encountered the same problem while using Espressif-ID v3.0.0. Upon reinstalling, I noticed that I do not have the "esp-clang" folder at the following path: Espressif\tools\esp-clang. However, in the Esp-IDE (Preferences -> C/C++ -> Editor (LSP) -> clangd), the settings are automatically configured to the same paths as yours, even though one of the folders is missing. I added the missing folder with the contents, reset the settings in ESP-IDE to the default, and manually re-entered them. After that, the problem was resolved. I restarted the system and the program, and everything was fine, but after the first compilation of any project, the problem returned.

@GrantMTG
Copy link

GrantMTG commented Nov 9, 2024

New install this week (Win11). I had the same problem and your fix worked. In my case the path just said clangd and nothing else. Everything else was correct. I browsed to the clangd.exe and that worked. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants