Page 1 of 1
Go To Definition
Posted: Mon Jun 24, 2024 11:23 pm
by sergiomarina
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.
Re: Go To Definition
Posted: Wed Jun 26, 2024 5:00 pm
by Skedaddles
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
Re: Go To Definition
Posted: Wed Jun 26, 2024 5:08 pm
by Skedaddles
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.
Re: Go To Definition
Posted: Fri Jun 28, 2024 3:49 am
by ESP_kondalkolipaka
Hello,
You can use Command + Click or Ctrl+Click based on OS for function navigation. It should work.