diff --git a/README.md b/README.md index ff4bd68..4a6532a 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,19 @@ You can activate AREPL directly by using control-shift-a or command-shift-a if o see [AREPL-backend](https://github.com/Almenon/AREPL-backend) for the npm package that executes the python code AREPL is also availible as a standalone [app](https://github.com/Almenon/AREPL) + +### Settings: + +AREPL offers the following customizable settings: + +// delay in ms before executing code after typing +> "AREPL.delay": 300, + +// 70 fits in 1280 screen +> "AREPL.max_string_length": 70, + +// when restart mode is active we add this to delay to delay longer +> "AREPL.restartDelay": 300, + +// 2 shows x=1 and x=[1,2], provides option to expand deeply nested data like x=[[1]] +> "AREPL.show_to_level": 2 \ No newline at end of file diff --git a/package.json b/package.json index b38f947..072a598 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,32 @@ ], "main": "./out/src/extension", "contributes": { + "configuration": { + "type": "object", + "title": "AREPL configuration", + "properties": { + "AREPL.delay": { + "type": "number", + "default": 300, + "description": "delay in ms before executing code after typing" + }, + "AREPL.restartDelay": { + "type": "number", + "default": 300, + "description": "when restart mode is active we add this to delay to delay longer" + }, + "AREPL.show_to_level": { + "type": "number", + "default": 2, + "description": "2 shows x=1 and x=[1,2], provides option to expand deeply nested data like x=[[1]]" + }, + "AREPL.max_string_length": { + "type": "number", + "default": 70, + "description": "70 fits in 1280 screen" + } + } + }, "commands": [ { "command": "extension.evalPythonInRealTime", diff --git a/src/HTMLDocumentContentProvider.ts b/src/HTMLDocumentContentProvider.ts index 699aa78..5f23361 100644 --- a/src/HTMLDocumentContentProvider.ts +++ b/src/HTMLDocumentContentProvider.ts @@ -22,11 +22,13 @@ export default class HtmlDocumentContentProvider implements vscode.TextDocumentC errorContainer = '' userVarContainer = `
`; printContainer = `