-
-
Notifications
You must be signed in to change notification settings - Fork 388
Implement source.organizeImports code action #719
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
Comments
Thanks for the report, this is an issue in the readme |
Thanks! |
What would such a code action do? My guess is:
|
I would expect it to sort the imports. Seems like an organizational issue! Although it's strictly a bit redundant (since presumably the user will format their code separately), there's something psychologically nice about hitting "organize imports" and seeing them become maximally orderly. In Haskell I think that means we ought to format them to deal with things like alignment.
If we do this, please let's have an option. At the moment HLS is friendly to those who don't buy the "explicit imports lists everywhere" philosophy - you just don't run the code action that inserts them. It would be nice if organize-imports was also friendly. |
I'm using Emacs 26.3 and the lsp-ui install instructions on the ghcide README.
The README says that
codeAction (source.organizeImports)
is supported. However, if I runlsp-organize-imports
I get the errorLSP :: source.organizeImports action not available
.The text was updated successfully, but these errors were encountered: