How to use the vscode.CompletionItem function in vscode

To help you get started, we’ve selected a few vscode 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 KamasamaK / vscode-cfml / src / features / completionItemProvider.ts View on Github external
function createNewProposal(name: string, kind: CompletionItemKind, entry?: CompletionEntry, sortPrefix?: string): CompletionItem {
  const proposal: CompletionItem = new CompletionItem(name, kind);
  if (entry) {
    if (entry.detail) {
      proposal.detail = entry.detail;
    }
    if (entry.description) {
      proposal.documentation = textToMarkdownString(entry.description);
    }
  }
  if (sortPrefix) {
    proposal.sortText = `${sortPrefix}${name}`;
  }

  return proposal;
}

vscode

## ⚠️ Deprecated, use @types/vscode and vscode-test instead ⚠️

MIT
Latest version published 5 years ago

Package Health Score

47 / 100
Full package analysis