1
1
mirror of https://github.com/kahole/edamagit.git synced 2024-09-11 07:15:31 +03:00
This commit is contained in:
kahole 2019-12-07 03:02:04 +01:00
parent d53e682c20
commit 8ebb000041
4 changed files with 7 additions and 14 deletions

View File

@ -2,7 +2,7 @@
"folding": {
"markers": {
"start": "^(Unstaged changes)|(Recent commits)",
"end": "^.$"
"end": "^\\.$"
}
}
}

View File

@ -38,17 +38,14 @@
"id": "magit-status",
"aliases": ["Magit"],
"extensions": [".magit"],
"configuration": "./languageConfigurations/magit.json"
"configuration": "./languages/magit.language-configuration.json"
}
],
"grammars": [
{
"language": "magit-status",
"scopeName": "source.magit",
"path": "./syntaxes/magitStatus.tmGrammar.json",
"embeddedLanguages": {
"meta.embedded.inline.diff": "source.diff"
}
"path": "./syntaxes/magitStatus.tmGrammar.json"
}
],
"keybindings": [

View File

@ -38,7 +38,7 @@ export default class StatusDocument {
magitStatus.log
.forEach(commit => {
this._lines.push(`Recent commits`);
this._lines.push(`${commit.hash.slice(0, 5)} ${commit.message}`);
this._lines.push(`${commit.hash.slice(0, 7)} ${commit.message}`);
});
this._lines.push(this.SECTION_FOLD_REGION_END);
}

View File

@ -3,24 +3,20 @@
"patterns": [{ "include": "#expression"}, {"include": "#diff" }],
"repository": {
"expression": {
"patterns": [{ "include": "#sectionHeader" }, { "include": "#branchName" }, { "include": "#changeHeader" }]
"patterns": [{ "include": "#sectionHeader" }, { "include": "#branchName" }]
},
"sectionHeader": {
"match": "Unstaged changes|Recent commits",
"name": "keyword.sectionHeader"
"name": "keyword.sectionHeader",
"comment": "kan bruke markup.bold.sectionHeader"
},
"branchName": {
"match": "master",
"name": "support.master"
},
"changeHeader": {
"match": "^@@.*",
"name": "support.master"
},
"diff": {
"begin": "^@@",
"end": "^$",
"name": "source.diff",
"patterns": [{ "include": "source.diff"}]
}
}