@codingame/monaco-editor-wrapper 1.4.3 → 1.7.0

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.
Files changed (99) hide show
  1. package/dist/COBOL Copybook2.js +2017 -0
  2. package/dist/COBOL2.js +2017 -0
  3. package/dist/JavaScript.tmLanguage.js +0 -49
  4. package/dist/JavaScriptReact.tmLanguage.js +0 -49
  5. package/dist/SQL.plist.js +482 -0
  6. package/dist/TypeScript.tmLanguage.js +0 -49
  7. package/dist/TypeScriptReact.tmLanguage.js +0 -49
  8. package/dist/bsv2.js +49 -0
  9. package/dist/c2.js +18 -0
  10. package/dist/cobol-snippets.js +2017 -0
  11. package/dist/codeblock3.js +18 -18
  12. package/dist/coffeescript-coffeescript.code-snippets.js +18 -0
  13. package/dist/coffeescript2.js +18 -0
  14. package/dist/configuration/hack.d.ts +2 -0
  15. package/dist/cpp-c.code-snippets.js +18 -0
  16. package/dist/cpp-cpp.code-snippets.js +18 -0
  17. package/dist/cpp2.js +18 -0
  18. package/dist/cpptools.js +7 -1
  19. package/dist/csharp2.js +508 -0
  20. package/dist/css.worker.js +1 -1
  21. package/dist/cssContribution.js +10 -0
  22. package/dist/diet3.js +92 -0
  23. package/dist/elixir-snippets.js +184 -0
  24. package/dist/extensionConfigurations.js +9475 -0
  25. package/dist/features/extensionConfigurations.js +3 -3
  26. package/dist/fsharp-fsharp.code-snippets.js +18 -0
  27. package/dist/fsharp2.js +18 -0
  28. package/dist/groovy-groovy.code-snippets.js +229 -0
  29. package/dist/groovy2.js +229 -0
  30. package/dist/hacks.d.ts +2 -1
  31. package/dist/html (eex).js +31 -0
  32. package/dist/html.worker.js +1 -1
  33. package/dist/htmlContribution.js +10 -0
  34. package/dist/index.d.ts +2 -2
  35. package/dist/java-java.js +4 -1
  36. package/dist/java.js +11 -0
  37. package/dist/java2.js +3 -2
  38. package/dist/javascript-javascript.code-snippets.js +196 -0
  39. package/dist/javascript2.js +196 -0
  40. package/dist/javascriptreact2.js +196 -0
  41. package/dist/json.worker.js +1 -1
  42. package/dist/jsonContribution.js +78 -0
  43. package/dist/keybindings/index.d.ts +2 -1
  44. package/dist/keybindings/keybindingHelper.d.ts +1 -1
  45. package/dist/kotlin2.js +117 -0
  46. package/dist/kotlinscript2.js +117 -0
  47. package/dist/languages/extensions/configurationLoader.d.ts +1306 -0
  48. package/dist/languages/extensions/languageConfigurationLoader.d.ts +9 -1
  49. package/dist/languages/monarch/list.d.ts +7 -0
  50. package/dist/languages/textMate/CGTMTokenizationSupport.d.ts +2 -2
  51. package/dist/languages/textMate/TextMateTokensProvider.d.ts +11 -0
  52. package/dist/lua2.js +35 -0
  53. package/dist/main.js +186 -232
  54. package/dist/markdown-basics-markdown.code-snippets.js +121 -0
  55. package/dist/markdown-basics.js +103 -0
  56. package/dist/markdown2.js +103 -0
  57. package/dist/monaco.d.ts +0 -1
  58. package/dist/pgsql-sql.js +21 -0
  59. package/dist/pgsql.js +21 -0
  60. package/dist/php-php.code-snippets.js +265 -0
  61. package/dist/php2.js +265 -0
  62. package/dist/powershell-powershell.code-snippets.js +18 -0
  63. package/dist/powershell2.js +18 -0
  64. package/dist/r.tmLanguage.js +572 -0
  65. package/dist/r2.js +1 -1
  66. package/dist/reason2.js +100 -0
  67. package/dist/scalameta.js +12 -1
  68. package/dist/services/MultiEditorStandaloneCodeEditorService.d.ts +3 -3
  69. package/dist/services/TextModelService.d.ts +25 -0
  70. package/dist/services/functional.d.ts +1 -0
  71. package/dist/services/lyfecycle.d.ts +13 -0
  72. package/dist/sql2.js +21 -0
  73. package/dist/svlangserver-systemverilog.js +395 -0
  74. package/dist/svlangserver.js +85 -0
  75. package/dist/swift-swift.code-snippets.js +183 -0
  76. package/dist/swift2.js +183 -0
  77. package/dist/systemverilog.js +41 -7
  78. package/dist/systemverilog.tmLanguage.js +676 -496
  79. package/dist/systemverilog2.js +208 -0
  80. package/dist/tcl2.js +151 -0
  81. package/dist/theme/tools.d.ts +2 -1
  82. package/dist/ts.worker.js +1 -1
  83. package/dist/typescript-basics-typescript.code-snippets.js +312 -0
  84. package/dist/typescript-basics.js +312 -0
  85. package/dist/typescript-language-features.js +14 -4
  86. package/dist/typescript2.js +312 -0
  87. package/dist/typescriptContribution.js +36 -0
  88. package/dist/typescriptreact2.js +312 -0
  89. package/dist/vb-vb.code-snippets.js +88 -0
  90. package/dist/vb2.js +88 -0
  91. package/dist/verilog-systemverilog.js +327 -140
  92. package/dist/verilog.js +85 -3
  93. package/dist/verilog2.js +56 -65
  94. package/dist/vscode-R-r-snippets.js +534 -0
  95. package/dist/vscode-R-rmarkdown.js +91 -0
  96. package/dist/vscode-python.js +9 -0
  97. package/dist/worker.js +1 -1
  98. package/package.json +18 -14
  99. package/stats.html +1 -1
