export const alignEditor = (editor: any) => { // Add margin above first line editor.changeViewZones((accessor: any) => { accessor.addZone({ afterLineNumber: 0, heightInPx: 4, domNode: document.createElement('div'), }) }) } export const getTheme = (theme: string) => { const isDarkMode = theme.includes('dark') // [TODO] Probably need better theming for light mode return { base: isDarkMode ? 'vs-dark' : 'vs', // can also be vs-dark or hc-black inherit: true, // can also be false to completely replace the builtin rules rules: [ { background: isDarkMode ? '1f1f1f' : 'f0f0f0' }, { token: '', background: isDarkMode ? '1f1f1f' : 'f0f0f0', foreground: isDarkMode ? 'd4d4d4' : '444444', }, { token: 'string.sql', foreground: '24b47e' }, { token: 'comment', foreground: '666666' }, { token: 'predefined.sql', foreground: isDarkMode ? 'D4D4D4' : '444444' }, ], colors: { 'editor.background': isDarkMode ? '#1f1f1f' : '#f0f0f0' }, } }