Skip to content

Bulb with suggestions to create for used not declared variable/function/class. #44837

Closed
@lukaszpolowczyk

Description

@lukaszpolowczyk

Bulb with suggestions "Create variable/function/class in scope" for used not declared variable/function/class.

Example:

function x () {
	const = var1 + 3;
}

Should be emphasize var1 as not exist, and in bulb should be showed few position like:
"Create variable in scope"
"Create variable in closure"

And then click "Create variable in scope for var1":

const var1 = ;
function x () {
	const = var1 + 3;
}

with cursor set const var1 = , so this will created somting like snippet.

Or if click "Create variable in closure for var1":

function x () {
	const var1 = ;
	const = var1 + 3;
}

Other example:

const var = fun();

When click "create function (...) for fun"

function fun () {
	
}
const var = fun();

with set cursor in body of fun.

In addition, three would like to choose "const, let, var" and arrow function, etc.

Metadata

Metadata

Assignees

Labels

*out-of-scopePosted issue is not in scope of VS Codefeature-requestRequest for new features or functionalityjavascriptJavaScript support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions