()
| 360 | } |
| 361 | |
| 362 | function makeCursorTheme() { |
| 363 | const width = Number(appSettings?.value?.cursorWidth); |
| 364 | const cursorWidth = |
| 365 | Number.isFinite(width) && width > 0 ? Math.min(width, 10) : 2; |
| 366 | return EditorView.theme({ |
| 367 | ".cm-cursor": { |
| 368 | borderLeftWidth: `${cursorWidth}px`, |
| 369 | }, |
| 370 | }); |
| 371 | } |
| 372 | |
| 373 | function getConfiguredThemeExtension() { |
| 374 | const desiredTheme = appSettings?.value?.editorTheme; |