-
-
Notifications
You must be signed in to change notification settings - Fork 443
No "Quick Suggest" for auto-selected arguments #206
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
Comments
@UKHeliBob thanks |
To Reproduce With a new sketch loaded and Arduino Nano selected as the board type, typing pin brings up an autocomplete suggestions list with pinMode at the top, and clicking on that or pressing return selects it. uint8_t pin is automatically selected as described, Expected behaviour Desktop Environment Additional context |
thanks @UKHeliBob |
I'm also having this problem. The autocomplete shows up if I press ctrl+space, but not automatically. I think there might be a setting to trigger the autocomplete on more characters but I can't find it. |
I think this comment is the key to understanding the issue. I was having trouble reproducing it because I always have File > Preferences > Editor Quick Suggestions disabled and so I instinctively use the "Trigger Suggest" keyboard shortcut (e.g., Ctrl+Space) to trigger the autocomplete suggestions. The tutorial was written before the "Editor Quick Suggestions" was changed to being off by default (#221), so it assumes the feature is on. After enabling the feature, I get the expected quick suggestion for It also isn't specific to macros. For example, you won't get a quick suggestion for |
This issue has two components: "autocomplete" tutorial not aligned with actual behavior of IDEAssumption the user has "Editor Quick Suggestions" enabledThis was resolved 2021-12-07 (before the tutorial was published to the public repository) by the addition of an "Enable/Disable Autocompletion" section to the tutorial: The tutorial instructions were later changed to mostly use the Ctrl+Space "Trigger Suggest" keyboard shortcut, making them applicable even for users with "Editor Quick Suggestions" disabled in their preferences: arduino/docs-content#427 Claim that quick suggestions are provided for auto-selected argumentsThis was resolved by arduino/docs-content#427 IDE does not provide quick suggestions for auto-selected argumentsSince it is maybe a little more difficult to reproduce now that following the tutorial doesn't result in this behavior, I'll provide complete instructions to reproduce it:
Since I don't ever use code completion, I'm no expert on how the Suggest feature is expected to work, but this behavior seems quite inconsistent and annoying to me. However, I see that it also occurs when I do the same procedure with a pure C++ program in VS Code with the clangd extension installed. So maybe it is the expected and correct behavior? In that case, we could close this as resolved by the tutorial changes I mentioned above. I didn't find a setting that allows this behavior to be adjusted. |
I have a similar issue, may be related to this? https://forum.arduino.cc/t/solved-auto-completion-not-working-on-arduino-2-1/1120524 A bug in arduino-cli was mentioned in post #5. The solution described there was to move all the sketched to C: drive. That did not work for me. I'm not sure if the Arduino IDE itself needs to be installed on C: drive on windows. For me function completion is missing. if I type The weird part it was working a few days ago. The only change is that I had a previous install of Arduino IDE 1.8 installed at the same time. I did some cleanup and removed all Arduino related software and reinstalled only IDE 2.1.1 and libraries for it. |
So a solution presented itself now that I took 2 minutes to think about it. I downloaded the latest release of Seems that CLI 0.33.1 will be bundled with IDE 2.1.2, so if sketches are stored on a different drive than C:, that problem will resolved itself. Not sure if the exact same problem as @UKHeliBob though. |
Following the instructions from https://www.arduino.cc/en/Tutorial/getting-started-with-ide-v2/ide-v2-autocomplete-feature/ I cannot make Autocomplete work as described
With a new sketch loaded and Arduino Nano selected as the board type, typing pin as suggested brings up an autocomplete suggestions list with pinMode at the top, and clicking on that or pressing return selects it. uint8_t pin is automatically selected as described, but typing but typing LED does not bring up the suggestion of LED_BUILTIN as described. Typing the name in full and hovering over it does show the fact that it is a macro with a value of 13 and right clicking and selecting Go to Definition opens pins_arduino.h showing how the macro is defined so it is obviously known to the editor
See https://forum.arduino.cc/index.php?topic=731873
The text was updated successfully, but these errors were encountered: