File tree Expand file tree Collapse file tree 2 files changed +73
-0
lines changed Expand file tree Collapse file tree 2 files changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ export class XmlSnippetProvider implements vscode.CompletionItemProvider {
4646 pattern : '**/webapi.xml' ,
4747 snippets : require ( './xml/snippet/webapi.json' ) ,
4848 } ,
49+ {
50+ pattern : '**/system.xml' ,
51+ snippets : require ( './xml/snippet/system.json' ) ,
52+ } ,
4953 ] ;
5054
5155 public provideCompletionItems (
Original file line number Diff line number Diff line change 1+ {
2+ "config" : {
3+ "parent" : null ,
4+ "prefix" : " config" ,
5+ "body" : [
6+ " <?xml version=\" 1.0\" ?>" ,
7+ " <config xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\" " ,
8+ " xsi:noNamespaceSchemaLocation=\" urn:magento:module:Magento_Config:etc/system_file.xsd\" >" ,
9+ " ${1}" ,
10+ " </config>"
11+ ],
12+ "description" : " Insert a config element"
13+ },
14+ "system" : {
15+ "parent" : " config" ,
16+ "prefix" : " system" ,
17+ "body" : [
18+ " <system>" ,
19+ " ${1}" ,
20+ " </system>"
21+ ],
22+ "description" : " Insert a system element"
23+ },
24+ "tab" : {
25+ "parent" : " system" ,
26+ "prefix" : " tab" ,
27+ "body" : [
28+ " <tab id=\" ${1}\" translate=\" label\" sortOrder=\" ${2}\" >" ,
29+ " <label>${3}</label>" ,
30+ " </tab>"
31+ ],
32+ "description" : " Insert a tab element"
33+ },
34+ "section" : {
35+ "parent" : " tab" ,
36+ "prefix" : " section" ,
37+ "body" : [
38+ " <section id=\" ${1}\" translate=\" label\" sortOrder=\" ${2}\" >" ,
39+ " <label>${3}</label>" ,
40+ " <tab>${4}</tab>" ,
41+ " <resource>${5}</resource>" ,
42+ " ${6}" ,
43+ " </section>"
44+ ],
45+ "description" : " Insert a section element"
46+ },
47+ "group" : {
48+ "parent" : " system" ,
49+ "prefix" : " group" ,
50+ "body" : [
51+ " <group id=\" ${1}\" translate=\" label\" sortOrder=\" ${2:10}\" showInDefault=\" ${3:1}\" showInWebsite=\" ${4:1}\" showInStore=\" ${5:1}\" >" ,
52+ " <label>${6}</label>" ,
53+ " ${7}" ,
54+ " </group>"
55+ ],
56+ "description" : " Insert a group element"
57+ },
58+ "field" : {
59+ "parent" : " group" ,
60+ "prefix" : " field" ,
61+ "body" : [
62+ " <field id=\" ${1}\" translate=\" label\" type=\" ${2:text}\" sortOrder=\" ${3:10}\" showInDefault=\" ${4:1}\" showInWebsite=\" ${5:1}\" showInStore=\" ${6:1}\" canRestore=\" ${7:1}\" >" ,
63+ " <label>${8}</label>" ,
64+ " ${9}" ,
65+ " </field>"
66+ ],
67+ "description" : " Insert a field element"
68+ }
69+ }
You can’t perform that action at this time.
0 commit comments