Fix VSCode support in .gitignore #24

Open
opened 2019-08-08 14:26:35 +00:00 by NatoBoram · 3 comments
NatoBoram commented 2019-08-08 14:26:35 +00:00 (Migrated from github.com)

The current .gitignore for VSCode is this :

# vscode

.settings/
.vscode/
bin/
.classpath
.project

While in reality, it should be that :

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

You can view proper templates for .gitignore in github.com/github/gitignore.

A useful tool to generate .gitignore can be found at gitignore.io. Personally, I love this tool. I'm not a fan of having to look for each individual .gitignore for every project I create, I'm way too lazy for that.

The .classpath, .project, .settings and .factorypath are added by Language Support for Java(TM) by Red Hat inside .vscode/settings.json. Well, they should probably be also inside .gitignore, but I think that they should be in a separate "block" from VSCode.

The current `.gitignore` for VSCode is this : ```gitignore # vscode .settings/ .vscode/ bin/ .classpath .project ``` While in reality, it should be that : ```gitignore .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json ``` You can view proper templates for `.gitignore` in [github.com/github/gitignore](https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore). A useful tool to generate `.gitignore` can be found at [gitignore.io](https://www.gitignore.io/?templates=java,linux,macos,gradle,windows,visualstudiocode). Personally, I love this tool. I'm not a fan of having to look for each individual `.gitignore` for every project I create, I'm way too lazy for that. The `.classpath`, `.project`, `.settings` and `.factorypath` are added by [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) inside `.vscode/settings.json`. Well, they should probably be also inside `.gitignore`, but I think that they should be in a separate "block" from VSCode.
modmuss50 commented 2020-02-28 12:54:58 +00:00 (Migrated from github.com)

Im not sure this is fully correct. The launch jsons change based on the system they are being ran as. Possibly just ingoring the launch.json would be a solution.

Im not sure this is fully correct. The launch jsons change based on the system they are being ran as. Possibly just ingoring the `launch.json` would be a solution.
NatoBoram commented 2020-03-03 00:01:47 +00:00 (Migrated from github.com)

If the project maintainer wants to share a specific launch config with the users of this project, then it's there.

Here's more insight from someone working directly on VSCode : https://stackoverflow.com/a/32979933/5083247

If the project maintainer wants to share a specific launch config with the users of this project, then it's there. Here's more insight from someone working directly on VSCode : https://stackoverflow.com/a/32979933/5083247
modmuss50 commented 2020-03-03 00:42:02 +00:00 (Migrated from github.com)

Fabrics launch files will not translate across systems, if a project specific run arg needs to be added it should be done through gradle. If the ability to do that doesn’t exist open a loom issue

Fabrics launch files will not translate across systems, if a project specific run arg needs to be added it should be done through gradle. If the ability to do that doesn’t exist open a loom issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Steven/fabric-example-mod#24