-
Notifications
You must be signed in to change notification settings - Fork 339
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
Gentle auto-import that respects Scala CLI's directives #7071
Comments
This looks like an error when no imports are added yet. |
Hi, I can't really reproduce your issue. It puts the import in the correct place for me. Screen.Recording.2025-01-08.at.16.09.26.movAre you sure that script is correctly recognised by Metals as Scala CLI script? Meaning, either |
I've seen such issue when there were no //> using scala 3.6
val d = FiniteDuration |
@dos65, it also seems to work for me without the |
@kasiaMarek yep, it works well on scala 3.6. my bad - the issue was on 2.13 Try this: //> using scala 2.13
object X {
FiniteDuration@@
} |
Is your feature request related to a problem? Please describe.
When I auto-import by completion in Scala Script for Scala CLI, Metals always adds import line top of my file. However, I want to keep Scala CLI directives top of the file...
e.g.
Before auto-import:
After auto-import:
Describe the solution you'd like
Describe alternatives you've considered
Cut and paste
Additional context
I'm using Metals 1.4.1 on Emacs.
Search terms
autoimport auto-import import
The text was updated successfully, but these errors were encountered: