@theia/editor 1.34.0-next.7 → 1.34.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.
@@ -144,7 +144,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
144
144
  "null"
145
145
  ],
146
146
  "default": null,
147
- "description": nls.localize("theia/editor/editor.language.colorizedBracketPairs", "Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),
147
+ "description": nls.localizeByDefault("Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),
148
148
  "items": {
149
149
  "type": "array",
150
150
  "items": [
@@ -171,7 +171,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
171
171
  "diffEditor.maxFileSize": {
172
172
  "type": "number",
173
173
  "default": 50,
174
- "description": nls.localize("theia/editor/diffEditor.maxFileSize", "Maximum file size in MB for which to compute diffs. Use 0 for no limit."),
174
+ "description": nls.localizeByDefault("Maximum file size in MB for which to compute diffs. Use 0 for no limit."),
175
175
  "scope": "language-overridable",
176
176
  "restricted": false
177
177
  },
@@ -282,7 +282,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
282
282
  "restricted": false
283
283
  },
284
284
  "editor.accessibilityPageSize": {
285
- "description": nls.localize("theia/editor/editor.accessibilityPageSize", "Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),
285
+ "description": nls.localizeByDefault("Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),
286
286
  "type": "integer",
287
287
  "default": 10,
288
288
  "minimum": 1,
@@ -405,14 +405,14 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
405
405
  "editor.bracketPairColorization.enabled": {
406
406
  "type": "boolean",
407
407
  "default": true,
408
- "markdownDescription": nls.localize("theia/editor/editor.bracketPairColorization.enabled", "Controls whether bracket pair colorization is enabled or not. Use `#workbench.colorCustomizations#` to override the bracket highlight colors."),
408
+ "markdownDescription": nls.localizeByDefault("Controls whether bracket pair colorization is enabled or not. Use `#workbench.colorCustomizations#` to override the bracket highlight colors."),
409
409
  "scope": "language-overridable",
410
410
  "restricted": false
411
411
  },
412
412
  "editor.bracketPairColorization.independentColorPoolPerBracketType": {
413
413
  "type": "boolean",
414
414
  "default": false,
415
- "description": nls.localize("theia/editor/editor.bracketPairColorization.independentColorPoolPerBracketType", "Controls whether each bracket type has its own independent color pool."),
415
+ "description": nls.localizeByDefault("Controls whether each bracket type has its own independent color pool."),
416
416
  "scope": "language-overridable",
417
417
  "restricted": false
418
418
  },
@@ -427,12 +427,12 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
427
427
  false
428
428
  ],
429
429
  "enumDescriptions": [
430
- nls.localize("theia/editor/editor.guides.bracketPairs0", "Enables bracket pair guides."),
431
- nls.localize("theia/editor/editor.guides.bracketPairs1", "Enables bracket pair guides only for the active bracket pair."),
432
- nls.localize("theia/editor/editor.guides.bracketPairs2", "Disables bracket pair guides.")
430
+ nls.localizeByDefault("Enables bracket pair guides."),
431
+ nls.localizeByDefault("Enables bracket pair guides only for the active bracket pair."),
432
+ nls.localizeByDefault("Disables bracket pair guides.")
433
433
  ],
434
434
  "default": false,
435
- "description": nls.localize("theia/editor/editor.guides.bracketPairs", "Controls whether bracket pair guides are enabled or not."),
435
+ "description": nls.localizeByDefault("Controls whether bracket pair guides are enabled or not."),
436
436
  "scope": "language-overridable",
437
437
  "restricted": false
438
438
  },
@@ -447,19 +447,19 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
447
447
  false
448
448
  ],
449
449
  "enumDescriptions": [
450
- nls.localize("theia/editor/editor.guides.bracketPairsHorizontal0", "Enables horizontal guides as addition to vertical bracket pair guides."),
451
- nls.localize("theia/editor/editor.guides.bracketPairsHorizontal1", "Enables horizontal guides only for the active bracket pair."),
452
- nls.localize("theia/editor/editor.guides.bracketPairsHorizontal2", "Disables horizontal bracket pair guides.")
450
+ nls.localizeByDefault("Enables horizontal guides as addition to vertical bracket pair guides."),
451
+ nls.localizeByDefault("Enables horizontal guides only for the active bracket pair."),
452
+ nls.localizeByDefault("Disables horizontal bracket pair guides.")
453
453
  ],
454
454
  "default": "active",
455
- "description": nls.localize("theia/editor/editor.guides.bracketPairsHorizontal", "Controls whether horizontal bracket pair guides are enabled or not."),
455
+ "description": nls.localizeByDefault("Controls whether horizontal bracket pair guides are enabled or not."),
456
456
  "scope": "language-overridable",
457
457
  "restricted": false
458
458
  },
459
459
  "editor.guides.highlightActiveBracketPair": {
460
460
  "type": "boolean",
461
461
  "default": true,
462
- "description": nls.localize("theia/editor/editor.guides.highlightActiveBracketPair", "Controls whether the editor should highlight the active bracket pair."),
462
+ "description": nls.localizeByDefault("Controls whether the editor should highlight the active bracket pair."),
463
463
  "scope": "language-overridable",
464
464
  "restricted": false
465
465
  },
@@ -481,9 +481,9 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
481
481
  false
482
482
  ],
483
483
  "enumDescriptions": [
484
- nls.localize("theia/editor/editor.guides.highlightActiveIndentation0", "Highlights the active indent guide."),
485
- nls.localize("theia/editor/editor.guides.highlightActiveIndentation1", "Highlights the active indent guide even if bracket guides are highlighted."),
486
- nls.localize("theia/editor/editor.guides.highlightActiveIndentation2", "Do not highlight the active indent guide.")
484
+ nls.localizeByDefault("Highlights the active indent guide."),
485
+ nls.localizeByDefault("Highlights the active indent guide even if bracket guides are highlighted."),
486
+ nls.localizeByDefault("Do not highlight the active indent guide.")
487
487
  ],
488
488
  "default": true,
489
489
  "description": nls.localizeByDefault("Controls whether the editor should highlight the active indent guide."),
@@ -509,7 +509,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
509
509
  "default": 0,
510
510
  "minimum": 0,
511
511
  "maximum": 100,
512
- "markdownDescription": nls.localize("theia/editor/editor.codeLensFontSize", "Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used."),
512
+ "markdownDescription": nls.localizeByDefault("Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used."),
513
513
  "scope": "language-overridable",
514
514
  "restricted": false
515
515
  },
