Skip to content

Commit ed8bc10

Browse files
committed
move config around
1 parent 13e026a commit ed8bc10

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

Diff for: demo/src/App.css

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
height: 300px;
44
}
55

6+
.codeview {
7+
border: 2px solid brown;
8+
}
9+
610
.controls {
711
flex: 0 0 100%;
812
}

Diff for: src/leanmonaco.ts

+19-21
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,24 @@ export type LeanMonacoOptions = {
158158

159159
await fontFile.load()
160160

161-
this.updateVSCodeOptions(options.vscode ?? {})
161+
this.updateVSCodeOptions({
162+
// "editor.tabSize": 6,
163+
"editor.minimap.enabled": false,
164+
"editor.folding": false, // reduces space to the right of line numbers.
165+
"editor.lineNumbers": 'on',
166+
// "editor.lineNumbersMinChars": 1, // TODO: I believe this has no effect
167+
"editor.glyphMargin": true,
168+
// "editor.lineDecorationsWidth": 0,
169+
// "editor.lineDecorationsWidth": 5,
170+
"editor.detectIndentation": false,
171+
"editor.lightbulb.enabled": "on",
172+
"editor.semanticHighlighting.enabled": true,
173+
"editor.wordWrap": "on",
174+
"editor.wrappingStrategy": "advanced",
175+
"editor.acceptSuggestionOnEnter": "off",
176+
"editor.fontFamily": "JuliaMono",
177+
...options.vscode
178+
})
162179

163180
if (this.disposed) return
164181

@@ -186,9 +203,7 @@ export type LeanMonacoOptions = {
186203
return extensionFiles
187204
}
188205

189-
/** This basically returns the `package.json` of `vscode-lean4` with some ts-fixes,
190-
* some lean4monaco-specific default options for the editor, and the custom themes.
191-
*/
206+
/** This basically returns the `package.json` of `vscode-lean4` with some ts-fixes and the custom themes. */
192207
protected getExtensionManifest(): IExtensionManifest {
193208
return {
194209
...packageJson,
@@ -202,23 +217,6 @@ export type LeanMonacoOptions = {
202217
// `menus` and `submenus` from the package.json
203218
menus: undefined,
204219
submenus: undefined,
205-
configurationDefaults: {
206-
...packageJson.contributes.configurationDefaults,
207-
// Tweak the default VSCode settings here.
208-
"editor.minimap.enabled": false,
209-
// "editor.folding": false,
210-
// "editor.lineNumbers": 'on',
211-
// "editor.lineNumbersMinChars": 1,
212-
"editor.glyphMargin": true,
213-
// "editor.lineDecorationsWidth": 5,
214-
// "editor.detectIndentation": false,
215-
"editor.lightbulb.enabled": "on",
216-
"editor.semanticHighlighting.enabled": true,
217-
"editor.wordWrap": "on",
218-
"editor.wrappingStrategy": "advanced",
219-
"editor.acceptSuggestionOnEnter": "off",
220-
"editor.fontFamily": "JuliaMono",
221-
},
222220
// Add custom themes here.
223221
themes: [
224222
{

0 commit comments

Comments
 (0)