Add better merge extension#27150
Conversation
- 'better-merge' command and setting namespace replaced with 'merge-conflict' - Configuration settings from extension replaced with single 'merge-conflicts.enabled' : boolean setting
Prior implementation in mergeConflictParserLegcacy which does a one shot regular expression.
|
@pprice, thanks for your PR! By analyzing the history of the files in this pull request, we identified @joaomoreno and @dbaeumer to be potential reviewers. |
|
@pprice, |
|
|
||
| const rightTitle = `Incoming changes`; // (Ln${range.start.line}${!range.isSingleLine ? `-${range.end.line}` : ''})`; | ||
|
|
||
| const title = `${fileName}: ${leftTitle} \u2194 ${rightTitle}`; |
There was a problem hiding this comment.
Maybe inline the two titles and use a placeholder {0} to localize like: https://github.com/Microsoft/vscode/blame/master/extensions/git/src/commands.ts#L754
| } | ||
| ], | ||
| "configuration": { | ||
| "title": "Merge Conflict", |
There was a problem hiding this comment.
Extract to nls file for completeness.
| } | ||
|
|
||
| private getConflictsOrEmpty(document: vscode.TextDocument): interfaces.IDocumentMergeConflict[] { | ||
| let stepStart = process.hrtime(); |
There was a problem hiding this comment.
Skip or remove console output.
| "description": "Merge Conflict", | ||
| "version": "0.7.0", | ||
| "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", | ||
| "enableProposedApi": true, |
There was a problem hiding this comment.
Not needed, I believe. Remove the property to clarify.
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| /// <reference path='../../../../src/vs/vscode.d.ts'/> | ||
| /// <reference path='../../../../src/vs/vscode.proposed.d.ts'/> |
There was a problem hiding this comment.
Not needed, I believe. Remove to clarify.
It is possible in the open / activate event cycle that we end up doing a double push of decorator changes to the editor, as both events pending on to the same delayed operation.
|
Just noticed this feature during a merge conflict. This is just great. Thanks a bunch!!! |
Adds the better merge extension to vscode proper. (https://marketplace.visualstudio.com/items?itemName=pprice.better-merge). This will enable decoration, code-lenses and commands for "standard" style merge conflicts.
Notable changes:
better-merge.*command contributions changed tomerge-conflict.*with same keybindings and functionality.merge-conflict.codeLens.enabledandmerge-conflict.decorators.enabledpackage.nls.jsonandvcode-nlsusage) supportgitextension decoration of merge blocks.Known TODOs:
mergeDecorator.ts, when a document is opened then active. The actual scan happens once as it is debounced via the delayer, BUT the merge decorators are sent to the document twice. I have a candidate fix in the works.Potential TODOs (probably future PRs)