diff --git a/lib/package/config.coffee b/lib/package/config.coffee index e1e02c76..0ecd2014 100644 --- a/lib/package/config.coffee +++ b/lib/package/config.coffee @@ -51,6 +51,14 @@ config = description: "Limits the Console history's size." default: 10000 order: 8 + resultsDisplayMode: + type: 'string' + default: 'inline' + enum: [ + {value:'inline', description:'Float results next to code'} + {value:'block', description:'Display results under code'} + ] + order: 10 if process.platform != 'darwin' config.terminal = diff --git a/lib/runtime/evaluation.coffee b/lib/runtime/evaluation.coffee index b3cc84e6..3b99c62b 100644 --- a/lib/runtime/evaluation.coffee +++ b/lib/runtime/evaluation.coffee @@ -23,12 +23,12 @@ module.exports = [[start], [end]] = range @ink.highlight editor, start, end r = null - setTimeout (=> r ?= new @ink.Result editor, [start, end]), 0.1 + setTimeout (=> r ?= new @ink.Result editor, [start, end], type: atom.config.get 'julia-client.resultsDisplayMode'), 0.1 evaluate({text, line: line+1, mod, path: edpath}) .then (result) => error = result.type == 'error' view = if error then result.view else result - if not r? or r.isDestroyed then r = new @ink.Result editor, [start, end] + if not r? or r.isDestroyed then r = new @ink.Result editor, [start, end], type: atom.config.get 'julia-client.resultsDisplayMode' registerLazy = (id) -> r.onDidDestroy client.withCurrent -> clearLazy [id] editor.onDidDestroy client.withCurrent -> clearLazy id