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

Option to opt-out of automatically starting metals #387

Open
lrytz opened this issue Jun 14, 2024 · 3 comments
Open

Option to opt-out of automatically starting metals #387

lrytz opened this issue Jun 14, 2024 · 3 comments

Comments

@lrytz
Copy link

lrytz commented Jun 14, 2024

Is your feature request related to a problem? Please describe.

When I open a single Scala file outside a project, VS Code starts metals.

I often edit random test files (without any scala-cli pragmas) and see a lot of semantic errors because metals doesn't have the right context.

Describe the solution you'd like

I would like to have an option to disable automatically running metals on single files.

Even with that option enabled, it would be useful to have a trigger to actually run metals after opening a file.

Describe alternatives you've considered

🤷‍♂️

Additional context

No response

Search terms

single file scala-cli

@lrytz lrytz changed the title Option to opt-out of automatically running metals on single files Option to opt-out of automatically starting metals Sep 4, 2024
@lrytz
Copy link
Author

lrytz commented Sep 4, 2024

Actually, I would like that option not only for single files, but for metals in general.

When opening any directory in VS Code and then a Scala file within it, there are 4 synthetic subdirectories created that I later have to clean up (.bsp, .metals, .scala-build and .vscode).

For example, when I open a single test folder fom scala/scala (like https://github.com/scala/scala/tree/2.13.x/test/files/pos/t2409) and then open the t2409.scala file, these four . folders are created.

@tgodzik
Copy link
Contributor

tgodzik commented Sep 4, 2024

You could disable the metals plugin and enable it per workspace. I don't think we need another mechanism for that.

@lrytz
Copy link
Author

lrytz commented Sep 4, 2024

Ah, thanks that helps.

I see another option is to set up a profile in vs code.

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

No branches or pull requests

2 participants