@codingame/monaco-vscode-swift-default-extension 1.81.8-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { registerExtension } from 'vscode/extensions';
2
+
3
+ var manifest = {name:"swift",displayName:"Swift Language Basics",description:"Provides snippets, syntax highlighting and bracket matching in Swift files.",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"*"},scripts:{"update-grammar":"node ../node_modules/vscode-grammar-updater/bin textmate/swift.tmbundle Syntaxes/Swift.tmLanguage ./syntaxes/swift.tmLanguage.json"},contributes:{languages:[{id:"swift",aliases:["Swift","swift"],extensions:[".swift"],configuration:"./language-configuration.json"}],grammars:[{language:"swift",scopeName:"source.swift",path:"./syntaxes/swift.tmLanguage.json"}],snippets:[{language:"swift",path:"./snippets/swift.code-snippets"}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"},main:undefined};
4
+
5
+ const { registerFileUrl } = registerExtension(manifest);
6
+ registerFileUrl('./syntaxes/swift.tmLanguage.json', new URL('./swift.tmLanguage.json', import.meta.url).toString(), 'application/json');
7
+ registerFileUrl('./language-configuration.json', new URL('./language-configuration.json', import.meta.url).toString(), 'application/json');
8
+ registerFileUrl('./snippets/swift.code-snippets', new URL('./swift.code-snippets', import.meta.url).toString(), 'application/json');
@@ -0,0 +1,27 @@
1
+ {
2
+ "comments": {
3
+ "lineComment": "//",
4
+ "blockComment": [ "/*", "*/" ]
5
+ },
6
+ "brackets": [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"]
10
+ ],
11
+ "autoClosingPairs": [
12
+ ["{", "}"],
13
+ ["[", "]"],
14
+ ["(", ")"],
15
+ { "open": "\"", "close": "\"", "notIn": ["string"] },
16
+ { "open": "'", "close": "'", "notIn": ["string"] },
17
+ { "open": "`", "close": "`", "notIn": ["string"] }
18
+ ],
19
+ "surroundingPairs": [
20
+ ["{", "}"],
21
+ ["[", "]"],
22
+ ["(", ")"],
23
+ ["\"", "\""],
24
+ ["'", "'"],
25
+ ["`", "`"]
26
+ ]
27
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-swift-default-extension",
3
+ "version": "1.81.8-next.1",
4
+ "keywords": [],
5
+ "author": {
6
+ "name": "CodinGame",
7
+ "url": "http://www.codingame.com"
8
+ },
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/CodinGame/monaco-vscode-api"
13
+ },
14
+ "type": "module",
15
+ "private": false,
16
+ "description": "Default VSCode extension designed to be used with @codingame/monaco-vscode-api",
17
+ "main": "index.js",
18
+ "module": "index.js",
19
+ "dependencies": {
20
+ "vscode": "npm:@codingame/monaco-vscode-api@1.81.8-next.1"
21
+ }
22
+ }
@@ -0,0 +1,175 @@
1
+ {
2
+ "print": {
3
+ "prefix": "print",
4
+ "body": "print(\"$1\")\n$0",
5
+ "description": "print(\"...\")"
6
+ },
7
+ "print value": {
8
+ "prefix": "printv",
9
+ "body": "print(\"\\($1)\")\n$0",
10
+ "description": "print(\"\\(...)\")"
11
+ },
12
+ "while": {
13
+ "prefix": "while",
14
+ "body": [
15
+ "while ${1:condition} {",
16
+ "\t$0",
17
+ "}"
18
+ ],
19
+ "description": "while statement"
20
+ },
21
+ "repeat-while": {
22
+ "prefix": "repeat",
23
+ "body": [
24
+ "repeat {",
25
+ "\t$0",
26
+ "} while ${1:condition}"
27
+ ],
28
+ "description": "repeat-while statement"
29
+ },
30
+ "for": {
31
+ "prefix": "for",
32
+ "body": [
33
+ "for ${1:item} in ${2:collection} {",
34
+ "\t$0",
35
+ "}"
36
+ ],
37
+ "description": "for-in statement"
38
+ },
39
+ "if": {
40
+ "prefix": "if",
41
+ "body": [
42
+ "if ${1:condition} {",
43
+ "\t$0",
44
+ "}"
45
+ ],
46
+ "description": "if statement"
47
+ },
48
+ "else if": {
49
+ "prefix": "elif",
50
+ "body": [
51
+ "else if ${1:condition} {",
52
+ "\t$0",
53
+ "}"
54
+ ],
55
+ "description": "else clause with a nested if statement"
56
+ },
57
+ "else": {
58
+ "prefix": "else",
59
+ "body": [
60
+ "else {",
61
+ "\t$0",
62
+ "}"
63
+ ],
64
+ "description": "else clause"
65
+ },
66
+ "if let": {
67
+ "prefix": "iflet",
68
+ "body": [
69
+ "if let ${1:value} = ${2:optional} {",
70
+ "\t$0",
71
+ "}"
72
+ ],
73
+ "description": "if statement with optional binding"
74
+ },
75
+ "guard": {
76
+ "prefix": "guard",
77
+ "body": [
78
+ "guard ${1:condition} else {",
79
+ "\t$0",
80
+ "}"
81
+ ],
82
+ "description": "guard statement"
83
+ },
84
+ "guard let": {
85
+ "prefix": "guardlet",
86
+ "body": [
87
+ "guard let ${1:value} = ${2:optional} else {",
88
+ "\t$0",
89
+ "}"
90
+ ],
91
+ "description": "guard statement with optional binding"
92
+ },
93
+ "switch": {
94
+ "prefix": "switch",
95
+ "body": [
96
+ "switch ${1:value} {",
97
+ "case ${2:pattern}:",
98
+ "\t$0",
99
+ "default:",
100
+ "\t",
101
+ "}"
102
+ ],
103
+ "description": "switch statement"
104
+ },
105
+ "do": {
106
+ "prefix": "do",
107
+ "body": [
108
+ "do {",
109
+ "\t$0",
110
+ "} catch ${1:error} {",
111
+ "\t$2",
112
+ "}"
113
+ ],
114
+ "description": "do statement"
115
+ },
116
+ "func": {
117
+ "prefix": "func",
118
+ "body": [
119
+ "func ${1:name}(${2:parameters}) -> ${3:Type} {",
120
+ "\t$0",
121
+ "}"
122
+ ],
123
+ "description": "function declaration"
124
+ },
125
+ "struct": {
126
+ "prefix": "struct",
127
+ "body": [
128
+ "struct ${1:Name} {",
129
+ "",
130
+ "\t$0",
131
+ "}"
132
+ ],
133
+ "description": "struct declaration"
134
+ },
135
+ "enum": {
136
+ "prefix": "enum",
137
+ "body": [
138
+ "enum ${1:Name} {",
139
+ "",
140
+ "\tcase $0",
141
+ "}"
142
+ ],
143
+ "description": "enum declaration"
144
+ },
145
+ "class": {
146
+ "prefix": "class",
147
+ "body": [
148
+ "class ${1:Name} {",
149
+ "",
150
+ "\t$0",
151
+ "}"
152
+ ],
153
+ "description": "class declaration"
154
+ },
155
+ "protocol": {
156
+ "prefix": "protocol",
157
+ "body": [
158
+ "protocol ${1:Name} {",
159
+ "",
160
+ "\t$0",
161
+ "}"
162
+ ],
163
+ "description": "protocol declaration"
164
+ },
165
+ "extension": {
166
+ "prefix": "extension",
167
+ "body": [
168
+ "extension ${1:Type} {",
169
+ "",
170
+ "\t$0",
171
+ "}"
172
+ ],
173
+ "description": "extension declaration"
174
+ }
175
+ }