@@ -627,7 +627,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
627
627
  "editor.dropIntoEditor.enabled": {
628
628
  "type": "boolean",
629
629
  "default": true,
630
- "markdownDescription": nls.localize("theia/editor/editor.dropIntoEditor.enabled", "Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor)."),
630
+ "markdownDescription": nls.localizeByDefault("Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor)."),
631
631
  "scope": "language-overridable",
632
632
  "restricted": false
633
633
  },
@@ -661,9 +661,9 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
661
661
  ],
662
662
  "default": "always",
663
663
  "enumDescriptions": [
664
- nls.localize("theia/editor/editor.find.seedSearchStringFromSelection0", "Never seed search string from the editor selection."),
665
- nls.localize("theia/editor/editor.find.seedSearchStringFromSelection1", "Always seed search string from the editor selection, including word at cursor position."),
666
- nls.localize("theia/editor/editor.find.seedSearchStringFromSelection2", "Only seed search string from the editor selection.")
664
+ nls.localizeByDefault("Never seed search string from the editor selection."),
665
+ nls.localizeByDefault("Always seed search string from the editor selection, including word at cursor position."),
666
+ nls.localizeByDefault("Only seed search string from the editor selection.")
667
667
  ],
668
668
  "description": nls.localizeByDefault("Controls whether the search string in the Find Widget is seeded from the editor selection."),
669
669
  "scope": "language-overridable",
@@ -678,11 +678,11 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
678
678
  ],
679
679
  "default": "never",
680
680
  "enumDescriptions": [
681
- nls.localizeByDefault('Never turn on Find in selection automatically (default).'),
682
- nls.localizeByDefault('Always turn on Find in selection automatically.'),
683
- nls.localizeByDefault('Turn on Find in selection automatically when multiple lines of content are selected.'),
681
+ nls.localizeByDefault('Never turn on Find in Selection automatically (default).'),
682
+ nls.localizeByDefault('Always turn on Find in Selection automatically.'),
683
+ nls.localizeByDefault('Turn on Find in Selection automatically when multiple lines of content are selected.'),
684
684
  ],
685
- "description": nls.localizeByDefault("Controls the condition for turning on find in selection automatically."),
685
+ "description": nls.localizeByDefault('Controls the condition for turning on Find in Selection automatically.'),
686
686
  "scope": "language-overridable",
