caos-language-server 0.1.2 → 0.1.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.
- package/dist/node/server.js +18 -15
- package/dist/web/server.js +18 -15
- package/package.json +1 -1
package/dist/node/server.js
CHANGED
|
@@ -4335,7 +4335,7 @@ function registerInlayHints(canUse) {
|
|
|
4335
4335
|
}
|
|
4336
4336
|
exports.registerInlayHints = registerInlayHints;
|
|
4337
4337
|
function onInlayHints(params) {
|
|
4338
|
-
var _a;
|
|
4338
|
+
var _a, _b, _c;
|
|
4339
4339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4340
4340
|
const uri = params.textDocument.uri;
|
|
4341
4341
|
const document = yield (0, document_1.unpackDocument)(uri);
|
|
@@ -4343,7 +4343,9 @@ function onInlayHints(params) {
|
|
|
4343
4343
|
return [];
|
|
4344
4344
|
}
|
|
4345
4345
|
if ((0, document_1.isCaosDocument)(document)) {
|
|
4346
|
-
|
|
4346
|
+
const minimumParameterHints = (_b = (_a = document.settings.inlayHints) === null || _a === void 0 ? void 0 : _a.parameterHints) === null || _b === void 0 ? void 0 : _b.minimumParameterCountForParameterInlayHints;
|
|
4347
|
+
console.log("minimumParameterHints: " + minimumParameterHints);
|
|
4348
|
+
return (0, caos_util_1.getCaosDocumentInlayHints)(document.variant, document.text, (_c = document.settings.disabledInlayHints) !== null && _c !== void 0 ? _c : [], minimumParameterHints);
|
|
4347
4349
|
}
|
|
4348
4350
|
return [];
|
|
4349
4351
|
});
|
|
@@ -68287,7 +68289,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
68287
68289
|
// Inline function 'com.bedalton.creatures.caos.ide.hints.getInlayHints.<anonymous>' call
|
|
68288
68290
|
var tmp;
|
|
68289
68291
|
var tmp_0 = element.command.parameters.length;
|
|
68290
|
-
if (tmp_0
|
|
68292
|
+
if (tmp_0 >= (minimumParameterCount == null ? 2 : minimumParameterCount)) {
|
|
68291
68293
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
68292
68294
|
var tmp1_safe_receiver = Companion_getInstance_2().resolve_gr3lw1_k$(variant, disabled, folds, element);
|
|
68293
68295
|
var tmp0_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.provideHints_wxla12_k$(variant, element);
|
|
@@ -94349,11 +94351,6 @@ if (typeof Array.prototype.fill === 'undefined') {
|
|
|
94349
94351
|
}});
|
|
94350
94352
|
}
|
|
94351
94353
|
});
|
|
94352
|
-
if (typeof Math.log10 === 'undefined') {
|
|
94353
|
-
Math.log10 = function (x) {
|
|
94354
|
-
return Math.log(x) * Math.LOG10E;
|
|
94355
|
-
};
|
|
94356
|
-
}
|
|
94357
94354
|
if (typeof Math.clz32 === 'undefined') {
|
|
94358
94355
|
Math.clz32 = function (log, LN2) {
|
|
94359
94356
|
return function (x) {
|
|
@@ -94374,6 +94371,11 @@ if (typeof Math.sign === 'undefined') {
|
|
|
94374
94371
|
return x > 0 ? 1 : -1;
|
|
94375
94372
|
};
|
|
94376
94373
|
}
|
|
94374
|
+
if (typeof Math.log10 === 'undefined') {
|
|
94375
|
+
Math.log10 = function (x) {
|
|
94376
|
+
return Math.log(x) * Math.LOG10E;
|
|
94377
|
+
};
|
|
94378
|
+
}
|
|
94377
94379
|
if (typeof String.prototype.endsWith === 'undefined') {
|
|
94378
94380
|
Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
|
|
94379
94381
|
var subjectString = this.toString();
|
|
@@ -189925,11 +189927,6 @@ if (typeof Array.prototype.fill === 'undefined') {
|
|
|
189925
189927
|
}});
|
|
189926
189928
|
}
|
|
189927
189929
|
});
|
|
189928
|
-
if (typeof Math.log10 === 'undefined') {
|
|
189929
|
-
Math.log10 = function (x) {
|
|
189930
|
-
return Math.log(x) * Math.LOG10E;
|
|
189931
|
-
};
|
|
189932
|
-
}
|
|
189933
189930
|
if (typeof Math.clz32 === 'undefined') {
|
|
189934
189931
|
Math.clz32 = function (log, LN2) {
|
|
189935
189932
|
return function (x) {
|
|
@@ -189950,6 +189947,11 @@ if (typeof Math.sign === 'undefined') {
|
|
|
189950
189947
|
return x > 0 ? 1 : -1;
|
|
189951
189948
|
};
|
|
189952
189949
|
}
|
|
189950
|
+
if (typeof Math.log10 === 'undefined') {
|
|
189951
|
+
Math.log10 = function (x) {
|
|
189952
|
+
return Math.log(x) * Math.LOG10E;
|
|
189953
|
+
};
|
|
189954
|
+
}
|
|
189953
189955
|
if (typeof String.prototype.endsWith === 'undefined') {
|
|
189954
189956
|
Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
|
|
189955
189957
|
var subjectString = this.toString();
|
|
@@ -233209,8 +233211,9 @@ const parseCaos = caos_kt_1.collectors.parseCaos;
|
|
|
233209
233211
|
* @param variant the game variant
|
|
233210
233212
|
* @param text text or parse result of CAOS document
|
|
233211
233213
|
* @param disabledInlayHints list of ids for inlay hint providers that should be disabled
|
|
233214
|
+
* @param mininumParametersForInlayHints
|
|
233212
233215
|
*/
|
|
233213
|
-
function getCaosDocumentInlayHints(variant, text, disabledInlayHints) {
|
|
233216
|
+
function getCaosDocumentInlayHints(variant, text, disabledInlayHints, mininumParametersForInlayHints = null) {
|
|
233214
233217
|
const parseResult = typeof text === 'string'
|
|
233215
233218
|
? parseCaos(variant, text)
|
|
233216
233219
|
: (is_util_1.Is.parseResult(text) ? text : null);
|
|
@@ -233218,7 +233221,7 @@ function getCaosDocumentInlayHints(variant, text, disabledInlayHints) {
|
|
|
233218
233221
|
return [];
|
|
233219
233222
|
}
|
|
233220
233223
|
const offset = (0, extension_util_1.isVsCode)() ? 1 : 0;
|
|
233221
|
-
const hints = (0, caos_kt_1.getCaosInlayHints)(parseResult, disabledInlayHints !== null && disabledInlayHints !== void 0 ? disabledInlayHints : [], []);
|
|
233224
|
+
const hints = (0, caos_kt_1.getCaosInlayHints)(parseResult, disabledInlayHints !== null && disabledInlayHints !== void 0 ? disabledInlayHints : [], [], mininumParametersForInlayHints);
|
|
233222
233225
|
if (offset === 0) {
|
|
233223
233226
|
return hints;
|
|
233224
233227
|
}
|
package/dist/web/server.js
CHANGED
|
@@ -5026,7 +5026,7 @@ function registerInlayHints(canUse) {
|
|
|
5026
5026
|
}
|
|
5027
5027
|
exports.registerInlayHints = registerInlayHints;
|
|
5028
5028
|
function onInlayHints(params) {
|
|
5029
|
-
var _a;
|
|
5029
|
+
var _a, _b, _c;
|
|
5030
5030
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5031
5031
|
const uri = params.textDocument.uri;
|
|
5032
5032
|
const document = yield (0, document_1.unpackDocument)(uri);
|
|
@@ -5034,7 +5034,9 @@ function onInlayHints(params) {
|
|
|
5034
5034
|
return [];
|
|
5035
5035
|
}
|
|
5036
5036
|
if ((0, document_1.isCaosDocument)(document)) {
|
|
5037
|
-
|
|
5037
|
+
const minimumParameterHints = (_b = (_a = document.settings.inlayHints) === null || _a === void 0 ? void 0 : _a.parameterHints) === null || _b === void 0 ? void 0 : _b.minimumParameterCountForParameterInlayHints;
|
|
5038
|
+
console.log("minimumParameterHints: " + minimumParameterHints);
|
|
5039
|
+
return (0, caos_util_1.getCaosDocumentInlayHints)(document.variant, document.text, (_c = document.settings.disabledInlayHints) !== null && _c !== void 0 ? _c : [], minimumParameterHints);
|
|
5038
5040
|
}
|
|
5039
5041
|
return [];
|
|
5040
5042
|
});
|
|
@@ -65700,7 +65702,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
65700
65702
|
// Inline function 'com.bedalton.creatures.caos.ide.hints.getInlayHints.<anonymous>' call
|
|
65701
65703
|
var tmp;
|
|
65702
65704
|
var tmp_0 = element.command.parameters.length;
|
|
65703
|
-
if (tmp_0
|
|
65705
|
+
if (tmp_0 >= (minimumParameterCount == null ? 2 : minimumParameterCount)) {
|
|
65704
65706
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
65705
65707
|
var tmp1_safe_receiver = Companion_getInstance_2().resolve_gr3lw1_k$(variant, disabled, folds, element);
|
|
65706
65708
|
var tmp0_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.provideHints_wxla12_k$(variant, element);
|
|
@@ -91764,11 +91766,6 @@ if (typeof Array.prototype.fill === 'undefined') {
|
|
|
91764
91766
|
}});
|
|
91765
91767
|
}
|
|
91766
91768
|
});
|
|
91767
|
-
if (typeof Math.log10 === 'undefined') {
|
|
91768
|
-
Math.log10 = function (x) {
|
|
91769
|
-
return Math.log(x) * Math.LOG10E;
|
|
91770
|
-
};
|
|
91771
|
-
}
|
|
91772
91769
|
if (typeof Math.clz32 === 'undefined') {
|
|
91773
91770
|
Math.clz32 = function (log, LN2) {
|
|
91774
91771
|
return function (x) {
|
|
@@ -91789,6 +91786,11 @@ if (typeof Math.sign === 'undefined') {
|
|
|
91789
91786
|
return x > 0 ? 1 : -1;
|
|
91790
91787
|
};
|
|
91791
91788
|
}
|
|
91789
|
+
if (typeof Math.log10 === 'undefined') {
|
|
91790
|
+
Math.log10 = function (x) {
|
|
91791
|
+
return Math.log(x) * Math.LOG10E;
|
|
91792
|
+
};
|
|
91793
|
+
}
|
|
91792
91794
|
if (typeof String.prototype.endsWith === 'undefined') {
|
|
91793
91795
|
Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
|
|
91794
91796
|
var subjectString = this.toString();
|
|
@@ -187342,11 +187344,6 @@ if (typeof Array.prototype.fill === 'undefined') {
|
|
|
187342
187344
|
}});
|
|
187343
187345
|
}
|
|
187344
187346
|
});
|
|
187345
|
-
if (typeof Math.log10 === 'undefined') {
|
|
187346
|
-
Math.log10 = function (x) {
|
|
187347
|
-
return Math.log(x) * Math.LOG10E;
|
|
187348
|
-
};
|
|
187349
|
-
}
|
|
187350
187347
|
if (typeof Math.clz32 === 'undefined') {
|
|
187351
187348
|
Math.clz32 = function (log, LN2) {
|
|
187352
187349
|
return function (x) {
|
|
@@ -187367,6 +187364,11 @@ if (typeof Math.sign === 'undefined') {
|
|
|
187367
187364
|
return x > 0 ? 1 : -1;
|
|
187368
187365
|
};
|
|
187369
187366
|
}
|
|
187367
|
+
if (typeof Math.log10 === 'undefined') {
|
|
187368
|
+
Math.log10 = function (x) {
|
|
187369
|
+
return Math.log(x) * Math.LOG10E;
|
|
187370
|
+
};
|
|
187371
|
+
}
|
|
187370
187372
|
if (typeof String.prototype.endsWith === 'undefined') {
|
|
187371
187373
|
Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
|
|
187372
187374
|
var subjectString = this.toString();
|
|
@@ -230626,8 +230628,9 @@ const parseCaos = caos_kt_1.collectors.parseCaos;
|
|
|
230626
230628
|
* @param variant the game variant
|
|
230627
230629
|
* @param text text or parse result of CAOS document
|
|
230628
230630
|
* @param disabledInlayHints list of ids for inlay hint providers that should be disabled
|
|
230631
|
+
* @param mininumParametersForInlayHints
|
|
230629
230632
|
*/
|
|
230630
|
-
function getCaosDocumentInlayHints(variant, text, disabledInlayHints) {
|
|
230633
|
+
function getCaosDocumentInlayHints(variant, text, disabledInlayHints, mininumParametersForInlayHints = null) {
|
|
230631
230634
|
const parseResult = typeof text === 'string'
|
|
230632
230635
|
? parseCaos(variant, text)
|
|
230633
230636
|
: (is_util_1.Is.parseResult(text) ? text : null);
|
|
@@ -230635,7 +230638,7 @@ function getCaosDocumentInlayHints(variant, text, disabledInlayHints) {
|
|
|
230635
230638
|
return [];
|
|
230636
230639
|
}
|
|
230637
230640
|
const offset = (0, extension_util_1.isVsCode)() ? 1 : 0;
|
|
230638
|
-
const hints = (0, caos_kt_1.getCaosInlayHints)(parseResult, disabledInlayHints !== null && disabledInlayHints !== void 0 ? disabledInlayHints : [], []);
|
|
230641
|
+
const hints = (0, caos_kt_1.getCaosInlayHints)(parseResult, disabledInlayHints !== null && disabledInlayHints !== void 0 ? disabledInlayHints : [], [], mininumParametersForInlayHints);
|
|
230639
230642
|
if (offset === 0) {
|
|
230640
230643
|
return hints;
|
|
230641
230644
|
}
|