Implement completion.

This commit is contained in:
CismonX 2020-11-11 15:10:00 +08:00
parent bc6a5565d5
commit f64b72d22b
Signed by: cismonx
GPG Key ID: 3094873E29A482FB
1 changed files with 49 additions and 1 deletions

View File

@ -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;