Skip to content

Commit

Permalink
Extract diff language into its own extension (#136967)
Browse files Browse the repository at this point in the history
  • Loading branch information
lszomoru committed Nov 12, 2021
1 parent 81cf536 commit 4549bd2
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 53 deletions.
2 changes: 2 additions & 0 deletions extensions/diff/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/**
cgmanifest.json
32 changes: 32 additions & 0 deletions extensions/diff/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"registrations": [
{
"component": {
"type": "git",
"git": {
"name": "textmate/diff.tmbundle",
"repositoryUrl": "https://github.com/textmate/diff.tmbundle",
"commitHash": "0593bb775eab1824af97ef2172fd38822abd97d7"
}
},
"licenseDetail": [
"Copyright (c) textmate-diff.tmbundle project authors",
"",
"If not otherwise specified (see below), files in this repository fall under the following license:",
"",
"Permission to copy, use, modify, sell and distribute this",
"software is granted. This software is provided \"as is\" without",
"express or implied warranty, and with no claim as to its",
"suitability for any purpose.",
"",
"An exception is made for files in readable text which contain their own license information,",
"or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added",
"to the base-name name of the original file, and an extension of txt, html, or similar. For example",
"\"tidy\" is accompanied by \"tidy-license.txt\"."
],
"license": "TextMate Bundle License",
"version": "0.0.0"
}
],
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
["[", "]"],
["(", ")"]
]
}
}
38 changes: 38 additions & 0 deletions extensions/diff/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "diff",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "0.10.x"
},
"scripts": {
"update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/diff.tmbundle Syntaxes/Diff.plist ./syntaxes/diff.tmLanguage.json"
},
"contributes": {
"languages": [
{
"id": "diff",
"aliases": [
"Diff",
"diff"
],
"extensions": [
".diff",
".patch",
".rej"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "diff",
"scopeName": "source.diff",
"path": "./syntaxes/diff.tmLanguage.json"
}
]
}
}
4 changes: 4 additions & 0 deletions extensions/diff/package.nls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"displayName": "Diff Language Basics",
"description": "Provides syntax highlighting & bracket matching in Diff files."
}
6 changes: 0 additions & 6 deletions extensions/git/build/update-grammars.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,3 @@ var updateGrammar = require('vscode-grammar-updater');

updateGrammar.update('textmate/git.tmbundle', 'Syntaxes/Git%20Commit%20Message.tmLanguage', './syntaxes/git-commit.tmLanguage.json');
updateGrammar.update('textmate/git.tmbundle', 'Syntaxes/Git%20Rebase%20Message.tmLanguage', './syntaxes/git-rebase.tmLanguage.json');
updateGrammar.update('textmate/diff.tmbundle', 'Syntaxes/Diff.plist', './syntaxes/diff.tmLanguage.json');





29 changes: 1 addition & 28 deletions extensions/git/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,7 @@
],
"license": "MIT",
"version": "0.0.0"
},
{
"component": {
"type": "git",
"git": {
"name": "textmate/diff.tmbundle",
"repositoryUrl": "https://github.com/textmate/diff.tmbundle",
"commitHash": "0593bb775eab1824af97ef2172fd38822abd97d7"
}
},
"licenseDetail": [
"Copyright (c) textmate-diff.tmbundle project authors",
"",
"If not otherwise specified (see below), files in this repository fall under the following license:",
"",
"Permission to copy, use, modify, sell and distribute this",
"software is granted. This software is provided \"as is\" without",
"express or implied warranty, and with no claim as to its",
"suitability for any purpose.",
"",
"An exception is made for files in readable text which contain their own license information,",
"or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added",
"to the base-name name of the original file, and an extension of txt, html, or similar. For example",
"\"tidy\" is accompanied by \"tidy-license.txt\"."
],
"license": "TextMate Bundle License",
"version": "0.0.0"
}
],
"version": 1
}
}
18 changes: 0 additions & 18 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2314,19 +2314,6 @@
],
"configuration": "./languages/git-rebase.language-configuration.json"
},
{
"id": "diff",
"aliases": [
"Diff",
"diff"
],
"extensions": [
".diff",
".patch",
".rej"
],
"configuration": "./languages/diff.language-configuration.json"
},
{
"id": "ignore",
"aliases": [
Expand All @@ -2351,11 +2338,6 @@
"scopeName": "text.git-rebase",
"path": "./syntaxes/git-rebase.tmLanguage.json"
},
{
"language": "diff",
"scopeName": "source.diff",
"path": "./syntaxes/diff.tmLanguage.json"
},
{
"language": "ignore",
"scopeName": "source.ignore",
Expand Down

0 comments on commit 4549bd2

Please sign in to comment.