687
687
  "restricted": false
688
688
  },
@@ -730,14 +730,14 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
730
730
  "restricted": false
731
731
  },
732
732
  "editor.foldingImportsByDefault": {
733
- "description": nls.localize("theia/editor/editor.foldingImportsByDefault", "Controls whether the editor automatically collapses import ranges."),
733
+ "description": nls.localizeByDefault("Controls whether the editor automatically collapses import ranges."),
734
734
  "type": "boolean",
735
735
  "default": false,
736
736
  "scope": "language-overridable",
737
737
  "restricted": false
738
738
  },
739
739
  "editor.foldingMaximumRegions": {
740
- "description": nls.localize("theia/editor/editor.foldingMaximumRegions", "The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions."),
740
+ "description": nls.localizeByDefault("The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions."),
741
741
  "type": "integer",
742
742
  "default": 5000,
743
743
  "minimum": 10,
@@ -1067,14 +1067,14 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1067
1067
  "editor.hover.above": {
1068
1068
  "type": "boolean",
1069
1069
  "default": true,
1070
- "description": nls.localize("theia/editor/editor.hover.above", "Prefer showing hovers above the line, if there's space."),
1070
+ "description": nls.localizeByDefault("Prefer showing hovers above the line, if there's space."),
1071
1071
  "scope": "language-overridable",
1072
1072
  "restricted": false
1073
1073
  },
1074
1074
  "editor.inlineSuggest.enabled": {
1075
1075
  "type": "boolean",
1076
1076
  "default": true,
1077
- "description": nls.localize("theia/editor/editor.inlineSuggest.enabled", "Controls whether to automatically show inline suggestions in the editor."),
1077
+ "description": nls.localizeByDefault("Controls whether to automatically show inline suggestions in the editor."),
1078
1078
  "scope": "language-overridable",
1079
1079
  "restricted": false
1080
1080
  },
@@ -1093,7 +1093,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1093
1093
  "restricted": false
1094
1094
  },
1095
1095
  "editor.lineHeight": {
1096
- "markdownDescription": nls.localize("theia/editor/editor.lineHeight", "Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values."),
1096
+ "markdownDescription": nls.localizeByDefault("Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values."),
1097
1097
  "type": "number",
1098
1098
  "default": 0,
1099
1099
  "scope": "language-overridable",
@@ -1361,9 +1361,9 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1361
1361
  "off"
1362
1362
  ],
1363
1363
  "enumDescriptions": [
1364
- nls.localize("theia/editor/editor.quickSuggestions0", "Quick suggestions show inside the suggest widget"),
1365
- nls.localize("theia/editor/editor.quickSuggestions1", "Quick suggestions show as ghost text"),
1366
- nls.localize("theia/editor/editor.quickSuggestions2", "Quick suggestions are disabled")
1364
+ nls.localizeByDefault("Quick suggestions show inside the suggest widget"),
1365
+ nls.localizeByDefault("Quick suggestions show as ghost text"),
1366
+ nls.localizeByDefault("Quick suggestions are disabled")
1367
1367
  ]
1368
1368
  }
1369
1369
  ],
@@ -1383,9 +1383,9 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1383
1383
  "off"
1384
1384
  ],
1385
1385
  "enumDescriptions": [
1386
- nls.localize("theia/editor/editor.quickSuggestions0", "Quick suggestions show inside the suggest widget"),
1387
- nls.localize("theia/editor/editor.quickSuggestions1", "Quick suggestions show as ghost text"),
1388
- nls.localize("theia/editor/editor.quickSuggestions2", "Quick suggestions are disabled")
1386
+ nls.localizeByDefault("Quick suggestions show inside the suggest widget"),
1387
+ nls.localizeByDefault("Quick suggestions show as ghost text"),
1388
+ nls.localizeByDefault("Quick suggestions are disabled")
1389
1389
  ]
1390
1390
  }
1391
1391
  ],
@@ -1405,9 +1405,9 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1405
1405
  "off"
1406
1406
  ],