package/dist/verilog2.js CHANGED
@@ -1,91 +1,82 @@
1
1
  var verilog = [
2
2
  {
3
- "title": "Verilog configuration",
3
+ "title": "SystemVerilog Language Server",
4
4
  "properties": {
5
- "verilog.linting.linter": {
6
- "scope": 3,
7
- "type": "string",
8
- "enum": [
9
- "xvlog",
10
- "iverilog",
11
- "verilator",
12
- "modelsim",
13
- "none"
5
+ "systemverilog.includeIndexing": {
6
+ "type": "array",
7
+ "default": [
8
+ "**/*.{sv,svh,v,vh}"
14
9
  ],
15
- "default": "none",
16
- "description": "Select the verilog linter. Possible values are 'iverilog', 'verilator', xvlog' or 'none'."
10
+ "description": "Files included for indexing (glob pattern).",
11
+ "scope": 3
12
+ },
13
+ "systemverilog.excludeIndexing": {
14
+ "type": "array",
15
+ "default": [],
16
+ "description": "Files excluded for indexing (glob pattern).",
17
+ "scope": 3
17
18
  },
18
- "verilog.linting.xvlog.arguments": {
19
- "scope": 3,
19
+ "systemverilog.linter": {
20
20
  "type": "string",
21
- "default": "",
22
- "description": "Add xvlog arguments here. They will be added to xvlog while linting."
21
+ "enum": [
22
+ "icarus",
23
+ "verilator"
24
+ ],
25
+ "default": "icarus",
26
+ "description": "Linter to use",
27
+ "scope": 3
23
28
  },
24
- "verilog.linting.iverilog.arguments": {
25
- "scope": 3,
29
+ "systemverilog.launchConfiguration": {
26
30
  "type": "string",
27
- "default": "",
28
- "description": "Add Icarus Verilog arguments here (like macros). They will be added to Icarus Verilog while linting (The command \"-t null\" will be added by the linter by default)."
31
+ "default": "iverilog -t null",
32
+ "description": "Command used for linting",
33
+ "examples": [
34
+ "verilator -sv --lint-only --Wall",
35
+ "iverilog -t null"
36
+ ],
37
+ "scope": 3
29
38
  },
30
- "verilog.linting.iverilog.runAtFileLocation": {
31
- "scope": 3,
32
- "type": "boolean",
33
- "default": false,
34
- "description": "If enabled, Icarus Verilog will be run at the file location for linting. Else it will be run at workspace folder. Disabled by default."
39
+ "systemverilog.defines": {
40
+ "type": "array",
41
+ "default": [],
42
+ "description": "Defines needed for linting.",
43
+ "scope": 3
35
44
  },
36
- "verilog.linting.modelsim.runAtFileLocation": {
37
- "scope": 3,
45
+ "systemverilog.lintOnUnsaved": {
38
46
  "type": "boolean",
39
- "default": false,
40
- "description": "If enabled, Modelsim will be run at the file location for linting. Else it will be run at workspace folder. Disabled by default."
47
+ "default": true,
48
+ "description": "Enable linting on unsaved files",
49
+ "scope": 3
41
50
  },
42
- "verilog.linting.modelsim.arguments": {
43
- "scope": 3,
51
+ "systemverilog.formatCommand": {
44
52
  "type": "string",
45
- "default": "",
46
- "description": "Add Modelsim arguments here. They will be added to Modelsim while linting."
53
+ "default": "verible-verilog-format",
54
+ "description": "Verible verilog format command",
55
+ "scope": 3
47
56
  },
48
- "verilog.linting.modelsim.work": {
49
- "scope": 3,
50
- "type": "string",
51
- "default": "",
52
- "description": "Add Modelsim work library here."
53
- },
54
- "verilog.linting.verilator.arguments": {
55
- "scope": 3,
56
- "type": "string",
57
- "default": "",
58
- "description": "Add Verilator arguments here (like macros). They will be added to Verilator while linting (The command \"--lint-only -I<document folder>\" will be added by the linter by default)."
59
- },
60
- "verilog.linting.verilator.runAtFileLocation": {
61
- "scope": 3,
57
+ "systemverilog.disableCompletionProvider": {
62
58
  "type": "boolean",
63
59
  "default": false,
64
- "description": "If enabled, Verilator will be run at the file location for linting. Else it will be run at workspace folder. Disabled by default."
60
+ "description": "Disable auto completion provided by the language server",
61
+ "scope": 3
65
62
  },
66
- "verilog.linting.verilator.useWSL": {
67
- "scope": 3,
63
+ "systemverilog.disableHoverProvider": {
68
64
  "type": "boolean",
69
65
  "default": false,
70
- "description": "If enabled, run verilator in WSL."
66
+ "description": "Disable hover over help provided by the language server",
67
+ "scope": 3
71
68
  },
72
- "verilog.ctags.path": {
73
- "scope": 3,
74
- "type": "string",
75
- "default": "ctags",
76
- "description": "A path to the installation of Universal Ctags."
77
- },
78
- "verilog.languageServer": {
79
- "scope": 3,
80
- "type": "string",
81
- "default": "none",
82
- "description": "Select the Language Server. Currently supports `svls`."
69
+ "systemverilog.disableSignatureHelpProvider": {
70
+ "type": "boolean",
71
+ "default": false,
72
+ "description": "Disable signature help provided by the language server",
73
+ "scope": 3
83
74
  },
84
- "verilog.logging.enabled": {
85
- "scope": 3,
75
+ "systemverilog.disableLinting": {
86
76
  "type": "boolean",
87
77
  "default": false,
88
- "description": "Enable logging for this extension."
78
+ "description": "Disable verilator linting",
79
+ "scope": 3
89
80
  }
90
81
  }
91
82
  }
@@ -0,0 +1,534 @@
1
+ var rug = {
2
+ prefix: "rug",
3
+ body: "rug(${1:jitter(${2:x})})",
4
+ descriptison: "Add Tick Marks"
5
+ };
6
+ var app = {
7
+ prefix: "apply",
8
+ body: "apply(${1:X}, ${2:MARGIN}, ${3:FUN}, ${4:...})",
9
+ description: "Apply"
10
+ };
11
+ var att = {
12
+ prefix: "attach",
13
+ body: "attach(${1:frame})",
14
+ description: "Attach"
15
+ };
16
+ var cat = {
17
+ prefix: "cat",
18
+ body: "cat(${1:file}, ${2:sep = ${3:\"\"}}, ${4:fill = ${5:FALSE}}, ${6:labels = ${7:NULL}}, ${8:append = ${9:FALSE}})",
19
+ description: "Cat"
20
+ };
21
+ var cum = {
22
+ prefix: "cum",
23
+ body: "cum${1:max}(${2:x})",
24
+ description: "Cummulative"
25
+ };
26
+ var cuma = {
27
+ prefix: "cumaax",
28
+ body: "cummax(${1:x}",
29
+ description: "Cummulative max"
30
+ };
31
+ var cumi = {
32
+ prefix: "cumin",
33
+ body: "cummin(${1:x}",
34
+ description: "Cummulative min"
35
+ };
36
+ var daf = {
37
+ prefix: "data.frame",
38
+ body: "data.frame(${1:...}, ${2:row.names = ${3:NULL}}, ${4:check.rows = ${5:FALSE}}, ${6:check.names = ${7:TRUE}}, ${8:stringsAsFactors = ${9:default.stringsAsFactors()}})",
39
+ description: "Data Frame"
40
+ };
41
+ var den = {
42
+ prefix: "density",
43
+ body: "density(${1:x}${2:, bw = ${3:bandwidth}})",
44
+ description: "Density"
45
+ };
46
+ var det = {
47
+ prefix: "detach",
48
+ body: "detach(${0:})",
49
+ description: "Detach"
50
+ };
51
+ var cut = {
52
+ prefix: "cut",
53
+ body: "cut(${1:x}, breaks = c(${2:${3:}, ${4:max(${1:x})}}))",
54
+ description: "Divide Into Intervals"
55
+ };
56
+ var exp = {
57
+ prefix: "exppand",
58
+ body: "expand.grid(${1:...}, ${2:KEEP.OUT.ATTRS = ${3:TRUE}}, ${4:stringsAsFactors = ${5:TRUE}})",
59
+ description: "Expand grid"
60
+ };
61
+ var fac = {
62
+ prefix: "factor",
63
+ body: "factor(${1:x})",
64
+ description: "Factor"
65
+ };
66
+ var fun = {
67
+ prefix: "function",
68
+ body: "function(${1:x}) ${3:{$0\\}}",
69
+ description: "Function"
70
+ };
71
+ var glm = {
72
+ prefix: "glm",
73
+ body: "glm(${1:formula}, ${2:family = {3:gaussian}}, ${4:data})",
74
+ description: "Generalized Linear Models"
75
+ };
76
+ var grep = {
77
+ prefix: "grep",
78
+ body: "grep(${1:pattern}, ${2:x}, ${3:ignore.case = ${4:FALSE}}, ${5:perl = ${6:FALSE}})",
79
+ description: "Grep"
80
+ };
81
+ var grep2 = {
82
+ prefix: "grep",
83
+ body: "grep(${1:pattern}, ${2:x}, ${3:ignore.case = ${4:FALSE}}, ${5:perl = ${6:FALSE}}, ${7:value = ${8:FALSE}}, ${9:fixed = ${10:TRUE}})",
84
+ description: "Grep"
85
+ };
86
+ var grepl = {
87
+ prefix: "grepl",
88
+ body: "grep(${1:pattern}, ${2:x}, ${3:ignore.case = ${4:FALSE}}, ${5:perl = ${6:FALSE}}, ${7:fixed = ${8:TRUE}})",
89
+ description: "Grep logical"
90
+ };
91
+ var ins = {
92
+ prefix: "insall",
93
+ body: "install.packages(${1:pkgs}, ${2:lib}, ${3:repos = ${4:getOption(\"repos\")}}, ${5:contriburl = ${6:contrib.url(repos, type)}})",
94
+ description: "Install package"
95
+ };
96
+ var km = {
97
+ prefix: "kmeans",
98
+ body: "kmeans(${1:x}, ${2:centers}, ${3:iter.max = ${4:10}}, ${5:nstart = ${6:1}}, ${7:algorithm = ${8:c(\"Hartigan-Wong\", \"Lloyd\", \"Forgy\",\"MacQueen\")}}, ${9:trace = ${10:FALSE}})",
99
+ description: "Kmeans"
100
+ };
101
+ var kr = {
102
+ prefix: "kruskal",
103
+ body: "kruskal.test(${1:formula}, ${2:data}, ${3:subset}, ${4:na.action}, ${5:...})",
104
+ description: "Kruskal-Wallis Rank Sum test"
105
+ };
106
+ var lap = {
107
+ prefix: "lapply",
108
+ body: "lapply(${1:X}, ${2:FUN}, ${3:...})",
109
+ description: "Lapply"
110
+ };
111
+ var len = {
112
+ prefix: "length",
113
+ body: "length(${1:x})",
114
+ description: "Length"
115
+ };
116
+ var lib = {
117
+ prefix: "library",
118
+ body: "library(${1:package}, ${2:help}, ${3:pos = ${4:2}}, ${5:lib.loc = ${6:NULL}})",
119
+ description: "Library"
120
+ };
121
+ var lin = {
122
+ prefix: "lines",
123
+ body: "lines(${1:x}${2:, color=${3:red}})",
124
+ description: "Polygonal Line"
125
+ };
126
+ var dat = {
127
+ prefix: "data",
128
+ body: "data(${1:name})",
129
+ description: "Load Dataset"
130
+ };
131
+ var loa = {
132
+ prefix: "load",
133
+ body: "load(${1:file}, ${2:envir = ${3:parent.frame()}}, ${4:verbose = ${5:FALSE}})",
134
+ description: "Load RData"
135
+ };
136
+ var mea = {
137
+ prefix: "mean",
138
+ body: "mean(${1:x}${2:, na.rm=${3:FALSE}})",
139
+ description: "Mean"
140
+ };
141
+ var mer = {
142
+ prefix: "merge",
143
+ body: "merge(${1:x}, ${2:y}, ${3:by = ${4:intersect(names(x), names(y))}}, ${5:all = ${6:FALSE}})",
144
+ description: "Merge"
145
+ };
146
+ var nam = {
147
+ prefix: "names",
148
+ body: "names(${1:x})",
149
+ description: "Names"
150
+ };
151
+ var opt = {
152
+ prefix: "option",
153
+ body: "options(${1:...})",
154
+ description: "Options"
155
+ };
156
+ var ord = {
157
+ prefix: "order",
158
+ body: "order(${1:...}, ${2:na.last = ${3:TRUE}}, ${4:decreasing = ${5:FALSE}})",
159
+ description: "Order"
160
+ };
161
+ var out = {
162
+ prefix: "outer",
163
+ body: "outer(${1:X}, ${2:Y}, ${3:FUN = ${4:\"*\"}}, ${5:...})",
164
+ description: "Outer"
165
+ };
166
+ var pas = {
167
+ prefix: "paste",
168
+ body: "paste(${1:...}, ${2:sep = ${3:\" \"}}, ${3:collapse = ${4:NULL}})",
169
+ description: "Paste"
170
+ };
171
+ var pas0 = {
172
+ prefix: "pas0",
173
+ body: "paste(${1:...}, ${2:collapse = ${3:NULL}})",
174
+ description: "Paste0"
175
+ };
176
+ var plot = {
177
+ prefix: "plot",
178
+ body: "plot(${1:x}, ${2:y}, ${3:...})",
179
+ description: "Plot"
180
+ };
181
+ var poi = {
182
+ prefix: "point",
183
+ body: "points(${1:x}, ${2:y = ${3:NULL}}, ${4:type = ${5:\"p\"}}, ${6:...})",
184
+ description: "Points"
185
+ };
186
+ var pri = {
187
+ prefix: "print",
188
+ body: "print(${1:x}, ${2:...})",
189
+ description: "Print"
190
+ };
191
+ var qua = {
192
+ prefix: "quantile",
193
+ body: "quantile(${1:x}, ${2:probs = ${3:seq(0, 1, 0.25)}}, ${4:na.rm = ${5:FALSE}}, ${6:names = ${7:TRUE}}, ${8:type = ${9:7}}, ${10:...})",
194
+ description: "Quantile"
195
+ };
196
+ var reat = {
197
+ prefix: "read",
198
+ body: "read.table('${1:filename}'${2:, header = ${3:TRUE}, sep = '${4:\t}', stringsAsFactors = ${5:FALSE}})",
199
+ description: "Read From File"
200
+ };
201
+ var rep = {
202
+ prefix: "rep",
203
+ body: "rep(${1:x}, ${2:...})",
204
+ description: "Rep"
205
+ };
206
+ var sam = {
207
+ prefix: "sample",
208
+ body: "sample(${1:x}, ${2:size}, ${3:replace = ${4:FALSE}}, ${5:prob = ${6:NULL}})",
209
+ description: "Sample"
210
+ };
211
+ var seq = {
212
+ prefix: "seq",
213
+ body: "seq(${1:from}, ${2:to}, ${3:by})",
214
+ description: "Sequence (from,to,by)"
215
+ };
216
+ var sor = {
217
+ prefix: "sort",
218
+ body: "sort(${1:x})",
219
+ description: "Sort"
220
+ };
221
+ var sou = {
222
+ prefix: "source",
223
+ body: "source(${1:'${2:}'}${3:, chdir = ${4:TRUE}})",
224
+ description: "Source"
225
+ };
226
+ var sd = {
227
+ prefix: "sd",
228
+ body: "sd(${1:x}${2:, na.rm=${3:FALSE}})",
229
+ description: "Standard deviation"
230
+ };
231
+ var tab = {
232
+ prefix: "table",
233
+ body: "table(${1:...})",
234
+ description: "Table"
235
+ };
236
+ var tap = {
237
+ prefix: "tapply",
238
+ body: "tapply(${1:X}, ${2:INDEX}, ${3:FUN = ${4:NULL}}, ${5:...}, ${6:simplify = ${7:TRUE}})",
239
+ description: "Tapply"
240
+ };
241
+ var uni = {
242
+ prefix: "unique",
243
+ body: "unique(${1:x}, ${2:incomparables = ${3:FALSE}}, ${4:...})",
244
+ description: "Unique"
245
+ };
246
+ var whi = {
247
+ prefix: "which",
248
+ body: "which(${1:x}, ${2:arr.ind = ${3:FALSE}}, ${4:useNames = ${5:TRUE}})",
249
+ description: "Which"
250
+ };
251
+ var wric = {
252
+ prefix: "write",
253
+ body: "write.csv(${1:x}, ${2:file = ${3:\"\"}}, ${4:append = ${5:FALSE}}, ${6:quote = ${7:TRUE}}, ${8:sep = ${9:\" \"}}",
254
+ description: "Write csv"
255
+ };
256
+ var fch = {
257
+ prefix: "fch",
258
+ body: "${1:file = }file.choose()${0:}",
259
+ description: "file.choose"
260
+ };
261
+ var Clustering = {
262
+ prefix: "clara",
263
+ body: [
264
+ "library(cluster)",
265
+ "clara(${1:xData}, k = ${2:k}, metric = ${3:metric}, stand = ${4:stand}, samples = ${5:samples})"
266
+ ],
267
+ description: "Cluster data into k clusters (library: cluster)"
268
+ };
269
+ var loess = {
270
+ prefix: "loess",
271
+ body: [
272
+ "loess(${1:yCol} ~ {2:xCol}, data = ${3:data}, subset = ${4:subset}, weights = ${5:weights}, span = ${6:span},",
273
+ "degree = ${7:degree}, na.action = {8:na.action})"
274
+ ],
275
+ description: "Local polynomial regression"
276
+ };
277
+ var Crosstabs = {
278
+ prefix: "xtabs",
279
+ body: [
280
+ "crossTable <- xtabs(~${1:varNames}, data= ${2:dataName}, exclude = c(${3:exclude}), subset = ${4:subset})",
281
+ "ftable(crossTable) # print crosstabs",
282
+ "summary(crossTable) # chi-square tests"
283
+ ],
284
+ description: "Crosstabulations for variables in a data frame"
285
+ };
286
+ var Matrix = {
287
+ prefix: "matrix",
288
+ body: "${1:outMatrix} <- matrix(data = ${2:dataVec}, nrow = ${3:nrow}, ncol = ${4:ncol}, byrow = ${5:byrow})",
289
+ description: "Create a matrix from a vector"
290
+ };
291
+ var elseif = {
292
+ prefix: "elseif",
293
+ body: [
294
+ "else if (${1:condition}) {",
295
+ " ${2:selected}",
296
+ "}"
297
+ ],
298
+ description: "Code snippet for 'else' conditional"
299
+ };
300
+ var vscodeRRSnippets = {
301
+ rug: rug,
302
+ app: app,
303
+ att: att,
304
+ cat: cat,
305
+ cum: cum,
306
+ cuma: cuma,
307
+ cumi: cumi,
308
+ daf: daf,
309
+ den: den,
310
+ det: det,
311
+ cut: cut,
312
+ exp: exp,
313
+ fac: fac,
314
+ fun: fun,
315
+ glm: glm,
316
+ grep: grep,
317
+ grep2: grep2,
318
+ grepl: grepl,
319
+ ins: ins,
320
+ km: km,
321
+ kr: kr,
322
+ lap: lap,
323
+ len: len,
324
+ lib: lib,
325
+ lin: lin,
326
+ dat: dat,
327
+ loa: loa,
328
+ mea: mea,
329
+ mer: mer,
330
+ nam: nam,
331
+ opt: opt,
332
+ ord: ord,
333
+ out: out,
334
+ pas: pas,
335
+ pas0: pas0,
336
+ plot: plot,
337
+ poi: poi,
338
+ pri: pri,
339
+ qua: qua,
340
+ reat: reat,
341
+ rep: rep,
342
+ sam: sam,
343
+ seq: seq,
344
+ sor: sor,
345
+ sou: sou,
346
+ sd: sd,
347
+ tab: tab,
348
+ tap: tap,
349
+ uni: uni,
350
+ whi: whi,
351
+ wric: wric,
352
+ fch: fch,
353
+ Clustering: Clustering,
354
+ "Linear model": {
355
+ prefix: "lm",
356
+ body: [
357
+ "lmObj <- lm(${1:yCol} ~ {2:xCol}, data = ${3:data}, subset = ${4:subset}, weights = ${5:weights}, na.action = ${6:na.action})",
358
+ "summary(lmObj)"
359
+ ],
360
+ description: "Fit a linear model"
361
+ },
362
+ "Linear model with plot": {
363
+ prefix: "lmplot",
364
+ body: [
365
+ "lmObj <- lm(${1:yCol} ~ {2:xCol}, data = ${3:data}, subset = ${4:subset}, weights = ${5:weights}, na.action = ${6:na.action})",
366
+ "summary(lmObj)",
367
+ "plot(lmObj, which=c(1)) # Plot residuals versus fitted"
368
+ ],
369
+ description: "Fit a linear model and create a plot"
370
+ },
371
+ loess: loess,
372
+ "Descriptive statistics summary": {
373
+ prefix: "summary",
374
+ body: "summary(${1:dataName}, digits = ${2:digits}, maxsum = ${3:maxsum})",
375
+ description: "Mean, median, 25th and 75th quartiles, min, and max of variables"
376
+ },
377
+ Crosstabs: Crosstabs,
378
+ "Empty data frame (character)": {
379
+ prefix: "df2c",
380
+ body: "${1:dfname} <- data.frame(${2:a} = character(), ${3:b} = character())",
381
+ description: "Code snippet for an empty character data frame"
382
+ },
383
+ "Empty data frame (numeric)": {
384
+ prefix: "df2n",
385
+ body: "${1:dfname} <- data.frame(${2:x} = numeric(), ${3:y} = numeric())",
386
+ description: "Code snippet for an empty numerical data frame"
387
+ },
388
+ "Data frame": {
389
+ prefix: "dfv",
390
+ body: "${1:dfname} <- data.frame(${2:varlist})",
391
+ description: "Create a data frame from vectors"
392
+ },
393
+ "Categorical variable": {
394
+ prefix: "factor",
395
+ body: "${1:outFactor} <- factor(x = ${2:dataVec}, levels = ${3:levels}, exclude = ${4:exclude})",
396
+ description: "Create a factor (categorical variable) from a vector"
397
+ },
398
+ Matrix: Matrix,
399
+ "remove missings": {
400
+ prefix: "naomit",
401
+ body: "${1:newdataframe} <- na.omit(${2:dataframe})",
402
+ description: "Remove all rows with missing values from data frame"
403
+ },
404
+ "Read CSV": {
405
+ prefix: "readc",
406
+ body: "${1:dfname} <- read.csv(file = \"${2:file}\", header = ${3|TRUE,FALSE|}, sep = \"${4|\\,,;|}\", row.names = ${5:NULL}, stringsAsFactors = ${6|FALSE,TRUE|})",
407
+ description: "Read a data table from a comma-separated file (CSV) and create a data frame"
408
+ },
409
+ "else": {
410
+ prefix: "else",
411
+ body: [
412
+ "else {",
413
+ " ${1:selected}",
414
+ "}"
415
+ ],
416
+ description: "Code snippet for 'else' conditional"
417
+ },
418
+ elseif: elseif,
419
+ "for": {
420
+ prefix: "for",
421
+ body: [
422
+ "for (${1:identifier} in ${2:collection}) {",
423
+ " ${3:selected}",
424
+ "}"
425
+ ],
426
+ description: "Code snippet for 'for' loop"
427
+ },
428
+ "function": {
429
+ prefix: "function",
430
+ body: [
431
+ "${1:name} <- function(${2:parameters}) {",
432
+ " ${3:selected}",
433
+ "}"
434
+ ],
435
+ description: "Named function"
436
+ },
437
+ "if": {
438
+ prefix: "if",
439
+ body: [
440
+ "if (${1:condition}) {",
441
+ " ${2:selected}",
442
+ "}"
443
+ ],
444
+ description: "Code snippet for 'if' conditional"
445
+ },
446
+ "if-else block": {
447
+ prefix: "ifelse",
448
+ body: [
449
+ "if (${1:condition}) {",
450
+ " ${2:selected}",
451
+ "} else {",
452
+ " ",
453
+ "}"
454
+ ],
455
+ description: "Code snippet for 'if-else' conditional block"
456
+ },
457
+ "Region Start": {
458
+ prefix: "#region",
459
+ body: [
460
+ "#region $0"
461
+ ],
462
+ description: "Folding Region Start"
463
+ },
464
+ "Region End": {
465
+ prefix: "#endregion",
466
+ body: [
467
+ "#endregion"
468
+ ],
469
+ description: "Folding Region End"
470
+ },
471
+ "Shiny sidebar page": {
472
+ prefix: "shiny sidebar page",
473
+ body: [
474
+ "library(shiny)",
475
+ "",
476
+ "ui <- fluidPage(",
477
+ " titlePanel(\"${1:title}\"),",
478
+ " sidebarLayout(",
479
+ " sidebarPanel(),",
480
+ " mainPanel()",
481
+ " )",
482
+ ")",
483
+ "",
484
+ "server <- function(input, output, session) {",
485
+ "",
486
+ "}",
487
+ "",
488
+ "shinyApp(ui, server)$0"
489
+ ],
490
+ description: "Shiny sidebar page"
491
+ },
492
+ "Shiny observe event": {
493
+ prefix: "shiny observe event",
494
+ body: [
495
+ "observeEvent(${1:event}, {",
496
+ " ${0}",
497
+ "})"
498
+ ],
499
+ description: "Shiny observe event"
500
+ },
501
+ "Shiny withProgress": {
502
+ prefix: "shiny withProgress",
503
+ body: [
504
+ "withProgress(message = \"${1:message}\", {",
505
+ "${0}",
506
+ "})"
507
+ ],
508
+ description: "Shiny withProgress"
509
+ },
510
+ "Shiny module": {
511
+ prefix: "shiny module",
512
+ body: [
513
+ "${1:name}ui <- function(id) {",
514
+ " ns <- NS(id)",
515
+ " tagList(",
516
+ " ${0}",
517
+ " )",
518
+ " }",
519
+ "",
520
+ "${1:name} <- function(input, output, session) {",
521
+ " ns <- session\\$ns",
522
+ "}",
523
+ "",
524
+ "# Copy in UI",
525
+ "#${1:name}ui(\"${1:name}ui\")",
526
+ "",
527
+ "# Copy in server",
528
+ "#callModule(${1:name}, \"${1:name}ui\")"
529
+ ],
530
+ description: "Shiny module"
531
+ }
532
+ };
533
+
534
+ export { Clustering, Crosstabs, Matrix, app, att, cat, cum, cuma, cumi, cut, daf, dat, vscodeRRSnippets as default, den, det, elseif, exp, fac, fch, fun, glm, grep, grep2, grepl, ins, km, kr, lap, len, lib, lin, loa, loess, mea, mer, nam, opt, ord, out, pas, pas0, plot, poi, pri, qua, reat, rep, rug, sam, sd, seq, sor, sou, tab, tap, uni, whi, wric };