-
-
Notifications
You must be signed in to change notification settings - Fork 253
Expand file tree
/
Copy pathpreferences.ts
More file actions
43 lines (39 loc) · 1.06 KB
/
preferences.ts
File metadata and controls
43 lines (39 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import Store from 'electron-store'
import { homedir, platform } from 'os'
import type { PreferencesStore } from '@shared/types/main/store'
const isWin = platform() === 'win32'
const defaultPath = isWin ? homedir() + '\\massCode' : homedir() + '/massCode'
const backupPath = isWin ? `${defaultPath}\\backups` : `${defaultPath}/backups`
export default new Store<PreferencesStore>({
name: 'preferences',
cwd: 'v2',
defaults: {
storagePath: defaultPath,
backupPath,
theme: 'light:github',
editor: {
wrap: true,
fontFamily: 'SF Mono, Consolas, Menlo, Ubuntu Mono, monospace',
fontSize: 12,
tabSize: 2,
trailingComma: 'none',
semi: false,
singleQuote: true,
highlightLine: false,
highlightGutter: false,
matchBrackets: false,
showFragments: false
},
screenshot: {
background: false,
gradient: ['#D02F98', '#9439CA'],
darkMode: true,
width: 600
},
markdown: {
presentationScale: 1.3,
codeRenderer: 'highlight.js'
},
language: 'en'
}
})