@mrclrchtr/supi-lsp 1.11.2 → 1.11.3

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 (132) hide show
  1. package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  2. package/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
  3. package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  4. package/node_modules/vscode-languageserver-protocol/README.md +3 -3
  5. package/node_modules/vscode-languageserver-protocol/eslint.config.js +13 -0
  6. package/node_modules/vscode-languageserver-protocol/lib/browser/main.js +1 -2
  7. package/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts +1 -1
  8. package/node_modules/vscode-languageserver-protocol/lib/common/api.js +1 -1
  9. package/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts +13 -13
  10. package/node_modules/vscode-languageserver-protocol/lib/common/connection.js +1 -2
  11. package/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts +7 -0
  12. package/node_modules/vscode-languageserver-protocol/lib/common/messages.js +38 -1
  13. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts +5 -2
  14. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +3 -0
  15. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts +5 -3
  16. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +3 -1
  17. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts +2 -1
  18. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +1 -0
  19. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts +735 -361
  20. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts +3 -2
  21. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +1 -0
  22. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts +12 -3
  23. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +37 -1
  24. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts +8 -2
  25. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +6 -0
  26. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts +34 -25
  27. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +4 -1
  28. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts +3 -2
  29. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +1 -0
  30. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts +15 -8
  31. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +3 -0
  32. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts +3 -7
  33. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +1 -1
  34. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts +7 -6
  35. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +2 -0
  36. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +97 -9
  37. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts +3 -2
  38. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +1 -0
  39. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts +3 -2
  40. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +1 -0
  41. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts +91 -63
  42. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +34 -1
  43. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts +2 -1
  44. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +1 -0
  45. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts +3 -2
  46. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +1 -0
  47. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts +44 -26
  48. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +4 -0
  49. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts +4 -3
  50. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +1 -0
  51. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.d.ts +93 -0
  52. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.js +33 -0
  53. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts +3 -2
  54. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +2 -1
  55. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts +3 -2
  56. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +1 -0
  57. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts +3 -1
  58. package/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +2 -0
  59. package/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +9 -10
  60. package/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts +0 -1
  61. package/node_modules/vscode-languageserver-protocol/lib/node/main.js +1 -2
  62. package/node_modules/vscode-languageserver-protocol/metaModel.schema.json +84 -3
  63. package/node_modules/vscode-languageserver-protocol/package.json +21 -12
  64. package/node_modules/vscode-languageserver-types/README.md +1 -1
  65. package/node_modules/vscode-languageserver-types/eslint.config.js +13 -0
  66. package/node_modules/vscode-languageserver-types/lib/esm/main.d.ts +483 -107
  67. package/node_modules/vscode-languageserver-types/lib/esm/main.js +255 -62
  68. package/node_modules/vscode-languageserver-types/lib/umd/main.d.ts +483 -107
  69. package/node_modules/vscode-languageserver-types/lib/umd/main.js +201 -8
  70. package/node_modules/vscode-languageserver-types/package.json +9 -8
  71. package/package.json +3 -3
  72. package/src/config/types.ts +3 -0
  73. package/src/diagnostics/diagnostic-context.ts +2 -1
  74. package/src/diagnostics/diagnostic-display.ts +2 -1
  75. package/src/diagnostics/diagnostics.ts +2 -1
  76. package/src/diagnostics/stale-diagnostics.ts +3 -1
  77. package/src/diagnostics/suppression-diagnostics.ts +3 -1
  78. package/src/format.ts +30 -3
  79. package/src/ui/ui.ts +3 -1
  80. package/node_modules/vscode-languageserver-protocol/browser.d.ts +0 -6
  81. package/node_modules/vscode-languageserver-protocol/browser.js +0 -7
  82. package/node_modules/vscode-languageserver-protocol/node.cmd +0 -5
  83. package/node_modules/vscode-languageserver-protocol/node.d.ts +0 -6
  84. package/node_modules/vscode-languageserver-protocol/node.js +0 -7
  85. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/License.txt +0 -11
  86. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/README.md +0 -69
  87. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.d.ts +0 -6
  88. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js +0 -7
  89. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
  90. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -76
  91. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +0 -12
  92. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -156
  93. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.d.ts +0 -14
  94. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js +0 -81
  95. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
  96. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -96
  97. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +0 -358
  98. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -1212
  99. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
  100. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -16
  101. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
  102. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.js +0 -70
  103. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.d.ts +0 -39
  104. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js +0 -128
  105. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.d.ts +0 -7
  106. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js +0 -35
  107. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -53
  108. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -398
  109. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
  110. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -152
  111. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
  112. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -197
  113. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
  114. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -115
  115. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
  116. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -306
  117. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
  118. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -23
  119. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
  120. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -68
  121. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
  122. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -76
  123. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.d.ts +0 -63
  124. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.js +0 -257
  125. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +0 -13
  126. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.js +0 -161
  127. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.cmd +0 -5
  128. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.d.ts +0 -6
  129. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.js +0 -7
  130. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/package.json +0 -45
  131. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/thirdpartynotices.txt +0 -16
  132. package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/typings/thenable.d.ts +0 -5
