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 code action: remove all unused imported types and values #3257

Open
lpil opened this issue Jun 10, 2024 Discussed in #3241 · 0 comments
Open

LSP code action: remove all unused imported types and values #3257

lpil opened this issue Jun 10, 2024 Discussed in #3241 · 0 comments
Labels
help wanted Contributions encouraged priority:medium

Comments

@lpil
Copy link
Member

lpil commented Jun 10, 2024

Discussed in #3241

Originally posted by nicklimmm June 3, 2024
I often find myself removing the unused imported types and values manually after I'm done with prototyping or refactoring.

Gleam can remove all unused imports, but not imported types and values yet.

A simple example:

import gleam/list.{find} // ->`find` is unused
import gleam/uri.{type Uri} // -> `Uri` is unused

Should become:

import gleam/list
import gleam/uri

This would be a good QOL improvement, especially if we are dealing with a lot of imported types and values.

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
Status: Unfinished
Development

Successfully merging a pull request may close this issue.

1 participant