mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
commit
2b67a156ff
25
extensions/ini/ini.language-configuration.json
Normal file
25
extensions/ini/ini.language-configuration.json
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"comments": {
|
||||||
|
"lineComment": ";",
|
||||||
|
"blockComment": [ ";", " " ]
|
||||||
|
},
|
||||||
|
"brackets": [
|
||||||
|
["{", "}"],
|
||||||
|
["[", "]"],
|
||||||
|
["(", ")"]
|
||||||
|
],
|
||||||
|
"autoClosingPairs": [
|
||||||
|
["{", "}"],
|
||||||
|
["[", "]"],
|
||||||
|
["(", ")"],
|
||||||
|
["\"", "\""],
|
||||||
|
["'", "'"]
|
||||||
|
],
|
||||||
|
"surroundingPairs": [
|
||||||
|
["{", "}"],
|
||||||
|
["[", "]"],
|
||||||
|
["(", ")"],
|
||||||
|
["\"", "\""],
|
||||||
|
["'", "'"]
|
||||||
|
]
|
||||||
|
}
|
|
@ -6,15 +6,26 @@
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"languages": [{
|
"languages": [{
|
||||||
"id": "ini",
|
"id": "ini",
|
||||||
"extensions": [ ".ini", ".properties", ".gitconfig" ],
|
"extensions": [ ".ini"],
|
||||||
"filenames": ["config", ".gitattributes", ".gitconfig", "gitconfig", ".editorconfig"],
|
|
||||||
"aliases": [ "Ini", "ini" ],
|
"aliases": [ "Ini", "ini" ],
|
||||||
"configuration": "./language-configuration.json"
|
"configuration": "./ini.language-configuration.json"
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
"id": "properties",
|
||||||
|
"extensions": [ ".properties", ".gitconfig" ],
|
||||||
|
"filenames": ["config", ".gitattributes", ".gitconfig", "gitconfig", ".editorconfig"],
|
||||||
|
"aliases": [ "properties", "properties" ],
|
||||||
|
"configuration": "./properties.language-configuration.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
"grammars": [{
|
"grammars": [{
|
||||||
"language": "ini",
|
"language": "ini",
|
||||||
"scopeName": "source.ini",
|
"scopeName": "source.ini",
|
||||||
"path": "./syntaxes/Ini.plist"
|
"path": "./syntaxes/Ini.tmLanuage"
|
||||||
|
},{
|
||||||
|
"language": "properties",
|
||||||
|
"scopeName": "source.properties",
|
||||||
|
"path": "./syntaxes/properties.plist"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
127
extensions/ini/syntaxes/Ini.tmLanguage
Normal file
127
extensions/ini/syntaxes/Ini.tmLanguage
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>fileTypes</key>
|
||||||
|
<array>
|
||||||
|
<string>ini</string>
|
||||||
|
<string>INI</string>
|
||||||
|
<string>inf</string>
|
||||||
|
<string>INF</string>
|
||||||
|
<string>reg</string>
|
||||||
|
<string>REG</string>
|
||||||
|
<string>lng</string>
|
||||||
|
<string>cfg</string>
|
||||||
|
<string>CFG</string>
|
||||||
|
<string>url</string>
|
||||||
|
<string>URL</string>
|
||||||
|
<string>.editorconfig</string>
|
||||||
|
</array>
|
||||||
|
<key>name</key>
|
||||||
|
<string>INI</string>
|
||||||
|
<key>patterns</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>captures</key>
|
||||||
|
<dict>
|
||||||
|
<key>1</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.comment.ini</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>match</key>
|
||||||
|
<string>^\s*(;|#).*$\n?</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>comment.line.semicolon.ini</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>captures</key>
|
||||||
|
<dict>
|
||||||
|
<key>1</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.section.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>2</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>entity.section.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>3</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.section.ini</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>match</key>
|
||||||
|
<string>^\s*(\[)(.*?)(\])</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>meta.tag.section.ini</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>captures</key>
|
||||||
|
<dict>
|
||||||
|
<key>1</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>meta.property.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>2</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.quote.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>3</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>keyword.name.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>4</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.quote.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>5</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.equals.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>6</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>meta.value.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>7</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.quote.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>8</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>string.name.value.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>9</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>punctuation.definition.quote.ini</string>
|
||||||
|
</dict>
|
||||||
|
<key>10</key>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>comment.declarationline.semicolon.ini</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>match</key>
|
||||||
|
<string>^(\s*(["']?)(.+?)(\2)\s*(=))?\s*((["']?)(.*?)(\7))\s*(;.*)?$\n?</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>meta.declaration.ini</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>scopeName</key>
|
||||||
|
<string>source.ini</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>957acd74-6d7c-4732-a25b-5f66a1e637cd</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -174,7 +174,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>scopeName</key>
|
<key>scopeName</key>
|
||||||
<string>source.ini</string>
|
<string>source.properties</string>
|
||||||
<key>uuid</key>
|
<key>uuid</key>
|
||||||
<string>77DC23B6-8A90-11D9-BAA4-000A9584EC8C</string>
|
<string>77DC23B6-8A90-11D9-BAA4-000A9584EC8C</string>
|
||||||
</dict>
|
</dict>
|
Loading…
Reference in a new issue