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

Add "Organize Imports" command #669

Closed

Conversation

camerondubas
Copy link
Contributor

As requested here #635 (comment), this adds a Glint: Organize Imports command. This is a destructive version of the "Sort Imports" command as it removes unused imports while also sorting.

These commands are analogous to the TS LSP's Sort/Organize commands.

This was just a matter of passing skipDestructiveCodeActions: false to the organizeImports language service method. As such, I've standardized on using organizeImports instead sortImports in the vscode extension.

@camerondubas camerondubas force-pushed the feature/organize-imports branch from f6db969 to bcd57a6 Compare January 5, 2024 17:19
@camerondubas camerondubas changed the title Add destructive "Organize Imports" command Add "Organize Imports" command Jan 5, 2024
@machty
Copy link
Contributor

machty commented Jan 9, 2025

Closing this because Volar-ized Glint gets an Organize Import command "for free" from Volar. Thank you for your contribution!

@machty machty closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants