Go To Definition

sergiomarina
Posts: 48
Joined: Wed Feb 05, 2020 6:29 pm

Go To Definition

Postby sergiomarina » Mon Jun 24, 2024 11:23 pm

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.

Skedaddles
Posts: 5
Joined: Mon Mar 14, 2022 11:59 am

Re: Go To Definition

Postby Skedaddles » Wed Jun 26, 2024 5:00 pm

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

Skedaddles
Posts: 5
Joined: Mon Mar 14, 2022 11:59 am

Re: Go To Definition

Postby Skedaddles » Wed Jun 26, 2024 5:08 pm

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.

ESP_kondalkolipaka
Posts: 188
Joined: Wed Jul 17, 2019 5:26 pm

Re: Go To Definition

Postby ESP_kondalkolipaka » Fri Jun 28, 2024 3:49 am

Hello,

You can use Command + Click or Ctrl+Click based on OS for function navigation. It should work.
Attachments
function_navigation.gif
Function Navigation in the CDT LSP Editor
function_navigation.gif (319.26 KiB) Viewed 3706 times

Who is online

Users browsing this forum: No registered users and 18 guests