1407
1407
  "enumDescriptions": [
1408
- nls.localize("theia/editor/editor.quickSuggestions0", "Quick suggestions show inside the suggest widget"),
1409
- nls.localize("theia/editor/editor.quickSuggestions1", "Quick suggestions show as ghost text"),
1410
- nls.localize("theia/editor/editor.quickSuggestions2", "Quick suggestions are disabled")
1408
+ nls.localizeByDefault("Quick suggestions show inside the suggest widget"),
1409
+ nls.localizeByDefault("Quick suggestions show as ghost text"),
1410
+ nls.localizeByDefault("Quick suggestions are disabled")
1411
1411
  ]
1412
1412
  }
1413
1413
  ],
@@ -1549,12 +1549,12 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1549
1549
  "hidden"
1550
1550
  ],
1551
1551
  "enumDescriptions": [
1552
- nls.localize("theia/editor/editor.scrollbar.vertical0", "The vertical scrollbar will be visible only when necessary."),
1553
- nls.localize("theia/editor/editor.scrollbar.vertical1", "The vertical scrollbar will always be visible."),
1554
- nls.localize("theia/editor/editor.scrollbar.vertical2", "The vertical scrollbar will always be hidden.")
1552
+ nls.localizeByDefault("The vertical scrollbar will be visible only when necessary."),
1553
+ nls.localizeByDefault("The vertical scrollbar will always be visible."),
1554
+ nls.localizeByDefault("The vertical scrollbar will always be hidden.")
1555
1555
  ],
1556
1556
  "default": "auto",
1557
- "description": nls.localize("theia/editor/editor.scrollbar.vertical", "Controls the visibility of the vertical scrollbar."),
1557
+ "description": nls.localizeByDefault("Controls the visibility of the vertical scrollbar."),
1558
1558
  "scope": "language-overridable",
1559
1559
  "restricted": false
1560
1560
  },
@@ -1566,33 +1566,33 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1566
1566
  "hidden"
1567
1567
  ],
1568
1568
  "enumDescriptions": [
1569
- nls.localize("theia/editor/editor.scrollbar.horizontal0", "The horizontal scrollbar will be visible only when necessary."),
1570
- nls.localize("theia/editor/editor.scrollbar.horizontal1", "The horizontal scrollbar will always be visible."),
1571
- nls.localize("theia/editor/editor.scrollbar.horizontal2", "The horizontal scrollbar will always be hidden.")
1569
+ nls.localizeByDefault("The horizontal scrollbar will be visible only when necessary."),
1570
+ nls.localizeByDefault("The horizontal scrollbar will always be visible."),
1571
+ nls.localizeByDefault("The horizontal scrollbar will always be hidden.")
1572
1572
  ],
1573
1573
  "default": "auto",
1574
- "description": nls.localize("theia/editor/editor.scrollbar.horizontal", "Controls the visibility of the horizontal scrollbar."),
1574
+ "description": nls.localizeByDefault("Controls the visibility of the horizontal scrollbar."),
1575
1575
  "scope": "language-overridable",
1576
1576
  "restricted": false
1577
1577
  },
1578
1578
  "editor.scrollbar.verticalScrollbarSize": {
1579
1579
  "type": "number",
1580
1580
  "default": 14,
1581
- "description": nls.localize("theia/editor/editor.scrollbar.verticalScrollbarSize", "The width of the vertical scrollbar."),
1581
+ "description": nls.localizeByDefault("The width of the vertical scrollbar."),
1582
1582
  "scope": "language-overridable",
1583
1583
  "restricted": false
1584
1584
  },
1585
1585
  "editor.scrollbar.horizontalScrollbarSize": {
1586
1586
  "type": "number",
1587
1587
  "default": 12,
1588
- "description": nls.localize("theia/editor/editor.scrollbar.horizontalScrollbarSize", "The height of the horizontal scrollbar."),
1588
+ "description": nls.localizeByDefault("The height of the horizontal scrollbar."),
1589
1589
  "scope": "language-overridable",
1590
1590
  "restricted": false
1591
1591
  },
1592
1592
  "editor.scrollbar.scrollByPage": {
1593
1593
  "type": "boolean",
1594
1594
  "default": false,
1595
- "description": nls.localize("theia/editor/editor.scrollbar.scrollByPage", "Controls whether clicks scroll by page or jump to click position."),
1595
+ "description": nls.localizeByDefault("Controls whether clicks scroll by page or jump to click position."),
1596
1596
  "scope": "language-overridable",
1597
1597
  "restricted": false
1598
1598
  },
