Closed BusinessDuck closed 5 months ago
I'm sorry, what is the issue exactly?
Its not an issue, just feature discuss
Then can you please explain once again in a more concise way what you want to achieve?
I want to suggest integrate a diff decorators without a git. Just between saved and unsaved state of the file. Or virtual versioning systems that depends from the env
Are you talking about a feature that doesn't exist on VSCode and you want to see implemented here?
What prevents you from implementing it as a VSCode extension?
You are referring to Git and everything related to Git in VSCode is an extension so I assume what you are trying to achieve is doable via an extension
Lets discuss it here, if i want to implement the extension for monaco-vscode-api
based on git decorators (but adapted to current file system) is it OK way?
As always I'm not sure to follow
the extension for monaco-vscode-api
monaco-vscode-api just uses VSCode extensions
based on git decorators
What are "git decorators"? are you talking about the decorator added by the git extensions?
but adapted to current file system
What is "current" filesystem? Why does anything need to be "adapted"?
Diff decoration af you may know its an field before line with blue, green or red icons to determine modified/deleted and added statements between saved and local file.
In browsers we don't have integrated git system, but we can highlight unsaved changes like a charm with diff inline decorators.
In vscode we have a web worker
src/vs/base/worker/workerMain.ts
that worker can return a diff data between registered models which can be recieved fromDiffComputer
class. Te recieve that data we need send a special command to web worker and get the result with deltas described byILineChange
interface. All of this changes can be transofrmed to human readable object by algo:And we can visualise all changes here (for unsaved files):
To achieve that feature we need: 1) Access to existing web worker with
DiffComputer
2) Register original and unsaved models ad different before computation 3) Create or re-use current worker command (that actiually already used by DiffEditor to get deltas for editor visualisation)