Autocomplete Should Prioritize Real Options

Hey there!

I love the cursor auto-complete, but I often find that it suggests completions for functions that don’t exist. Take this screenshot as an example:

It is suggesting that I use the function get_user_with_uuid when that function doesn’t exist. Not only does it not exist, the function I actually want is get_user_with_property.

Notice that the function I want is currently highlighted in the VS Code suggestion, and the cursor auto-complete is suggesting something wrong. When I press tab, the cursor auto-complete is prioritized over the real option, and it types: get_user_with_uuid(uuid).

I often catch myself needing to click on a VS Code suggestion instead of pressing tab because cursor is suggesting something wrong, and it has higher priority for tab.

Maybe there’s a way to add the existing options to the auto-complete context with higher weight? Maybe there’s a way to prioritize the existing options on tab? I don’t know what the solution is, but it’s annoying to press tab when the correct option is highlighted, only to have something different written.

1 Like

Has your codebase been indexed?

Yep! It was fully indexed, but just in case I just deleted it and re-indexed.
I’ll post back in a few days about whether re-indexing helped the situation.