MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / update

Function update

src/cm/lsp/tooltipExtensions.ts:489–515  ·  view source on GitHub ↗
(value, tr)

Source from the content-addressed store, hash-verified

487 return null;
488 },
489 update(value, tr) {
490 for (const effect of tr.effects) {
491 if (effect.is(signatureEffect)) {
492 if (effect.value) {
493 return new SignatureState(
494 effect.value.data,
495 effect.value.active,
496 signatureTooltip(
497 effect.value.data,
498 effect.value.active,
499 effect.value.pos,
500 ),
501 );
502 }
503 return null;
504 }
505 }
506
507 if (value && tr.docChanged) {
508 return new SignatureState(value.data, value.active, {
509 ...value.tooltip,
510 pos: tr.changes.mapPos(value.tooltip.pos),
511 });
512 }
513
514 return value;
515 },
516 provide: (field) =>
517 showTooltip.from(field, (value) => value?.tooltip ?? null),
518});

Callers

nothing calls this directly

Calls 1

signatureTooltipFunction · 0.85

Tested by

no test coverage detected