Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide ordering to configuration settings #1530

Merged
merged 4 commits into from
Feb 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 75 additions & 57 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,92 @@ const Config = {
description:
"If enabled, use autocomplete options provided by the current kernel.",
type: "boolean",
default: true
default: true,
order: 0
},
showAutocompleteFirst: {
title: "Show Hydrogen's autocomplete suggestions first",
includeTitle: false,
description:
"If enabled, Hydrogen's autocomplete suggestions will be listed before those of other providers, like snippets.",
type: "boolean",
default: true
default: true,
order: 1
},
importNotebookURI: {
title: "Enable Notebook Auto-import",
description:
"If enabled, opening a file with extension `.ipynb` will [import the notebook](https://nteract.gitbooks.io/hydrogen/docs/Usage/NotebookFiles.html#notebook-import) file's source into a new tab. If disabled, or if the Hydrogen package is not activated, the raw file will open in Atom as normal.",
type: "boolean",
default: true,
order: 1.5
},
statusBarDisable: {
title: "Disable the Hydrogen status bar",
description:
"If enabled, no kernel information will be provided in Atom's status bar.",
type: "boolean",
default: false,
order: 2
},
debug: {
title: "Enable Debug Messages",
includeTitle: false,
description: "If enabled, log debug messages onto the dev console.",
type: "boolean",
default: false,
order: 3
},
autoScroll: {
title: "Enable Autoscroll",
includeTitle: false,
description:
"If enabled, Hydrogen will automatically scroll to the bottom of the result view.",
type: "boolean",
default: true
default: true,
order: 4
},
outputAreaDefault: {
title: "View output in the dock by default",
description:
"If enabled, output will be displayed in the dock by default rather than inline",
type: "boolean",
default: false,
order: 5
},
outputAreaDock: {
title: "Leave output dock open",
description:
"Do not close dock when switching to an editor without a running kernel",
type: "boolean",
default: false,
order: 6
},
outputAreaFontSize: {
title: "Output area fontsize",
includeTitle: false,
description: "Change the fontsize of the Output area.",
type: "integer",
minimum: 0,
default: 0
default: 0,
order: 7
},
debug: {
title: "Enable Debug Messages",
globalMode: {
title: "Enable Global Kernel",
description:
"If enabled, all files of the same grammar will share a single global kernel (requires Atom restart)",
type: "boolean",
default: false,
order: 8
},
kernelNotifications: {
title: "Enable Kernel Notifications",
includeTitle: false,
description: "If enabled, log debug messages onto the dev console.",
description:
"Notify if kernels writes to stdout. By default, kernel notifications are only displayed in the developer console.",
type: "boolean",
default: false
default: false,
order: 9
},
startDir: {
title: "Directory to start kernel in",
Expand All @@ -72,71 +126,35 @@ const Config = {
description: "Current directory of the file"
}
],
default: "firstProjectDir"
},
kernelNotifications: {
title: "Enable Kernel Notifications",
includeTitle: false,
description:
"Notify if kernels writes to stdout. By default, kernel notifications are only displayed in the developer console.",
type: "boolean",
default: false
},
gateways: {
title: "Kernel Gateways",
includeTitle: false,
description:
'Hydrogen can connect to remote notebook servers and kernel gateways. Each gateway needs at minimum a name and a value for options.baseUrl. The options are passed directly to the `jupyter-js-services` npm package, which includes documentation for additional fields. Example value: ``` [{ "name": "Remote notebook", "options": { "baseUrl": "http://mysite.com:8888" } }] ```',
type: "string",
default: "[]"
default: "firstProjectDir",
order: 10
},
languageMappings: {
title: "Language Mappings",
includeTitle: false,
description:
'Custom Atom grammars and some kernels use non-standard language names. That leaves Hydrogen unable to figure out what kernel to start for your code. This field should be a valid JSON mapping from a kernel language name to Atom\'s grammar name ``` { "kernel name": "grammar name" } ```. For example ``` { "scala211": "scala", "javascript": "babel es6 javascript", "python": "magicpython" } ```.',
type: "string",
default: '{ "python": "magicpython" }'
default: '{ "python": "magicpython" }',
order: 11
},
startupCode: {
title: "Startup Code",
includeTitle: false,
description:
'This code will be executed on kernel startup. Format: `{"kernel": "your code \\nmore code"}`. Example: `{"Python 2": "%matplotlib inline"}`',
type: "string",
default: "{}"
},
outputAreaDock: {
title: "Leave output dock open",
description:
"Do not close dock when switching to an editor without a running kernel",
type: "boolean",
default: false
default: "{}",
order: 12
},
outputAreaDefault: {
title: "View output in the dock by default",
description:
"If enabled, output will be displayed in the dock by default rather than inline",
type: "boolean",
default: false
},
statusBarDisable: {
title: "Disable the Hydrogen status bar",
type: "boolean",
default: false
},
globalMode: {
title:
"If enabled, all files of the same grammar will share a single global kernel (requires atom restart)",
type: "boolean",
default: false
},
importNotebookURI: {
title: "Enable Notebook Auto-import",
gateways: {
title: "Kernel Gateways",
includeTitle: false,
description:
"If enabled, opening a file with extension `.ipynb` will [import the notebook](https://nteract.gitbooks.io/hydrogen/docs/Usage/NotebookFiles.html#notebook-import) file's source into a new tab. If disabled, or if the Hydrogen package is not activated, the raw file will open in Atom as normal.",
type: "boolean",
default: true
'Hydrogen can connect to remote notebook servers and kernel gateways. Each gateway needs at minimum a name and a value for options.baseUrl. The options are passed directly to the `jupyter-js-services` npm package, which includes documentation for additional fields. Example value: ``` [{ "name": "Remote notebook", "options": { "baseUrl": "http://mysite.com:8888" } }] ```',
type: "string",
default: "[]",
order: 13
}
}
};
Expand Down