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

LSP: Support for suggesting adding a missing generic parameter to types #4160

Open
JosephTLyons opened this issue Jan 9, 2025 · 1 comment
Labels
help wanted Contributions encouraged priority:medium

Comments

@JosephTLyons
Copy link

JosephTLyons commented Jan 9, 2025

In Rust, the language server will suggest adding a generic type parameter to the struct if it has a field with a generic (unknown) type:

struct GenericStruct {
    field: T,
}
image

If possible, this might be nice for Gleam as well:

type GenericType {
  GenericType(field: t)
}
@JosephTLyons JosephTLyons changed the title LSP: Support for suggesting adding a missing generic parameter type to types LSP: Support for suggesting adding a missing generic parameter to types Jan 9, 2025
@lpil
Copy link
Member

lpil commented Jan 9, 2025

Cool idea! Thank you

@lpil lpil added help wanted Contributions encouraged priority:medium labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions encouraged priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants