From f64b72d22b6a69fb0f06f4e90acc0a3c777b8276 Mon Sep 17 00:00:00 2001 From: CismonX Date: Wed, 11 Nov 2020 15:10:00 +0800 Subject: [PATCH] Implement completion. --- src/providers/completion_item.ts | 50 +++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/src/providers/completion_item.ts b/src/providers/completion_item.ts index d22ac07..cf14735 100644 --- a/src/providers/completion_item.ts +++ b/src/providers/completion_item.ts @@ -169,9 +169,57 @@ export default class CompletionItemProvider implements vscode.CompletionItemProv ...blockCommand('format', 'Begin a kind of example, but do not indent'), ...lineCommandEnum('frenchspacing', 'Control spacing after punctuation', 'on', 'off'), + command('geq', 'Generate a greater-than-or-equal sign, "≥"', { hasEmptyArguments: true }), + ...blockCommand('group', 'Disallow page breaks within following text'), + command('guillemetleft', 'Double angle quotation mark, "«"', { hasEmptyArguments: true }), + command('guillemetright', 'Double angle quotation mark, "»"', { hasEmptyArguments: true }), + command('guillemotleft', 'Double angle quotation mark, "«"', { hasEmptyArguments: true }), + command('guillemotright', 'Double angle quotation mark, "»"', { hasEmptyArguments: true }), + command('guillemotleft', 'Single angle quotation mark, "‹"', { hasEmptyArguments: true }), + command('guillemotright', 'Single angle quotation mark, "›"', { hasEmptyArguments: true }), + command('hashchar', 'Insert a hash character, "#"', { hasEmptyArguments: true }), + ...lineCommand('heading', 'Print an unnumbered section-like heading', 'title'), + ...lineCommandEnum('headings', 'Turn page headings on or off, and/or specify single or double-sided ' + + 'page headings for printing', 'on', 'single', 'double', 'singleafter', 'doubleafter', 'off'), + command('headitem', 'Begin a heading row in a multitable'), + ...braceCommand('headitemfont', 'Set text in the font used for multitable heading rows', 1, 'text'), + ...blockCommand('html', 'Enter HTML completely'), + ...braceCommand('hyphenation', 'Tell TeX how to hyphenate words', 1, 'hy-phen-a-ted words'), + ...braceCommand('i', 'Set text in an italic font', 1, 'text'), + + ...blockCommand('ifdocbook', 'Begin text that will appear only in DocBook format'), + ...blockCommand('ifhtml', 'Begin text that will appear only in HTML format'), + ...blockCommand('ifinfo', 'Begin text that will appear only in Info format'), + ...blockCommand('ifplaintext', 'Begin text that will appear only in plain text format'), + ...blockCommand('iftex', 'Begin text that will appear only in TeX format'), + ...blockCommand('ifxml', 'Begin text that will appear only in XML format'), + ...blockCommand('ifnotdocbook', 'Begin text to be ignored in DocBook format'), + ...blockCommand('ifnothtml', 'Begin text to be ignored in HTML format'), + ...blockCommand('ifnotinfo', 'Begin text to be ignored in Info format'), + ...blockCommand('ifnotplaintext', 'Begin text to be ignored in plain text format'), + ...blockCommand('ifnottex', 'Begin text to be ignored in TeX format'), + ...blockCommand('ifnotxml', 'Begin text to be ignored in XML format'), + ...blockCommand('ignore', 'Begin text that will not appear in any output'), + ...braceCommand('image', 'Insert an image', 1, 'filename', 'width', 'height', 'alt', 'ext'), + ...lineCommand('include', 'Read the contents of Texinfo source file', 'filname'), + command('indent', 'Insert paragraph indentation'), + ...blockCommand('indentedblock', 'Indent a block of arbitary text on the left'), + ...braceCommand('indicateurl', 'Indicate text that is a URL', 1, 'URL'), + ...braceCommand('inforef', 'Make a cross-reference to an Info file', 3, 'node-name', + 'entry-name', 'info-file-name'), + ...braceCommand('inlinefmt', 'Insert text only if the output format is fmt', 2, 'fmt', 'text'), + ...braceCommand('inlinefmtifelse', 'Insert text if the output format is fmt, else else-text', 3, + 'fmt', 'text', 'else-text'), + ...braceCommand('inlineifclear', 'Insert text only if variable var is not set', 2, 'var', 'text'), + ...braceCommand('inlineifset', 'Insert text only if variable var is set', 2, 'var', 'text'), + ...braceCommand('inlineraw', 'Insert text as in a raw conditional, only if the output format is fmt', 2, + 'fmt', 'raw-text'), + command('insertcopying', 'Insert previously defined @copying text'), + command('item', 'Indicate the beginning of a marked paragraph, or the beginning of the text of a ' + + 'first column entry for a table'), + ...lineCommand('setfilename', 'Provide a name for the output files', 'info-file-name'), ...lineCommand('settitle', 'Specify the title for page headers', 'title'), - command('insertcopying', 'Insert previously defined @copying text'), ...blockCommand('titlepage', 'Declare title page'), ].filter(completionItem => { if (!enableSnippets) return completionItem.kind === vscode.CompletionItemKind.Function;