How to use the @argdown/core.IArgument.getCanonicalMemberText function in @argdown/core

To help you get started, we’ve selected a few @argdown/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github christianvoigt / argdown / packages / argdown-language-server / src / providers / utils.ts View on Github external
let implicitRelationsStr = "";
  if (implicitRelations.length > 0) {
    implicitRelationsStr = " \n // implicit relations derived from pcs";
    for (let relation of implicitRelations) {
      if (relation.to!.type === ArgdownTypes.INFERENCE) {
        //we can not refer directly to inferences, only to arguments (undercuts will only appear in implicit relations)
        continue;
      }

      implicitRelationsStr += generateArgdownRelationStringFromRelation(
        relation,
        argument
      );
    }
  }
  let desc = IArgument.getCanonicalMemberText(argument);
  if (desc) {
    desc = ": " + desc;
  } else {
    desc = "";
  }
  return `
\`\`\`argdown
<${
    argument.title
  }>${desc}${explicitRelationsStr}${implicitRelationsStr}${caveat}
\`\`\``;
};
github christianvoigt / argdown / packages / argdown-language-server / src / providers / provideCompletion.ts View on Github external
return Object.keys(response.arguments!).map((k: any) => {
      const argument = response.arguments![k];
      const title = argument.title;
      const item = CompletionItem.create(`<${title}>`);
      item.textEdit = TextEdit.replace(range, `<${title}>`);
      item.kind = CompletionItemKind.Variable;
      const desc = IArgument.getCanonicalMemberText(argument);
      if (desc) {
        item.detail = desc;
      }
      return item;
    });
  } else if (char === ":") {