@@ -60,7 +60,7 @@ export var Position;
60
60
  * Checks whether the given literal conforms to the {@link Position} interface.
61
61
  */
62
62
  function is(value) {
63
- let candidate = value;
63
+ const candidate = value;
64
64
  return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
65
65
  }
66
66
  Position.is = is;
@@ -87,7 +87,7 @@ export var Range;
87
87
  * Checks whether the given literal conforms to the {@link Range} interface.
88
88
  */
89
89
  function is(value) {
90
- let candidate = value;
90
+ const candidate = value;
91
91
  return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
92
92
  }
93
93
  Range.is = is;
@@ -111,7 +111,7 @@ export var Location;
111
111
  * Checks whether the given literal conforms to the {@link Location} interface.
112
112
  */
113
113
  function is(value) {
114
- let candidate = value;
114
+ const candidate = value;
115
115
  return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
116
116
  }
117
117
  Location.is = is;
@@ -137,7 +137,7 @@ export var LocationLink;
137
137
  * Checks whether the given literal conforms to the {@link LocationLink} interface.
138
138
  */
139
139
  function is(value) {
140
- let candidate = value;
140
+ const candidate = value;
141
141
  return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
142
142
  && Range.is(candidate.targetSelectionRange)
143
143
  && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
@@ -306,7 +306,7 @@ export var DiagnosticRelatedInformation;
306
306
  * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.
307
307
  */
308
308
  function is(value) {
309
- let candidate = value;
309
+ const candidate = value;
310
310
  return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
311
311
  }
312
312
  DiagnosticRelatedInformation.is = is;
@@ -377,7 +377,7 @@ export var Diagnostic;
377
377
  * Creates a new Diagnostic literal.
378
378
  */
379
379
  function create(range, message, severity, code, source, relatedInformation) {
380
- let result = { range, message };
380
+ const result = { range, message };
381
381
  if (Is.defined(severity)) {
382
382
  result.severity = severity;
383
383
  }
@@ -398,10 +398,10 @@ export var Diagnostic;
398
398
  */
399
399
  function is(value) {
400
400
  var _a;
401
- let candidate = value;
401
+ const candidate = value;
402
402
  return Is.defined(candidate)
403
403
  && Range.is(candidate.range)
404
- && Is.string(candidate.message)
404
+ && (Is.string(candidate.message) || MarkupContent.is(candidate.message))
405
405
  && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
406
406
  && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
407
407
  && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
@@ -409,6 +409,37 @@ export var Diagnostic;
409
409
  && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
410
410
  }
411
411
  Diagnostic.is = is;
412
+ /**
413
+ * Checks whether the given diagnostic's message conforms to the 3.17.0
414
+ * version of the protocol where the message is a string.
415
+ *
416
+ * @param value the diagnostic
417
+ * @returns true if the diagnostic's message is a string, false otherwise.
418
+ */
419
+ function is3_17(value) {
420
+ return Is.string(value.message);
421
+ }
422
+ Diagnostic.is3_17 = is3_17;
423
+ /**
424
+ * Gets the message string of a diagnostic. If the message is already a
425
+ * string, it is returned as is. If the message is a MarkupContent,
426
+ * the value of the MarkupContent is returned. Otherwise an error is thrown.
427
+ *
428
+ * @param diagnostic the diagnostic to get the message string from.
429
+ * @returns the message string of the given diagnostic.
430
+ */
431
+ function getMessageString(diagnostic) {
432
+ if (Is.string(diagnostic.message)) {
433
+ return diagnostic.message;
434
+ }
435
+ else if (MarkupContent.is(diagnostic.message)) {
436
+ return diagnostic.message.value;
437
+ }
438
+ else {
439
+ throw new Error(`Unknown message type ${typeof diagnostic.message}`);
440
+ }
441
+ }
442
+ Diagnostic.getMessageString = getMessageString;
412
443
  })(Diagnostic || (Diagnostic = {}));
413
444
  /**
414
445
  * The Command namespace provides helper functions to work with
@@ -420,7 +451,7 @@ export var Command;
420
451
  * Creates a new Command literal.
421
452
  */
