Update configuration options.
This commit is contained in:
parent
c0f1a64ab8
commit
c09d267d66
10
package.json
10
package.json
|
@ -154,6 +154,11 @@
|
|||
"default": true,
|
||||
"description": "When snippet is enabled, hide the snippets' corresponding commands from completion items."
|
||||
},
|
||||
"texinfo.diagnosis.noWarnings": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not show warnings in diagnosis."
|
||||
},
|
||||
"texinfo.enableCodeLens": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
|
@ -202,11 +207,6 @@
|
|||
"default": false,
|
||||
"description": "Supress node cross-reference validation."
|
||||
},
|
||||
"texinfo.preview.noWarnings": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Suppress warnings."
|
||||
},
|
||||
"texinfo.preview.variables": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
|
|
|
@ -102,9 +102,11 @@ export default class ContextMapping implements vscode.Disposable {
|
|||
const document = editor.document;
|
||||
// Only show preview for saved files, as we're not gonna send document content to `makeinfo` via STDIN.
|
||||
// Instead, the file will be loaded from disk.
|
||||
if (document.isUntitled) {
|
||||
if (!await prompt('Save this document to display preview.', 'Save')) return;
|
||||
if (!await document.save()) return;
|
||||
if (document.isUntitled && !await prompt('Save this document to display preview.', 'Save')) {
|
||||
return;
|
||||
}
|
||||
if (document.isDirty && !await document.save()) {
|
||||
return;
|
||||
}
|
||||
this.getDocumentContext(document).initPreview().show();
|
||||
}
|
||||
|
|
|
@ -36,6 +36,10 @@ export default class Options {
|
|||
return this.getBoolean('completion.hideSnippetCommands');
|
||||
}
|
||||
|
||||
get noWarnings() {
|
||||
return this.getBoolean('diagnosis.noWarnings');
|
||||
}
|
||||
|
||||
get enableCodeLens() {
|
||||
return this.getBoolean('enableCodeLens');
|
||||
}
|
||||
|
@ -72,10 +76,6 @@ export default class Options {
|
|||
return this.getBoolean('preview.noValidation');
|
||||
}
|
||||
|
||||
get noWarnings() {
|
||||
return this.getBoolean('preview.noWarnings');
|
||||
}
|
||||
|
||||
get variables() {
|
||||
return this.getArray('preview.variables');
|
||||
}
|
||||
|
|
|
@ -39,9 +39,7 @@ export default class Converter {
|
|||
this.options.noNumberSections && options.push('--no-number-sections');
|
||||
this.options.noValidation && options.push('--no-validate');
|
||||
this.options.noWarnings && options.push('--no-warn');
|
||||
if (insertScript !== undefined) {
|
||||
options.push('--set-customization-variable', `EXTRA_HEAD <script>${insertScript}</script>`);
|
||||
}
|
||||
insertScript !== undefined && options.push('-c', `EXTRA_HEAD <script>${insertScript}</script>`);
|
||||
this.addIncludePaths(this.options.includePaths, options);
|
||||
this.defineVariables(this.options.variables, options);
|
||||
this.includeCustomCSS(this.options.customCSS, options);
|
||||
|
|
Loading…
Reference in New Issue