diff --git a/language-configuration/language-configuration.c.json b/language-configuration/language-configuration.c.json deleted file mode 100644 index efbafff..0000000 --- a/language-configuration/language-configuration.c.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "comments": { - "lineComment": "//", - "blockComment": ["/*", "*/"] - }, - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - "autoClosingPairs": [ - { "open": "[", "close": "]" }, - { "open": "{", "close": "}" }, - { "open": "(", "close": ")" }, - { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "\"", "close": "\"", "notIn": ["string"] }, - { "open": "/**", "close": " */", "notIn": ["string"] }, - { "open": "/*!", "close": " */", "notIn": ["string"] } - ], - "surroundingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"] - ] -} \ No newline at end of file diff --git a/language-configuration/language-configuration.cpp.json b/language-configuration/language-configuration.cpp.json index efbafff..b812f69 100644 --- a/language-configuration/language-configuration.cpp.json +++ b/language-configuration/language-configuration.cpp.json @@ -22,6 +22,14 @@ ["[", "]"], ["(", ")"], ["\"", "\""], - ["'", "'"] - ] + ["'", "'"], + ["<", ">"] + ], + "wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)", + "folding": { + "markers": { + "start": "^\\s*#pragma\\s+region\\b", + "end": "^\\s*#pragma\\s+endregion\\b" + } + } } \ No newline at end of file diff --git a/language-configuration/language-configuration.css.json b/language-configuration/language-configuration.css.json index 0cb1540..9159bd9 100644 --- a/language-configuration/language-configuration.css.json +++ b/language-configuration/language-configuration.css.json @@ -13,7 +13,7 @@ { "open": "(", "close": ")", "notIn": ["string", "comment"] }, { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "/**", "close": " */", "notIn": ["string"] } + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], @@ -21,5 +21,11 @@ ["(", ")"], ["\"", "\""], ["'", "'"] - ] -} \ No newline at end of file + ], + "folding": { + "markers": { + "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/", + "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/" + } + } +} diff --git a/language-configuration/language-configuration.go.json b/language-configuration/language-configuration.go.json index 9c7917a..47e8d96 100644 --- a/language-configuration/language-configuration.go.json +++ b/language-configuration/language-configuration.go.json @@ -14,8 +14,8 @@ ["(", ")"], { "open": "`", "close": "`", "notIn": ["string"]}, { "open": "\"", "close": "\"", "notIn": ["string"]}, - { "open": "'", "close": "'", "notIn": ["string", "comment"]}, - ["/**", " */"] + { "open": "'", "close": "'", "notIn": ["string", "comment"]}, + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], @@ -24,5 +24,15 @@ ["\"", "\""], ["'", "'"], ["`", "`"] - ] + ], + "indentationRules": { + "increaseIndentPattern": "^.*(\\bcase\\b.*:|\\bdefault\\b:|(\\b(func|if|else|switch|select|for|struct)\\b.*)?{[^}\"'`]*|\\([^)\"'`]*)$", + "decreaseIndentPattern": "^\\s*(\\bcase\\b.*:|\\bdefault\\b:|}[)}]*[),]?|\\)[,]?)$" + }, + "folding": { + "markers": { + "start": "^\\s*//\\s*#?region\\b", + "end": "^\\s*//\\s*#?endregion\\b" + } + } } \ No newline at end of file diff --git a/language-configuration/language-configuration.groovy.json b/language-configuration/language-configuration.groovy.json index 057ca80..183b70b 100644 --- a/language-configuration/language-configuration.groovy.json +++ b/language-configuration/language-configuration.groovy.json @@ -12,9 +12,9 @@ ["{", "}"], ["[", "]"], ["(", ")"], - ["\"", "\""], - ["'", "'"], - ["/**", " */"] + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "'", "close": "'", "notIn": ["string"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], diff --git a/language-configuration/language-configuration.less.json b/language-configuration/language-configuration.less.json index bd8af2f..abc4cbd 100644 --- a/language-configuration/language-configuration.less.json +++ b/language-configuration/language-configuration.less.json @@ -13,8 +13,8 @@ { "open": "[", "close": "]", "notIn": ["string", "comment"] }, { "open": "(", "close": ")", "notIn": ["string", "comment"] }, { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "/**", "close": " */", "notIn":["string", "comment"] } + { "open": "'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], @@ -26,5 +26,11 @@ "indentationRules": { "increaseIndentPattern": "(^.*\\{[^}]*$)", "decreaseIndentPattern": "^\\s*\\}" + }, + "folding": { + "markers": { + "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/", + "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/" + } } } \ No newline at end of file diff --git a/language-configuration/language-configuration.objective-c.json b/language-configuration/language-configuration.objective-c.json index 4eb3e62..183b70b 100644 --- a/language-configuration/language-configuration.objective-c.json +++ b/language-configuration/language-configuration.objective-c.json @@ -12,9 +12,9 @@ ["{", "}"], ["[", "]"], ["(", ")"], - ["\"", "\""], - ["'", "'"], - ["/**", " */"] + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "'", "close": "'", "notIn": ["string"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], diff --git a/language-configuration/language-configuration.php.json b/language-configuration/language-configuration.php.json deleted file mode 100644 index 80aaaad..0000000 --- a/language-configuration/language-configuration.php.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "comments": { - "lineComment": "//", // "#" - "blockComment": [ "/*", "*/" ] - }, - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - "autoClosingPairs": [ - { "open": "{", "close": "}", "notIn": ["string"] }, - { "open": "[", "close": "]", "notIn": ["string"] }, - { "open": "(", "close": ")", "notIn": ["string"] }, - { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "\"", "close": "\"", "notIn": ["string"] }, - { "open": "/**", "close": " */", "notIn": ["string"] } - ], - "indentationRules": { - "increaseIndentPattern": "({(?!.+}).*|\\(|\\[|((else(\\s)?)?if|else|for(each)?|while|switch).*:)\\s*(/[/*].*)?$", - "decreaseIndentPattern": "^(.*\\*\\/)?\\s*((\\})|(\\)+[;,])|(\\][;,])|\\b(else:)|\\b((end(if|for(each)?|while|switch));))" - } -} \ No newline at end of file diff --git a/language-configuration/language-configuration.rust.json b/language-configuration/language-configuration.rust.json index 4f70ca1..6922e90 100644 --- a/language-configuration/language-configuration.rust.json +++ b/language-configuration/language-configuration.rust.json @@ -12,14 +12,24 @@ ["{", "}"], ["[", "]"], ["(", ")"], - ["\"", "\""], - ["/**", " */"] + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], ["[", "]"], ["(", ")"], ["\"", "\""], - ["'", "'"] - ] -} \ No newline at end of file + ["<", ">"] + ], + "indentationRules": { + "increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$", + "decreaseIndentPattern": "^\\s*(\\s*\\/[*].*[*]\\/\\s*)*[})]" + }, + "folding": { + "markers": { + "start": "^\\s*//\\s*#?region\\b", + "end": "^\\s*//\\s*#?endregion\\b" + } + } +} diff --git a/language-configuration/language-configuration.scss.json b/language-configuration/language-configuration.scss.json index 85c8aa5..065b927 100644 --- a/language-configuration/language-configuration.scss.json +++ b/language-configuration/language-configuration.scss.json @@ -14,7 +14,7 @@ { "open": "(", "close": ")", "notIn": ["string", "comment"] }, { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "/**", "close": " */", "notIn": ["string"] } + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], @@ -22,5 +22,11 @@ ["(", ")"], ["\"", "\""], ["'", "'"] - ] + ], + "folding": { + "markers": { + "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/", + "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/" + } + } } \ No newline at end of file diff --git a/language-configuration/language-configuration.swift.json b/language-configuration/language-configuration.swift.json index bacc7bf..a017c64 100644 --- a/language-configuration/language-configuration.swift.json +++ b/language-configuration/language-configuration.swift.json @@ -12,10 +12,10 @@ ["{", "}"], ["[", "]"], ["(", ")"], - ["\"", "\""], - ["'", "'"], - ["`", "`"], - ["/**", " */"] + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "'", "close": "'", "notIn": ["string"] }, + { "open": "`", "close": "`", "notIn": ["string"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } ], "surroundingPairs": [ ["{", "}"], @@ -25,4 +25,4 @@ ["'", "'"], ["`", "`"] ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 3f7eb37..e782988 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "languages": [ { "id": "c", - "configuration": "./language-configuration/language-configuration.c.json" + "configuration": "./language-configuration/language-configuration.cpp.json" }, { "id": "cpp", @@ -84,10 +84,6 @@ "id": "groovy", "configuration": "./language-configuration/language-configuration.groovy.json" }, - { - "id": "php", - "configuration": "./language-configuration/language-configuration.php.json" - }, { "id": "objective-c", "configuration": "./language-configuration/language-configuration.objective-c.json"