@@ -1772,7 +1772,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1772
1772
  "editor.suggest.preview": {
1773
1773
  "type": "boolean",
1774
1774
  "default": false,
1775
- "description": nls.localize("theia/editor/editor.suggest.preview", "Controls whether to preview the suggestion outcome in the editor."),
1775
+ "description": nls.localizeByDefault("Controls whether to preview the suggestion outcome in the editor."),
1776
1776
  "scope": "language-overridable",
1777
1777
  "restricted": false
1778
1778
  },
@@ -1821,7 +1821,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
1821
1821
  "editor.suggest.showDeprecated": {
1822
1822
  "type": "boolean",
1823
1823
  "default": true,
1824
- "markdownDescription": nls.localize("theia/editor/editor.suggest.showDeprecated", "When enabled IntelliSense shows `deprecated`-suggestions."),
1824
+ "markdownDescription": nls.localizeByDefault("When enabled IntelliSense shows `deprecated`-suggestions."),
1825
1825
  "scope": "language-overridable",
1826
1826
  "restricted": false
1827
1827
  },
@@ -2078,21 +2078,21 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2078
2078
  "inUntrustedWorkspace"
2079
2079
  ],
2080
2080
  "default": "inUntrustedWorkspace",
2081
- "description": nls.localize("theia/editor/editor.unicodeHighlight.nonBasicASCII", "Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII."),
2081
+ "description": nls.localizeByDefault("Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII."),
2082
2082
  "scope": "language-overridable"
2083
2083
  },
2084
2084
  "editor.unicodeHighlight.invisibleCharacters": {
2085
2085
  "restricted": true,
2086
2086
  "type": "boolean",
2087
2087
  "default": true,
2088
- "description": nls.localize("theia/editor/editor.unicodeHighlight.invisibleCharacters", "Controls whether characters that just reserve space or have no width at all are highlighted."),
2088
+ "description": nls.localizeByDefault("Controls whether characters that just reserve space or have no width at all are highlighted."),
2089
2089
  "scope": "language-overridable"
2090
2090
  },
2091
2091
  "editor.unicodeHighlight.ambiguousCharacters": {
2092
2092
  "restricted": true,
2093
2093
  "type": "boolean",
2094
2094
  "default": true,
2095
- "description": nls.localize("theia/editor/editor.unicodeHighlight.ambiguousCharacters", "Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale."),
2095
+ "description": nls.localizeByDefault("Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale."),
2096
2096
  "scope": "language-overridable"
2097
2097
  },
2098
2098
  "editor.unicodeHighlight.includeComments": {
@@ -2107,7 +2107,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2107
2107
  "inUntrustedWorkspace"
2108
2108
  ],
2109
2109
  "default": "inUntrustedWorkspace",
2110
- "description": nls.localize("theia/editor/editor.unicodeHighlight.includeComments", "Controls whether characters in comments should also be subject to unicode highlighting."),
2110
+ "description": nls.localizeByDefault("Controls whether characters in comments should also be subject to unicode highlighting."),
2111
2111
  "scope": "language-overridable"
2112
2112
  },
2113
2113
  "editor.unicodeHighlight.includeStrings": {
@@ -2122,14 +2122,14 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2122
2122
  "inUntrustedWorkspace"
2123
2123
  ],
2124
2124
  "default": true,
2125
- "description": nls.localize("theia/editor/editor.unicodeHighlight.includeStrings", "Controls whether characters in strings should also be subject to unicode highlighting."),
2125
+ "description": nls.localizeByDefault("Controls whether characters in strings should also be subject to unicode highlighting."),
2126
2126
  "scope": "language-overridable"
2127
2127
  },
2128
2128
  "editor.unicodeHighlight.allowedCharacters": {
2129
2129
  "restricted": true,
2130
2130
  "type": "object",
2131
2131
  "default": {},
2132
- "description": nls.localize("theia/editor/editor.unicodeHighlight.allowedCharacters", "Defines allowed characters that are not being highlighted."),
2132
+ "description": nls.localizeByDefault("Defines allowed characters that are not being highlighted."),
2133
2133
  "additionalProperties": {
2134
2134
  "type": "boolean"
2135
2135
  },
@@ -2145,7 +2145,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2145
2145
  "_os": true,
2146
2146
  "_vscode": true
2147
2147
  },
