winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.06k stars 198 forks source link

vscode irrelevant completion on variable definition #4000

Open staycoolcall911 opened 1 year ago

staycoolcall911 commented 1 year ago

I tried this:

Tried to get completion for a ,variable definition:

bring cloud;

let bucket = 
                 // ^ cursor here

This happened:

image

I expected this:

Expected to see the word new. Expected to see cloud (already there). Expected not to see assert, log, throw.

Is there a workaround?

No response

Component

IDE Extension

Wing Version

0.26.4

Node.js Version

18.15.0

Platform(s)

MacOS

Anything else?

No response

Community Notes

monadabot commented 1 year ago

Congrats! :rocket: This was released in Wing 0.41.12.

staycoolcall911 commented 1 year ago

This still shows irrelevant completions (assert, log) and doesn't show new, so I'll reopen.

image
Chriscbr commented 1 year ago

I guess if we're generating autocompletions in an expression position, we could filter out functions whose return type is void perhaps?

staycoolcall911 commented 1 year ago

I guess if we're generating autocompletions in an expression position, we could filter out functions whose return type is void perhaps?

Yeah that's what it says below this issue in this PR's description, maybe it was reverted somehow?

MarkMcCulloh commented 1 year ago

Thanks for reopening, it's a bug with the implementation. Looks like it only works when there is something after the completion

image
github-actions[bot] commented 9 months ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] commented 6 months ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] commented 2 months ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!