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

Viewing a graphical git diff for .yarn files should default to the built-in Text Editor, not the Yarn Loom editor #19

Open
weaversam8 opened this issue Dec 3, 2021 · 1 comment · May be fixed by #33

Comments

@weaversam8
Copy link

Describe the bug
When you've made changes to a .yarn file and the file is kept in version control, VS Code's Git extension will highlight that those changes have been made. Clicking on a file with changes (or staged changes) allows you to view a side-by-side diff of those changes, which is a useful feature.

When this extension registered the Yarn Loom editor for .yarn files, it also accidentally registered that editor for these side by side diffs. The Yarn Loom editor doesn't offer any special features for doing these diffs (like highlighting changes) and is relatively clunky when two editor instances are positioned side by side. Therefore, these diffs should open in the regular text editor.

Expected behavior
Side-by-side diffs of .yarn files should automatically open in VS Code's built-in Text Editor, not the Yarn Loom editor.

Actual behavior
Side-by-side diffs of .yarn files are opened in the Yarn Loom editor.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Find or create a project where .yarn files are kept under version control in a Git repository.
  2. Launch VS code with the Yarn Loom extension and VS Code Git support enabled (it should be by default.)
  3. Open a .yarn file in the Yarn Loom editor and make some changes in the working directory.
  4. Save the file.
  5. Open the Git sidebar in VS Code.
  6. Click on the file, which should have an orange "M" designation next to it.
  7. The side-by-side diff of your file will open with two side-by-side instances of the Yarn Loom editor.

Screenshots

image

Environment

  • OS: macOS Monterey, 12.0.1
  • Visual Studio Code Version: 1.62.3
  • Yarn Loom Extension Version: 1.2.0
@weaversam8
Copy link
Author

Update, it appears that this might not be easily possible given the VS Code extensions API. See microsoft/vscode#97683.

zjffun added a commit to zjffun/YarnLoom that referenced this issue Dec 9, 2023
Fix TranquilMarmot#19

`configurationDefaults` with `workbench.editorAssociations` should work fine use in `VS Code 1.86.0`. See:  microsoft/vscode#138525 (comment)
@zjffun zjffun linked a pull request Dec 9, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant