Code Monkey home page Code Monkey logo

vscode-diff-viewer's Introduction

Hi, there! ๐Ÿ™‚

vscode-diff-viewer's People

Contributors

blalond avatar caponetto avatar dependabot[bot] avatar jacekkopecky avatar sandy081 avatar scfrazer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vscode-diff-viewer's Issues

"No diff structure found in" with non-utf8 encodings

Thanks for making this extension!

It looks like this extension will only work with files encoded with utf8. If you use a different type it will say, "No diff structure found in (file)". I had to resave my file with UTF-8 in order to see the custom view.

I'm not very familiar with extension development but it seems like this section of code in DiffDocument.ts would need to detect the appropriate Decoder before it sets up the DiffDocument. I'm not sure off-hand how to do that. I'll see if I can find out.

image

Setting Diff Viewer as the Default doesn't work with another extension

When in the quick picker, I chose "Configure default editor for '*.diff'..." and chose Diff Viewer. Now the quick picker says that Diff Viewer is default. But still, *.diff files are opening in the Text Editor anyway.

How do I force it to always render in Diff Viewer? Does this have something to do with the view being read-only?

Side-note: Git can generate diff in *.patch files. Worth including this file extension as well.

PS: Ignore the mention below, and continue with next comment.

Add dark mode

Hi and thanks for the great extension. It would be awesome if there was a dark mode - if VS Code has a dark theme - use dark mode in the extension. But also allow manually overriding the dark/light theme.

Add ability to add custom file extensions

Currently I have a project where I use the .patch.disabled extension for disabled patches, nevertheless, I added the *.patch.disabled to my file assignations as "diff" but since the custom editor only works for *.diff and *.patch, my files cannot be edited. I'd rather make the editor to be bound to the "diff" file type or add a setting so that the editor can be bound to custom user file extensions

Not working for `git add -p` diff files.

I am using VS Code as editor for git. When a run git add -p somefile and then enter e to edit the diff file in the default editor, the .diff file is opened in VS Code. The extension then reports that it couldn't find any diff structure in the file.
It would be really great if that wasn't the case and I was able to use the diff viewer for editing these diff files.

How to ? (newer versions are missing select for Compare menu option)

Ok, I recently moved computers and had to reload everything, so my old configs that worked easy disappeared.

I downloaded VS 1.76 and Diff Viewer and can't find the "Open for Comparison" menu choice...

So rather than get frustrated, I will ask.... How do I compare two folders/files?

I have TWO libraries I want to compare

"VSStuff/Marlin Bug Fix" and "VSStuff/Iliam"

I want to compare those two builds, probably starting with the "Config.H" files....

How do I open those two to compare them?? I open the files/folders. but never see the "select for compare" options...

H E L P ??

Plugin does not load

Hi,

Just installed the VS Code plugin.

According to the page it works on files with either diff or patch extension.

I created a patch from git diff command line.

In both case VS does not load and displays this instead.

image

It there anything I would be missing ?

Kind Regards.

Support Workspace Trust

Hello ๐Ÿ‘‹ I'm from the VS Code team.

Recently, we have been exploring a security feature we refer to as Workspace Trust. This feature is intended to centralize and unify a security conscious decision required by a variety of VS Code features. With workspace trust, the user will be able to declare whether or not they trust the folder that is opened in VS Code before these features are executed.

Why you should care

We want to make sure that those users have a delightful experience with workspace trust and that includes extension authors deciding how much of their extension is supported in an untrusted workspace. Custom editors are special in that if they cannot at least render in an untrusted state then they will be replaced by a lightweight message telling the user to enable trust. This means that users of your extension will not be able to see their editors and there may even be cases of data loss.

Custom Editors Untrusted

Workspace Trust experience

You can enable the feature with the following setting security.workspace.trust.enabled. Once enabled, you will see the following dialog when opening folders in VS Code.

Workspace Trust Startup Dialog

This dialog is important for allowing the user to make a decision early and understand the impact of their decision. Once you understand the feature, you may want to customize when to display the dialog using the setting security.workspace.trust.startupPrompt.

You can follow the development of Workspace Trust and provide feedback in issue #106488.

Workspace trust API

First off, all of what I am about to say can be found in issue #120251. That issue will include discussion of the feature and any updates to the feature.

The Workspace Trust extension API is now in stable. This allowed us to release the first cut of our guide for onboarding your extension to Workspace Trust. The API is small, so here is a quick look.

You can declare your extension to provide complete, partial or no support in untrusted workspaces using the untrustedWorkspaces capability in package.json.

The following example declares that the extension is supported completely in untrusted workspaces. In this case, the extension is enabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": true
  }
}

The next example declares that the extension is not supported in untrusted workspaces. In this case, the extension is disabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": false
  }
}

The third option is to declared limited support. There are three tools provided to you when you select the limited option.

First, if you have a setting that can be configured in the workspace but requires the workspace to be trusted in order to apply the workspace value, then you can include the setting using restrictedConfigurations array property in untrustedWorkspaces object. Doing so, VS Code will ignore the workspace value of these restricted settings when your extension reads these settings values using the VS Code Workspace Configuration API.

The following example declares the settings that are restricted in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": "limited",
    "restrictedConfigurations": [
      "markdown.styles"
    ]
  }
}

Next, you can also check and listen if the current workspace is trusted or not programmatically using the following API:

export namespace workspace {
  /**
   * When true, the user has explicitly trusted the contents of the workspace.
   */
  export const isTrusted: boolean;
  /**
   * Event that fires when the current workspace has been trusted.
   */
  export const onDidGrantWorkspaceTrust: Event<void>;
}

Lastly, you can hide commands or views declaratively with the isWorkspaceTrusted context key in your when clauses.

A far more detailed guide on how to onboard which will be updated as we receive feedback can be found in issue #120251.

Rollout plan

We are planning on enabling this by default in the near future (most likely next release). To prepare for that day, we want to work with you to allow your editor to work seamlessly alongside the trusted workspace experience

Our Asks

The main features that should work for custom editors in an untrusted folder is rendering, viewing, and saving (if applicable). After reviewing your codebase, I believe that your extension doesn't rely on user contents in a way that could be taken advantage of if the files were malicious. My initial assessment would be to adopt supported:true and allow your extension to operate in untrusted workspaces.

Please let me know if you have any question or would like to meet up via voice chat as I would be happy to assist you in getting your extension ready for workspace trust!

Is it possible to change the diff colours?

I find the yellow used to highlight lines with word diffs to be quite confusing.

I worked around it by using side-by-side diffs instead (where it is highlighted in green), but ideally I would like to adjust the colours to match VS Code's built-in diff view, if that's possible?

Also should the colours be synced between the line-by-line and side-by-side views?

"Loading โ€ฆ" never gets replaced with content

I'm just getting this when attempting to open a git diff of my staged changes:

Screenshot 2023-06-27 at 2 46 28 PM

I don't think there's any related errors in the developer console. If it's related (and I find it often is, with extensions), I'm on VScode-Remote over SSH.

Error loading webview: Error: Could not register service worker

I'm not sure why but when I try to open a patch with this extension installed, it gives me:

Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

line numbers columns shifted to the side

Hi, sometimes on Mac and always on Windows my diffs show like this:

Screen Shot 2023-02-28 at 22 24 37

Notice how the columns that have line numbers are off by about a character.

I believe the problem is app.css line 9 - I don't think you need "both-edges" there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.