Skip to content

Organize Imports doesn't remove duplicate or unused imports #2240

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

Open
Jarred-Sumner opened this issue Apr 4, 2025 · 0 comments
Open

Organize Imports doesn't remove duplicate or unused imports #2240

Jarred-Sumner opened this issue Apr 4, 2025 · 0 comments

Comments

@Jarred-Sumner
Copy link
Contributor

Zig Version

0.14.0

ZLS Version

0.14.0-dev

Client / Code Editor / Extensions

Visual Studio Code

Steps to Reproduce and Observed Behavior

  1. Source code:
const Foo = @import("./foo.zig");
  1. Run "Organize imports"
  2. Source code:
const Foo = @import("./foo.zig");

Expected Behavior

When you use "Organize imports" in the TypeScript LSP, it removes unused imports, which sets the expectation for other LSPs that implement "Organize imports" to remove unused imports.

  1. Source code:
const Foo = @import("./foo.zig");
  1. Run "Organize imports"
  2. Source code:

Relevant log output

@Jarred-Sumner Jarred-Sumner added the bug Something isn't working label Apr 4, 2025
@Jarred-Sumner Jarred-Sumner changed the title Organize Imports doesn't remove unused imports Organize Imports doesn't remove duplicate or unused imports Apr 4, 2025
@Techatrix Techatrix added enhancement and removed bug Something isn't working labels May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants