mirror of
https://github.com/kahole/edamagit.git
synced 2024-09-11 07:15:31 +03:00
syntax
This commit is contained in:
parent
d53e682c20
commit
8ebb000041
@ -2,7 +2,7 @@
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^(Unstaged changes)|(Recent commits)",
|
||||
"end": "^.$"
|
||||
"end": "^\\.$"
|
||||
}
|
||||
}
|
||||
}
|
@ -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": [
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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"}]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user