This request for clarification refers to ESP-IDE Version: 3.0.0 (Build id: 20240605-1941)
I'm looking for the ESP-IDE equivalent to F12 for VS Code.
I've read that it is supposed to be F3, I tried but it does not work as I expect.
What's wrong?
Thank you.
Go To Definition
-
- Posts: 5
- Joined: Mon Mar 14, 2022 11:59 am
Re: Go To Definition
F3 would normally be the key, but I just had to reinstall my toolchain and ran into the same problem as you.
It turned out the "C/C++ (LSP)" editor type doesn't seem to be behaving how we would expect out-of-the-box. In short, on my fresh install yesterday, none of the normal C/C++ keybinds or the indexing are working, refactoring tools are not available, and in general it seems like the LSP stuff just isn't working. I'm using IDF 4.4.7 with an ESP32-c3 target on my current project.
As far as I can tell, the default indexing and code navigation were broken with the introduction of Espressif IDE 3.0. I sort of got it to work by going into Window->Preferences->C/C++->Indexer and turning on "Enable Indexer". Then you can change the association of the *.c and *.h (or whatever other C/C++ file types) to be the old "C/C++ Editor" via the "file association" section in the Window->Preferences dialog. Note that "C/C++ Editor (LSP)" is the one that seems to be broken. I couldn't seem to just disable the LSP entirely (I tried but it didn't seem to work), so this is the best I came up with.
So -- I'm not sure if we're running into the same issues, but it sounds likely based on a couple other comments I've seen on here this week. If you're new to ESP IDE it might be easier to use an older version of the IDE until it works correctly by default.
--Sid
It turned out the "C/C++ (LSP)" editor type doesn't seem to be behaving how we would expect out-of-the-box. In short, on my fresh install yesterday, none of the normal C/C++ keybinds or the indexing are working, refactoring tools are not available, and in general it seems like the LSP stuff just isn't working. I'm using IDF 4.4.7 with an ESP32-c3 target on my current project.
As far as I can tell, the default indexing and code navigation were broken with the introduction of Espressif IDE 3.0. I sort of got it to work by going into Window->Preferences->C/C++->Indexer and turning on "Enable Indexer". Then you can change the association of the *.c and *.h (or whatever other C/C++ file types) to be the old "C/C++ Editor" via the "file association" section in the Window->Preferences dialog. Note that "C/C++ Editor (LSP)" is the one that seems to be broken. I couldn't seem to just disable the LSP entirely (I tried but it didn't seem to work), so this is the best I came up with.
So -- I'm not sure if we're running into the same issues, but it sounds likely based on a couple other comments I've seen on here this week. If you're new to ESP IDE it might be easier to use an older version of the IDE until it works correctly by default.
--Sid
-
- Posts: 5
- Joined: Mon Mar 14, 2022 11:59 am
Re: Go To Definition
Actually, I'm not sure my advice for the file associations works -- it seems that on my install the default file association setting is getting overridden.
I think I will go back to v2.12.1 of the IDE for now.
I think I will go back to v2.12.1 of the IDE for now.
-
- Posts: 188
- Joined: Wed Jul 17, 2019 5:26 pm
Re: Go To Definition
Hello,
You can use Command + Click or Ctrl+Click based on OS for function navigation. It should work.
You can use Command + Click or Ctrl+Click based on OS for function navigation. It should work.
- Attachments
-
- Function Navigation in the CDT LSP Editor
- function_navigation.gif (319.26 KiB) Viewed 3667 times
Who is online
Users browsing this forum: ESP_bignacio and 13 guests