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

Wrapping of intersection types #554

Open
Gama11 opened this issue Jan 4, 2020 · 2 comments
Open

Wrapping of intersection types #554

Gama11 opened this issue Jan 4, 2020 · 2 comments
Labels
enhancement New feature or request wrapping Incorrect or undesirable wrapping

Comments

@Gama11
Copy link
Member

Gama11 commented Jan 4, 2020

typedef CallHierarchyIncomingCallsParams = WorkDoneProgressParams & PartialResultParams & {
	var item:CallHierarchyItem;
}

Turns into:

typedef CallHierarchyIncomingCallsParams = WorkDoneProgressParams &
	PartialResultParams & {
	var item:CallHierarchyItem;
}

I think this looks much better unwrapped? Maybe this should be treated similar to function headers, which by default only wrap once they hit the line length.

@Gama11 Gama11 added enhancement New feature or request wrapping Incorrect or undesirable wrapping labels Jan 4, 2020
@Gama11
Copy link
Member Author

Gama11 commented Jan 4, 2020

Another similarity to function headers: once we do wrap, maybe we want to have some "additional indent" here too to visually separate the structure body from the rest:

typedef CallHierarchyIncomingCallsParams = WorkDoneProgressParams &
		PartialResultParams & {
	var item:CallHierarchyItem;
}

@kevinresol
Copy link

+1 just stumbled into this.

Just to add, this doesn't happen inside type parameters (i.e. Foo<X & Y>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wrapping Incorrect or undesirable wrapping
Projects
None yet
Development

No branches or pull requests

2 participants