@codingame/monaco-vscode-snippets-service-override 11.0.0 → 11.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-snippets-service-override",
3
- "version": "11.0.0",
3
+ "version": "11.0.2",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@11.0.0",
30
- "@codingame/monaco-vscode-files-service-override": "11.0.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@11.0.2",
30
+ "@codingame/monaco-vscode-files-service-override": "11.0.2"
31
31
  }
32
32
  }
@@ -57,15 +57,15 @@ async function computePicks(snippetService, userDataProfileService, languageServ
57
57
  label: basename(file.location),
58
58
  filepath: file.location,
59
59
  description: names.size === 0
60
- ? ( localize(6631, "(global)"))
61
- : ( localize(6632, "({0})", [...names].join(', ')))
60
+ ? ( localize(6665, "(global)"))
61
+ : ( localize(6666, "({0})", [...names].join(', ')))
62
62
  };
63
63
  existing.push(snippet);
64
64
  if (!source) {
65
65
  continue;
66
66
  }
67
67
  const detail = ( localize(
68
- 6633,
68
+ 6667,
69
69
  "({0}) {1}",
70
70
  source,
71
71
  labelService.getUriLabel(file.location, { relative: true })
@@ -127,16 +127,16 @@ async function createSnippetFile(scope, defaultPath, quickInputService, fileServ
127
127
  }
128
128
  await fileService.createFolder(defaultPath);
129
129
  const input = await quickInputService.input({
130
- placeHolder: ( localize(6634, "Type snippet file name")),
130
+ placeHolder: ( localize(6668, "Type snippet file name")),
131
131
  async validateInput(input) {
132
132
  if (!input) {
133
- return ( localize(6635, "Invalid file name"));
133
+ return ( localize(6669, "Invalid file name"));
134
134
  }
135
135
  if (!isValidBasename(input)) {
136
- return ( localize(6636, "'{0}' is not a valid file name", input));
136
+ return ( localize(6670, "'{0}' is not a valid file name", input));
137
137
  }
138
138
  if (await fileService.exists(createSnippetUri(input))) {
139
- return ( localize(6637, "'{0}' already exists", input));
139
+ return ( localize(6671, "'{0}' already exists", input));
140
140
  }
141
141
  return undefined;
142
142
  }
@@ -195,10 +195,10 @@ class ConfigureSnippetsAction extends SnippetsAction {
195
195
  constructor() {
196
196
  super({
197
197
  id: 'workbench.action.openSnippets',
198
- title: ( localize2(6638, "Configure Snippets")),
198
+ title: ( localize2(6672, "Configure Snippets")),
199
199
  shortTitle: {
200
- ...( localize2(6639, "Snippets")),
201
- mnemonicTitle: ( localize(6640, "&&Snippets")),
200
+ ...( localize2(6673, "Snippets")),
201
+ mnemonicTitle: ( localize(6674, "&&Snippets")),
202
202
  },
203
203
  f1: true,
204
204
  menu: [
@@ -220,27 +220,27 @@ class ConfigureSnippetsAction extends SnippetsAction {
220
220
  const picks = await computePicks(snippetService, userDataProfileService, languageService, labelService);
221
221
  const existing = picks.existing;
222
222
  const globalSnippetPicks = [{
223
- scope: ( localize(6641, 'global')),
224
- label: ( localize(6642, "New Global Snippets file...")),
223
+ scope: ( localize(6675, 'global')),
224
+ label: ( localize(6676, "New Global Snippets file...")),
225
225
  uri: userDataProfileService.currentProfile.snippetsHome
226
226
  }];
227
227
  const workspaceSnippetPicks = [];
228
228
  for (const folder of workspaceService.getWorkspace().folders) {
229
229
  workspaceSnippetPicks.push({
230
- scope: ( localize(6643, "{0} workspace", folder.name)),
231
- label: ( localize(6644, "New Snippets file for '{0}'...", folder.name)),
230
+ scope: ( localize(6677, "{0} workspace", folder.name)),
231
+ label: ( localize(6678, "New Snippets file for '{0}'...", folder.name)),
232
232
  uri: folder.toResource('.vscode')
233
233
  });
234
234
  }
235
235
  if (existing.length > 0) {
236
- existing.unshift({ type: 'separator', label: ( localize(6645, "Existing Snippets")) });
237
- existing.push({ type: 'separator', label: ( localize(6646, "New Snippets")) });
236
+ existing.unshift({ type: 'separator', label: ( localize(6679, "Existing Snippets")) });
237
+ existing.push({ type: 'separator', label: ( localize(6680, "New Snippets")) });
238
238
  }
239
239
  else {
240
- existing.push({ type: 'separator', label: ( localize(6646, "New Snippets")) });
240
+ existing.push({ type: 'separator', label: ( localize(6680, "New Snippets")) });
241
241
  }
242
242
  const pick = await quickInputService.pick([].concat(existing, globalSnippetPicks, workspaceSnippetPicks, picks.future), {
243
- placeHolder: ( localize(6647, "Select Snippets File or Create Snippets")),
243
+ placeHolder: ( localize(6681, "Select Snippets File or Create Snippets")),
244
244
  matchOnDescription: true
245
245
  });
246
246
  if (globalSnippetPicks.indexOf(pick) >= 0) {
@@ -39,7 +39,7 @@ class InsertSnippetAction extends SnippetEditorAction {
39
39
  constructor() {
40
40
  super({
41
41
  id: 'editor.action.insertSnippet',
42
- title: ( localize2(6650, "Insert Snippet")),
42
+ title: ( localize2(6686, "Insert Snippet")),
43
43
  f1: true,
44
44
  precondition: EditorContextKeys.writable,
45
45
  metadata: {
@@ -18,7 +18,7 @@ async function getSurroundableSnippets(snippetsService, model, position, include
18
18
  class SurroundWithSnippetEditorAction extends SnippetEditorAction {
19
19
  static { this.options = {
20
20
  id: 'editor.action.surroundWithSnippet',
21
- title: ( localize2(6651, "Surround with Snippet..."))
21
+ title: ( localize2(6687, "Surround with Snippet..."))
22
22
  }; }
23
23
  constructor() {
24
24
  super({
@@ -16,7 +16,7 @@ let SurroundWithSnippetCodeActionProvider = class SurroundWithSnippetCodeActionP
16
16
  static { this._MAX_CODE_ACTIONS = 4; }
17
17
  static { this._overflowCommandCodeAction = {
18
18
  kind: CodeActionKind.SurroundWith.value,
19
- title: ( localize(6652, "More...")),
19
+ title: ( localize(6688, "More...")),
20
20
  command: {
21
21
  id: SurroundWithSnippetEditorAction.options.id,
22
22
  title: SurroundWithSnippetEditorAction.options.title.value,
@@ -41,7 +41,7 @@ let SurroundWithSnippetCodeActionProvider = class SurroundWithSnippetCodeActionP
41
41
  break;
42
42
  }
43
43
  actions.push({
44
- title: ( localize(6653, "{0}", snippet.name)),
44
+ title: ( localize(6689, "{0}", snippet.name)),
45
45
  kind: CodeActionKind.SurroundWith.value,
46
46
  edit: asWorkspaceEdit(model, range, snippet)
47
47
  });
@@ -59,7 +59,7 @@ let FileTemplateCodeActionProvider = class FileTemplateCodeActionProvider {
59
59
  static { FileTemplateCodeActionProvider_1 = this; }
60
60
  static { this._MAX_CODE_ACTIONS = 4; }
61
61
  static { this._overflowCommandCodeAction = {
62
- title: ( localize(6654, 'Start with Snippet')),
62
+ title: ( localize(6690, 'Start with Snippet')),
63
63
  kind: CodeActionKind.SurroundWith.value,
64
64
  command: {
65
65
  id: ApplyFileSnippetAction.Id,
@@ -82,7 +82,7 @@ let FileTemplateCodeActionProvider = class FileTemplateCodeActionProvider {
82
82
  break;
83
83
  }
84
84
  actions.push({
85
- title: ( localize(6655, 'Start with: {0}', snippet.name)),
85
+ title: ( localize(6691, 'Start with: {0}', snippet.name)),
86
86
  kind: CodeActionKind.SurroundWith.value,
87
87
  edit: asWorkspaceEdit(model, model.getFullModelRange(), snippet)
88
88
  });
@@ -30,13 +30,13 @@ async function pickSnippet(accessor, languageIdOrSnippets) {
30
30
  let label = '';
31
31
  switch (snippet.snippetSource) {
32
32
  case 1 :
33
- label = ( localize(10723, "User Snippets"));
33
+ label = ( localize(10734, "User Snippets"));
34
34
  break;
35
35
  case 3 :
36
36
  label = snippet.source;
37
37
  break;
38
38
  case 2 :
39
- label = ( localize(10724, "Workspace Snippets"));
39
+ label = ( localize(10735, "Workspace Snippets"));
40
40
  break;
41
41
  }
42
42
  result.push({ type: 'separator', label });
@@ -46,14 +46,14 @@ async function pickSnippet(accessor, languageIdOrSnippets) {
46
46
  if (isEnabled) {
47
47
  pick.buttons = [{
48
48
  iconClass: ThemeIcon.asClassName(Codicon.eyeClosed),
49
- tooltip: ( localize(10725, 'Hide from IntelliSense'))
49
+ tooltip: ( localize(10736, 'Hide from IntelliSense'))
50
50
  }];
51
51
  }
52
52
  else {
53
- pick.description = ( localize(10726, "(hidden from IntelliSense)"));
53
+ pick.description = ( localize(10737, "(hidden from IntelliSense)"));
54
54
  pick.buttons = [{
55
55
  iconClass: ThemeIcon.asClassName(Codicon.eye),
56
- tooltip: ( localize(10727, 'Show in IntelliSense'))
56
+ tooltip: ( localize(10738, 'Show in IntelliSense'))
57
57
  }];
58
58
  }
59
59
  }
@@ -64,7 +64,7 @@ async function pickSnippet(accessor, languageIdOrSnippets) {
64
64
  };
65
65
  const disposables = ( (new DisposableStore()));
66
66
  const picker = disposables.add(quickInputService.createQuickPick({ useSeparators: true }));
67
- picker.placeholder = ( localize(10728, "Select a snippet"));
67
+ picker.placeholder = ( localize(10739, "Select a snippet"));
68
68
  picker.matchOnDetail = true;
69
69
  picker.ignoreFocusOut = false;
70
70
  picker.keepScrollPosition = true;
@@ -75,7 +75,7 @@ async function pickSnippet(accessor, languageIdOrSnippets) {
75
75
  }));
76
76
  picker.items = makeSnippetPicks();
77
77
  if (!picker.items.length) {
78
- picker.validationMessage = ( localize(10729, "No snippet available"));
78
+ picker.validationMessage = ( localize(10740, "No snippet available"));
79
79
  }
80
80
  picker.show();
81
81
  await Promise.race([Event.toPromise(picker.onDidAccept), Event.toPromise(picker.onDidHide)]);
@@ -29,7 +29,7 @@ workbenchContribRegistry.registerWorkbenchContribution(SnippetCodeActions, 3 );
29
29
  'properties': {
30
30
  'editor.snippets.codeActions.enabled': {
31
31
  'description': ( localize(
32
- 2497,
32
+ 2979,
33
33
  'Controls if surround-with-snippets or file template snippets show as Code Actions.'
34
34
  )),
35
35
  'type': 'boolean',
@@ -40,16 +40,16 @@ workbenchContribRegistry.registerWorkbenchContribution(SnippetCodeActions, 3 );
40
40
  const languageScopeSchemaId = 'vscode://schemas/snippets';
41
41
  const snippetSchemaProperties = {
42
42
  prefix: {
43
- description: ( localize(2498, 'The prefix to use when selecting the snippet in intellisense')),
43
+ description: ( localize(2980, 'The prefix to use when selecting the snippet in intellisense')),
44
44
  type: ['string', 'array']
45
45
  },
46
46
  isFileTemplate: {
47
- description: ( localize(2499, 'The snippet is meant to populate or replace a whole file')),
47
+ description: ( localize(2981, 'The snippet is meant to populate or replace a whole file')),
48
48
  type: 'boolean'
49
49
  },
50
50
  body: {
51
51
  markdownDescription: ( localize(
52
- 2500,
52
+ 2982,
53
53
  'The snippet content. Use `$1`, `${1:defaultText}` to define cursor positions, use `$0` for the final cursor position. Insert variable values with `${varName}` and `${varName:defaultText}`, e.g. `This is file: $TM_FILENAME`.'
54
54
  )),
55
55
  type: ['string', 'array'],
@@ -58,7 +58,7 @@ const snippetSchemaProperties = {
58
58
  }
59
59
  },
60
60
  description: {
61
- description: ( localize(2501, 'The snippet description.')),
61
+ description: ( localize(2983, 'The snippet description.')),
62
62
  type: ['string', 'array']
63
63
  }
64
64
  };
@@ -67,11 +67,11 @@ const languageScopeSchema = {
67
67
  allowComments: true,
68
68
  allowTrailingCommas: true,
69
69
  defaultSnippets: [{
70
- label: ( localize(2502, "Empty snippet")),
70
+ label: ( localize(2984, "Empty snippet")),
71
71
  body: { '${1:snippetName}': { 'prefix': '${2:prefix}', 'body': '${3:snippet}', 'description': '${4:description}' } }
72
72
  }],
73
73
  type: 'object',
74
- description: ( localize(2503, 'User snippet configuration')),
74
+ description: ( localize(2985, 'User snippet configuration')),
75
75
  additionalProperties: {
76
76
  type: 'object',
77
77
  required: ['body'],
@@ -85,11 +85,11 @@ const globalSchema = {
85
85
  allowComments: true,
86
86
  allowTrailingCommas: true,
87
87
  defaultSnippets: [{
88
- label: ( localize(2502, "Empty snippet")),
88
+ label: ( localize(2984, "Empty snippet")),
89
89
  body: { '${1:snippetName}': { 'scope': '${2:scope}', 'prefix': '${3:prefix}', 'body': '${4:snippet}', 'description': '${5:description}' } }
90
90
  }],
91
91
  type: 'object',
92
- description: ( localize(2503, 'User snippet configuration')),
92
+ description: ( localize(2985, 'User snippet configuration')),
93
93
  additionalProperties: {
94
94
  type: 'object',
95
95
  required: ['body'],
@@ -97,7 +97,7 @@ const globalSchema = {
97
97
  ...snippetSchemaProperties,
98
98
  scope: {
99
99
  description: ( localize(
100
- 2504,
100
+ 2986,
101
101
  "A list of language names to which this snippet applies, e.g. 'typescript,javascript'."
102
102
  )),
103
103
  type: 'string'