update texmate bundles

GitOrigin-RevId: 6e8d3a5d351429eb0141d2067a91f6a5bd630d69
This commit is contained in:
Dennis Ushakov
2019-12-23 09:33:29 +00:00
committed by intellij-monorepo-bot
parent 7753ee638a
commit 200cce5589
69 changed files with 15513 additions and 20701 deletions
@@ -6,11 +6,11 @@
"git": {
"name": "jeff-hykin/cpp-textmate-grammar",
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
"commitHash": "031ef619bef4c5a1ca46e6fa69d7c913e0c32068"
"commitHash": "666808cab3907fc91ed4d3901060ee6b045cca58"
}
},
"license": "MIT",
"version": "1.13.2",
"version": "1.14.15",
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
},
{
+73 -35
View File
@@ -5,44 +5,82 @@
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": { "vscode": "*" },
"engines": {
"vscode": "*"
},
"scripts": {
"update-grammar": "node ./build/update-grammars.js"
},
"contributes": {
"languages": [{
"id": "c",
"extensions": [ ".c"],
"aliases": [ "C", "c" ],
"configuration": "./language-configuration.json"
},
{
"id": "cpp",
"extensions": [ ".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx", ".h", ".i", ".ino", ".inl", ".ipp", ".hpp.in", ".h.in" ],
"aliases": [ "C++", "Cpp", "cpp"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "c",
"scopeName": "source.c",
"path": "./syntaxes/c.tmLanguage.json"
},
{
"language": "cpp",
"scopeName": "source.cpp",
"path": "./syntaxes/cpp.tmLanguage.json"
},
{
"scopeName": "source.c.platform",
"path": "./syntaxes/platform.tmLanguage.json"
}],
"snippets": [{
"language": "c",
"path": "./snippets/c.json"
},
{
"language": "cpp",
"path": "./snippets/cpp.json"
}]
"languages": [
{
"id": "c",
"extensions": [
".c",
".i"
],
"aliases": [
"C",
"c"
],
"configuration": "./language-configuration.json"
},
{
"id": "cpp",
"extensions": [
".cpp",
".cc",
".cxx",
".c++",
".hpp",
".hh",
".hxx",
".h",
".ii",
".ino",
".inl",
".ipp",
".hpp.in",
".h.in"
],
"aliases": [
"C++",
"Cpp",
"cpp"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "c",
"scopeName": "source.c",
"path": "./syntaxes/c.tmLanguage.json"
},
{
"language": "cpp",
"scopeName": "source.cpp.embedded.macro",
"path": "./syntaxes/cpp.embedded.macro.tmLanguage.json"
},
{
"language": "cpp",
"scopeName": "source.cpp",
"path": "./syntaxes/cpp.tmLanguage.json"
},
{
"scopeName": "source.c.platform",
"path": "./syntaxes/platform.tmLanguage.json"
}
],
"snippets": [
{
"language": "c",
"path": "./snippets/c.json"
},
{
"language": "cpp",
"path": "./snippets/cpp.json"
}
]
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
"git": {
"name": "dotnet/csharp-tmLanguage",
"repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
"commitHash": "ad7514e8d78542a6ee37f6187091cd4102eb3797"
"commitHash": "572697a2c2267430010b3534281f73337144e94f"
}
},
"license": "MIT",
@@ -13,8 +13,7 @@
["[", "]"],
["(", ")"],
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "/*", "close": " */", "notIn": ["string"] }
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] }
],
"surroundingPairs": [
["{", "}"],
@@ -30,4 +29,4 @@
"end": "^\\s*#endregion\\b"
}
}
}
}
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/ad7514e8d78542a6ee37f6187091cd4102eb3797",
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/572697a2c2267430010b3534281f73337144e94f",
"name": "C#",
"scopeName": "source.cs",
"patterns": [
@@ -2498,7 +2498,7 @@
},
"interpolation": {
"name": "meta.interpolation.cs",
"begin": "(?<=[^\\{])((?:\\{\\{)*)(\\{)(?=[^\\{])",
"begin": "(?<=[^\\{]|^)((?:\\{\\{)*)(\\{)(?=[^\\{])",
"beginCaptures": {
"1": {
"name": "string.quoted.double.cs"
@@ -6,7 +6,7 @@
"git": {
"name": "octref/language-css",
"repositoryUrl": "https://github.com/octref/language-css",
"commitHash": "377734aad976be88a425aab5667784f3f71ea7e5"
"commitHash": "dcdc1cb4403266f4ebdb1a4f526f8b6d09fd39d6"
}
},
"license": "MIT",
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/octref/language-css/commit/377734aad976be88a425aab5667784f3f71ea7e5",
"version": "https://github.com/octref/language-css/commit/dcdc1cb4403266f4ebdb1a4f526f8b6d09fd39d6",
"name": "CSS",
"scopeName": "source.css",
"patterns": [
@@ -1260,7 +1260,7 @@
"name": "support.type.property-name.media.css"
},
"2": {
"name": "invalid.deprecated.media.css"
"name": "support.type.property-name.media.css"
},
"3": {
"name": "support.type.vendored.property-name.media.css"
@@ -6,7 +6,7 @@
"git": {
"name": "ionide/ionide-fsgrammar",
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
"commitHash": "687070defaf355022a5d82d091258eccfea7317c"
"commitHash": "b4f43aafa6f843707410fabe9f904ec04fa536dc"
}
},
"license": "MIT",
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/ionide/ionide-fsgrammar/commit/687070defaf355022a5d82d091258eccfea7317c",
"version": "https://github.com/ionide/ionide-fsgrammar/commit/b4f43aafa6f843707410fabe9f904ec04fa536dc",
"name": "fsharp",
"scopeName": "source.fsharp",
"patterns": [
@@ -937,10 +937,10 @@
},
{
"name": "binding.fsharp",
"begin": "\\b((get|set)\\s*(?=\\())(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
"begin": "(?<=with|and)\\s*\\b((get|set)\\s*(?=\\())(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
"end": "\\s*(=|\\n+=|(?<=\\=))",
"beginCaptures": {
"3": {
"4": {
"name": "variable.fsharp"
}
},
@@ -1240,11 +1240,11 @@
},
{
"name": "constant.character.string.escape.fsharp",
"match": "\\\\([\\\\''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})"
"match": "\\\\([\\\\''ntbr]|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})"
},
{
"name": "invalid.illeagal.character.string.fsharp",
"match": "\\\\(?![\\\\''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})."
"match": "\\\\(?![\\\\''ntbr]|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})."
},
{
"include": "#string_formatter"
@@ -1,5 +1,5 @@
{
"comments": {
"lineComment": "#"
"lineComment": "#",
}
}
+265 -20
View File
@@ -109,6 +109,24 @@
"dark": "resources/icons/dark/stage.svg"
}
},
{
"command": "git.stageAllTracked",
"title": "%command.stageAllTracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/stage.svg",
"dark": "resources/icons/dark/stage.svg"
}
},
{
"command": "git.stageAllUntracked",
"title": "%command.stageAllUntracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/stage.svg",
"dark": "resources/icons/dark/stage.svg"
}
},
{
"command": "git.stageSelectedRanges",
"title": "%command.stageSelectedRanges%",
@@ -178,6 +196,24 @@
"dark": "resources/icons/dark/clean.svg"
}
},
{
"command": "git.cleanAllTracked",
"title": "%command.cleanAllTracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/clean.svg",
"dark": "resources/icons/dark/clean.svg"
}
},
{
"command": "git.cleanAllUntracked",
"title": "%command.cleanAllUntracked%",
"category": "Git",
"icon": {
"light": "resources/icons/light/clean.svg",
"dark": "resources/icons/dark/clean.svg"
}
},
{
"command": "git.commit",
"title": "%command.commit%",
@@ -267,6 +303,11 @@
"title": "%command.createTag%",
"category": "Git"
},
{
"command": "git.deleteTag",
"title": "%command.deleteTag%",
"category": "Git"
},
{
"command": "git.fetch",
"title": "%command.fetch%",
@@ -362,6 +403,11 @@
"title": "%command.ignore%",
"category": "Git"
},
{
"command": "git.revealInExplorer",
"title": "%command.revealInExplorer%",
"category": "Git"
},
{
"command": "git.stashIncludeUntracked",
"title": "%command.stashIncludeUntracked%",
@@ -391,6 +437,11 @@
"command": "git.stashApplyLatest",
"title": "%command.stashApplyLatest%",
"category": "Git"
},
{
"command": "git.stashDrop",
"title": "%command.stashDrop%",
"category": "Git"
}
],
"menus": {
@@ -435,6 +486,14 @@
"command": "git.stageAll",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.stageAllTracked",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.stageAllUntracked",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.stageSelectedRanges",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
@@ -469,11 +528,11 @@
},
{
"command": "git.clean",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository"
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.cleanAll",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository"
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.commit",
@@ -507,6 +566,10 @@
"command": "git.restoreCommitTemplate",
"when": "false"
},
{
"command": "git.revealInExplorer",
"when": "false"
},
{
"command": "git.undoCommit",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
@@ -555,6 +618,10 @@
"command": "git.createTag",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.deleteTag",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.fetch",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
@@ -642,6 +709,10 @@
{
"command": "git.stashApplyLatest",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.stashDrop",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
}
],
"scm/title": [
@@ -763,7 +834,7 @@
{
"command": "git.cleanAll",
"group": "5_stage",
"when": "scmProvider == git && !gitFreshRepository"
"when": "scmProvider == git"
},
{
"command": "git.stashIncludeUntracked",
@@ -795,6 +866,11 @@
"group": "6_stash",
"when": "scmProvider == git"
},
{
"command": "git.stashDrop",
"group": "6_stash",
"when": "scmProvider == git"
},
{
"command": "git.showOutput",
"group": "7_repository",
@@ -831,23 +907,110 @@
},
{
"command": "git.cleanAll",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "1_modification"
},
{
"command": "git.stageAll",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "1_modification"
},
{
"command": "git.cleanAll",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "inline"
},
{
"command": "git.stageAll",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
"group": "inline"
},
{
"command": "git.cleanAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "1_modification"
},
{
"command": "git.stageAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "1_modification"
},
{
"command": "git.cleanAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "inline"
},
{
"command": "git.stageAllTracked",
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
"group": "inline"
},
{
"command": "git.cleanAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification"
},
{
"command": "git.stageAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification"
},
{
"command": "git.cleanAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "inline"
},
{
"command": "git.stageAllUntracked",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "inline"
}
],
"scm/resourceFolder/context": [
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == merge",
"group": "1_modification"
},
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == merge",
"group": "inline"
},
{
"command": "git.unstage",
"when": "scmProvider == git && scmResourceGroup == index",
"group": "1_modification"
},
{
"command": "git.unstage",
"when": "scmProvider == git && scmResourceGroup == index",
"group": "inline"
},
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline"
},
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline"
},
{
"command": "git.ignore",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification@3"
}
],
"scm/resourceState/context": [
@@ -866,6 +1029,11 @@
"when": "scmProvider == git && scmResourceGroup == merge",
"group": "inline"
},
{
"command": "git.revealInExplorer",
"when": "scmProvider == git && scmResourceGroup == merge",
"group": "2_view"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == merge && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",
@@ -901,6 +1069,11 @@
"when": "scmProvider == git && scmResourceGroup == index",
"group": "inline"
},
{
"command": "git.revealInExplorer",
"when": "scmProvider == git && scmResourceGroup == index",
"group": "2_view"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == index && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",
@@ -933,12 +1106,12 @@
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline"
},
{
@@ -960,13 +1133,68 @@
"command": "git.ignore",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification@3"
},
{
"command": "git.revealInExplorer",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "2_view"
},
{
"command": "git.openChange",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "navigation"
},
{
"command": "git.openHEADFile",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "navigation"
},
{
"command": "git.openFile",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "navigation"
},
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository",
"group": "inline"
},
{
"command": "git.stage",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "inline"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",
"group": "inline0"
},
{
"command": "git.openChange",
"when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick",
"group": "inline0"
},
{
"command": "git.ignore",
"when": "scmProvider == git && scmResourceGroup == untracked",
"group": "1_modification@3"
}
],
"editor/title": [
{
"command": "git.openFile",
"group": "navigation",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
},
{
"command": "git.openChange",
@@ -976,44 +1204,44 @@
{
"command": "git.stageSelectedRanges",
"group": "2_git@1",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
},
{
"command": "git.unstageSelectedRanges",
"group": "2_git@2",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
},
{
"command": "git.revertSelectedRanges",
"group": "2_git@3",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
}
],
"editor/context": [
{
"command": "git.stageSelectedRanges",
"group": "2_git@1",
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
},
{
"command": "git.unstageSelectedRanges",
"group": "2_git@2",
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
},
{
"command": "git.revertSelectedRanges",
"group": "2_git@3",
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
}
],
"scm/change/title": [
{
"command": "git.stageChange",
"when": "originalResourceScheme == git"
"when": "originalResourceScheme == gitfs"
},
{
"command": "git.revertChange",
"when": "originalResourceScheme == git"
"when": "originalResourceScheme == gitfs"
}
]
},
@@ -1103,7 +1331,8 @@
"%config.countBadge.off%"
],
"description": "%config.countBadge%",
"default": "all"
"default": "all",
"scope": "resource"
},
"git.checkoutType": {
"type": "string",
@@ -1363,6 +1592,22 @@
],
"default": "committerdate",
"description": "%config.branchSortOrder%"
},
"git.untrackedChanges": {
"type": "string",
"enum": [
"mixed",
"separate",
"hidden"
],
"enumDescriptions": [
"%config.untrackedChanges.mixed%",
"%config.untrackedChanges.separate%",
"%config.untrackedChanges.hidden%"
],
"default": "mixed",
"description": "%config.untrackedChanges%",
"scope": "resource"
}
}
},
@@ -1514,7 +1759,7 @@
"byline": "^5.0.0",
"file-type": "^7.2.0",
"iconv-lite": "^0.4.24",
"jschardet": "^1.6.0",
"jschardet": "2.1.1",
"vscode-extension-telemetry": "0.1.1",
"vscode-nls": "^4.0.0",
"vscode-uri": "^2.0.0",
@@ -1524,7 +1769,7 @@
"@types/byline": "4.2.31",
"@types/file-type": "^5.2.1",
"@types/mocha": "2.2.43",
"@types/node": "^10.14.8",
"@types/node": "^12.11.7",
"@types/which": "^1.0.28",
"mocha": "^3.2.0"
}
@@ -11,6 +11,8 @@
"command.openHEADFile": "Open File (HEAD)",
"command.stage": "Stage Changes",
"command.stageAll": "Stage All Changes",
"command.stageAllTracked": "Stage All Tracked Changes",
"command.stageAllUntracked": "Stage All Untracked Changes",
"command.stageSelectedRanges": "Stage Selected Ranges",
"command.revertSelectedRanges": "Revert Selected Ranges",
"command.stageChange": "Stage Change",
@@ -20,6 +22,8 @@
"command.unstageSelectedRanges": "Unstage Selected Ranges",
"command.clean": "Discard Changes",
"command.cleanAll": "Discard All Changes",
"command.cleanAllTracked": "Discard All Tracked Changes",
"command.cleanAllUntracked": "Discard All Untracked Changes",
"command.commit": "Commit",
"command.commitStaged": "Commit Staged",
"command.commitEmpty": "Commit Empty",
@@ -37,6 +41,7 @@
"command.renameBranch": "Rename Branch...",
"command.merge": "Merge Branch...",
"command.createTag": "Create Tag",
"command.deleteTag": "Delete Tag",
"command.fetch": "Fetch",
"command.fetchPrune": "Fetch (Prune)",
"command.fetchAll": "Fetch From All Remotes",
@@ -53,15 +58,17 @@
"command.removeRemote": "Remove Remote",
"command.sync": "Sync",
"command.syncRebase": "Sync (Rebase)",
"command.publish": "Publish Branch",
"command.publish": "Publish Branch...",
"command.showOutput": "Show Git Output",
"command.ignore": "Add File to .gitignore",
"command.ignore": "Add to .gitignore",
"command.revealInExplorer": "Reveal in Side Bar",
"command.stashIncludeUntracked": "Stash (Include Untracked)",
"command.stash": "Stash",
"command.stashPop": "Pop Stash...",
"command.stashPopLatest": "Pop Latest Stash",
"command.stashApply": "Apply Stash...",
"command.stashApplyLatest": "Apply Latest Stash",
"command.stashDrop": "Drop Stash...",
"config.enabled": "Whether git is enabled.",
"config.path": "Path and filename of the git executable, e.g. `C:\\Program Files\\Git\\bin\\git.exe` (Windows).",
"config.autoRepositoryDetection": "Configures when repositories should be automatically detected.",
@@ -73,7 +80,7 @@
"config.autofetch": "When enabled, commits will automatically be fetched from the default remote of the current Git repository.",
"config.autofetchPeriod": "Duration in seconds between each automatic git fetch, when `git.autofetch` is enabled.",
"config.confirmSync": "Confirm before synchronizing git repositories.",
"config.countBadge": "Controls the git badge counter.",
"config.countBadge": "Controls the Git count badge.",
"config.countBadge.all": "Count all changes.",
"config.countBadge.tracked": "Count only tracked changes.",
"config.countBadge.off": "Turn off counter.",
@@ -118,7 +125,7 @@
"config.scanRepositories": "List of paths to search for git repositories in.",
"config.showProgress": "Controls whether git actions should show progress.",
"config.rebaseWhenSync": "Force git to use rebase when running the sync command.",
"config.confirmEmptyCommits": "Always confirm the creation of empty commits.",
"config.confirmEmptyCommits": "Always confirm the creation of empty commits for the 'Git: Commit Empty' command.",
"config.fetchOnPull": "Fetch all branches when pulling or just the current one.",
"config.pullTags": "Fetch all tags when pulling.",
"config.autoStash": "Stash any changes before pulling and restore them after successful pull.",
@@ -128,6 +135,10 @@
"config.openDiffOnClick": "Controls whether the diff editor should be opened when clicking a change. Otherwise the regular editor will be opened.",
"config.supportCancellation": "Controls whether a notification comes up when running the Sync action, which allows the user to cancel the operation.",
"config.branchSortOrder": "Controls the sort order for branches.",
"config.untrackedChanges": "Controls how untracked changes behave.",
"config.untrackedChanges.mixed": "All changes, tracked and untracked, appear together and behave equally.",
"config.untrackedChanges.separate": "Untracked changes appear separately in the Source Control view. They are also excluded from several actions.",
"config.untrackedChanges.hidden": "Untracked changes are hidden and excluded from several actions.",
"colors.added": "Color for added resources.",
"colors.modified": "Color for modified resources.",
"colors.deleted": "Color for deleted resources.",
@@ -8,6 +8,7 @@ import { Repository as BaseRepository, Resource } from '../repository';
import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState } from './git';
import { Event, SourceControlInputBox, Uri, SourceControl } from 'vscode';
import { mapEvent } from '../util';
import { toGitUri } from '../uri';
class ApiInputBox implements InputBox {
set value(value: string) { this._inputBox.value = value; }
@@ -234,5 +235,9 @@ export class ApiImpl implements API {
return this._model.repositories.map(r => new ApiRepository(r));
}
toGitUri(uri: Uri, ref: string): Uri {
return toGitUri(uri, ref);
}
constructor(private _model: Model) { }
}
+2
View File
@@ -185,6 +185,8 @@ export interface API {
readonly repositories: Repository[];
readonly onDidOpenRepository: Event<Repository>;
readonly onDidCloseRepository: Event<Repository>;
toGitUri(uri: Uri, ref: string): Uri;
}
export interface GitExtension {
@@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as http from 'http';
import * as fs from 'fs';
import * as nls from 'vscode-nls';
import { IPCClient } from './ipc/ipcClient';
const localize = nls.loadMessageBundle();
@@ -20,53 +20,23 @@ function main(argv: string[]): void {
return fatal('Wrong number of arguments');
}
if (!process.env['VSCODE_GIT_ASKPASS_HANDLE']) {
return fatal('Missing handle');
}
if (!process.env['VSCODE_GIT_ASKPASS_PIPE']) {
return fatal('Missing pipe');
}
if (process.env['VSCODE_GIT_COMMAND'] === 'fetch') {
return fatal('Skip fetch commands');
if (process.env['VSCODE_GIT_COMMAND'] === 'fetch' && !!process.env['VSCODE_GIT_FETCH_SILENT']) {
return fatal('Skip silent fetch commands');
}
const output = process.env['VSCODE_GIT_ASKPASS_PIPE'] as string;
const socketPath = process.env['VSCODE_GIT_ASKPASS_HANDLE'] as string;
const request = argv[2];
const host = argv[4].substring(1, argv[4].length - 2);
const opts: http.RequestOptions = {
socketPath,
path: '/',
method: 'POST'
};
const ipcClient = new IPCClient('askpass');
const req = http.request(opts, res => {
if (res.statusCode !== 200) {
return fatal(`Bad status code: ${res.statusCode}`);
}
const chunks: string[] = [];
res.setEncoding('utf8');
res.on('data', (d: string) => chunks.push(d));
res.on('end', () => {
const raw = chunks.join('');
try {
const result = JSON.parse(raw);
fs.writeFileSync(output, result + '\n');
} catch (err) {
return fatal(`Error parsing response`);
}
setTimeout(() => process.exit(0), 0);
});
});
req.on('error', () => fatal('Error in request'));
req.write(JSON.stringify({ request, host }));
req.end();
ipcClient.call({ request, host }).then(res => {
fs.writeFileSync(output, res + '\n');
setTimeout(() => process.exit(0), 0);
}).catch(err => fatal(err));
}
main(process.argv);
+18 -81
View File
@@ -3,15 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Disposable, window, InputBoxOptions } from 'vscode';
import { denodeify } from './util';
import { window, InputBoxOptions } from 'vscode';
import { IDisposable } from './util';
import * as path from 'path';
import * as http from 'http';
import * as os from 'os';
import * as fs from 'fs';
import * as crypto from 'crypto';
const randomBytes = denodeify<Buffer>(crypto.randomBytes);
import { IIPCHandler, IIPCServer } from './ipc/ipcServer';
export interface AskpassEnvironment {
GIT_ASKPASS: string;
@@ -21,68 +16,21 @@ export interface AskpassEnvironment {
VSCODE_GIT_ASKPASS_HANDLE?: string;
}
function getIPCHandlePath(nonce: string): string {
if (process.platform === 'win32') {
return `\\\\.\\pipe\\vscode-git-askpass-${nonce}-sock`;
export class Askpass implements IIPCHandler {
private disposable: IDisposable;
static getDisabledEnv(): AskpassEnvironment {
return {
GIT_ASKPASS: path.join(__dirname, 'askpass-empty.sh')
};
}
if (process.env['XDG_RUNTIME_DIR']) {
return path.join(process.env['XDG_RUNTIME_DIR'] as string, `vscode-git-askpass-${nonce}.sock`);
constructor(ipc: IIPCServer) {
this.disposable = ipc.registerHandler('askpass', this);
}
return path.join(os.tmpdir(), `vscode-git-askpass-${nonce}.sock`);
}
export class Askpass implements Disposable {
private server: http.Server;
private ipcHandlePathPromise: Promise<string>;
private ipcHandlePath: string | undefined;
private enabled = true;
constructor() {
this.server = http.createServer((req, res) => this.onRequest(req, res));
this.ipcHandlePathPromise = this.setup().catch(err => {
console.error(err);
return '';
});
}
private async setup(): Promise<string> {
const buffer = await randomBytes(20);
const nonce = buffer.toString('hex');
const ipcHandlePath = getIPCHandlePath(nonce);
this.ipcHandlePath = ipcHandlePath;
try {
this.server.listen(ipcHandlePath);
this.server.on('error', err => console.error(err));
} catch (err) {
console.error('Could not launch git askpass helper.');
this.enabled = false;
}
return ipcHandlePath;
}
private onRequest(req: http.IncomingMessage, res: http.ServerResponse): void {
const chunks: string[] = [];
req.setEncoding('utf8');
req.on('data', (d: string) => chunks.push(d));
req.on('end', () => {
const { request, host } = JSON.parse(chunks.join(''));
this.prompt(host, request).then(result => {
res.writeHead(200);
res.end(JSON.stringify(result));
}, () => {
res.writeHead(500);
res.end();
});
});
}
private async prompt(host: string, request: string): Promise<string> {
async handle({ request, host }: { request: string, host: string }): Promise<string> {
const options: InputBoxOptions = {
password: /password/i.test(request),
placeHolder: request,
@@ -93,27 +41,16 @@ export class Askpass implements Disposable {
return await window.showInputBox(options) || '';
}
async getEnv(): Promise<AskpassEnvironment> {
if (!this.enabled) {
return {
GIT_ASKPASS: path.join(__dirname, 'askpass-empty.sh')
};
}
getEnv(): AskpassEnvironment {
return {
ELECTRON_RUN_AS_NODE: '1',
GIT_ASKPASS: path.join(__dirname, 'askpass.sh'),
VSCODE_GIT_ASKPASS_NODE: process.execPath,
VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js'),
VSCODE_GIT_ASKPASS_HANDLE: await this.ipcHandlePathPromise
VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js')
};
}
dispose(): void {
this.server.close();
if (this.ipcHandlePath && process.platform !== 'win32') {
fs.unlinkSync(this.ipcHandlePath);
}
this.disposable.dispose();
}
}
}
@@ -99,7 +99,7 @@ export class AutoFetcher {
}
try {
await this.repository.fetchDefault();
await this.repository.fetchDefault({ silent: true });
} catch (err) {
if (err.gitErrorCode === GitErrorCodes.AuthenticationFailed) {
this.disable();
+302 -168
View File
@@ -3,19 +3,19 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Uri, commands, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn, ProgressLocation, TextEditor, MessageOptions, WorkspaceFolder } from 'vscode';
import { Git, CommitOptions, Stash, ForcePushMode } from './git';
import { Repository, Resource, ResourceGroupType } from './repository';
import { Model } from './model';
import { toGitUri, fromGitUri } from './uri';
import { grep, isDescendant, pathEquals } from './util';
import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange, getModifiedRange } from './staging';
import * as path from 'path';
import { lstat, Stats } from 'fs';
import * as os from 'os';
import * as path from 'path';
import { commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder } from 'vscode';
import TelemetryReporter from 'vscode-extension-telemetry';
import * as nls from 'vscode-nls';
import { Ref, RefType, Branch, GitErrorCodes, Status } from './api/git';
import { Branch, GitErrorCodes, Ref, RefType, Status } from './api/git';
import { CommitOptions, ForcePushMode, Git, Stash } from './git';
import { Model } from './model';
import { Repository, Resource, ResourceGroupType } from './repository';
import { applyLineChanges, getModifiedRange, intersectDiffWithRange, invertLineChange, toLineRanges } from './staging';
import { fromGitUri, toGitUri, isGitUri } from './uri';
import { grep, isDescendant, pathEquals } from './util';
const localize = nls.loadMessageBundle();
@@ -99,7 +99,7 @@ class CreateBranchItem implements QuickPickItem {
constructor(private cc: CommandCenter) { }
get label(): string { return localize('create branch', '$(plus) Create new branch...'); }
get label(): string { return '$(plus) ' + localize('create branch', 'Create new branch...'); }
get description(): string { return ''; }
get alwaysShow(): boolean { return true; }
@@ -113,7 +113,7 @@ class CreateBranchFromItem implements QuickPickItem {
constructor(private cc: CommandCenter) { }
get label(): string { return localize('create branch from', '$(plus) Create new branch from...'); }
get label(): string { return '$(plus) ' + localize('create branch from', 'Create new branch from...'); }
get description(): string { return ''; }
get alwaysShow(): boolean { return true; }
@@ -132,6 +132,20 @@ class HEADItem implements QuickPickItem {
get alwaysShow(): boolean { return true; }
}
class AddRemoteItem implements QuickPickItem {
constructor(private cc: CommandCenter) { }
get label(): string { return '$(plus) ' + localize('add remote', 'Add a new remote...'); }
get description(): string { return ''; }
get alwaysShow(): boolean { return true; }
async run(repository: Repository): Promise<void> {
await this.cc.addRemote(repository);
}
}
interface CommandOptions {
repository?: boolean;
diff?: boolean;
@@ -156,14 +170,14 @@ function command(commandId: string, options: CommandOptions = {}): Function {
};
}
const ImageMimetypes = [
'image/png',
'image/gif',
'image/jpeg',
'image/webp',
'image/tiff',
'image/bmp'
];
// const ImageMimetypes = [
// 'image/png',
// 'image/gif',
// 'image/jpeg',
// 'image/webp',
// 'image/tiff',
// 'image/bmp'
// ];
async function categorizeResourceByResolution(resources: Resource[]): Promise<{ merge: Resource[], resolved: Resource[], unresolved: Resource[], deletionConflicts: Resource[] }> {
const selection = resources.filter(s => s instanceof Resource) as Resource[];
@@ -199,6 +213,12 @@ function createCheckoutItems(repository: Repository): CheckoutItem[] {
return [...heads, ...tags, ...remoteHeads];
}
class TagItem implements QuickPickItem {
get label(): string { return this.ref.name ?? ''; }
get description(): string { return this.ref.commit?.substr(0, 8) ?? ''; }
constructor(readonly ref: Ref) { }
}
enum PushType {
Push,
PushTo,
@@ -275,10 +295,10 @@ export class CommandCenter {
}
} else {
if (resource.type !== Status.DELETED_BY_THEM) {
left = await this.getLeftResource(resource);
left = this.getLeftResource(resource);
}
right = await this.getRightResource(resource);
right = this.getRightResource(resource);
}
const title = this.getTitle(resource);
@@ -310,79 +330,40 @@ export class CommandCenter {
}
}
private async getURI(uri: Uri, ref: string): Promise<Uri | undefined> {
const repository = this.model.getRepository(uri);
if (!repository) {
return toGitUri(uri, ref);
}
try {
let gitRef = ref;
if (gitRef === '~') {
const uriString = uri.toString();
const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.resourceUri.toString() === uriString);
gitRef = indexStatus ? '' : 'HEAD';
}
const { size, object } = await repository.getObjectDetails(gitRef, uri.fsPath);
const { mimetype } = await repository.detectObjectType(object);
if (mimetype === 'text/plain') {
return toGitUri(uri, ref);
}
if (size > 1000000) { // 1 MB
return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${gitRef},`);
}
if (ImageMimetypes.indexOf(mimetype) > -1) {
const contents = await repository.buffer(gitRef, uri.fsPath);
return Uri.parse(`data:${mimetype};label:${path.basename(uri.fsPath)};description:${gitRef};size:${size};base64,${contents.toString('base64')}`);
}
return Uri.parse(`data:;label:${path.basename(uri.fsPath)};description:${gitRef},`);
} catch (err) {
return toGitUri(uri, ref);
}
}
private async getLeftResource(resource: Resource): Promise<Uri | undefined> {
private getLeftResource(resource: Resource): Uri | undefined {
switch (resource.type) {
case Status.INDEX_MODIFIED:
case Status.INDEX_RENAMED:
case Status.INDEX_ADDED:
return this.getURI(resource.original, 'HEAD');
return toGitUri(resource.original, 'HEAD');
case Status.MODIFIED:
case Status.UNTRACKED:
return this.getURI(resource.resourceUri, '~');
return toGitUri(resource.resourceUri, '~');
case Status.DELETED_BY_THEM:
return this.getURI(resource.resourceUri, '');
return toGitUri(resource.resourceUri, '');
}
return undefined;
}
private async getRightResource(resource: Resource): Promise<Uri | undefined> {
private getRightResource(resource: Resource): Uri | undefined {
switch (resource.type) {
case Status.INDEX_MODIFIED:
case Status.INDEX_ADDED:
case Status.INDEX_COPIED:
case Status.INDEX_RENAMED:
return this.getURI(resource.resourceUri, '');
return toGitUri(resource.resourceUri, '');
case Status.INDEX_DELETED:
case Status.DELETED:
return this.getURI(resource.resourceUri, 'HEAD');
return toGitUri(resource.resourceUri, 'HEAD');
case Status.DELETED_BY_US:
return this.getURI(resource.resourceUri, '~3');
return toGitUri(resource.resourceUri, '~3');
case Status.DELETED_BY_THEM:
return this.getURI(resource.resourceUri, '~2');
return toGitUri(resource.resourceUri, '~2');
case Status.MODIFIED:
case Status.UNTRACKED:
@@ -439,7 +420,7 @@ export class CommandCenter {
}
@command('git.clone')
async clone(url?: string): Promise<void> {
async clone(url?: string, parentPath?: string): Promise<void> {
if (!url) {
url = await window.showInputBox({
prompt: localize('repourl', "Repository URL"),
@@ -459,31 +440,33 @@ export class CommandCenter {
url = url.trim().replace(/^git\s+clone\s+/, '');
const config = workspace.getConfiguration('git');
let defaultCloneDirectory = config.get<string>('defaultCloneDirectory') || os.homedir();
defaultCloneDirectory = defaultCloneDirectory.replace(/^~/, os.homedir());
if (!parentPath) {
const config = workspace.getConfiguration('git');
let defaultCloneDirectory = config.get<string>('defaultCloneDirectory') || os.homedir();
defaultCloneDirectory = defaultCloneDirectory.replace(/^~/, os.homedir());
const uris = await window.showOpenDialog({
canSelectFiles: false,
canSelectFolders: true,
canSelectMany: false,
defaultUri: Uri.file(defaultCloneDirectory),
openLabel: localize('selectFolder', "Select Repository Location")
});
const uris = await window.showOpenDialog({
canSelectFiles: false,
canSelectFolders: true,
canSelectMany: false,
defaultUri: Uri.file(defaultCloneDirectory),
openLabel: localize('selectFolder', "Select Repository Location")
});
if (!uris || uris.length === 0) {
/* __GDPR__
"clone" : {
"outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_directory' });
return;
if (!uris || uris.length === 0) {
/* __GDPR__
"clone" : {
"outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_directory' });
return;
}
const uri = uris[0];
parentPath = uri.fsPath;
}
const uri = uris[0];
const parentPath = uri.fsPath;
try {
const opts = {
location: ProgressLocation.Notification,
@@ -493,7 +476,7 @@ export class CommandCenter {
const repositoryPath = await window.withProgress(
opts,
(_, token) => this.git.clone(url!, parentPath, token)
(progress, token) => this.git.clone(url!, parentPath!, progress, token)
);
let message = localize('proposeopen', "Would you like to open the cloned repository?");
@@ -672,7 +655,7 @@ export class CommandCenter {
let uris: Uri[] | undefined;
if (arg instanceof Uri) {
if (arg.scheme === 'git') {
if (isGitUri(arg)) {
uris = [Uri.file(fromGitUri(arg).path)];
} else if (arg.scheme === 'file') {
uris = [arg];
@@ -751,7 +734,7 @@ export class CommandCenter {
return;
}
const HEAD = await this.getLeftResource(resource);
const HEAD = this.getLeftResource(resource);
const basename = path.basename(resource.resourceUri.fsPath);
const title = `${basename} (HEAD)`;
@@ -852,7 +835,8 @@ export class CommandCenter {
}
const workingTree = selection.filter(s => s.resourceGroupType === ResourceGroupType.WorkingTree);
const scmResources = [...workingTree, ...resolved, ...unresolved];
const untracked = selection.filter(s => s.resourceGroupType === ResourceGroupType.Untracked);
const scmResources = [...workingTree, ...untracked, ...resolved, ...unresolved];
this.outputChannel.appendLine(`git.stage.scmResources ${scmResources.length}`);
if (!scmResources.length) {
@@ -893,7 +877,9 @@ export class CommandCenter {
}
}
await repository.add([]);
const config = workspace.getConfiguration('git', Uri.file(repository.root));
const untrackedChanges = config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
await repository.add([], untrackedChanges === 'mixed' ? undefined : { update: true });
}
private async _stageDeletionConflict(repository: Repository, uri: Uri): Promise<void> {
@@ -931,6 +917,24 @@ export class CommandCenter {
}
}
@command('git.stageAllTracked', { repository: true })
async stageAllTracked(repository: Repository): Promise<void> {
const resources = repository.workingTreeGroup.resourceStates
.filter(r => r.type !== Status.UNTRACKED && r.type !== Status.IGNORED);
const uris = resources.map(r => r.resourceUri);
await repository.add(uris);
}
@command('git.stageAllUntracked', { repository: true })
async stageAllUntracked(repository: Repository): Promise<void> {
const resources = [...repository.workingTreeGroup.resourceStates, ...repository.untrackedGroup.resourceStates]
.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED);
const uris = resources.map(r => r.resourceUri);
await repository.add(uris);
}
@command('git.stageChange')
async stageChange(uri: Uri, changes: LineChange[], index: number): Promise<void> {
const textEditor = window.visibleTextEditors.filter(e => e.document.uri.toString() === uri.toString())[0];
@@ -1076,7 +1080,7 @@ export class CommandCenter {
const modifiedDocument = textEditor.document;
const modifiedUri = modifiedDocument.uri;
if (modifiedUri.scheme !== 'git') {
if (!isGitUri(modifiedUri)) {
return;
}
@@ -1117,8 +1121,8 @@ export class CommandCenter {
resourceStates = [resource];
}
const scmResources = resourceStates
.filter(s => s instanceof Resource && s.resourceGroupType === ResourceGroupType.WorkingTree) as Resource[];
const scmResources = resourceStates.filter(s => s instanceof Resource
&& (s.resourceGroupType === ResourceGroupType.WorkingTree || s.resourceGroupType === ResourceGroupType.Untracked)) as Resource[];
if (!scmResources.length) {
return;
@@ -1175,41 +1179,11 @@ export class CommandCenter {
const untrackedResources = resources.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED);
if (untrackedResources.length === 0) {
const message = resources.length === 1
? localize('confirm discard all single', "Are you sure you want to discard changes in {0}?", path.basename(resources[0].resourceUri.fsPath))
: localize('confirm discard all', "Are you sure you want to discard ALL changes in {0} files?\nThis is IRREVERSIBLE!\nYour current working set will be FOREVER LOST.", resources.length);
const yes = resources.length === 1
? localize('discardAll multiple', "Discard 1 File")
: localize('discardAll', "Discard All {0} Files", resources.length);
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
return;
await this._cleanTrackedChanges(repository, resources);
} else if (resources.length === 1) {
const message = localize('confirm delete', "Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST.", path.basename(resources[0].resourceUri.fsPath));
const yes = localize('delete file', "Delete file");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
await this._cleanUntrackedChange(repository, resources[0]);
} else if (trackedResources.length === 0) {
const message = localize('confirm delete multiple', "Are you sure you want to DELETE {0} files?", resources.length);
const yes = localize('delete files', "Delete Files");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
await this._cleanUntrackedChanges(repository, resources);
} else { // resources.length > 1 && untrackedResources.length > 0 && trackedResources.length > 0
const untrackedMessage = untrackedResources.length === 1
? localize('there are untracked files single', "The following untracked file will be DELETED FROM DISK if discarded: {0}.", path.basename(untrackedResources[0].resourceUri.fsPath))
@@ -1234,6 +1208,74 @@ export class CommandCenter {
}
}
@command('git.cleanAllTracked', { repository: true })
async cleanAllTracked(repository: Repository): Promise<void> {
const resources = repository.workingTreeGroup.resourceStates
.filter(r => r.type !== Status.UNTRACKED && r.type !== Status.IGNORED);
if (resources.length === 0) {
return;
}
await this._cleanTrackedChanges(repository, resources);
}
@command('git.cleanAllUntracked', { repository: true })
async cleanAllUntracked(repository: Repository): Promise<void> {
const resources = [...repository.workingTreeGroup.resourceStates, ...repository.untrackedGroup.resourceStates]
.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED);
if (resources.length === 0) {
return;
}
if (resources.length === 1) {
await this._cleanUntrackedChange(repository, resources[0]);
} else {
await this._cleanUntrackedChanges(repository, resources);
}
}
private async _cleanTrackedChanges(repository: Repository, resources: Resource[]): Promise<void> {
const message = resources.length === 1
? localize('confirm discard all single', "Are you sure you want to discard changes in {0}?", path.basename(resources[0].resourceUri.fsPath))
: localize('confirm discard all', "Are you sure you want to discard ALL changes in {0} files?\nThis is IRREVERSIBLE!\nYour current working set will be FOREVER LOST.", resources.length);
const yes = resources.length === 1
? localize('discardAll multiple', "Discard 1 File")
: localize('discardAll', "Discard All {0} Files", resources.length);
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
}
private async _cleanUntrackedChange(repository: Repository, resource: Resource): Promise<void> {
const message = localize('confirm delete', "Are you sure you want to DELETE {0}?\nThis is IRREVERSIBLE!\nThis file will be FOREVER LOST.", path.basename(resource.resourceUri.fsPath));
const yes = localize('delete file', "Delete file");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean([resource.resourceUri]);
}
private async _cleanUntrackedChanges(repository: Repository, resources: Resource[]): Promise<void> {
const message = localize('confirm delete multiple', "Are you sure you want to DELETE {0} files?", resources.length);
const yes = localize('delete files', "Delete Files");
const pick = await window.showWarningMessage(message, { modal: true }, yes);
if (pick !== yes) {
return;
}
await repository.clean(resources.map(r => r.resourceUri));
}
private async smartCommit(
repository: Repository,
getCommitMessage: () => Promise<string | undefined>,
@@ -1249,18 +1291,20 @@ export class CommandCenter {
promptToSaveFilesBeforeCommit = 'never';
}
const enableSmartCommit = config.get<boolean>('enableSmartCommit') === true;
if (promptToSaveFilesBeforeCommit !== 'never') {
let documents = workspace.textDocuments
.filter(d => !d.isUntitled && d.isDirty && isDescendant(repository.root, d.uri.fsPath));
if (promptToSaveFilesBeforeCommit === 'staged') {
if (promptToSaveFilesBeforeCommit === 'staged' || repository.indexGroup.resourceStates.length > 0) {
documents = documents
.filter(d => repository.indexGroup.resourceStates.some(s => s.resourceUri.path === d.uri.fsPath));
.filter(d => repository.indexGroup.resourceStates.some(s => pathEquals(s.resourceUri.fsPath, d.uri.fsPath)));
}
if (documents.length > 0) {
const message = documents.length === 1
? localize('unsaved files single', "The following file is unsaved and will not be included in the commit if you proceed: {0}.\n\nWould you like to save it before committing?", path.basename(documents[0].uri.fsPath))
? localize('unsaved files single', "The following file has unsaved changes which won't be included in the commit if you proceed: {0}.\n\nWould you like to save it before committing?", path.basename(documents[0].uri.fsPath))
: localize('unsaved files', "There are {0} unsaved files.\n\nWould you like to save them before committing?", documents.length);
const saveAndCommit = localize('save and commit', "Save All & Commit");
const commit = localize('commit', "Commit Anyway");
@@ -1268,14 +1312,13 @@ export class CommandCenter {
if (pick === saveAndCommit) {
await Promise.all(documents.map(d => d.save()));
await repository.add(documents.map(d => d.uri));
await repository.add([]);
} else if (pick !== commit) {
return false; // do not commit on cancel
}
}
}
const enableSmartCommit = config.get<boolean>('enableSmartCommit') === true;
const enableCommitSigning = config.get<boolean>('enableCommitSigning') === true;
const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0;
@@ -1341,6 +1384,10 @@ export class CommandCenter {
opts.all = 'tracked';
}
if (opts.all && config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges') !== 'mixed') {
opts.all = 'tracked';
}
await repository.commit(message, opts);
const postCommitCommand = config.get<'none' | 'push' | 'sync'>('postCommitCommand');
@@ -1360,28 +1407,39 @@ export class CommandCenter {
private async commitWithAnyInput(repository: Repository, opts?: CommitOptions): Promise<void> {
const message = repository.inputBox.value;
const getCommitMessage = async () => {
if (message) {
return message;
let _message: string | undefined = message;
if (!_message) {
let value: string | undefined = undefined;
if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) {
value = (await repository.getCommit(repository.HEAD.commit)).message;
}
const branchName = repository.headShortName;
let placeHolder: string;
if (branchName) {
placeHolder = localize('commitMessageWithHeadLabel2', "Message (commit on '{0}')", branchName);
} else {
placeHolder = localize('commit message', "Commit message");
}
_message = await window.showInputBox({
value,
placeHolder,
prompt: localize('provide commit message', "Please provide a commit message"),
ignoreFocusOut: true
});
}
let value: string | undefined = undefined;
if (opts && opts.amend && repository.HEAD && repository.HEAD.commit) {
value = (await repository.getCommit(repository.HEAD.commit)).message;
}
return await window.showInputBox({
value,
placeHolder: localize('commit message', "Commit message"),
prompt: localize('provide commit message', "Please provide a commit message"),
ignoreFocusOut: true
});
return _message;
};
const didCommit = await this.smartCommit(repository, getCommitMessage, opts);
if (message && didCommit) {
repository.inputBox.value = await repository.getCommitTemplate();
repository.inputBox.value = await repository.getInputTemplate();
}
}
@@ -1458,6 +1516,15 @@ export class CommandCenter {
const commit = await repository.getCommit('HEAD');
if (commit.parents.length > 1) {
const yes = localize('undo commit', "Undo merge commit");
const result = await window.showWarningMessage(localize('merge commit', "The last commit was a merge commit. Are you sure you want to undo it?"), { modal: true }, yes);
if (result !== yes) {
return;
}
}
if (commit.parents.length > 0) {
await repository.reset('HEAD~');
} else {
@@ -1483,7 +1550,6 @@ export class CommandCenter {
const quickpick = window.createQuickPick();
quickpick.items = picks;
quickpick.placeholder = placeHolder;
quickpick.ignoreFocusOut = true;
quickpick.show();
const choice = await new Promise<QuickPickItem | undefined>(c => quickpick.onDidAccept(() => c(quickpick.activeItems[0])));
@@ -1672,6 +1738,26 @@ export class CommandCenter {
await repository.tag(name, message);
}
@command('git.deleteTag', { repository: true })
async deleteTag(repository: Repository): Promise<void> {
const picks = repository.refs.filter(ref => ref.type === RefType.Tag)
.map(ref => new TagItem(ref));
if (picks.length === 0) {
window.showWarningMessage(localize('no tags', "This repository has no tags."));
return;
}
const placeHolder = localize('select a tag to delete', 'Select a tag to delete');
const choice = await window.showQuickPick(picks, { placeHolder });
if (!choice) {
return;
}
await repository.deleteTag(choice.label);
}
@command('git.fetch', { repository: true })
async fetch(repository: Repository): Promise<void> {
if (repository.remotes.length === 0) {
@@ -1722,7 +1808,7 @@ export class CommandCenter {
const remoteRefs = repository.refs;
const remoteRefsFiltered = remoteRefs.filter(r => (r.remote === remotePick.label));
const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name })) as { label: string; description: string }[];
const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name! }));
const branchPlaceHolder = localize('pick branch pull', "Pick a branch to pull from");
const branchPick = await window.showQuickPick(branchPicks, { placeHolder: branchPlaceHolder });
@@ -1829,15 +1915,24 @@ export class CommandCenter {
}
} else {
const branchName = repository.HEAD.name;
const picks = remotes.filter(r => r.pushUrl !== undefined).map(r => ({ label: r.name, description: r.pushUrl! }));
const addRemote = new AddRemoteItem(this);
const picks = [...remotes.filter(r => r.pushUrl !== undefined).map(r => ({ label: r.name, description: r.pushUrl })), addRemote];
const placeHolder = localize('pick remote', "Pick a remote to publish the branch '{0}' to:", branchName);
const pick = await window.showQuickPick(picks, { placeHolder });
const choice = await window.showQuickPick(picks, { placeHolder });
if (!pick) {
if (!choice) {
return;
}
await repository.pushTo(pick.label, branchName, undefined, forcePushMode);
if (choice === addRemote) {
const newRemote = await this.addRemote(repository);
if (newRemote) {
await repository.pushTo(newRemote, branchName, undefined, forcePushMode);
}
} else {
await repository.pushTo(choice.label, branchName, undefined, forcePushMode);
}
}
}
@@ -1872,7 +1967,7 @@ export class CommandCenter {
}
@command('git.addRemote', { repository: true })
async addRemote(repository: Repository): Promise<void> {
async addRemote(repository: Repository): Promise<string | undefined> {
const remotes = repository.remotes;
const sanitize = (name: string) => {
@@ -1914,6 +2009,8 @@ export class CommandCenter {
}
await repository.addRemote(name, url);
return name;
}
@command('git.removeRemote', { repository: true })
@@ -2030,18 +2127,29 @@ export class CommandCenter {
}
const branchName = repository.HEAD && repository.HEAD.name || '';
const selectRemote = async () => {
const picks = repository.remotes.map(r => r.name);
const placeHolder = localize('pick remote', "Pick a remote to publish the branch '{0}' to:", branchName);
return await window.showQuickPick(picks, { placeHolder });
};
const choice = remotes.length === 1 ? remotes[0].name : await selectRemote();
if (remotes.length === 1) {
return await repository.pushTo(remotes[0].name, branchName, true);
}
const addRemote = new AddRemoteItem(this);
const picks = [...repository.remotes.map(r => ({ label: r.name, description: r.pushUrl })), addRemote];
const placeHolder = localize('pick remote', "Pick a remote to publish the branch '{0}' to:", branchName);
const choice = await window.showQuickPick(picks, { placeHolder });
if (!choice) {
return;
}
await repository.pushTo(choice, branchName, true);
if (choice === addRemote) {
const newRemote = await this.addRemote(repository);
if (newRemote) {
await repository.pushTo(newRemote, branchName, true);
}
} else {
await repository.pushTo(choice.label, branchName, true);
}
}
@command('git.ignore')
@@ -2069,8 +2177,22 @@ export class CommandCenter {
await this.runByRepository(resources, async (repository, resources) => repository.ignore(resources));
}
@command('git.revealInExplorer')
async revealInExplorer(resourceState: SourceControlResourceState): Promise<void> {
if (!resourceState) {
return;
}
if (!(resourceState.resourceUri instanceof Uri)) {
return;
}
await commands.executeCommand('revealInExplorer', resourceState.resourceUri);
}
private async _stash(repository: Repository, includeUntracked = false): Promise<void> {
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0;
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0
&& (!includeUntracked || repository.untrackedGroup.resourceStates.length === 0);
const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
if (noUnstagedChanges && noStagedChanges) {
@@ -2152,6 +2274,18 @@ export class CommandCenter {
await repository.applyStash();
}
@command('git.stashDrop', { repository: true })
async stashDrop(repository: Repository): Promise<void> {
const placeHolder = localize('pick stash to drop', "Pick a stash to drop");
const stash = await this.pickStash(repository, placeHolder);
if (!stash) {
return;
}
await repository.dropStash(stash.index);
}
private async pickStash(repository: Repository, placeHolder: string): Promise<Stash | undefined> {
const stashes = await repository.getStashes();
@@ -2289,7 +2423,7 @@ export class CommandCenter {
return undefined;
}
if (uri.scheme === 'git') {
if (isGitUri(uri)) {
const { path } = fromGitUri(uri);
uri = Uri.file(path);
}
@@ -147,4 +147,4 @@ export class GitContentProvider {
dispose(): void {
this.disposables.forEach(d => d.dispose());
}
}
}
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { window, workspace, Uri, Disposable, Event, EventEmitter, DecorationData, DecorationProvider, ThemeColor } from 'vscode';
import { window, workspace, Uri, Disposable, Event, EventEmitter, Decoration, DecorationProvider, ThemeColor } from 'vscode';
import * as path from 'path';
import { Repository, GitResourceGroup } from './repository';
import { Model } from './model';
@@ -29,7 +29,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
this.disposables.push(window.registerDecorationProvider(this));
}
provideDecoration(uri: Uri): Promise<DecorationData | undefined> {
provideDecoration(uri: Uri): Promise<Decoration | undefined> {
const repository = this.model.getRepository(uri);
if (!repository) {
@@ -48,7 +48,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
this.checkIgnoreSoon();
}).then(ignored => {
if (ignored) {
return <DecorationData>{
return <Decoration>{
priority: 3,
color: new ThemeColor('gitDecoration.ignoredResourceForeground')
};
@@ -89,7 +89,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
class GitDecorationProvider implements DecorationProvider {
private static SubmoduleDecorationData: DecorationData = {
private static SubmoduleDecorationData: Decoration = {
title: 'Submodule',
letter: 'S',
color: new ThemeColor('gitDecoration.submoduleResourceForeground')
@@ -99,7 +99,7 @@ class GitDecorationProvider implements DecorationProvider {
readonly onDidChangeDecorations: Event<Uri[]> = this._onDidChangeDecorations.event;
private disposables: Disposable[] = [];
private decorations = new Map<string, DecorationData>();
private decorations = new Map<string, Decoration>();
constructor(private repository: Repository) {
this.disposables.push(
@@ -109,10 +109,11 @@ class GitDecorationProvider implements DecorationProvider {
}
private onDidRunGitStatus(): void {
let newDecorations = new Map<string, DecorationData>();
let newDecorations = new Map<string, Decoration>();
this.collectSubmoduleDecorationData(newDecorations);
this.collectDecorationData(this.repository.indexGroup, newDecorations);
this.collectDecorationData(this.repository.untrackedGroup, newDecorations);
this.collectDecorationData(this.repository.workingTreeGroup, newDecorations);
this.collectDecorationData(this.repository.mergeGroup, newDecorations);
@@ -121,25 +122,28 @@ class GitDecorationProvider implements DecorationProvider {
this._onDidChangeDecorations.fire([...uris.values()].map(value => Uri.parse(value, true)));
}
private collectDecorationData(group: GitResourceGroup, bucket: Map<string, DecorationData>): void {
group.resourceStates.forEach(r => {
if (r.resourceDecoration
&& r.type !== Status.DELETED
&& r.type !== Status.INDEX_DELETED
) {
private collectDecorationData(group: GitResourceGroup, bucket: Map<string, Decoration>): void {
for (const r of group.resourceStates) {
const decoration = r.resourceDecoration;
if (decoration) {
// not deleted and has a decoration
bucket.set(r.original.toString(), r.resourceDecoration);
bucket.set(r.original.toString(), decoration);
if (r.type === Status.INDEX_RENAMED) {
bucket.set(r.resourceUri.toString(), decoration);
}
}
});
}
}
private collectSubmoduleDecorationData(bucket: Map<string, DecorationData>): void {
private collectSubmoduleDecorationData(bucket: Map<string, Decoration>): void {
for (const submodule of this.repository.submodules) {
bucket.set(Uri.file(path.join(this.repository.root, submodule.path)).toString(), GitDecorationProvider.SubmoduleDecorationData);
}
}
provideDecoration(uri: Uri): DecorationData | undefined {
provideDecoration(uri: Uri): Decoration | undefined {
return this.decorations.get(uri.toString());
}
@@ -5,8 +5,6 @@
import * as jschardet from 'jschardet';
jschardet.Constants.MINIMUM_THRESHOLD = 0.2;
function detectEncodingByBOM(buffer: Buffer): string | null {
if (!buffer || buffer.length < 2) {
return null;
+109 -30
View File
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as fs from 'fs';
import { promises as fs, exists } from 'fs';
import * as path from 'path';
import * as os from 'os';
import * as cp from 'child_process';
@@ -11,17 +11,17 @@ import * as which from 'which';
import { EventEmitter } from 'events';
import iconv = require('iconv-lite');
import * as filetype from 'file-type';
import { assign, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter } from './util';
import { CancellationToken } from 'vscode';
import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter } from './util';
import { CancellationToken, Progress } from 'vscode';
import { URI } from 'vscode-uri';
import { detectEncoding } from './encoding';
import { Ref, RefType, Branch, Remote, GitErrorCodes, LogOptions, Change, Status } from './api/git';
import * as byline from 'byline';
import { StringDecoder } from 'string_decoder';
// https://github.com/microsoft/vscode/issues/65693
const MAX_CLI_LENGTH = 30000;
const readfile = denodeify<string, string | null, string>(fs.readFile);
export interface IGit {
path: string;
version: string;
@@ -163,6 +163,7 @@ export interface SpawnOptions extends cp.SpawnOptions {
encoding?: string;
log?: boolean;
cancellationToken?: CancellationToken;
onSpawn?: (childProcess: cp.ChildProcess) => void;
}
async function exec(child: cp.ChildProcess, cancellationToken?: CancellationToken): Promise<IExecutionResult<Buffer>> {
@@ -193,13 +194,13 @@ async function exec(child: cp.ChildProcess, cancellationToken?: CancellationToke
}),
new Promise<Buffer>(c => {
const buffers: Buffer[] = [];
on(child.stdout, 'data', (b: Buffer) => buffers.push(b));
once(child.stdout, 'close', () => c(Buffer.concat(buffers)));
on(child.stdout!, 'data', (b: Buffer) => buffers.push(b));
once(child.stdout!, 'close', () => c(Buffer.concat(buffers)));
}),
new Promise<string>(c => {
const buffers: Buffer[] = [];
on(child.stderr, 'data', (b: Buffer) => buffers.push(b));
once(child.stderr, 'close', () => c(Buffer.concat(buffers).toString('utf8')));
on(child.stderr!, 'data', (b: Buffer) => buffers.push(b));
once(child.stderr!, 'close', () => c(Buffer.concat(buffers).toString('utf8')));
})
]) as Promise<[number, Buffer, string]>;
@@ -341,21 +342,49 @@ export class Git {
return;
}
async clone(url: string, parentPath: string, cancellationToken?: CancellationToken): Promise<string> {
async clone(url: string, parentPath: string, progress: Progress<{ increment: number }>, cancellationToken?: CancellationToken): Promise<string> {
let baseFolderName = decodeURI(url).replace(/[\/]+$/, '').replace(/^.*[\/\\]/, '').replace(/\.git$/, '') || 'repository';
let folderName = baseFolderName;
let folderPath = path.join(parentPath, folderName);
let count = 1;
while (count < 20 && await new Promise(c => fs.exists(folderPath, c))) {
while (count < 20 && await new Promise(c => exists(folderPath, c))) {
folderName = `${baseFolderName}-${count++}`;
folderPath = path.join(parentPath, folderName);
}
await mkdirp(parentPath);
const onSpawn = (child: cp.ChildProcess) => {
const decoder = new StringDecoder('utf8');
const lineStream = new byline.LineStream({ encoding: 'utf8' });
child.stderr!.on('data', (buffer: Buffer) => lineStream.write(decoder.write(buffer)));
let totalProgress = 0;
let previousProgress = 0;
lineStream.on('data', (line: string) => {
let match: RegExpMatchArray | null = null;
if (match = /Counting objects:\s*(\d+)%/i.exec(line)) {
totalProgress = Math.floor(parseInt(match[1]) * 0.1);
} else if (match = /Compressing objects:\s*(\d+)%/i.exec(line)) {
totalProgress = 10 + Math.floor(parseInt(match[1]) * 0.1);
} else if (match = /Receiving objects:\s*(\d+)%/i.exec(line)) {
totalProgress = 20 + Math.floor(parseInt(match[1]) * 0.4);
} else if (match = /Resolving deltas:\s*(\d+)%/i.exec(line)) {
totalProgress = 60 + Math.floor(parseInt(match[1]) * 0.4);
}
if (totalProgress !== previousProgress) {
progress.report({ increment: totalProgress - previousProgress });
previousProgress = totalProgress;
}
});
};
try {
await this.exec(parentPath, ['clone', url.includes(' ') ? encodeURI(url) : url, folderPath], { cancellationToken });
await this.exec(parentPath, ['clone', url.includes(' ') ? encodeURI(url) : url, folderPath, '--progress'], { cancellationToken, onSpawn });
} catch (err) {
if (err.stderr) {
err.stderr = err.stderr.replace(/^Cloning.+$/m, '').trim();
@@ -370,7 +399,8 @@ export class Git {
async getRepositoryRoot(repositoryPath: string): Promise<string> {
const result = await this.exec(repositoryPath, ['rev-parse', '--show-toplevel']);
return path.normalize(result.stdout.trim());
// Keep trailing spaces which are part of the directory name
return path.normalize(result.stdout.trimLeft().replace(/(\r\n|\r|\n)+$/, ''));
}
async getRepositoryDotGit(repositoryPath: string): Promise<string> {
@@ -401,8 +431,12 @@ export class Git {
private async _exec(args: string[], options: SpawnOptions = {}): Promise<IExecutionResult<string>> {
const child = this.spawn(args, options);
if (options.onSpawn) {
options.onSpawn(child);
}
if (options.input) {
child.stdin.end(options.input, 'utf8');
child.stdin!.end(options.input, 'utf8');
}
const bufferResult = await exec(child, options.cancellationToken);
@@ -727,9 +761,10 @@ export class Repository {
async log(options?: LogOptions): Promise<Commit[]> {
const maxEntries = options && typeof options.maxEntries === 'number' && options.maxEntries > 0 ? options.maxEntries : 32;
const args = ['log', '-' + maxEntries, `--pretty=format:${COMMIT_FORMAT}%x00%x00`];
const gitResult = await this.run(args);
if (gitResult.exitCode) {
// An empty repo.
// An empty repo
return [];
}
@@ -846,7 +881,7 @@ export class Repository {
async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> {
const child = await this.stream(['show', object]);
const buffer = await readBytes(child.stdout, 4100);
const buffer = await readBytes(child.stdout!, 4100);
try {
child.kill();
@@ -1115,7 +1150,7 @@ export class Repository {
async stage(path: string, data: string): Promise<void> {
const child = this.stream(['hash-object', '--stdin', '-w', '--path', path], { stdio: [null, null, null] });
child.stdin.end(data, 'utf8');
child.stdin!.end(data, 'utf8');
const { exitCode, stdout } = await exec(child);
const hash = stdout.toString('utf8');
@@ -1127,11 +1162,12 @@ export class Repository {
});
}
const treeish = await this.getCommit('HEAD').then(() => 'HEAD', () => '');
let mode: string;
let add: string = '';
try {
const details = await this.getObjectDetails('HEAD', path);
const details = await this.getObjectDetails(treeish, path);
mode = details.mode;
} catch (err) {
if (err.gitErrorCode !== GitErrorCodes.UnknownPath) {
@@ -1291,6 +1327,11 @@ export class Repository {
await this.run(args);
}
async deleteTag(name: string): Promise<void> {
let args = ['tag', '-d', name];
await this.run(args);
}
async clean(paths: string[]): Promise<void> {
const pathsByGroup = groupBy(paths, p => path.dirname(p));
const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]);
@@ -1366,8 +1407,9 @@ export class Repository {
await this.run(args);
}
async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean, depth?: number } = {}): Promise<void> {
async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean, depth?: number, silent?: boolean } = {}): Promise<void> {
const args = ['fetch'];
const spawnOptions: SpawnOptions = {};
if (options.remote) {
args.push(options.remote);
@@ -1387,8 +1429,12 @@ export class Repository {
args.push(`--depth=${options.depth}`);
}
if (options.silent) {
spawnOptions.env = { 'VSCODE_GIT_FETCH_SILENT': 'true' };
}
try {
await this.run(args);
await this.run(args, spawnOptions);
} catch (err) {
if (/No remote repository specified\./.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.NoRemoteRepositorySpecified;
@@ -1551,6 +1597,24 @@ export class Repository {
}
}
async dropStash(index?: number): Promise<void> {
const args = ['stash', 'drop'];
if (typeof index === 'number') {
args.push(`stash@{${index}}`);
}
try {
await this.run(args);
} catch (err) {
if (/No stash found/.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.NoStashFound;
}
throw err;
}
}
getStatus(limit = 5000): Promise<{ status: IFileStatus[]; didHitLimit: boolean; }> {
return new Promise<{ status: IFileStatus[]; didHitLimit: boolean; }>((c, e) => {
const parser = new GitStatusParser();
@@ -1577,19 +1641,19 @@ export class Repository {
if (parser.status.length > limit) {
child.removeListener('exit', onExit);
child.stdout.removeListener('data', onStdoutData);
child.stdout!.removeListener('data', onStdoutData);
child.kill();
c({ status: parser.status.slice(0, limit), didHitLimit: true });
}
};
child.stdout.setEncoding('utf8');
child.stdout.on('data', onStdoutData);
child.stdout!.setEncoding('utf8');
child.stdout!.on('data', onStdoutData);
const stderrData: string[] = [];
child.stderr.setEncoding('utf8');
child.stderr.on('data', raw => stderrData.push(raw as string));
child.stderr!.setEncoding('utf8');
child.stderr!.on('data', raw => stderrData.push(raw as string));
child.on('error', cpErrorHandler(e));
child.on('exit', onExit);
@@ -1628,7 +1692,7 @@ export class Repository {
const args = ['for-each-ref', '--format', '%(refname) %(objectname)'];
if (opts && opts.sort && opts.sort !== 'alphabetically') {
args.push('--sort', opts.sort);
args.push('--sort', `-${opts.sort}`);
}
const result = await this.run(args);
@@ -1748,6 +1812,22 @@ export class Repository {
}
}
// TODO: Support core.commentChar
stripCommitMessageComments(message: string): string {
return message.replace(/^\s*#.*$\n?/gm, '').trim();
}
async getMergeMessage(): Promise<string | undefined> {
const mergeMsgPath = path.join(this.repositoryRoot, '.git', 'MERGE_MSG');
try {
const raw = await fs.readFile(mergeMsgPath, 'utf8');
return this.stripCommitMessageComments(raw);
} catch {
return undefined;
}
}
async getCommitTemplate(): Promise<string> {
try {
const result = await this.run(['config', '--get', 'commit.template']);
@@ -1765,9 +1845,8 @@ export class Repository {
templatePath = path.join(this.repositoryRoot, templatePath);
}
const raw = await readfile(templatePath, 'utf8');
return raw.replace(/\n?#.*/g, '');
const raw = await fs.readFile(templatePath, 'utf8');
return this.stripCommitMessageComments(raw);
} catch (err) {
return '';
}
@@ -1790,7 +1869,7 @@ export class Repository {
const gitmodulesPath = path.join(this.root, '.gitmodules');
try {
const gitmodulesRaw = await readfile(gitmodulesPath, 'utf8');
const gitmodulesRaw = await fs.readFile(gitmodulesPath, 'utf8');
return parseGitmodules(gitmodulesRaw);
} catch (err) {
if (/ENOENT/.test(err.message)) {
+22 -3
View File
@@ -11,6 +11,7 @@ import { findGit, Git, IGit } from './git';
import { Model } from './model';
import { CommandCenter } from './commands';
import { GitContentProvider } from './contentProvider';
import { GitFileSystemProvider } from './fileSystemProvider';
import { GitDecorations } from './decorationProvider';
import { Askpass } from './askpass';
import { toDisposable, filterEvent, eventToPromise } from './util';
@@ -20,6 +21,7 @@ import { GitProtocolHandler } from './protocolHandler';
import { GitExtensionImpl } from './api/extension';
import * as path from 'path';
import * as fs from 'fs';
import { createIPCServer, IIPCServer } from './ipc/ipcServer';
const deactivateTasks: { (): Promise<any>; }[] = [];
@@ -32,10 +34,26 @@ export async function deactivate(): Promise<any> {
async function createModel(context: ExtensionContext, outputChannel: OutputChannel, telemetryReporter: TelemetryReporter, disposables: Disposable[]): Promise<Model> {
const pathHint = workspace.getConfiguration('git').get<string>('path');
const info = await findGit(pathHint, path => outputChannel.appendLine(localize('looking', "Looking for git in: {0}", path)));
const askpass = new Askpass();
disposables.push(askpass);
const env = await askpass.getEnv();
let env: any = {};
let ipc: IIPCServer | undefined;
try {
ipc = await createIPCServer();
disposables.push(ipc);
env = { ...env, ...ipc.getEnv() };
} catch {
// noop
}
if (ipc) {
const askpass = new Askpass(ipc);
disposables.push(askpass);
env = { ...env, ...askpass.getEnv() };
} else {
env = { ...env, ...Askpass.getDisabledEnv() };
}
const git = new Git({ gitPath: info.path, version: info.version, env });
const model = new Model(git, context.globalState, outputChannel);
disposables.push(model);
@@ -62,6 +80,7 @@ async function createModel(context: ExtensionContext, outputChannel: OutputChann
disposables.push(
new CommandCenter(git, model, outputChannel, telemetryReporter),
new GitContentProvider(model),
new GitFileSystemProvider(model),
new GitDecorations(model),
new GitProtocolHandler()
);
+25 -7
View File
@@ -6,7 +6,7 @@
import { workspace, WorkspaceFoldersChangeEvent, Uri, window, Event, EventEmitter, QuickPickItem, Disposable, SourceControl, SourceControlResourceGroup, TextEditor, Memento, OutputChannel } from 'vscode';
import { Repository, RepositoryState } from './repository';
import { memoize, sequentialize, debounce } from './decorators';
import { dispose, anyEvent, filterEvent, isDescendant, firstIndex } from './util';
import { dispose, anyEvent, filterEvent, isDescendant, firstIndex, pathEquals } from './util';
import { Git } from './git';
import * as path from 'path';
import * as fs from 'fs';
@@ -190,7 +190,7 @@ export class Model {
openRepositoriesToDispose.forEach(r => r.dispose());
}
private async onDidChangeVisibleTextEditors(editors: TextEditor[]): Promise<void> {
private async onDidChangeVisibleTextEditors(editors: readonly TextEditor[]): Promise<void> {
const config = workspace.getConfiguration('git');
const autoRepositoryDetection = config.get<boolean | 'subFolders' | 'openEditors'>('autoRepositoryDetection');
@@ -240,10 +240,7 @@ export class Model {
return;
}
const config = workspace.getConfiguration('git');
const ignoredRepos = new Set(config.get<Array<string>>('ignoredRepositories'));
if (ignoredRepos.has(rawRoot)) {
if (this.shouldRepositoryBeIgnored(rawRoot)) {
return;
}
@@ -261,6 +258,27 @@ export class Model {
}
}
private shouldRepositoryBeIgnored(repositoryRoot: string): boolean {
const config = workspace.getConfiguration('git');
const ignoredRepos = config.get<string[]>('ignoredRepositories') || [];
for (const ignoredRepo of ignoredRepos) {
if (path.isAbsolute(ignoredRepo)) {
if (pathEquals(ignoredRepo, repositoryRoot)) {
return true;
}
} else {
for (const folder of workspace.workspaceFolders || []) {
if (pathEquals(path.join(folder.uri.fsPath, ignoredRepo), repositoryRoot)) {
return true;
}
}
}
}
return false;
}
private open(repository: Repository): void {
this.outputChannel.appendLine(`Open repository: ${repository.root}`);
@@ -374,7 +392,7 @@ export class Model {
if (hint instanceof Uri) {
let resourcePath: string;
if (hint.scheme === 'git') {
if (hint.scheme === 'git' || hint.scheme === 'gitfs') {
resourcePath = fromGitUri(hint).path;
} else {
resourcePath = hint.fsPath;
@@ -3,17 +3,17 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { commands, Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, SourceControlInputBoxValidation, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento, SourceControlInputBoxValidationType, OutputChannel, LogLevel, env, ProgressOptions, CancellationToken } from 'vscode';
import { Repository as BaseRepository, Commit, Stash, GitError, Submodule, CommitOptions, ForcePushMode } from './git';
import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent, combinedDisposable } from './util';
import { memoize, throttle, debounce } from './decorators';
import { toGitUri } from './uri';
import { AutoFetcher } from './autofetch';
import * as path from 'path';
import * as nls from 'vscode-nls';
import * as fs from 'fs';
import * as path from 'path';
import { CancellationToken, Command, Disposable, env, Event, EventEmitter, LogLevel, Memento, OutputChannel, ProgressLocation, ProgressOptions, scm, SourceControl, SourceControlInputBox, SourceControlInputBoxValidation, SourceControlInputBoxValidationType, SourceControlResourceDecorations, SourceControlResourceGroup, SourceControlResourceState, ThemeColor, Uri, window, workspace, WorkspaceEdit, Decoration } from 'vscode';
import * as nls from 'vscode-nls';
import { Branch, Change, GitErrorCodes, LogOptions, Ref, RefType, Remote, Status } from './api/git';
import { AutoFetcher } from './autofetch';
import { debounce, memoize, throttle } from './decorators';
import { Commit, CommitOptions, ForcePushMode, GitError, Repository as BaseRepository, Stash, Submodule } from './git';
import { StatusBarCommands } from './statusbar';
import { Branch, Ref, Remote, RefType, GitErrorCodes, Status, LogOptions, Change } from './api/git';
import { toGitUri } from './uri';
import { anyEvent, combinedDisposable, debounceEvent, dispose, EmptyDisposable, eventToPromise, filterEvent, find, IDisposable, isDescendant, onceEvent } from './util';
import { IFileWatcher, watch } from './watch';
const timeout = (millis: number) => new Promise(c => setTimeout(c, millis));
@@ -33,7 +33,8 @@ export const enum RepositoryState {
export const enum ResourceGroupType {
Merge,
Index,
WorkingTree
WorkingTree,
Untracked
}
export class Resource implements SourceControlResourceState {
@@ -157,10 +158,7 @@ export class Resource implements SourceControlResourceState {
const tooltip = this.tooltip;
const strikeThrough = this.strikeThrough;
const faded = this.faded;
const letter = this.letter;
const color = this.color;
return { strikeThrough, faded, tooltip, light, dark, letter, color, source: 'git.resource' /*todo@joh*/ };
return { strikeThrough, faded, tooltip, light, dark };
}
get letter(): string {
@@ -247,12 +245,12 @@ export class Resource implements SourceControlResourceState {
}
}
get resourceDecoration(): DecorationData {
get resourceDecoration(): Decoration {
const title = this.tooltip;
const letter = this.letter;
const color = this.color;
const priority = this.priority;
return { bubble: true, source: 'git.resource', title, letter, color, priority };
return { bubble: true, title, letter, color, priority };
}
constructor(
@@ -295,6 +293,7 @@ export const enum Operation {
Merge = 'Merge',
Ignore = 'Ignore',
Tag = 'Tag',
DeleteTag = 'DeleteTag',
Stash = 'Stash',
CheckIgnore = 'CheckIgnore',
GetObjectDetails = 'GetObjectDetails',
@@ -572,6 +571,9 @@ export class Repository implements Disposable {
private _workingTreeGroup: SourceControlResourceGroup;
get workingTreeGroup(): GitResourceGroup { return this._workingTreeGroup as GitResourceGroup; }
private _untrackedGroup: SourceControlResourceGroup;
get untrackedGroup(): GitResourceGroup { return this._untrackedGroup as GitResourceGroup; }
private _HEAD: Branch | undefined;
get HEAD(): Branch | undefined {
return this._HEAD;
@@ -582,6 +584,27 @@ export class Repository implements Disposable {
return this._refs;
}
get headShortName(): string | undefined {
if (!this.HEAD) {
return;
}
const HEAD = this.HEAD;
if (HEAD.name) {
return HEAD.name;
}
const tag = this.refs.filter(iref => iref.type === RefType.Tag && iref.commit === HEAD.commit)[0];
const tagName = tag && tag.name;
if (tagName) {
return tagName;
}
return (HEAD.commit || '').substr(0, 8);
}
private _remotes: Remote[] = [];
get remotes(): Remote[] {
return this._remotes;
@@ -623,6 +646,7 @@ export class Repository implements Disposable {
this.mergeGroup.resourceStates = [];
this.indexGroup.resourceStates = [];
this.workingTreeGroup.resourceStates = [];
this.untrackedGroup.resourceStates = [];
this._sourceControl.count = 0;
}
@@ -636,7 +660,6 @@ export class Repository implements Disposable {
private isRepositoryHuge = false;
private didWarnAboutLimit = false;
private isFreshRepository: boolean | undefined = undefined;
private disposables: Disposable[] = [];
@@ -691,6 +714,7 @@ export class Repository implements Disposable {
this._mergeGroup = this._sourceControl.createResourceGroup('merge', localize('merge changes', "MERGE CHANGES"));
this._indexGroup = this._sourceControl.createResourceGroup('index', localize('staged changes', "STAGED CHANGES"));
this._workingTreeGroup = this._sourceControl.createResourceGroup('workingTree', localize('changes', "CHANGES"));
this._untrackedGroup = this._sourceControl.createResourceGroup('untracked', localize('untracked changes', "UNTRACKED CHANGES"));
const updateIndexGroupVisibility = () => {
const config = workspace.getConfiguration('git', root);
@@ -704,11 +728,16 @@ export class Repository implements Disposable {
const onConfigListenerForBranchSortOrder = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.branchSortOrder', root));
onConfigListenerForBranchSortOrder(this.updateModelState, this, this.disposables);
const onConfigListenerForUntracked = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.untrackedChanges', root));
onConfigListenerForUntracked(this.updateModelState, this, this.disposables);
this.mergeGroup.hideWhenEmpty = true;
this.untrackedGroup.hideWhenEmpty = true;
this.disposables.push(this.mergeGroup);
this.disposables.push(this.indexGroup);
this.disposables.push(this.workingTreeGroup);
this.disposables.push(this.untrackedGroup);
this.disposables.push(new AutoFetcher(this, globalState));
@@ -733,8 +762,6 @@ export class Repository implements Disposable {
const onDidChangeCountBadge = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.countBadge', root));
onDidChangeCountBadge(this.setCountBadge, this, this.disposables);
this.setCountBadge();
this.updateCommitTemplate();
}
validateInput(text: string, position: number): SourceControlInputBoxValidation | undefined {
@@ -810,12 +837,14 @@ export class Repository implements Disposable {
return toGitUri(uri, '', { replaceFileExtension: true });
}
private async updateCommitTemplate(): Promise<void> {
try {
this._sourceControl.commitTemplate = await this.repository.getCommitTemplate();
} catch (e) {
// noop
async getInputTemplate(): Promise<string> {
const mergeMessage = await this.repository.getMergeMessage();
if (mergeMessage) {
return mergeMessage;
}
return await this.repository.getCommitTemplate();
}
getConfigs(): Promise<{ key: string; value: string; }[]> {
@@ -894,8 +923,8 @@ export class Repository implements Disposable {
return this.run(Operation.HashObject, () => this.repository.hashObject(data));
}
async add(resources: Uri[]): Promise<void> {
await this.run(Operation.Add, () => this.repository.add(resources.map(r => r.fsPath)));
async add(resources: Uri[], opts?: { update?: boolean }): Promise<void> {
await this.run(Operation.Add, () => this.repository.add(resources.map(r => r.fsPath), opts));
}
async rm(resources: Uri[]): Promise<void> {
@@ -940,6 +969,7 @@ export class Repository implements Disposable {
const toClean: string[] = [];
const toCheckout: string[] = [];
const submodulesToUpdate: string[] = [];
const resourceStates = [...this.workingTreeGroup.resourceStates, ...this.untrackedGroup.resourceStates];
resources.forEach(r => {
const fsPath = r.fsPath;
@@ -952,7 +982,7 @@ export class Repository implements Disposable {
}
const raw = r.toString();
const scmResource = find(this.workingTreeGroup.resourceStates, sr => sr.resourceUri.toString() === raw);
const scmResource = find(resourceStates, sr => sr.resourceUri.toString() === raw);
if (!scmResource) {
return;
@@ -1004,6 +1034,10 @@ export class Repository implements Disposable {
await this.run(Operation.Tag, () => this.repository.tag(name, message));
}
async deleteTag(name: string): Promise<void> {
await this.run(Operation.DeleteTag, () => this.repository.deleteTag(name));
}
async checkout(treeish: string): Promise<void> {
await this.run(Operation.Checkout, () => this.repository.checkout(treeish, []));
}
@@ -1037,8 +1071,8 @@ export class Repository implements Disposable {
}
@throttle
async fetchDefault(): Promise<void> {
await this.run(Operation.Fetch, () => this.repository.fetch());
async fetchDefault(options: { silent?: boolean } = {}): Promise<void> {
await this.run(Operation.Fetch, () => this.repository.fetch(options));
}
@throttle
@@ -1232,6 +1266,10 @@ export class Repository implements Disposable {
return await this.run(Operation.Stash, () => this.repository.popStash(index));
}
async dropStash(index?: number): Promise<void> {
return await this.run(Operation.Stash, () => this.repository.dropStash(index));
}
async applyStash(index?: number): Promise<void> {
return await this.run(Operation.Stash, () => this.repository.applyStash(index));
}
@@ -1277,7 +1315,7 @@ export class Repository implements Disposable {
// https://git-scm.com/docs/git-check-ignore#git-check-ignore--z
const child = this.repository.stream(['check-ignore', '-v', '-z', '--stdin'], { stdio: [null, null, null] });
child.stdin.end(filePaths.join('\0'), 'utf8');
child.stdin!.end(filePaths.join('\0'), 'utf8');
const onExit = (exitCode: number) => {
if (exitCode === 1) {
@@ -1299,12 +1337,12 @@ export class Repository implements Disposable {
data += raw;
};
child.stdout.setEncoding('utf8');
child.stdout.on('data', onStdoutData);
child.stdout!.setEncoding('utf8');
child.stdout!.on('data', onStdoutData);
let stderr: string = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', raw => stderr += raw);
child.stderr!.setEncoding('utf8');
child.stderr!.on('data', raw => stderr += raw);
child.on('error', reject);
child.on('exit', onExit);
@@ -1406,6 +1444,7 @@ export class Repository implements Disposable {
private async updateModelState(): Promise<void> {
const { status, didHitLimit } = await this.repository.getStatus();
const config = workspace.getConfiguration('git');
const scopedConfig = workspace.getConfiguration('git', Uri.file(this.repository.root));
const shouldIgnore = config.get<boolean>('ignoreLimitWarning') === true;
const useIcons = !config.get<boolean>('decorations.enabled', true);
this.isRepositoryHuge = didHitLimit;
@@ -1461,22 +1500,34 @@ export class Repository implements Disposable {
const [refs, remotes, submodules, rebaseCommit] = await Promise.all([this.repository.getRefs({ sort }), this.repository.getRemotes(), this.repository.getSubmodules(), this.getRebaseCommit()]);
this._HEAD = HEAD;
this._refs = refs;
this._remotes = remotes;
this._submodules = submodules;
this._refs = refs!;
this._remotes = remotes!;
this._submodules = submodules!;
this.rebaseCommit = rebaseCommit;
const untrackedChanges = scopedConfig.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
const index: Resource[] = [];
const workingTree: Resource[] = [];
const merge: Resource[] = [];
const untracked: Resource[] = [];
status.forEach(raw => {
const uri = Uri.file(path.join(this.repository.root, raw.path));
const renameUri = raw.rename ? Uri.file(path.join(this.repository.root, raw.rename)) : undefined;
const renameUri = raw.rename
? Uri.file(path.join(this.repository.root, raw.rename))
: undefined;
switch (raw.x + raw.y) {
case '??': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED, useIcons));
case '!!': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED, useIcons));
case '??': switch (untrackedChanges) {
case 'mixed': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED, useIcons));
case 'separate': return untracked.push(new Resource(ResourceGroupType.Untracked, uri, Status.UNTRACKED, useIcons));
default: return undefined;
}
case '!!': switch (untrackedChanges) {
case 'mixed': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED, useIcons));
case 'separate': return untracked.push(new Resource(ResourceGroupType.Untracked, uri, Status.IGNORED, useIcons));
default: return undefined;
}
case 'DD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_DELETED, useIcons));
case 'AU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_US, useIcons));
case 'UD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_THEM, useIcons));
@@ -1499,6 +1550,7 @@ export class Repository implements Disposable {
case 'D': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.DELETED, useIcons, renameUri)); break;
case 'A': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.INTENT_TO_ADD, useIcons, renameUri)); break;
}
return undefined;
});
@@ -1506,29 +1558,38 @@ export class Repository implements Disposable {
this.mergeGroup.resourceStates = merge;
this.indexGroup.resourceStates = index;
this.workingTreeGroup.resourceStates = workingTree;
this.untrackedGroup.resourceStates = untracked;
// set count badge
this.setCountBadge();
// Disable `Discard All Changes` for "fresh" repositories
// https://github.com/Microsoft/vscode/issues/43066
const isFreshRepository = !this._HEAD || !this._HEAD.commit;
if (this.isFreshRepository !== isFreshRepository) {
commands.executeCommand('setContext', 'gitFreshRepository', isFreshRepository);
this.isFreshRepository = isFreshRepository;
}
this._onDidChangeStatus.fire();
this._sourceControl.commitTemplate = await this.getInputTemplate();
}
private setCountBadge(): void {
const countBadge = workspace.getConfiguration('git').get<string>('countBadge');
let count = this.mergeGroup.resourceStates.length + this.indexGroup.resourceStates.length + this.workingTreeGroup.resourceStates.length;
const config = workspace.getConfiguration('git', Uri.file(this.repository.root));
const countBadge = config.get<'all' | 'tracked' | 'off'>('countBadge');
const untrackedChanges = config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
let count =
this.mergeGroup.resourceStates.length +
this.indexGroup.resourceStates.length +
this.workingTreeGroup.resourceStates.length;
switch (countBadge) {
case 'off': count = 0; break;
case 'tracked': count = count - this.workingTreeGroup.resourceStates.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED).length; break;
case 'tracked':
if (untrackedChanges === 'mixed') {
count -= this.workingTreeGroup.resourceStates.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED).length;
}
break;
case 'all':
if (untrackedChanges === 'separate') {
count += this.untrackedGroup.resourceStates.length;
}
break;
}
this._sourceControl.count = count;
@@ -1630,7 +1691,7 @@ export class Repository implements Disposable {
const head = HEAD.name || tagName || (HEAD.commit || '').substr(0, 8);
return head
+ (this.workingTreeGroup.resourceStates.length > 0 ? '*' : '')
+ (this.workingTreeGroup.resourceStates.length + this.untrackedGroup.resourceStates.length > 0 ? '*' : '')
+ (this.indexGroup.resourceStates.length > 0 ? '+' : '')
+ (this.mergeGroup.resourceStates.length > 0 ? '!' : '');
}
@@ -1656,15 +1717,11 @@ export class Repository implements Disposable {
}
private updateInputBoxPlaceholder(): void {
const HEAD = this.HEAD;
if (HEAD) {
const tag = this.refs.filter(iref => iref.type === RefType.Tag && iref.commit === HEAD.commit)[0];
const tagName = tag && tag.name;
const head = HEAD.name || tagName || (HEAD.commit || '').substr(0, 8);
const branchName = this.headShortName;
if (branchName) {
// '{0}' will be replaced by the corresponding key-command later in the process, which is why it needs to stay.
this._sourceControl.inputBox.placeholder = localize('commitMessageWithHeadLabel', "Message ({0} to commit on '{1}')", "{0}", head);
this._sourceControl.inputBox.placeholder = localize('commitMessageWithHeadLabel', "Message ({0} to commit on '{1}')", "{0}", branchName);
} else {
this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message ({0} to commit)");
}
@@ -71,6 +71,7 @@ class SyncStatusBar {
const onEnablementChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.enableStatusBarSync'));
onEnablementChange(this.updateEnablement, this, this.disposables);
this.updateEnablement();
this._onDidChange.fire();
}
+23 -4
View File
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { Uri } from 'vscode';
import * as qs from 'querystring';
export interface GitUriParams {
path: string;
@@ -11,8 +12,26 @@ export interface GitUriParams {
submoduleOf?: string;
}
export function isGitUri(uri: Uri): boolean {
return /^git(fs)?$/.test(uri.scheme);
}
export function fromGitUri(uri: Uri): GitUriParams {
return JSON.parse(uri.query);
const result = qs.parse(uri.query) as any;
if (!result) {
throw new Error('Invalid git URI: empty query');
}
if (typeof result.path !== 'string') {
throw new Error('Invalid git URI: missing path');
}
if (typeof result.ref !== 'string') {
throw new Error('Invalid git URI: missing ref');
}
return result;
}
export interface GitUriOptions {
@@ -42,8 +61,8 @@ export function toGitUri(uri: Uri, ref: string, options: GitUriOptions = {}): Ur
}
return uri.with({
scheme: 'git',
scheme: 'gitfs',
path,
query: JSON.stringify(params)
query: qs.stringify(params as any)
});
}
}
+5 -16
View File
@@ -6,7 +6,7 @@
import { Event } from 'vscode';
import { dirname, sep } from 'path';
import { Readable } from 'stream';
import * as fs from 'fs';
import { promises as fs, createReadStream } from 'fs';
import * as byline from 'byline';
export function log(...args: any[]): void {
@@ -140,27 +140,16 @@ export function groupBy<T>(arr: T[], fn: (el: T) => string): { [key: string]: T[
}, Object.create(null));
}
export function denodeify<A, B, C, R>(fn: Function): (a: A, b: B, c: C) => Promise<R>;
export function denodeify<A, B, R>(fn: Function): (a: A, b: B) => Promise<R>;
export function denodeify<A, R>(fn: Function): (a: A) => Promise<R>;
export function denodeify<R>(fn: Function): (...args: any[]) => Promise<R>;
export function denodeify<R>(fn: Function): (...args: any[]) => Promise<R> {
return (...args) => new Promise<R>((c, e) => fn(...args, (err: any, r: any) => err ? e(err) : c(r)));
}
export function nfcall<R>(fn: Function, ...args: any[]): Promise<R> {
return new Promise<R>((c, e) => fn(...args, (err: any, r: any) => err ? e(err) : c(r)));
}
export async function mkdirp(path: string, mode?: number): Promise<boolean> {
const mkdir = async () => {
try {
await nfcall(fs.mkdir, path, mode);
await fs.mkdir(path, mode);
} catch (err) {
if (err.code === 'EEXIST') {
const stat = await nfcall<fs.Stats>(fs.stat, path);
const stat = await fs.stat(path);
if (stat.isDirectory) {
if (stat.isDirectory()) {
return;
}
@@ -232,7 +221,7 @@ export function find<T>(array: T[], fn: (t: T) => boolean): T | undefined {
export async function grep(filename: string, pattern: RegExp): Promise<boolean> {
return new Promise<boolean>((c, e) => {
const fileStream = fs.createReadStream(filename, { encoding: 'utf8' });
const fileStream = createReadStream(filename, { encoding: 'utf8' });
const stream = byline(fileStream);
stream.on('data', (line: string) => {
if (pattern.test(line)) {
+8 -8
View File
@@ -26,10 +26,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb"
integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ==
"@types/node@^10.14.8":
version "10.14.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
"@types/node@^12.11.7":
version "12.11.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.7.tgz#57682a9771a3f7b09c2497f28129a0462966524a"
integrity sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==
"@types/which@^1.0.28":
version "1.0.28"
@@ -176,10 +176,10 @@ isexe@^2.0.0:
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
jschardet@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.6.0.tgz#c7d1a71edcff2839db2f9ec30fc5d5ebd3c1a678"
integrity sha512-xYuhvQ7I9PDJIGBWev9xm0+SMSed3ZDBAmvVjbFR1ZRLAF+vlXcQu6cRI9uAlj81rzikElRVteehwV7DuX2ZmQ==
jschardet@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.1.1.tgz#af6f8fd0b3b0f5d46a8fd9614a4fce490575c184"
integrity sha512-pA5qG9Zwm8CBpGlK/lo2GE9jPxwqRgMV7Lzc/1iaPccw6v4Rhj8Zg2BTyrdmHmxlJojnbLupLeRnaPLsq03x6Q==
json3@3.3.2:
version "3.3.2"
@@ -6,11 +6,11 @@
"git": {
"name": "atom/language-java",
"repositoryUrl": "https://github.com/atom/language-java",
"commitHash": "759a0ac02dc091018a112b25a5a6d894918a0aa8"
"commitHash": "0facf7cbe02cda460db1160fd730f2e57bf15c36"
}
},
"license": "MIT",
"version": "0.31.3"
"version": "0.31.4"
}
],
"version": 1
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-java/commit/759a0ac02dc091018a112b25a5a6d894918a0aa8",
"version": "https://github.com/atom/language-java/commit/0facf7cbe02cda460db1160fd730f2e57bf15c36",
"name": "Java",
"scopeName": "source.java",
"patterns": [
@@ -209,7 +209,7 @@
"name": "keyword.control.new.java"
}
},
"end": "(?=;|\\)|,|:|}|\\+|\\-|\\*|\\/|%|!|&|\\||=)",
"end": "(?=;|\\)|\\]|\\.|,|\\?|:|}|\\+|\\-|\\*|\\/(?!\\/|\\*)|%|!|&|\\||\\^|=)",
"patterns": [
{
"include": "#comments"
@@ -269,7 +269,7 @@
]
},
"class": {
"begin": "(?=\\w?[\\w\\s]*\\b(?:class|(?<!@)interface|enum)\\s+\\w+)",
"begin": "(?=\\w?[\\w\\s]*\\b(?:class|(?<!@)interface|enum)\\s+[\\w$]+)",
"end": "}",
"endCaptures": {
"0": {
@@ -296,7 +296,7 @@
"name": "entity.name.type.class.java"
}
},
"match": "(class|(?<!@)interface|enum)\\s+(\\w+)",
"match": "(class|(?<!@)interface|enum)\\s+([\\w$]+)",
"name": "meta.class.identifier.java"
},
{
@@ -379,10 +379,10 @@
"include": "#annotations"
},
{
"include": "#member-variables"
"include": "#storage-modifiers"
},
{
"include": "#storage-modifiers"
"include": "#member-variables"
},
{
"include": "#code"
@@ -582,7 +582,7 @@
}
},
{
"match": "{(@link)\\s+(\\S+)?#([\\w$]+\\s*\\([^\\(\\)]*\\)).*}",
"match": "{(@link)\\s+(\\S+)?#([\\w$]+\\s*\\([^\\(\\)]*\\)).*?}",
"captures": {
"1": {
"name": "keyword.other.documentation.javadoc.java"
@@ -696,52 +696,64 @@
"include": "#comments"
},
{
"begin": "(\\w+)\\s*({)",
"begin": "\\b(\\w+)\\b",
"beginCaptures": {
"1": {
"name": "constant.other.enum.java"
},
"2": {
"name": "punctuation.bracket.curly.java"
}
},
"end": "\\}",
"end": "(,)|(?=;|})",
"endCaptures": {
"0": {
"name": "punctuation.bracket.curly.java"
"1": {
"name": "punctuation.separator.delimiter.java"
}
},
"patterns": [
{
"include": "#class-body"
}
]
},
{
"begin": "(\\w+)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "constant.other.enum.java"
"include": "#comments-javadoc"
},
"2": {
"name": "punctuation.bracket.round.java"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.bracket.round.java"
}
},
"patterns": [
{
"include": "#code"
"include": "#comments"
},
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.bracket.round.java"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.bracket.round.java"
}
},
"patterns": [
{
"include": "#code"
}
]
},
{
"begin": "{",
"beginCaptures": {
"0": {
"name": "punctuation.bracket.curly.java"
}
},
"end": "}",
"endCaptures": {
"0": {
"name": "punctuation.bracket.curly.java"
}
},
"patterns": [
{
"include": "#class-body"
}
]
}
]
},
{
"match": "\\b\\w+\\b",
"name": "constant.other.enum.java"
}
]
},
@@ -1472,7 +1484,7 @@
]
},
{
"begin": "\\b(catch)\\b\\s*(?=\\(\\s*[^\\s]+\\s*[^)]+\\))",
"begin": "\\b(catch)\\b",
"beginCaptures": {
"1": {
"name": "keyword.control.catch.java"
@@ -1486,6 +1498,9 @@
},
"name": "meta.catch.java",
"patterns": [
{
"include": "#comments"
},
{
"begin": "\\(",
"beginCaptures": {
@@ -1508,19 +1523,31 @@
"include": "#storage-modifiers"
},
{
"match": "\\|",
"name": "punctuation.catch.separator.java"
},
{
"match": "([a-zA-Z$_][\\.a-zA-Z0-9$_]*)\\s*(\\w+)?",
"captures": {
"1": {
"begin": "[a-zA-Z$_][\\.a-zA-Z0-9$_]*",
"beginCaptures": {
"0": {
"name": "storage.type.java"
},
"2": {
"name": "variable.parameter.java"
}
}
},
"end": "(\\|)|(?=\\))",
"endCaptures": {
"1": {
"name": "punctuation.catch.separator.java"
}
},
"patterns": [
{
"include": "#comments"
},
{
"match": "\\w+",
"captures": {
"0": {
"name": "variable.parameter.java"
}
}
}
]
}
]
},
@@ -32,6 +32,7 @@
".js",
".es6",
".mjs",
".cjs",
".pac"
],
"filenames": [
@@ -98,36 +99,6 @@
"language": "javascriptreact",
"path": "./snippets/javascript.json"
}
],
"jsonValidation": [
{
"fileMatch": ".bowerrc",
"url": "https://schemastore.azurewebsites.net/schemas/json/bowerrc.json"
},
{
"fileMatch": ".babelrc",
"url": "https://schemastore.azurewebsites.net/schemas/json/babelrc.json"
},
{
"fileMatch": ".babelrc.json",
"url": "https://schemastore.azurewebsites.net/schemas/json/babelrc.json"
},
{
"fileMatch": "jsconfig.json",
"url": "https://schemastore.azurewebsites.net/schemas/json/jsconfig.json"
},
{
"fileMatch": "jsconfig.json",
"url": "./schemas/jsconfig.schema.json"
},
{
"fileMatch": "jsconfig.*.json",
"url": "https://schemastore.azurewebsites.net/schemas/json/jsconfig.json"
},
{
"fileMatch": "jsconfig.*.json",
"url": "./schemas/jsconfig.schema.json"
}
]
}
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -12,8 +12,7 @@
{ "open": "[", "close": "]", "notIn": ["string"] },
{ "open": "(", "close": ")", "notIn": ["string"] },
{ "open": "'", "close": "'", "notIn": ["string"] },
{ "open": "/*", "close": "*/", "notIn": ["string"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "`", "close": "`", "notIn": ["string", "comment"] }
]
}
}
@@ -27,7 +27,8 @@
".swcrc",
".webmanifest",
".js.map",
".css.map"
".css.map",
".har"
],
"filenames": [
"composer.lock",
@@ -50,8 +51,7 @@
".babelrc",
".jsonc",
".eslintrc",
".eslintrc.json",
"tslint.json"
".eslintrc.json"
],
"configuration": "./language-configuration.json"
}
@@ -6,11 +6,11 @@
"git": {
"name": "vscode-logfile-highlighter",
"repositoryUrl": "https://github.com/emilast/vscode-logfile-highlighter",
"commitHash": "30a19d24b9a0070b0fab5eef45f89c92e7cd71ea"
"commitHash": "e90aa2554b439827f125fd60ff6d7773fc582fcc"
}
},
"license": "MIT",
"version": "2.4.1"
"version": "2.5.0"
}
],
"version": 1
@@ -4,18 +4,34 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/emilast/vscode-logfile-highlighter/commit/30a19d24b9a0070b0fab5eef45f89c92e7cd71ea",
"version": "https://github.com/emilast/vscode-logfile-highlighter/commit/e90aa2554b439827f125fd60ff6d7773fc582fcc",
"name": "Log file",
"scopeName": "text.log",
"patterns": [
{
"match": "\\b(DEBUG|Debug|Trace)\\b|(?i)\\b(debug)\\:",
"match": "\\b(Trace)\\b:",
"name": "comment log.verbose"
},
{
"match": "(?i)\\[(verbose|verb|vrb|vb|v)\\]",
"name": "comment log.verbose"
},
{
"match": "\\bV/",
"name": "comment log.verbose"
},
{
"match": "\\b(DEBUG|Debug)\\b|(?i)\\b(debug)\\:",
"name": "markup.changed log.debug"
},
{
"match": "(?i)\\[(debug|dbug|dbg|de|d)\\]",
"name": "markup.changed log.debug"
},
{
"match": "\\bD/",
"name": "markup.changed log.debug"
},
{
"match": "\\b(HINT|INFO|INFORMATION|Info|NOTICE)\\b|(?i)\\b(info|information)\\:",
"name": "markup.inserted log.info"
@@ -24,6 +40,10 @@
"match": "(?i)\\[(information|info|inf|in|i)\\]",
"name": "markup.inserted log.info"
},
{
"match": "\\bI/",
"name": "markup.inserted log.info"
},
{
"match": "\\b(WARNING|WARN|Warn)\\b|(?i)\\b(warning)\\:",
"name": "markup.deleted log.warning"
@@ -32,6 +52,10 @@
"match": "(?i)\\[(warning|warn|wrn|wn|w)\\]",
"name": "markup.deleted log.warning"
},
{
"match": "\\bW/",
"name": "markup.deleted log.warning"
},
{
"match": "\\b(ALERT|CRITICAL|EMERGENCY|ERROR|FAILURE|FAIL|Fatal|Error)\\b|(?i)\\b(error)\\:",
"name": "string.regexp, strong log.error"
@@ -40,6 +64,10 @@
"match": "(?i)\\[(error|eror|err|er|e|fatal|fatl|ftl|fa|f)\\]",
"name": "string.regexp, strong log.error"
},
{
"match": "\\bE/",
"name": "string.regexp, strong log.error"
},
{
"match": "\\b\\d{4}-\\d{2}-\\d{2}(T|\\b)",
"name": "comment log.date"
@@ -6,7 +6,7 @@
"git": {
"name": "fadeevab/make.tmbundle",
"repositoryUrl": "https://github.com/fadeevab/make.tmbundle",
"commitHash": "1b05209b483f81f42270bdda5514590e013e4896"
"commitHash": "fd57c0552dbe5e4d0c1e6765daea4b296d9bfc59"
}
},
"licenseDetail": [
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/fadeevab/make.tmbundle/commit/1b05209b483f81f42270bdda5514590e013e4896",
"version": "https://github.com/fadeevab/make.tmbundle/commit/fd57c0552dbe5e4d0c1e6765daea4b296d9bfc59",
"name": "Makefile",
"scopeName": "source.makefile",
"patterns": [
@@ -342,7 +342,7 @@
]
},
"variable-assignment": {
"begin": "(^[ ]*|\\G\\s*)([^\\s]+)\\s*((?<![?:+!])=|\\?=|:=|\\+=|!=)",
"begin": "(^[ ]*|\\G\\s*)([^\\s:#=]+)\\s*((?<![?:+!])=|\\?=|:=|\\+=|!=)",
"beginCaptures": {
"2": {
"name": "variable.other.makefile",
File diff suppressed because it is too large Load Diff
@@ -6,7 +6,7 @@
"git": {
"name": "jeff-hykin/cpp-textmate-grammar",
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
"commitHash": "9c4f4b3291538d9f5144f02d3b6af877b84f2cb2"
"commitHash": "bc7dedd28eebe52b374744d3fb34d77ff441569e"
}
},
"license": "MIT",
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/9c4f4b3291538d9f5144f02d3b6af877b84f2cb2",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/bc7dedd28eebe52b374744d3fb34d77ff441569e",
"name": "Objective-C++",
"scopeName": "source.objcpp",
"patterns": [
@@ -293,6 +293,186 @@
}
],
"repository": {
"bracketed_content": {
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.section.scope.begin.objcpp"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.section.scope.end.objcpp"
}
},
"name": "meta.bracketed.objcpp",
"patterns": [
{
"begin": "(?=predicateWithFormat:)(?<=NSPredicate )(predicateWithFormat:)",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objcpp"
},
"2": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"end": "(?=\\])",
"name": "meta.function-call.predicate.objcpp",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"match": "\\bargument(Array|s)(:)",
"name": "support.function.any-method.name-of-parameter.objcpp"
},
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"match": "\\b\\w+(:)",
"name": "invalid.illegal.unknown-method.objcpp"
},
{
"begin": "@\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.objcpp"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.objcpp"
}
},
"name": "string.quoted.double.objcpp",
"patterns": [
{
"match": "\\b(AND|OR|NOT|IN)\\b",
"name": "keyword.operator.logical.predicate.cocoa.objcpp"
},
{
"match": "\\b(ALL|ANY|SOME|NONE)\\b",
"name": "constant.language.predicate.cocoa.objcpp"
},
{
"match": "\\b(NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",
"name": "constant.language.predicate.cocoa.objcpp"
},
{
"match": "\\b(MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",
"name": "keyword.operator.comparison.predicate.cocoa.objcpp"
},
{
"match": "\\bC(ASEINSENSITIVE|I)\\b",
"name": "keyword.other.modifier.predicate.cocoa.objcpp"
},
{
"match": "\\b(ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",
"name": "keyword.other.predicate.cocoa.objcpp"
},
{
"match": "\\\\(\\\\|[abefnrtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-zA-Z0-9]+)",
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objcpp"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"begin": "(?=\\w)(?<=[\\w\\])\"] )(\\w+(?:(:)|(?=\\])))",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objcpp"
},
"2": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"end": "(?=\\])",
"name": "meta.function-call.objcpp",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"match": "\\b\\w+(:)",
"name": "support.function.any-method.name-of-parameter.objcpp"
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$self"
}
]
},
"c_functions": {
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.whitespace.support.function.leading.objcpp"
},
"2": {
"name": "support.function.C99.objcpp"
}
},
"match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b"
},
{
"captures": {
"1": {
"name": "punctuation.whitespace.function-call.leading.objcpp"
},
"2": {
"name": "support.function.any-method.objcpp"
},
"3": {
"name": "punctuation.definition.parameters.objcpp"
}
},
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n \t\t\t(\\b \n \t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n \t\t\t)\n \t\t\t \\s*(\\()",
"name": "meta.function-call.objcpp"
}
]
},
"c_lang": {
"patterns": [
{
@@ -2876,6 +3056,47 @@
}
}
},
"comment": {
"patterns": [
{
"begin": "/\\*",
"captures": {
"0": {
"name": "punctuation.definition.comment.objcpp"
}
},
"end": "\\*/",
"name": "comment.block.objcpp"
},
{
"begin": "(^[ \\t]+)?(?=//)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.objcpp"
}
},
"end": "(?!\\G)",
"patterns": [
{
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.objcpp"
}
},
"end": "\\n",
"name": "comment.line.double-slash.objcpp",
"patterns": [
{
"match": "(?>\\\\\\s*\\n)",
"name": "punctuation.separator.continuation.objcpp"
}
]
}
]
}
]
},
"cpp_lang": {
"patterns": [
{
@@ -6365,255 +6586,6 @@
}
}
},
"string_escaped_char": {
"patterns": [
{
"match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objcpp"
}
]
},
"string_placeholder": {
"patterns": [
{
"match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type",
"name": "constant.other.placeholder.objcpp"
},
{
"match": "(%)(?!\"\\s*(PRI|SCN))",
"captures": {
"1": {
"name": "invalid.illegal.placeholder.objcpp"
}
}
}
]
},
"bracketed_content": {
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.section.scope.begin.objcpp"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.section.scope.end.objcpp"
}
},
"name": "meta.bracketed.objcpp",
"patterns": [
{
"begin": "(?=predicateWithFormat:)(?<=NSPredicate )(predicateWithFormat:)",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objcpp"
},
"2": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"end": "(?=\\])",
"name": "meta.function-call.predicate.objcpp",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"match": "\\bargument(Array|s)(:)",
"name": "support.function.any-method.name-of-parameter.objcpp"
},
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"match": "\\b\\w+(:)",
"name": "invalid.illegal.unknown-method.objcpp"
},
{
"begin": "@\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.objcpp"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.objcpp"
}
},
"name": "string.quoted.double.objcpp",
"patterns": [
{
"match": "\\b(AND|OR|NOT|IN)\\b",
"name": "keyword.operator.logical.predicate.cocoa.objcpp"
},
{
"match": "\\b(ALL|ANY|SOME|NONE)\\b",
"name": "constant.language.predicate.cocoa.objcpp"
},
{
"match": "\\b(NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",
"name": "constant.language.predicate.cocoa.objcpp"
},
{
"match": "\\b(MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",
"name": "keyword.operator.comparison.predicate.cocoa.objcpp"
},
{
"match": "\\bC(ASEINSENSITIVE|I)\\b",
"name": "keyword.other.modifier.predicate.cocoa.objcpp"
},
{
"match": "\\b(ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",
"name": "keyword.other.predicate.cocoa.objcpp"
},
{
"match": "\\\\(\\\\|[abefnrtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-zA-Z0-9]+)",
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objcpp"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"begin": "(?=\\w)(?<=[\\w\\])\"] )(\\w+(?:(:)|(?=\\])))",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objcpp"
},
"2": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"end": "(?=\\])",
"name": "meta.function-call.objcpp",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objcpp"
}
},
"match": "\\b\\w+(:)",
"name": "support.function.any-method.name-of-parameter.objcpp"
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$self"
}
]
},
"c_functions": {
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.whitespace.support.function.leading.objcpp"
},
"2": {
"name": "support.function.C99.objcpp"
}
},
"match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b"
},
{
"captures": {
"1": {
"name": "punctuation.whitespace.function-call.leading.objcpp"
},
"2": {
"name": "support.function.any-method.objcpp"
},
"3": {
"name": "punctuation.definition.parameters.objcpp"
}
},
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n \t\t\t(\\b \n \t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n \t\t\t)\n \t\t\t \\s*(\\()",
"name": "meta.function-call.objcpp"
}
]
},
"comment": {
"patterns": [
{
"begin": "/\\*",
"captures": {
"0": {
"name": "punctuation.definition.comment.objcpp"
}
},
"end": "\\*/",
"name": "comment.block.objcpp"
},
{
"begin": "(^[ \\t]+)?(?=//)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.objcpp"
}
},
"end": "(?!\\G)",
"patterns": [
{
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.objcpp"
}
},
"end": "\\n",
"name": "comment.line.double-slash.objcpp",
"patterns": [
{
"match": "(?>\\\\\\s*\\n)",
"name": "punctuation.separator.continuation.objcpp"
}
]
}
]
}
]
},
"disabled": {
"begin": "^\\s*#\\s*if(n?def)?\\b.*$",
"comment": "eat nested preprocessor if(def)s",
@@ -7093,6 +7065,34 @@
"name": "variable.language.objcpp"
}
]
},
"string_escaped_char": {
"patterns": [
{
"match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objcpp"
}
]
},
"string_placeholder": {
"patterns": [
{
"match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type",
"name": "constant.other.placeholder.objcpp"
},
{
"match": "(%)(?!\"\\s*(PRI|SCN))",
"captures": {
"1": {
"name": "invalid.illegal.placeholder.objcpp"
}
}
}
]
}
}
}
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/9c4f4b3291538d9f5144f02d3b6af877b84f2cb2",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/bc7dedd28eebe52b374744d3fb34d77ff441569e",
"name": "Objective-C",
"scopeName": "source.objc",
"patterns": [
@@ -290,6 +290,186 @@
}
],
"repository": {
"bracketed_content": {
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.section.scope.begin.objc"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.section.scope.end.objc"
}
},
"name": "meta.bracketed.objc",
"patterns": [
{
"begin": "(?=predicateWithFormat:)(?<=NSPredicate )(predicateWithFormat:)",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objc"
},
"2": {
"name": "punctuation.separator.arguments.objc"
}
},
"end": "(?=\\])",
"name": "meta.function-call.predicate.objc",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objc"
}
},
"match": "\\bargument(Array|s)(:)",
"name": "support.function.any-method.name-of-parameter.objc"
},
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objc"
}
},
"match": "\\b\\w+(:)",
"name": "invalid.illegal.unknown-method.objc"
},
{
"begin": "@\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.objc"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.objc"
}
},
"name": "string.quoted.double.objc",
"patterns": [
{
"match": "\\b(AND|OR|NOT|IN)\\b",
"name": "keyword.operator.logical.predicate.cocoa.objc"
},
{
"match": "\\b(ALL|ANY|SOME|NONE)\\b",
"name": "constant.language.predicate.cocoa.objc"
},
{
"match": "\\b(NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",
"name": "constant.language.predicate.cocoa.objc"
},
{
"match": "\\b(MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",
"name": "keyword.operator.comparison.predicate.cocoa.objc"
},
{
"match": "\\bC(ASEINSENSITIVE|I)\\b",
"name": "keyword.other.modifier.predicate.cocoa.objc"
},
{
"match": "\\b(ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",
"name": "keyword.other.predicate.cocoa.objc"
},
{
"match": "\\\\(\\\\|[abefnrtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-zA-Z0-9]+)",
"name": "constant.character.escape.objc"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objc"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"begin": "(?=\\w)(?<=[\\w\\])\"] )(\\w+(?:(:)|(?=\\])))",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objc"
},
"2": {
"name": "punctuation.separator.arguments.objc"
}
},
"end": "(?=\\])",
"name": "meta.function-call.objc",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objc"
}
},
"match": "\\b\\w+(:)",
"name": "support.function.any-method.name-of-parameter.objc"
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$self"
}
]
},
"c_functions": {
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.whitespace.support.function.leading.objc"
},
"2": {
"name": "support.function.C99.objc"
}
},
"match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b"
},
{
"captures": {
"1": {
"name": "punctuation.whitespace.function-call.leading.objc"
},
"2": {
"name": "support.function.any-method.objc"
},
"3": {
"name": "punctuation.definition.parameters.objc"
}
},
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n \t\t\t(\\b \n \t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n \t\t\t)\n \t\t\t \\s*(\\()",
"name": "meta.function-call.objc"
}
]
},
"c_lang": {
"patterns": [
{
@@ -2873,214 +3053,6 @@
}
}
},
"string_escaped_char": {
"patterns": [
{
"match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
"name": "constant.character.escape.objc"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objc"
}
]
},
"string_placeholder": {
"patterns": [
{
"match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type",
"name": "constant.other.placeholder.objc"
},
{
"match": "(%)(?!\"\\s*(PRI|SCN))",
"captures": {
"1": {
"name": "invalid.illegal.placeholder.objc"
}
}
}
]
},
"bracketed_content": {
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.section.scope.begin.objc"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.section.scope.end.objc"
}
},
"name": "meta.bracketed.objc",
"patterns": [
{
"begin": "(?=predicateWithFormat:)(?<=NSPredicate )(predicateWithFormat:)",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objc"
},
"2": {
"name": "punctuation.separator.arguments.objc"
}
},
"end": "(?=\\])",
"name": "meta.function-call.predicate.objc",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objc"
}
},
"match": "\\bargument(Array|s)(:)",
"name": "support.function.any-method.name-of-parameter.objc"
},
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objc"
}
},
"match": "\\b\\w+(:)",
"name": "invalid.illegal.unknown-method.objc"
},
{
"begin": "@\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.objc"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.objc"
}
},
"name": "string.quoted.double.objc",
"patterns": [
{
"match": "\\b(AND|OR|NOT|IN)\\b",
"name": "keyword.operator.logical.predicate.cocoa.objc"
},
{
"match": "\\b(ALL|ANY|SOME|NONE)\\b",
"name": "constant.language.predicate.cocoa.objc"
},
{
"match": "\\b(NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",
"name": "constant.language.predicate.cocoa.objc"
},
{
"match": "\\b(MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",
"name": "keyword.operator.comparison.predicate.cocoa.objc"
},
{
"match": "\\bC(ASEINSENSITIVE|I)\\b",
"name": "keyword.other.modifier.predicate.cocoa.objc"
},
{
"match": "\\b(ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",
"name": "keyword.other.predicate.cocoa.objc"
},
{
"match": "\\\\(\\\\|[abefnrtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-zA-Z0-9]+)",
"name": "constant.character.escape.objc"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objc"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"begin": "(?=\\w)(?<=[\\w\\])\"] )(\\w+(?:(:)|(?=\\])))",
"beginCaptures": {
"1": {
"name": "support.function.any-method.objc"
},
"2": {
"name": "punctuation.separator.arguments.objc"
}
},
"end": "(?=\\])",
"name": "meta.function-call.objc",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.separator.arguments.objc"
}
},
"match": "\\b\\w+(:)",
"name": "support.function.any-method.name-of-parameter.objc"
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$base"
}
]
},
{
"include": "#special_variables"
},
{
"include": "#c_functions"
},
{
"include": "$self"
}
]
},
"c_functions": {
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.whitespace.support.function.leading.objc"
},
"2": {
"name": "support.function.C99.objc"
}
},
"match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b"
},
{
"captures": {
"1": {
"name": "punctuation.whitespace.function-call.leading.objc"
},
"2": {
"name": "support.function.any-method.objc"
},
"3": {
"name": "punctuation.definition.parameters.objc"
}
},
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n \t\t\t(\\b \n \t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n \t\t\t)\n \t\t\t \\s*(\\()",
"name": "meta.function-call.objc"
}
]
},
"comment": {
"patterns": [
{
@@ -3601,6 +3573,34 @@
"name": "variable.language.objc"
}
]
},
"string_escaped_char": {
"patterns": [
{
"match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
"name": "constant.character.escape.objc"
},
{
"match": "\\\\.",
"name": "invalid.illegal.unknown-escape.objc"
}
]
},
"string_placeholder": {
"patterns": [
{
"match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type",
"name": "constant.other.placeholder.objc"
},
{
"match": "(%)(?!\"\\s*(PRI|SCN))",
"captures": {
"1": {
"name": "invalid.illegal.placeholder.objc"
}
}
}
]
}
}
}
@@ -22,5 +22,11 @@
["\"", "\""],
["'", "'"],
["`", "`"]
]
],
"folding": {
"markers": {
"start": "^(?:(?:=pod\\s*$)|(?:\\s*#region\\b))",
"end": "^(?:(?:=cut\\s*$)|(?:\\s*#endregion\\b))"
}
}
}
@@ -6,11 +6,11 @@
"git": {
"name": "language-php",
"repositoryUrl": "https://github.com/atom/language-php",
"commitHash": "0efbd42e73b52347f95ac5f00c9f288ed4958832"
"commitHash": "b95dc79f30084c25547397ab41388af154e69895"
}
},
"license": "MIT",
"version": "0.44.1"
"version": "0.44.3"
}
],
"version": 1
@@ -25,8 +25,8 @@
["`", "`"]
],
"indentationRules": {
"increaseIndentPattern": "({(?!.+}).*|\\(|\\[|((else(\\s)?)?if|else|for(each)?|while|switch).*:)\\s*(/[/*].*)?$",
"decreaseIndentPattern": "^(.*\\*\\/)?\\s*((\\})|(\\)+[;,])|(\\][;,])|\\b(else:)|\\b((end(if|for(each)?|while|switch));))"
"increaseIndentPattern": "({(?!.*}).*|\\(|\\[|((else(\\s)?)?if|else|for(each)?|while|switch|case).*:)\\s*((/[/*].*|)?$|\\?>)",
"decreaseIndentPattern": "^(.*\\*\\/)?\\s*((\\})|(\\)+[;,])|(\\][;,])|\\b(else:)|\\b((end(if|for(each)?|while|switch)|break);))"
},
"folding": {
"markers": {
@@ -34,4 +34,4 @@
"end": "^\\s*(#|\/\/)endregion\\b"
}
}
}
}
@@ -109,7 +109,7 @@
}
]
},
"text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php))": {
"text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))": {
"patterns": [
{
"include": "#php-tag"
@@ -129,7 +129,7 @@
"name": "comment.line.shebang.php"
},
{
"include": "text.html.basic"
"include": "text.html.derivative"
}
],
"repository": {
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-php/commit/0efbd42e73b52347f95ac5f00c9f288ed4958832",
"version": "https://github.com/atom/language-php/commit/b95dc79f30084c25547397ab41388af154e69895",
"scopeName": "source.php",
"patterns": [
{
@@ -439,19 +439,25 @@
"name": "keyword.control.exception.php"
},
{
"begin": "(?i)\\b(function)\\s*(?=\\()",
"begin": "(?i)\\b(function)\\s*(?=&?\\s*\\()",
"beginCaptures": {
"1": {
"name": "storage.type.function.php"
}
},
"end": "(?={)",
"end": "(?=\\s*{)",
"name": "meta.function.closure.php",
"patterns": [
{
"begin": "\\(",
"include": "#comments"
},
{
"begin": "(&)?\\s*(\\()",
"beginCaptures": {
"0": {
"1": {
"name": "storage.modifier.reference.php"
},
"2": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
@@ -501,11 +507,25 @@
"name": "meta.function.closure.use.php"
}
]
},
{
"match": "(:)\\s*(\\?)?\\s*((?:\\\\?[a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*)+)",
"captures": {
"1": {
"name": "keyword.operator.return-value.php"
},
"2": {
"name": "keyword.operator.nullable-type.php"
},
"3": {
"name": "storage.type.php"
}
}
}
]
},
{
"begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n |([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*)\n)\n\\s*(\\()",
"begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n |(?:(&)?\\s*([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*))\n)\n\\s*(\\()",
"beginCaptures": {
"1": {
"patterns": [
@@ -522,14 +542,17 @@
"name": "support.function.magic.php"
},
"4": {
"name": "entity.name.function.php"
"name": "storage.modifier.reference.php"
},
"5": {
"name": "entity.name.function.php"
},
"6": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
"contentName": "meta.function.parameters.php",
"end": "(\\))(?:\\s*(:)\\s*(\\?)?\\s*([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*))?",
"end": "(\\))(?:\\s*(:)\\s*(\\?)?\\s*((?:\\\\?[a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*)+))?",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
@@ -2736,7 +2759,7 @@
"name": "support.function.enchant.php"
},
{
"match": "(?i)\\bsplit(i)?|sql_regcase|ereg(i)?(_replace)?\\b",
"match": "(?i)\\b(split(i)?|sql_regcase|ereg(i)?(_replace)?)\\b",
"name": "support.function.ereg.php"
},
{
@@ -2744,7 +2767,7 @@
"name": "support.function.errorfunc.php"
},
{
"match": "(?i)\\bshell_exec|system|passthru|proc_(nice|close|terminate|open|get_status)|escapeshell(arg|cmd)|exec\\b",
"match": "(?i)\\b(shell_exec|system|passthru|proc_(nice|close|terminate|open|get_status)|escapeshell(arg|cmd)|exec)\\b",
"name": "support.function.exec.php"
},
{
@@ -3315,7 +3338,7 @@
"name": "keyword.operator.ternary.php"
}
},
"end": ":",
"end": "(?<!:):(?!:)",
"endCaptures": {
"0": {
"name": "keyword.operator.ternary.php"
@@ -14,4 +14,4 @@
}
],
"version": 1
}
}
@@ -6,7 +6,7 @@
"git": {
"name": "MagicStack/MagicPython",
"repositoryUrl": "https://github.com/MagicStack/MagicPython",
"commitHash": "38422d302fe0b3e7716d26ce8cd7d0b9685f3a38"
"commitHash": "c0f8d514bbe6e9d3899f2b002bcd6971aef5e34b"
}
},
"license": "MIT",
@@ -14,7 +14,7 @@
"extensions": [ ".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi", ".pyi", ".ipy"],
"aliases": [ "Python", "py" ],
"filenames": [ "Snakefile" ],
"firstLine": "^#!\\s*/.*\\bpython[0-9.-]*\\b",
"firstLine": "^#!\\s*/?.*\\bpython[0-9.-]*\\b",
"configuration": "./language-configuration.json"
}],
"grammars": [{
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/MagicStack/MagicPython/commit/38422d302fe0b3e7716d26ce8cd7d0b9685f3a38",
"version": "https://github.com/MagicStack/MagicPython/commit/c0f8d514bbe6e9d3899f2b002bcd6971aef5e34b",
"name": "MagicPython",
"scopeName": "source.python",
"patterns": [
@@ -374,6 +374,7 @@
]
},
"member-access": {
"name": "meta.member.access.python",
"begin": "(\\.)\\s*(?!\\.)",
"end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n",
"beginCaptures": {
@@ -1067,6 +1068,7 @@
}
},
"member-access-class": {
"name": "meta.member.access.python",
"begin": "(\\.)\\s*(?!\\.)",
"end": "(?<=\\S)(?=\\W)|$",
"beginCaptures": {
@@ -6,7 +6,7 @@
"git": {
"name": "textmate/ruby.tmbundle",
"repositoryUrl": "https://github.com/textmate/ruby.tmbundle",
"commitHash": "05698e99314d8653e2e9d8f198d3c83e387ee1eb"
"commitHash": "8d525dd4a0b77ae041593ff26dc883a694c648c5"
}
},
"licenseDetail": [
@@ -13,7 +13,7 @@
"languages": [{
"id": "ruby",
"extensions": [ ".rb", ".rbx", ".rjs", ".gemspec", ".rake", ".ru", ".erb", ".podspec", ".rbi" ],
"filenames": [ "rakefile", "gemfile", "guardfile", "podfile", "capfile", "Vagrantfile" ],
"filenames": [ "rakefile", "gemfile", "guardfile", "podfile", "capfile" ],
"aliases": [ "Ruby", "rb" ],
"firstLine": "^#!\\s*/.*\\bruby\\b",
"configuration": "./language-configuration.json"
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/ruby.tmbundle/commit/05698e99314d8653e2e9d8f198d3c83e387ee1eb",
"version": "https://github.com/textmate/ruby.tmbundle/commit/8d525dd4a0b77ae041593ff26dc883a694c648c5",
"name": "Ruby",
"scopeName": "source.ruby",
"comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <<end\n\tprint me!\n\tend\"\n\tsymptoms:\n\tnot recognized as a heredoc\n\tsolution:\n\tthere is no way to distinguish perfectly between the << operator and the start\n\tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\trefinement is possible.\n\t• Heredocs with indented terminators (<<-) are always distinguishable, however.\n\t• Nested heredocs are not really supportable at present\n\n\ttext:\n\tprint <<-'THERE' \n\tThis is single quoted. \n\tThe above used #{Time.now} \n\tTHERE \n\tsymtoms:\n\tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\t\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n",
@@ -222,7 +222,7 @@
"name": "support.function.kernel.ruby"
},
{
"match": "\\b[_A-Z]\\w*\\b",
"match": "\\b[A-Z]\\w*\\b",
"name": "variable.other.constant.ruby"
},
{
@@ -21,6 +21,10 @@
["\"", "\""],
["'", "'"]
],
"indentationRules": {
"increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$",
"decreaseIndentPattern": "^\\s*(\\s*\\/[*].*[*]\\/\\s*)*[})]"
},
"folding": {
"markers": {
"start": "^\\s*//\\s*#?region\\b",
@@ -6,12 +6,12 @@
"git": {
"name": "atom/language-sass",
"repositoryUrl": "https://github.com/atom/language-sass",
"commitHash": "303bbf0c250fe380b9e57375598cfd916110758b"
"commitHash": "f52ab12f7f9346cc2568129d8c4419bd3d506b47"
}
},
"license": "MIT",
"description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.",
"version": "0.61.4"
"version": "0.62.1"
}
],
"version": 1
@@ -4,13 +4,19 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-sass/commit/804a935ea1d50504e14a7f602e2bb133fee8450c",
"version": "https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47",
"name": "SCSS",
"scopeName": "source.css.scss",
"patterns": [
{
"include": "#variable_setting"
},
{
"include": "#at_rule_forward"
},
{
"include": "#at_rule_use"
},
{
"include": "#at_rule_include"
},
@@ -239,6 +245,55 @@
}
]
},
"at_rule_forward": {
"begin": "\\s*((@)forward\\b)\\s*",
"captures": {
"1": {
"name": "keyword.control.at-rule.forward.scss"
},
"2": {
"name": "punctuation.definition.keyword.scss"
}
},
"end": "\\s*(?=;)",
"name": "meta.at-rule.forward.scss",
"patterns": [
{
"match": "\\b(as|hide|show)\\b",
"name": "keyword.control.operator"
},
{
"match": "\\b([\\w-]+)(\\*)",
"captures": {
"1": {
"name": "entity.other.attribute-name.module.scss"
},
"2": {
"name": "punctuation.definition.wildcard.scss"
}
}
},
{
"match": "\\b[\\w-]+\\b",
"name": "entity.name.function.scss"
},
{
"include": "#variable"
},
{
"include": "#string_single"
},
{
"include": "#string_double"
},
{
"include": "#comment_line"
},
{
"include": "#comment_block"
}
]
},
"at_rule_function": {
"patterns": [
{
@@ -336,12 +391,18 @@
"at_rule_include": {
"patterns": [
{
"begin": "(?<=@include)\\s+([\\w-]+)\\s*(\\()",
"begin": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "entity.name.function.scss"
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "entity.name.function.scss"
},
"4": {
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
}
},
@@ -359,12 +420,18 @@
]
},
{
"match": "(?<=@include)\\s+([\\w-]+)",
"match": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)",
"captures": {
"0": {
"name": "meta.at-rule.include.scss"
},
"1": {
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "entity.name.function.scss"
}
}
@@ -794,6 +861,64 @@
}
]
},
"at_rule_use": {
"begin": "\\s*((@)use\\b)\\s*",
"captures": {
"1": {
"name": "keyword.control.at-rule.use.scss"
},
"2": {
"name": "punctuation.definition.keyword.scss"
}
},
"end": "\\s*(?=;)",
"name": "meta.at-rule.use.scss",
"patterns": [
{
"match": "\\b(as|with)\\b",
"name": "keyword.control.operator"
},
{
"match": "\\b[\\w-]+\\b",
"name": "variable.scss"
},
{
"match": "\\*",
"name": "variable.language.expanded-namespace.scss"
},
{
"include": "#string_single"
},
{
"include": "#string_double"
},
{
"include": "#comment_line"
},
{
"include": "#comment_block"
},
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.bracket.round.scss"
}
},
"patterns": [
{
"include": "#function_attributes"
}
]
}
]
},
"at_rule_warn": {
"begin": "\\s*((@)(warn|debug|error)\\b)\\s*",
"captures": {
@@ -890,12 +1015,18 @@
"name": "keyword.other.default.scss"
},
"constant_functions": {
"begin": "([\\w-]+)(\\()",
"begin": "(?:([\\w-]+)(\\.))?([\\w-]+)(\\()",
"beginCaptures": {
"1": {
"name": "support.function.misc.scss"
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "support.function.misc.scss"
},
"4": {
"name": "punctuation.section.function.scss"
}
},
@@ -1050,10 +1181,10 @@
"name": "variable.interpolation.scss",
"patterns": [
{
"include": "#property_values"
"include": "#variable"
},
{
"include": "#variable"
"include": "#property_values"
}
]
},
@@ -1118,10 +1249,10 @@
"include": "#map"
},
{
"include": "#property_values"
"include": "#variable"
},
{
"include": "#variable"
"include": "#property_values"
}
]
},
@@ -1326,7 +1457,7 @@
]
},
"selector_attribute": {
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
"name": "meta.attribute-selector.scss",
"captures": {
"1": {
@@ -1421,7 +1552,7 @@
}
},
"selector_class": {
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
"name": "entity.other.attribute-name.class.css",
"captures": {
"1": {
@@ -1449,7 +1580,7 @@
"name": "entity.name.tag.custom.scss"
},
"selector_id": {
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
"name": "entity.other.attribute-name.id.css",
"captures": {
"1": {
@@ -1473,7 +1604,7 @@
}
},
"selector_placeholder": {
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.\\$ # Possible start of interpolation module scope variable\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
"name": "entity.other.attribute-name.placeholder.css",
"captures": {
"1": {
@@ -1723,8 +1854,26 @@
]
},
"variables": {
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
"name": "variable.scss"
"patterns": [
{
"match": "\\b([\\w-]+)(\\.)(\\$[\\w-]+)\\b",
"captures": {
"1": {
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "variable.scss"
}
}
},
{
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
"name": "variable.scss"
}
]
}
}
}
@@ -23,6 +23,12 @@
"language": "shellscript",
"scopeName": "source.shell",
"path": "./syntaxes/shell-unix-bash.tmLanguage.json"
}]
}],
"configurationDefaults": {
"[shellscript]": {
"files.eol": "\n"
}
}
}
}
@@ -12,8 +12,9 @@
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "N'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] }
],
"surroundingPairs": [
["{", "}"],
@@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/swift.tmbundle/commit/bdc8ae07562060a566b33da3f62601bb5aababd1",
"version": "https://github.com/textmate/swift.tmbundle/commit/3f582e9acc1613745b06a56be55ba2a032c458eb",
"name": "Swift",
"scopeName": "source.swift",
"comment": "See swift.tmbundle/grammar-test.swift for test cases.",
@@ -2759,10 +2759,13 @@
}
},
"comment": "SE-0168: Multi-Line String Literals",
"end": "\"\"\"",
"end": "\"\"\"(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.block.swift",
@@ -2785,6 +2788,66 @@
}
]
},
{
"begin": "#\"\"\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.swift"
}
},
"end": "\"\"\"#(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.block.raw.swift",
"patterns": [
{
"match": "\\G.+(?=\"\"\")|\\G.+",
"name": "invalid.illegal.content-after-opening-delimiter.swift"
},
{
"match": "\\\\#\\s*\\n",
"name": "constant.character.escape.newline.swift"
},
{
"include": "#raw-string-guts"
},
{
"comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string",
"match": "\\S((?!\\\\#\\().)*(?=\"\"\")",
"name": "invalid.illegal.content-before-closing-delimiter.swift"
}
]
},
{
"begin": "(##+)\"\"\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.swift"
}
},
"end": "\"\"\"\\1(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.block.raw.swift",
"patterns": [
{
"match": "\\G.+(?=\"\"\")|\\G.+",
"name": "invalid.illegal.content-after-opening-delimiter.swift"
}
]
},
{
"begin": "\"",
"beginCaptures": {
@@ -2792,10 +2855,13 @@
"name": "punctuation.definition.string.begin.swift"
}
},
"end": "\"",
"end": "\"(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.single-line.swift",
@@ -2808,9 +2874,108 @@
"include": "#string-guts"
}
]
},
{
"begin": "(##+)\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.raw.swift"
}
},
"comment": "SE-0168: raw string literals (more than one #, grammar limitations prevent us from supporting escapes)",
"end": "\"\\1(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.raw.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.single-line.raw.swift",
"patterns": [
{
"match": "\\r|\\n",
"name": "invalid.illegal.returns-not-allowed.swift"
}
]
},
{
"begin": "#\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.raw.swift"
}
},
"comment": "SE-0168: raw string literals (one #, escapes supported)",
"end": "\"#(#*)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.raw.swift"
},
"1": {
"name": "invalid.illegal.extra-closing-delimiter.swift"
}
},
"name": "string.quoted.double.single-line.raw.swift",
"patterns": [
{
"match": "\\r|\\n",
"name": "invalid.illegal.returns-not-allowed.swift"
},
{
"include": "#raw-string-guts"
}
]
}
],
"repository": {
"raw-string-guts": {
"comment": "the same as #string-guts but with # in escapes",
"patterns": [
{
"match": "\\\\#[0\\\\tnr\"']",
"name": "constant.character.escape.swift"
},
{
"match": "\\\\#u\\{[0-9a-fA-F]{1,8}\\}",
"name": "constant.character.escape.unicode.swift"
},
{
"begin": "\\\\#\\(",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.swift"
}
},
"contentName": "source.swift",
"end": "(\\))",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.end.swift"
},
"1": {
"name": "source.swift"
}
},
"name": "meta.embedded.line.swift",
"patterns": [
{
"include": "$self"
},
{
"begin": "\\(",
"comment": "Nested parens",
"end": "\\)"
}
]
},
{
"match": "\\\\#.",
"name": "invalid.illegal.escape-not-recognized"
}
]
},
"string-guts": {
"patterns": [
{
@@ -6,7 +6,7 @@
"git": {
"name": "TypeScript-TmLanguage",
"repositoryUrl": "https://github.com/Microsoft/TypeScript-TmLanguage",
"commitHash": "84238ef0fa1c7e4e2c9fe77875d832dab9f57e5d"
"commitHash": "c9c955af17ed0c86ebce32e0f26c72f0a2925937"
}
},
"license": "MIT",
@@ -77,16 +77,6 @@
"meta.import string.quoted": "other",
"variable.other.jsdoc": "other"
}
},
{
"scopeName": "documentation.injection",
"path": "./syntaxes/jsdoc.injection.tmLanguage.json",
"injectTo": [
"source.ts",
"source.tsx",
"source.js",
"source.js.jsx"
]
}
],
"snippets": [
@@ -98,36 +88,6 @@
"language": "typescriptreact",
"path": "./snippets/typescript.json"
}
],
"jsonValidation": [
{
"fileMatch": "tsconfig.json",
"url": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"
},
{
"fileMatch": "tsconfig.json",
"url": "./schemas/tsconfig.schema.json"
},
{
"fileMatch": "tsconfig.*.json",
"url": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"
},
{
"fileMatch": "tsconfig-*.json",
"url": "./schemas/tsconfig.schema.json"
},
{
"fileMatch": "tsconfig-*.json",
"url": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"
},
{
"fileMatch": "tsconfig.*.json",
"url": "./schemas/tsconfig.schema.json"
},
{
"fileMatch": "typings.json",
"url": "https://schemastore.azurewebsites.net/schemas/json/typings.json"
}
]
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -40,8 +40,8 @@
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.autoIndent": false
"editor.autoIndent": "advanced"
}
}
}
}
}