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

Metals starts in non-Scala projects #5931

Closed
anatoliykmetyuk opened this issue Dec 9, 2023 · 2 comments
Closed

Metals starts in non-Scala projects #5931

anatoliykmetyuk opened this issue Dec 9, 2023 · 2 comments
Milestone

Comments

@anatoliykmetyuk
Copy link

Describe the bug

  1. Create a new empty folder
  2. Open it in VS Code with Metals installed
  3. Metals will start and create the .metals directory, even though this is not a Scala project

With such behavior, when working with non-Scala projects, one needs to keep Metals disabled, since it's going to pollute the project directory with the .metals folder, and reduce the real estate of the files explorer tab by opening irrelevant controls.

Screen.Recording.2023-12-09.at.13.05.32.mov

Expected behavior

If a project is not a Scala project (that is, no sbt, scala or sc files are there), do not start the metals server, do not display metals in the Files Explorer tab, and do not create the .metals directory inside the project.

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.1.0

Extra context or search terms

No response

@ritschwumm
Copy link

(maybe) interestingly, this only happens when the extension tab is visible

@tgodzik
Copy link
Contributor

tgodzik commented Dec 11, 2023

(maybe) interestingly, this only happens when the extension tab is visible

That's exactly it. VS Code does it automatically without Metals specifying this condition. There is nothing we can do aside from maybe fixing the behaviour with creating .metals in that case. PReviously raised here scalameta/metals-vscode#1439

@tgodzik tgodzik closed this as completed Dec 11, 2023
@tgodzik tgodzik reopened this Dec 11, 2023
@tgodzik tgodzik closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
@kasiaMarek kasiaMarek added this to the Metals v1.2.1 milestone Feb 7, 2024
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

4 participants