3

I have a Maven project with Scala and Java. I generally develop it using Intellij IDEA, however, I sometimes open it in Visual Studio Code.

Whenever I do that, it automatically adds .settings directory, .project file and .classpath file to the root of each module in the project.

This is seemed to occur due to the Language Support for Java by Red hat extension.

I would very much like to avoid this, how would I do that?

7
  • 1
    .settings, .project and .classpath are files/directories generated by Eclipse, not by VSCode. VSCode creates a directory named .vscode. Commented Jul 24, 2018 at 14:16
  • They are generated by visual studio code, automatically. I am not sure why, I expected to see .vscode in the root but in practice I see these three in each and every subdirectory whenever I opened it in VSCode. This is the reason for the question. Commented Jul 24, 2018 at 14:48
  • VSCode does not generate those files. Maybe one of its extensions you have installed does. Commented Jul 24, 2018 at 15:21
  • How do I test which extension does it and how to stop it? BTW I would suspect the language support for java by redhat. Commented Jul 24, 2018 at 15:25
  • 1
    Here is the related discussion on this extension's GitHub page: Any way to get rid of .project .classpath .settings/ files? Commented May 22, 2019 at 21:28

1 Answer 1

4

The Language Support for Java(TM) by Red Hat (aka vscode-java) extension generate those Eclipse files, because, under the hood, a customized, headless Eclipse process (jdt.ls) is providing all the Java support. You can not remove these files, if you expect proper Java support by this VS Code extension.

So your alternatives are:

  • add these files to your .gitignore (if you're using git, else, ignore them from whatever SCM you use)
  • disable or uninstall vscode-java and use a different Java extension in VS Code
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.