Quick suggestions do not work

Hi
I am using Arduino 2.33 on a fast I7 processor and WIN11, I have the following problem:
As soon as the sketch is bigger than ~200 lines, the autocompletion takes up to 30 sek to show the right suggestion, sometimes it doesn´t work at all.
The sketchbook is on C:\sketchbook , the IDE is also installed on C:
The problem appears with all boards Nano, Uno, ESP32 ....
In smaller skeches autocompletion works perfectly !
Is there something I can do to solve it ??

Seems the same issue was also encountered in IDE v 2.3.2 .

Might also be related to issues mentioned here.

I've got a sketch where the (one and only) .ino is 400 lines, plus over a dozen other translation units. It mostly works, but is also brittle. There are three categories of "names"

  • things defined in the sketch, either in the .ino or other files. One extra file you might have even for a simple sketch is
    #include "arduino_secrets.h"
    
  • globals and functions defined in the core like Serial
  • things defined by libraries, like WiFi from <WiFi.h>

When the sketch first opens (or shortly after), the bottom left of the IDE window will say "Indexing: 1/60" or whatever and count up. It's important that the sketch is valid; for example, if the wrong board is selected for whatever reason, and some #includes aren't available, the build will break -- silently -- and some/all libraries will not be "known".

After that is done, hovering over a name will show the floating info box for it. Then typing something known, for example

Serial.

that dot will trigger a list of member functions. If I keep typing

Serial.print(

that opening left parenthesis will auto-close with the right ) and show a popup with 1/14 overloads. But it seems easy to confuse, and will stop working just by working on the sketch. Sometimes if you hover, it will say Loading... and then as if it's saying to itself, "I should know this", it will do that "Indexing" all over and recover.

It seems one way to determine whether the IDE "knows about" something: if you hover over an #include statement, it should show the full path to the file. Hovering over a (valid) library #include shows the actual file path, and you can Go to Definition on those files to open them, and from their usage in the code.

However, files that are part of the sketch show a temp path (under temp/arduino-language-server-something) instead of their actual location in the sketch. Maybe that's why Go to Definition doesn't work for those files, or their referenced names in the code, despite the hover box showing info. Seems like this used to work?

Hello
Everything you mentioned works perfectly : Show information when hovering over variables, functions, includes ....
Indexing is starting and completes quite fast.
My .ino file has 275 lines and triggering the autocopletions works, but very slow !!
If I trigger it manually by "Control+Space bar" , it says "loading...." and the result appears after 20-30 seconds.
Interesting: If I stop the language server, then the autocompletion works very fast, but without parameter suggestions and the "hover over" informations do not work anymore .
Obviously the Arduino comunity does not share this probem, and the IDE developers do not work on this topic !?!?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.