2148
- "description": nls.localize("theia/editor/editor.unicodeHighlight.allowedLocales", "Unicode characters that are common in allowed locales are not being highlighted."),
2148
+ "description": nls.localizeByDefault("Unicode characters that are common in allowed locales are not being highlighted."),
2149
2149
  "scope": "language-overridable"
2150
2150
  },
2151
2151
  "editor.unusualLineTerminators": {
@@ -2251,7 +2251,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2251
2251
  "editor.inlayHints.enabled": {
2252
2252
  "type": "string",
2253
2253
  "default": "on",
2254
- "description": nls.localize("theia/editor/editor.inlayHints.enabled", "Enables the inlay hints in the editor."),
2254
+ "description": nls.localizeByDefault("Enables the inlay hints in the editor."),
2255
2255
  "enum": [
2256
2256
  "on",
2257
2257
  "onUnlessPressed",
@@ -2259,10 +2259,10 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2259
2259
  "off"
2260
2260
  ],
2261
2261
  "markdownEnumDescriptions": [
2262
- nls.localize("theia/editor/editor.inlayHints.enabled0", "Inlay hints are enabled"),
2262
+ nls.localizeByDefault("Inlay hints are enabled"),
2263
2263
  nls.localize("theia/editor/editor.inlayHints.enabled1", "Inlay hints are showing by default and hide when holding Ctrl+Alt"),
2264
2264
  nls.localize("theia/editor/editor.inlayHints.enabled2", "Inlay hints are hidden by default and show when holding Ctrl+Alt"),
2265
- nls.localize("theia/editor/editor.inlayHints.enabled3", "Inlay hints are disabled")
2265
+ nls.localizeByDefault("Inlay hints are disabled")
2266
2266
  ],
2267
2267
  "scope": "language-overridable",
2268
2268
  "restricted": false
@@ -2270,21 +2270,21 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2270
2270
  "editor.inlayHints.fontSize": {
2271
2271
  "type": "number",
2272
2272
  "default": 0,
2273
- "markdownDescription": nls.localize("theia/editor/editor.inlayHints.fontSize", "Controls font size of inlay hints in the editor. As default the `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size."),
2273
+ "markdownDescription": nls.localizeByDefault("Controls font size of inlay hints in the editor. As default the `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size."),
2274
2274
  "scope": "language-overridable",
2275
2275
  "restricted": false
2276
2276
  },
2277
2277
  "editor.inlayHints.fontFamily": {
2278
2278
  "type": "string",
2279
2279
  "default": "",
2280
- "markdownDescription": nls.localize("theia/editor/editor.inlayHints.fontFamily", "Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used."),
2280
+ "markdownDescription": nls.localizeByDefault("Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used."),
2281
2281
  "scope": "language-overridable",
2282
2282
  "restricted": false
2283
2283
  },
2284
2284
  "editor.inlayHints.padding": {
2285
2285
  "type": "boolean",
2286
2286
  "default": false,
2287
- "description": nls.localize("theia/editor/editor.inlayHints.padding", "Enables the padding around the inlay hints in the editor."),
2287
+ "description": nls.localizeByDefault("Enables the padding around the inlay hints in the editor."),
2288
2288
  "scope": "language-overridable",
2289
2289
  "restricted": false
2290
2290
  },
@@ -2297,7 +2297,7 @@ export const editorGeneratedPreferenceProperties: PreferenceSchema['properties']
2297
2297
  },
2298
2298
  "editor.experimental.pasteActions.enabled": {
2299
2299
  "type": "boolean",
2300
- "description": nls.localize("theia/editor/editor.experimental.pasteActions.enabled", "Enable/disable running edits from extensions on paste."),
2300
+ "description": nls.localizeByDefault("Enable/disable running edits from extensions on paste."),
2301
2301
  "default": false,
2302
2302
  "scope": "language-overridable",
2303
2303
  "restricted": false
@@ -253,6 +253,12 @@ export class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
253
253
 
254
254
  protected getSelection(widget: EditorWidget, selection: RecursivePartial<Range>): Range | Position | undefined {
255
255
  const { start, end } = selection;
256
+ if (Position.is(start)) {
257
+ if (Position.is(end)) {
258
+ return widget.editor.document.toValidRange({ start, end });
259
+ }
260
+ return widget.editor.document.toValidPosition(start);
261
+ }
256
262
  const line = start && start.line !== undefined && start.line >= 0 ? start.line : undefined;
257
263
  if (line === undefined) {
258
264
  return undefined;
@@ -121,7 +121,7 @@ const fileContributionSchema: PreferenceSchema['properties'] = {
121
121
  'type': 'number',
122
122
  'default': 1000,
123
123
  'minimum': 0,
124
- 'markdownDescription': nls.localizeByDefault('Controls the delay in ms after which a dirty editor is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.', 'afterDelay')
124
+ 'markdownDescription': nls.localizeByDefault('Controls the delay in milliseconds after which an editor with unsaved changes is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.', 'afterDelay')
125
125
  },
126
126
  };
127
127
 
@@ -73,8 +73,7 @@ export class EditorWidgetFactory implements WidgetFactory {
73
73
  private setLabels(editor: EditorWidget, uri: URI): void {
74
74
  editor.title.caption = uri.path.fsPath();
75
75
  if (editor.editor.isReadonly) {
76
- // nls-todo: 'Read Only' be available with newer VSCode API
77
- editor.title.caption += ` • ${nls.localize('theia/editor/readOnly', 'Read Only')}`;
76
+ editor.title.caption += ` • ${nls.localizeByDefault('Read Only')}`;
78
77
  }
79
78
  const icon = this.labelProvider.getIcon(uri);
80
79
  editor.title.label = this.labelProvider.getName(uri);
@@ -17,7 +17,7 @@
17
17
  import { Position, Range, Location } from '@theia/core/shared/vscode-languageserver-protocol';
18
18
  import * as lsp from '@theia/core/shared/vscode-languageserver-protocol';
19
19
  import URI from '@theia/core/lib/common/uri';
20
- import { Event, Disposable, TextDocumentContentChangeDelta, Reference } from '@theia/core/lib/common';
20
+ import { Event, Disposable, TextDocumentContentChangeDelta, Reference, isObject } from '@theia/core/lib/common';
21
21
  import { Saveable, Navigatable, Widget } from '@theia/core/lib/browser';
22
22
  import { EditorDecoration } from './decorations/editor-decoration';
23
23
 
@@ -33,6 +33,17 @@ export interface TextEditorDocument extends lsp.TextDocument, Saveable, Disposab
33
33
  * @since 1.8.0
34
34
  */
35
35
  findMatches?(options: FindMatchesOptions): FindMatch[];
36
+ /**
37
+ * Creates a valid position. If the position is outside of the backing document, this method will return a position that is ensured to be inside the document and valid.
38
+ * For example, when the `position` is `{ line: 1, character: 0 }` and the document is empty, this method will return with `{ line: 0, character: 0 }`.
39
+ */
40
+ toValidPosition(position: Position): Position;
41
+ /**
42
+ * Creates a valid range. If the `range` argument is outside of the document, this method will return with a new range that does not exceed the boundaries of the document.
43
+ * For example, if the argument is `{ start: { line: 1, character: 0 }, end: { line: 1, character: 0 } }` and the document is empty, the return value is
44
+ * `{ start: { line: 0, character: 0 }, end: { line: 0, character: 0 } }`.
45
+ */
46
+ toValidRange(range: Range): Range;
36
47
  }
37
48
 
38
49
  // Refactoring
@@ -330,8 +341,8 @@ export interface ReplaceOperation {
330
341
  }
331
342
 
332
343
  export namespace TextEditorSelection {
333
- export function is(e: unknown): e is TextEditorSelection {
334
- return !!e && typeof e === 'object' && (e as TextEditorSelection).uri instanceof URI;
344
+ export function is(arg: unknown): arg is TextEditorSelection {
345
+ return isObject<TextEditorSelection>(arg) && arg.uri instanceof URI;
335
346
  }
336
347
  }
337
348
 
@@ -230,8 +230,8 @@ export class EditorLanguageStatusService {
230
230
  pin.className = this.pinnedCommands.has(id) ? codicon('pinned', true) : codicon('pin', true);
231
231
  pin.ariaRoleDescription = 'button';
232
232
  const pinText = this.pinnedCommands.has(id)
233
- ? nls.localize('theia/editor/status-bar-unpin', 'Remove from Status Bar')
234
- : nls.localize('theia/editor/status-bar-pin', 'Add to Status Bar');
233
+ ? nls.localizeByDefault('Remove from Status Bar')
234
+ : nls.localizeByDefault('Add to Status Bar');
235
235
  pin.ariaLabel = pinText;
236
236
  pin.title = pinText;
237
237
  }