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

missing code outline, jumping to declarations and includes etc. (IEP-1294) #1019

Open
bs-eng opened this issue Jul 11, 2024 · 7 comments
Open

Comments

@bs-eng
Copy link

bs-eng commented Jul 11, 2024

Hello!

Describe the bug
The eclipse environment is missing the following functionalities after installing IDF-Eclipse-PluginV3.0.0:

  • code outline of currently opened file in outline tab
  • jumping to declarations of types, variables, functions when double clicking them
  • jumping to included files when double clicking the #include statement
  • code completion for structs
    Am I missing something in eclipse or is it simply a bug of the plugin?

To Reproduce
Steps to reproduce the behavior:

  1. install eclipse IDE 2024-03
  2. install IDF-Eclipse-Plugin
  3. open project
  4. open any code file

Expected behavior
Above functionalities should work as before V3.x

Screenshots
image
image

Espressif-IDE Product Information:
ESP32_tools.txt

Eclipse Error log:
eclipse_error_log.log

Thanks for your help!
Regards
JR

@github-actions github-actions bot changed the title missing code outline, jumping to declarations and includes etc. missing code outline, jumping to declarations and includes etc. (IEP-1294) Jul 11, 2024
@kolipakakondal
Copy link
Collaborator

Hi @bs-eng With Espressif-IDE 3.0.0, we've switched to a Clangd-based C/C++ editor. However, this is only supported for ESP-IDF version 5.1 or later. Unfortunately, I don't have an immediate solution for using it with earlier versions. I'll check into it further and get back to you.

In the meantime, could you please stick with the previous version, v2.12.1?

@bs-eng
Copy link
Author

bs-eng commented Jul 11, 2024

Hi!
I would happily stick with a previous version if I would find any hint of how to install that. All install guides that I found so far give instructions for installing latest version only and no clue as to how to change the url that points to the corrected sources.
So far my manual attempts at doing so failed.
The downloadable zip file at the link you gave, contains lots of files, which are unclear to me what I need to to with them in order to get them installed in eclipse.
If you could help me out on that, I would really appreciate it!

Do you happen to know when ESP32-ADF is scheduled to support IDFv5.1?

Cheers
JR

@kolipakakondal
Copy link
Collaborator

Hi @bs-eng With Espressif-IDE 3.0.0, we've switched to a Clangd-based C/C++ editor. However, this is only supported for ESP-IDF version 5.1 or later. Unfortunately, I don't have an immediate solution for using it with earlier versions. I'll check into it further and get back to you.

In the meantime, could you please stick with the previous version, v2.12.1?

Here is what you could try without leaving 3.0.0 version:

  1. Download latest esp-clang toolchain from here https://github.com/espressif/llvm-project/releases/tag/esp-17.0.1_20240419
  2. Configure clangd path in the preferences as shown below and click on apply and close.
Screenshot 2024-07-12 at 8 47 27 PM

Now see if your're able use clangd editor features.

@kolipakakondal
Copy link
Collaborator

Hi! I would happily stick with a previous version if I would find any hint of how to install that. All install guides that I found so far give instructions for installing latest version only and no clue as to how to change the url that points to the corrected sources. So far my manual attempts at doing so failed. The downloadable zip file at the link you gave, contains lots of files, which are unclear to me what I need to to with them in order to get them installed in eclipse. If you could help me out on that, I would really appreciate it!

Do you happen to know when ESP32-ADF is scheduled to support IDFv5.1?

Cheers JR

Ok, two options:

https://dl.espressif.com/dl/idf-eclipse-plugin/ide/Espressif-IDE-2.12.1-win32.win32.x86_64.zip

or
https://dl.espressif.com/dl/idf-eclipse-plugin/updates/com.espressif.idf.update-2.12.1.zip
Here are the instructions for installation https://github.com/espressif/idf-eclipse-plugin?tab=readme-ov-file#installing-idf-eclipse-plugin-from-local-archive

@bs-eng
Copy link
Author

bs-eng commented Jul 13, 2024

Dear @kolipakakondal,

Here is what you could try without leaving 3.0.0 version:

  1. Download latest esp-clang toolchain from here https://github.com/espressif/llvm-project/releases/tag/esp-17.0.1_20240419
  2. Configure clangd path in the preferences as shown below and click on apply and close.
    Now see if your're able use clangd editor features.

I guessed I need to download both lib and clang itself from the linked location. I tried in different ways to 'install' this, but found no effective way of doing it. Tried the "install new software" in eclipse as well as just copying it to a folder and pointing to it. Neither worked.

So I am setting up my system anew using the downloadable 2.12.1 version.
Thanks for the link to the old version! :-)
JR

@bs-eng
Copy link
Author

bs-eng commented Jul 13, 2024

For those stumbling upon this, here is how I finally installed the previous version:

  1. download the version of Espressif IDF Plugins for Eclipse of your choice (dont get irritated by the word update in the name, it is a full package)
  2. in Eclipse uninstall the previous version of IDF plugin:
    • go to eclipse > help > about eclipse
    • click installation details
    • type in search bar ESP
    • select the IDF plugin and uninstall
    • follow eclipse instructions
  3. Eclipse should ask to restart Eclipse to finish
  4. quit Eclipse
  5. delete Espressif tools that were installed previously, as they do not get deleted during the uninstall step before!
    • most probably in your user folder (on Windows) there is the .espressif folder, delete it completely!
    • unix/linux/mac I do not know, please search on internet
  6. in Eclipse install the new IDF plugin according to standard instructions as posted by @kolipakakondal
  7. install IDF tools as usual: Eclipse > Espressif > ESP IDF tools manager > install tools

Opening projects afterwards:
I deleted the projects in my workspace and simply imported them again, to make sure everything gets set properly in the .cproject file (which I deleted before importing)

That's how it worked for me at least.
Cheers
JR

@kolipakakondal
Copy link
Collaborator

kolipakakondal commented Jul 15, 2024

Dear @kolipakakondal,

Here is what you could try without leaving 3.0.0 version:

  1. Download latest esp-clang toolchain from here https://github.com/espressif/llvm-project/releases/tag/esp-17.0.1_20240419
  2. Configure clangd path in the preferences as shown below and click on apply and close.
    Now see if your're able use clangd editor features.

I guessed I need to download both lib and clang itself from the linked location. I tried in different ways to 'install' this, but found no effective way of doing it. Tried the "install new software" in eclipse as well as just copying it to a folder and pointing to it. Neither worked.

So I am setting up my system anew using the downloadable 2.12.1 version. Thanks for the link to the old version! :-) JR

Okay, here's what I did on my macOS (arm64) system, and it worked without any problems. If you'd like to try it out later, feel free to do so.

  1. Installed ESP-IDF v4.4.8
Screenshot 2024-07-15 at 1 59 38 PM
  1. Downloaded my OS supported esp-clang (clang-esp-17.0.1_20240419-aarch64-apple-darwin.tar.xz) from here

  2. Set the clangd path in the preferences from the file you've downloaded.

Screenshot 2024-07-15 at 2 01 48 PM
  1. Compiled the blink example for esp32, no build issues reported.
Screenshot 2024-07-15 at 2 03 12 PM
  1. Opened the C/C++ editor and which is by default opened in the LSP editor and working fine.
fix.mp4

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

2 participants