diff --git a/media/docs.css b/media/docs.css index 2e2d1a8..ae2fce0 100644 --- a/media/docs.css +++ b/media/docs.css @@ -1,7 +1,3 @@ -body { - margin-right: 200px; -} - a { text-decoration: none; } diff --git a/package.json b/package.json index b264186..7a4bb4d 100644 --- a/package.json +++ b/package.json @@ -258,6 +258,11 @@ "maximum": 200, "description": "Scale factor (%) to apply to the Godot documentation viewer." }, + "godotTools.documentation.displayMinimap":{ + "type": "boolean", + "default": true, + "description": "Whether to display the minimap for the Godot documentation viewer." + }, "godotTools.editorPath.godot3": { "type": "string", "default": "godot3", diff --git a/src/providers/documentation.ts b/src/providers/documentation.ts index 1883327..e7653ea 100644 --- a/src/providers/documentation.ts +++ b/src/providers/documentation.ts @@ -114,8 +114,17 @@ export class GDDocumentationProvider implements CustomReadonlyEditorProvider { } const scaleFactor = get_configuration("documentation.pageScale"); - panel.webview.html = this.htmlDb.get(className).replaceAll("scaleFactor", scaleFactor); + + const displayMinimap = get_configuration("documentation.displayMinimap"); + if (displayMinimap) { + panel.webview.html = this.htmlDb.get(className).replace("displayMinimap", "initial;"); + panel.webview.html = this.htmlDb.get(className).replace("bodyMargin", "200px;"); + } else { + panel.webview.html = this.htmlDb.get(className).replace("bodyMargin", "0px;"); + panel.webview.html = this.htmlDb.get(className).replace("displayMinimap", "none;"); + } + panel.iconPath = get_extension_uri("resources/godot_icon.svg"); panel.webview.onDidReceiveMessage((msg) => { if (msg.type === "INSPECT_NATIVE_SYMBOL") { diff --git a/src/providers/documentation_builder.ts b/src/providers/documentation_builder.ts index d92a9f1..c2fce71 100644 --- a/src/providers/documentation_builder.ts +++ b/src/providers/documentation_builder.ts @@ -78,12 +78,12 @@ export function make_html_content(webview: vscode.Webview, symbol: GodotNativeSy ${symbol.name} - +
${make_symbol_document(symbol)}
- +