422
453
  function create(title, command, ...args) {
423
- let result = { title, command };
454
+ const result = { title, command };
424
455
  if (Is.defined(args) && args.length > 0) {
425
456
  result.arguments = args;
426
457
  }
@@ -431,8 +462,8 @@ export var Command;
431
462
  * Checks whether the given literal conforms to the {@link Command} interface.
432
463
  */
433
464
  function is(value) {
434
- let candidate = value;
435
- return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
465
+ const candidate = value;
466
+ return Is.defined(candidate) && Is.string(candidate.title) && (candidate.tooltip === undefined || Is.string(candidate.tooltip)) && Is.string(candidate.command);
436
467
  }
437
468
  Command.is = is;
438
469
  })(Command || (Command = {}));
@@ -559,7 +590,7 @@ export var TextDocumentEdit;
559
590
  }
560
591
  TextDocumentEdit.create = create;
561
592
  function is(value) {
562
- let candidate = value;
593
+ const candidate = value;
563
594
  return Is.defined(candidate)
564
595
  && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
565
596
  && Array.isArray(candidate.edits);
@@ -569,7 +600,7 @@ export var TextDocumentEdit;
569
600
  export var CreateFile;
570
601
  (function (CreateFile) {
571
602
  function create(uri, options, annotation) {
572
- let result = {
603
+ const result = {
573
604
  kind: 'create',
574
605
  uri
575
606
  };
@@ -583,7 +614,7 @@ export var CreateFile;
583
614
  }
584
615
  CreateFile.create = create;
585
616
  function is(value) {
586
- let candidate = value;
617
+ const candidate = value;
587
618
  return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
588
619
  ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
589
620
  }
@@ -592,7 +623,7 @@ export var CreateFile;
592
623
  export var RenameFile;
593
624
  (function (RenameFile) {
594
625
  function create(oldUri, newUri, options, annotation) {
595
- let result = {
626
+ const result = {
596
627
  kind: 'rename',
597
628
  oldUri,
598
629
  newUri
@@ -607,7 +638,7 @@ export var RenameFile;
607
638
  }
608
639
  RenameFile.create = create;
609
640
  function is(value) {
610
- let candidate = value;
641
+ const candidate = value;
611
642
  return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
612
643
  ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
613
644
  }
@@ -616,7 +647,7 @@ export var RenameFile;
616
647
  export var DeleteFile;
617
648
  (function (DeleteFile) {
618
649
  function create(uri, options, annotation) {
619
- let result = {
650
+ const result = {
620
651
  kind: 'delete',
621
652
  uri
622
653
  };
@@ -630,7 +661,7 @@ export var DeleteFile;
630
661
  }
631
662
  DeleteFile.create = create;
632
663
  function is(value) {
633
- let candidate = value;
664
+ const candidate = value;
634
665
  return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
635
666
  ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
636
667
  }
@@ -639,7 +670,7 @@ export var DeleteFile;
639
670
  export var WorkspaceEdit;
640
671
  (function (WorkspaceEdit) {
641
672
  function is(value) {
642
- let candidate = value;
673
+ const candidate = value;
643
674
  return candidate &&
644
675
  (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
645
676
  (candidate.documentChanges === undefined || candidate.documentChanges.every((change) => {
@@ -733,6 +764,18 @@ class TextEditChangeImpl {
733
764
  }
734
765
  }
735
766
  }
767
+ export var SnippetTextEdit;
768
+ (function (SnippetTextEdit) {
769
+ function is(value) {
770
+ const candidate = value;
771
+ return Is.objectLiteral(candidate)
772
+ && Range.is(candidate.range)
773
+ && StringValue.isSnippet(candidate.snippet)
774
+ && (candidate.annotationId === undefined ||
775
+ (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)));
776
+ }
777
+ SnippetTextEdit.is = is;
778
+ })(SnippetTextEdit || (SnippetTextEdit = {}));
736
779
  /**
737
780
  * A helper class
738
781
  */
@@ -844,7 +887,7 @@ export class WorkspaceChange {
844
887
  }
845
888
  let result = this._textEditChanges[key];
846
889
  if (!result) {
847
- let edits = [];
890
+ const edits = [];
848
891
  this._workspaceEdit.changes[key] = edits;
849
892
  result = new TextEditChangeImpl(edits);
850
893
  this._textEditChanges[key] = result;
@@ -961,7 +1004,7 @@ export var TextDocumentIdentifier;
961
1004
  * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
962
1005
  */
963
1006
  function is(value) {
964
- let candidate = value;
1007
+ const candidate = value;
965
1008
  return Is.defined(candidate) && Is.string(candidate.uri);
966
1009
  }
967
1010
  TextDocumentIdentifier.is = is;
@@ -985,7 +1028,7 @@ export var VersionedTextDocumentIdentifier;
985
1028
  * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
986
1029
  */
987
1030
  function is(value) {
988
- let candidate = value;
1031
+ const candidate = value;
989
1032
  return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
990
1033
  }
991
1034
  VersionedTextDocumentIdentifier.is = is;
@@ -1009,11 +1052,89 @@ export var OptionalVersionedTextDocumentIdentifier;
1009
1052
  * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
1010
1053
  */
1011
1054
  function is(value) {
1012
- let candidate = value;
1055
+ const candidate = value;
1013
1056
  return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
1014
1057
  }
1015
1058
  OptionalVersionedTextDocumentIdentifier.is = is;
1016
1059
  })(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
1060
+ /**
1061
+ * Predefined Language kinds
1062
+ * @since 3.18.0
1063
+ */
1064
+ export var LanguageKind;
1065
+ (function (LanguageKind) {
1066
+ LanguageKind.ABAP = 'abap';
1067
+ LanguageKind.WindowsBat = 'bat';
1068
+ LanguageKind.BibTeX = 'bibtex';
1069
+ LanguageKind.Clojure = 'clojure';
1070
+ LanguageKind.Coffeescript = 'coffeescript';
1071
+ LanguageKind.C = 'c';
1072
+ LanguageKind.CPP = 'cpp';
1073
+ LanguageKind.CSharp = 'csharp';
1074
+ LanguageKind.CSS = 'css';
1075
+ /**
1076
+ * @since 3.18.0
1077
+ */
1078
+ LanguageKind.D = 'd';
1079
+ /**
1080
+ * @since 3.18.0
1081
+ */
1082
+ LanguageKind.Delphi = 'pascal';
1083
+ LanguageKind.Diff = 'diff';
1084
+ LanguageKind.Dart = 'dart';
1085
+ LanguageKind.Dockerfile = 'dockerfile';
1086
+ LanguageKind.Elixir = 'elixir';
1087
+ LanguageKind.Erlang = 'erlang';
1088
+ LanguageKind.FSharp = 'fsharp';
1089
+ LanguageKind.GitCommit = 'git-commit';
1090
+ LanguageKind.GitRebase = 'git-rebase';
1091
+ LanguageKind.Go = 'go';
1092
+ LanguageKind.Groovy = 'groovy';
1093
+ LanguageKind.Handlebars = 'handlebars';
1094
+ LanguageKind.Haskell = 'haskell';
1095
+ LanguageKind.HTML = 'html';
1096
+ LanguageKind.Ini = 'ini';
1097
+ LanguageKind.Java = 'java';
1098
+ LanguageKind.JavaScript = 'javascript';
1099
+ LanguageKind.JavaScriptReact = 'javascriptreact';
1100
+ LanguageKind.JSON = 'json';
1101
+ LanguageKind.LaTeX = 'latex';
1102
+ LanguageKind.Less = 'less';
1103
+ LanguageKind.Lua = 'lua';
1104
+ LanguageKind.Makefile = 'makefile';
1105
+ LanguageKind.Markdown = 'markdown';
1106
+ LanguageKind.ObjectiveC = 'objective-c';
1107
+ LanguageKind.ObjectiveCPP = 'objective-cpp';
1108
+ /**
1109
+ * @since 3.18.0
1110
+ */
1111
+ LanguageKind.Pascal = 'pascal';
1112
+ LanguageKind.Perl = 'perl';
1113
+ LanguageKind.Perl6 = 'perl6';
1114
+ LanguageKind.PHP = 'php';
1115
+ LanguageKind.Plaintext = 'plaintext';
1116
+ LanguageKind.Powershell = 'powershell';
1117
+ LanguageKind.Pug = 'jade';
1118
+ LanguageKind.Python = 'python';
1119
+ LanguageKind.R = 'r';
1120
+ LanguageKind.Razor = 'razor';
1121
+ LanguageKind.Ruby = 'ruby';
1122
+ LanguageKind.Rust = 'rust';
1123
+ LanguageKind.SCSS = 'scss';
1124
+ LanguageKind.SASS = 'sass';
1125
+ LanguageKind.Scala = 'scala';
1126
+ LanguageKind.ShaderLab = 'shaderlab';
1127
+ LanguageKind.ShellScript = 'shellscript';
1128
+ LanguageKind.SQL = 'sql';
1129
+ LanguageKind.Swift = 'swift';
1130
+ LanguageKind.TypeScript = 'typescript';
1131
+ LanguageKind.TypeScriptReact = 'typescriptreact';
1132
+ LanguageKind.TeX = 'tex';
1133
+ LanguageKind.VisualBasic = 'vb';
1134
+ LanguageKind.XML = 'xml';
1135
+ LanguageKind.XSL = 'xsl';
1136
+ LanguageKind.YAML = 'yaml';
1137
+ })(LanguageKind || (LanguageKind = {}));
1017
1138
  /**
1018
1139
  * The TextDocumentItem namespace provides helper functions to work with
1019
1140
  * {@link TextDocumentItem} literals.
@@ -1035,7 +1156,7 @@ export var TextDocumentItem;
1035
1156
  * Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
1036
1157
  */
1037
1158
  function is(value) {
1038
- let candidate = value;
1159
+ const candidate = value;
1039
1160
  return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
1040
1161
  }
1041
1162
  TextDocumentItem.is = is;
@@ -1193,6 +1314,27 @@ export var InsertTextMode;
1193
1314
  */
1194
1315
  InsertTextMode.adjustIndentation = 2;
1195
1316
  })(InsertTextMode || (InsertTextMode = {}));
1317
+ /**
1318
+ * Defines how values from a set of defaults and an individual item will be
1319
+ * merged.
1320
+ *
1321
+ * @since 3.18.0
1322
+ */
1323
+ export var ApplyKind;
1324
+ (function (ApplyKind) {
1325
+ /**
1326
+ * The value from the individual item (if provided and not `null`) will be
1327
+ * used instead of the default.
1328
+ */
1329
+ ApplyKind.Replace = 1;
1330
+ /**
1331
+ * The value from the item will be merged with the default.
1332
+ *
1333
+ * The specific rules for mergeing values are defined against each field
1334
+ * that supports merging.
1335
+ */
1336
+ ApplyKind.Merge = 2;
1337
+ })(ApplyKind || (ApplyKind = {}));
1196
1338
  export var CompletionItemLabelDetails;
1197
1339
  (function (CompletionItemLabelDetails) {
1198
1340
  function is(value) {
@@ -1260,7 +1402,7 @@ export var Hover;
1260
1402
  * Checks whether the given value conforms to the {@link Hover} interface.
1261
1403
  */
1262
1404
  function is(value) {
1263
- let candidate = value;
1405
+ const candidate = value;
1264
1406
  return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
1265
1407
  MarkedString.is(candidate.contents) ||
1266
1408
  Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
@@ -1291,7 +1433,7 @@ export var ParameterInformation;
1291
1433
  export var SignatureInformation;
1292
1434
  (function (SignatureInformation) {
1293
1435
  function create(label, documentation, ...parameters) {
1294
- let result = { label };
1436
+ const result = { label };
1295
1437
  if (Is.defined(documentation)) {
1296
1438
  result.documentation = documentation;
1297
1439
  }
@@ -1335,7 +1477,7 @@ export var DocumentHighlight;
1335
1477
  * @param kind The highlight kind
1336
1478
  */
1337
1479
  function create(range, kind) {
1338
- let result = { range };
1480
+ const result = { range };
1339
1481
  if (Is.number(kind)) {
1340
1482
  result.kind = kind;
1341
1483
  }
@@ -1399,7 +1541,7 @@ export var SymbolInformation;
1399
1541
  * @param containerName The name of the symbol containing the symbol.
1400
1542
  */
1401
1543
  function create(name, kind, range, uri, containerName) {
1402
- let result = {
1544
+ const result = {
1403
1545
  name,
1404
1546
  kind,
1405
1547
  location: { uri, range }
@@ -1442,7 +1584,7 @@ export var DocumentSymbol;
1442
1584
  * @param children Children of the symbol.
1443
1585
  */
1444
1586
  function create(name, detail, kind, range, selectionRange, children) {
1445
- let result = {
1587
+ const result = {
1446
1588
  name,
1447
1589
  detail,
1448
1590
  kind,
@@ -1459,7 +1601,7 @@ export var DocumentSymbol;
1459
1601
  * Checks whether the given literal conforms to the {@link DocumentSymbol} interface.
1460
1602
  */
1461
1603
  function is(value) {
1462
- let candidate = value;
1604
+ const candidate = value;
1463
1605
  return candidate &&
1464
1606
  Is.string(candidate.name) && Is.number(candidate.kind) &&
1465
1607
  Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
@@ -1510,6 +1652,19 @@ export var CodeActionKind;
1510
1652
  * - ...
1511
1653
  */
1512
1654
  CodeActionKind.RefactorInline = 'refactor.inline';
1655
+ /**
1656
+ * Base kind for refactoring move actions: `refactor.move`
1657
+ *
1658
+ * Example move actions:
1659
+ *
1660
+ * - Move a function to a new file
1661
+ * - Move a property between classes
1662
+ * - Move method to base class
1663
+ * - ...
1664
+ *
1665
+ * @since 3.18.0
1666
+ */
1667
+ CodeActionKind.RefactorMove = 'refactor.move';
1513
1668
  /**
1514
1669
  * Base kind for refactoring rewrite actions: 'refactor.rewrite'
1515
1670
  *
@@ -1542,6 +1697,13 @@ export var CodeActionKind;
1542
1697
  * @since 3.15.0
1543
1698
  */
1544
1699
  CodeActionKind.SourceFixAll = 'source.fixAll';
1700
+ /**
1701
+ * Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using
1702
+ * this should always begin with `notebook.`
1703
+ *
1704
+ * @since 3.18.0
1705
+ */
1706
+ CodeActionKind.Notebook = 'notebook';
1545
1707
  })(CodeActionKind || (CodeActionKind = {}));
1546
1708
  /**
1547
1709
  * The reason why code actions were requested.
@@ -1572,7 +1734,7 @@ export var CodeActionContext;
1572
1734
  * Creates a new CodeActionContext literal.
1573
1735
  */
1574
1736
  function create(diagnostics, only, triggerKind) {
1575
- let result = { diagnostics };
1737
+ const result = { diagnostics };
1576
1738
  if (only !== undefined && only !== null) {
1577
1739
  result.only = only;
1578
1740
  }
@@ -1586,17 +1748,36 @@ export var CodeActionContext;
1586
1748
  * Checks whether the given literal conforms to the {@link CodeActionContext} interface.
1587
1749
  */
1588
1750
  function is(value) {
1589
- let candidate = value;
1751
+ const candidate = value;
1590
1752
  return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)
1591
1753
  && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))
1592
1754
  && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
1593
1755
  }
1594
1756
  CodeActionContext.is = is;
1595
1757
  })(CodeActionContext || (CodeActionContext = {}));
1758
+ /**
1759
+ * Code action tags are extra annotations that tweak the behavior of a code action.
1760
+ *
1761
+ * @since 3.18.0 - proposed
1762
+ */
1763
+ export var CodeActionTag;
1764
+ (function (CodeActionTag) {
1765
+ /**
1766
+ * Marks the code action as LLM-generated.
1767
+ */
1768
+ CodeActionTag.LLMGenerated = 1;
1769
+ /**
1770
+ * Checks whether the given literal conforms to the {@link CodeActionTag} interface.
1771
+ */
1772
+ function is(value) {
1773
+ return Is.defined(value) && value === CodeActionTag.LLMGenerated;
1774
+ }
1775
+ CodeActionTag.is = is;
1776
+ })(CodeActionTag || (CodeActionTag = {}));
1596
1777
  export var CodeAction;
1597
1778
  (function (CodeAction) {
1598
1779
  function create(title, kindOrCommandOrEdit, kind) {
1599
- let result = { title };
1780
+ const result = { title };
1600
1781
  let checkKind = true;
1601
1782
  if (typeof kindOrCommandOrEdit === 'string') {
1602
1783
  checkKind = false;
@@ -1615,14 +1796,15 @@ export var CodeAction;
1615
1796
  }
1616
1797
  CodeAction.create = create;
1617
1798
  function is(value) {
1618
- let candidate = value;
1799
+ const candidate = value;
1619
1800
  return candidate && Is.string(candidate.title) &&
1620
1801
  (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
1621
1802
  (candidate.kind === undefined || Is.string(candidate.kind)) &&
1622
1803
  (candidate.edit !== undefined || candidate.command !== undefined) &&
1623
1804
  (candidate.command === undefined || Command.is(candidate.command)) &&
1624
1805
  (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
1625
- (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
1806
+ (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)) &&
1807
+ (candidate.tags === undefined || Is.typedArray(candidate.tags, CodeActionTag.is));
1626
1808
  }
1627
1809
  CodeAction.is = is;
1628
1810
  })(CodeAction || (CodeAction = {}));
@@ -1636,7 +1818,7 @@ export var CodeLens;
1636
1818
  * Creates a new CodeLens literal.
1637
1819
  */
1638
1820
  function create(range, data) {
1639
- let result = { range };
1821
+ const result = { range };
1640
1822
  if (Is.defined(data)) {
1641
1823
  result.data = data;
1642
1824
  }
@@ -1647,7 +1829,7 @@ export var CodeLens;
1647
1829
  * Checks whether the given literal conforms to the {@link CodeLens} interface.
1648
1830
  */
1649
1831
  function is(value) {
1650
- let candidate = value;
1832
+ const candidate = value;
1651
1833
  return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
1652
1834
  }
1653
1835
  CodeLens.is = is;
@@ -1669,7 +1851,7 @@ export var FormattingOptions;
1669
1851
  * Checks whether the given literal conforms to the {@link FormattingOptions} interface.
1670
1852
  */
1671
1853
  function is(value) {
1672
- let candidate = value;
1854
+ const candidate = value;
1673
1855
  return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
1674
1856
  }
1675
1857
  FormattingOptions.is = is;
@@ -1691,7 +1873,7 @@ export var DocumentLink;
1691
1873
  * Checks whether the given literal conforms to the {@link DocumentLink} interface.
1692
1874
  */
1693
1875
  function is(value) {
1694
- let candidate = value;
1876
+ const candidate = value;
1695
1877
  return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
1696
1878
  }
1697
1879
  DocumentLink.is = is;
@@ -1712,7 +1894,7 @@ export var SelectionRange;
1712
1894
  }
1713
1895
  SelectionRange.create = create;
1714
1896
  function is(value) {
1715
- let candidate = value;
1897
+ const candidate = value;
1716
1898
  return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
1717
1899
  }
1718
1900
  SelectionRange.is = is;
@@ -1756,6 +1938,10 @@ export var SemanticTokenTypes;
1756
1938
  * @since 3.17.0
1757
1939
  */
1758
1940
  SemanticTokenTypes["decorator"] = "decorator";
1941
+ /**
1942
+ * @since 3.18.0
1943
+ */
1944
+ SemanticTokenTypes["label"] = "label";
1759
1945
  })(SemanticTokenTypes || (SemanticTokenTypes = {}));
1760
1946
  /**
1761
1947
  * A set of predefined token modifiers. This set is not fixed
@@ -1810,7 +1996,8 @@ export var InlineValueText;
1810
1996
  InlineValueText.is = is;
1811
1997
  })(InlineValueText || (InlineValueText = {}));
1812
1998
  /**
1813
- * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
1999
+ * The InlineValueVariableLookup namespace provides functions to
2000
+ * deal with InlineValueVariableLookups.
1814
2001
  *
1815
2002
  * @since 3.17.0
1816
2003
  */
@@ -1938,6 +2125,13 @@ export var StringValue;
1938
2125
  return { kind: 'snippet', value };
1939
2126
  }
1940
2127
  StringValue.createSnippet = createSnippet;
2128
+ function isSnippet(value) {
2129
+ const candidate = value;
2130
+ return Is.objectLiteral(candidate)
2131
+ && candidate.kind === 'snippet'
2132
+ && Is.string(candidate.value);
2133
+ }
2134
+ StringValue.isSnippet = isSnippet;
1941
2135
  })(StringValue || (StringValue = {}));
1942
2136
  export var InlineCompletionItem;
1943
2137
  (function (InlineCompletionItem) {
@@ -1957,18 +2151,17 @@ export var InlineCompletionList;
1957
2151
  * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.
1958
2152
  *
1959
2153
  * @since 3.18.0
1960
- * @proposed
1961
2154
  */
1962
2155
  export var InlineCompletionTriggerKind;
1963
2156
  (function (InlineCompletionTriggerKind) {
1964
2157
  /**
1965
2158
  * Completion was triggered explicitly by a user gesture.
1966
2159
  */
1967
- InlineCompletionTriggerKind.Invoked = 0;
2160
+ InlineCompletionTriggerKind.Invoked = 1;
1968
2161
  /**
1969
2162
  * Completion was triggered automatically while editing.
1970
2163
  */
1971
- InlineCompletionTriggerKind.Automatic = 1;
2164
+ InlineCompletionTriggerKind.Automatic = 2;
1972
2165
  })(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));
1973
2166
  export var SelectedCompletionInfo;
1974
2167
  (function (SelectedCompletionInfo) {
@@ -2013,15 +2206,15 @@ export var TextDocument;
2013
2206
  * Checks whether the given literal conforms to the {@link ITextDocument} interface.
2014
2207
  */
2015
2208
  function is(value) {
2016
- let candidate = value;
2209
+ const candidate = value;
2017
2210
  return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
2018
2211
  && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
2019
2212
  }
2020
2213
  TextDocument.is = is;
2021
2214
  function applyEdits(document, edits) {
2022
2215
  let text = document.getText();
2023
- let sortedEdits = mergeSort(edits, (a, b) => {
2024
- let diff = a.range.start.line - b.range.start.line;
2216
+ const sortedEdits = mergeSort(edits, (a, b) => {
2217
+ const diff = a.range.start.line - b.range.start.line;
2025
2218
  if (diff === 0) {
2026
2219
  return a.range.start.character - b.range.start.character;
2027
2220
  }
@@ -2029,9 +2222,9 @@ export var TextDocument;
2029
2222
  });
2030
2223
  let lastModifiedOffset = text.length;
2031
2224
  for (let i = sortedEdits.length - 1; i >= 0; i--) {
2032
- let e = sortedEdits[i];
2033
- let startOffset = document.offsetAt(e.range.start);
2034
- let endOffset = document.offsetAt(e.range.end);
2225
+ const e = sortedEdits[i];
2226
+ const startOffset = document.offsetAt(e.range.start);
2227
+ const endOffset = document.offsetAt(e.range.end);
2035
2228
  if (endOffset <= lastModifiedOffset) {
2036
2229
  text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
2037
2230
  }
@@ -2057,7 +2250,7 @@ export var TextDocument;
2057
2250
  let rightIdx = 0;
2058
2251
  let i = 0;
2059
2252
  while (leftIdx < left.length && rightIdx < right.length) {
2060
- let ret = compare(left[leftIdx], right[rightIdx]);
2253
+ const ret = compare(left[leftIdx], right[rightIdx]);
2061
2254
  if (ret <= 0) {
2062
2255
  // smaller_equal -> take left to preserve order
2063
2256
  data[i++] = left[leftIdx++];
@@ -2098,8 +2291,8 @@ class FullTextDocument {
2098
2291
  }
2099
2292
  getText(range) {
2100
2293
  if (range) {
2101
- let start = this.offsetAt(range.start);
2102
- let end = this.offsetAt(range.end);
2294
+ const start = this.offsetAt(range.start);
2295
+ const end = this.offsetAt(range.end);
2103
2296
  return this._content.substring(start, end);
2104
2297
  }
2105
2298
  return this._content;
@@ -2111,15 +2304,15 @@ class FullTextDocument {
2111
2304
  }
2112
2305
  getLineOffsets() {
2113
2306
  if (this._lineOffsets === undefined) {
2114
- let lineOffsets = [];
2115
- let text = this._content;
2307
+ const lineOffsets = [];
2308
+ const text = this._content;
2116
2309
  let isLineStart = true;
2117
2310
  for (let i = 0; i < text.length; i++) {
2118
2311
  if (isLineStart) {
2119
2312
  lineOffsets.push(i);
2120
2313
  isLineStart = false;
2121
2314
  }
2122
- let ch = text.charAt(i);
2315
+ const ch = text.charAt(i);
2123
2316
  isLineStart = (ch === '\r' || ch === '\n');
2124
2317
  if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
2125
2318
  i++;
@@ -2134,13 +2327,13 @@ class FullTextDocument {
2134
2327
  }
2135
2328
  positionAt(offset) {
2136
2329
  offset = Math.max(Math.min(offset, this._content.length), 0);
2137
- let lineOffsets = this.getLineOffsets();
2330
+ const lineOffsets = this.getLineOffsets();
2138
2331
  let low = 0, high = lineOffsets.length;
2139
2332
  if (high === 0) {
2140
2333
  return Position.create(0, offset);
2141
2334
  }
2142
2335
  while (low < high) {
2143
- let mid = Math.floor((low + high) / 2);
2336
+ const mid = Math.floor((low + high) / 2);
2144
2337
  if (lineOffsets[mid] > offset) {
2145
2338
  high = mid;
2146
2339
  }
@@ -2150,19 +2343,19 @@ class FullTextDocument {
2150
2343
  }
2151
2344
  // low is the least x for which the line offset is larger than the current offset
2152
2345
  // or array.length if no line offset is larger than the current offset
2153
- let line = low - 1;
2346
+ const line = low - 1;
2154
2347
  return Position.create(line, offset - lineOffsets[line]);
2155
2348
  }
2156
2349
  offsetAt(position) {
2157
- let lineOffsets = this.getLineOffsets();
2350
+ const lineOffsets = this.getLineOffsets();
2158
2351
  if (position.line >= lineOffsets.length) {
2159
2352
  return this._content.length;
2160
2353
  }
2161
2354
  else if (position.line < 0) {
2162
2355
  return 0;
2163
2356
  }
2164
- let lineOffset = lineOffsets[position.line];
2165
- let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
2357
+ const lineOffset = lineOffsets[position.line];
2358
+ const nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
2166
2359
  return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
2167
2360
  }
2168
2361
  get lineCount() {