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