Skip to content
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

Do not display variables before they are initialized #168

Open
zardoy opened this issue Jul 21, 2023 · 1 comment
Open

Do not display variables before they are initialized #168

zardoy opened this issue Jul 21, 2023 · 1 comment
Assignees
Labels
Prioritized This one is prioritized over other issues (actually p-2) suggestions-edit Remove or modify suggestions in some places

Comments

@zardoy
Copy link
Owner

zardoy commented Jul 21, 2023

I found its useless to display variables before they are initialized. For example:

if (true) {
  | // a is displayed but shouldn't as it cant be used yet
}
const a = 5

However:

const b = () => {
    // here, a is okay to display, so check should not go outside of current function
}

const a = 5

Enabling it by default could surprise some users (it will be noticable completions change), also I'm not sure of any edge cases so lets make it optionable with setting (but with recommended flag)

@zardoy zardoy transferred this issue from zardoy/vscode-experiments Jul 25, 2023
@zardoy zardoy added the suggestions-edit Remove or modify suggestions in some places label Jul 25, 2023
@zardoy zardoy added the Prioritized This one is prioritized over other issues (actually p-2) label Oct 13, 2023
@Ilanaya
Copy link
Collaborator

Ilanaya commented Nov 19, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prioritized This one is prioritized over other issues (actually p-2) suggestions-edit Remove or modify suggestions in some places
Projects
None yet
Development

No branches or pull requests

2 participants