MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / editorSettings

Function editorSettings

src/settings/editorSettings.js:7–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import scrollSettings from "./scrollSettings";
6
7export default function editorSettings() {
8 const title = strings["editor settings"];
9 const values = appSettings.value;
10 const categories = {
11 scrolling: strings["settings-category-scrolling"],
12 textLayout: strings["settings-category-text-layout"],
13 editing: strings["settings-category-editing"],
14 assistance: strings["settings-category-assistance"],
15 guidesIndicators: strings["settings-category-guides-indicators"],
16 cursorSelection: strings["settings-category-cursor-selection"],
17 };
18 const items = [
19 {
20 key: "scroll-settings",
21 text: strings["scroll settings"],
22 info: strings["settings-info-editor-scroll-settings"],
23 category: categories.scrolling,
24 chevron: true,
25 },
26 {
27 key: "editorFont",
28 text: strings["editor font"],
29 value: values.editorFont,
30 get select() {
31 return fonts.getNames();
32 },
33 info: strings["settings-info-editor-font-family"],
34 category: categories.textLayout,
35 },
36 {
37 key: "fontSize",
38 text: strings["font size"],
39 value: values.fontSize,
40 prompt: strings["font size"],
41 promptOptions: {
42 required: true,
43 match: config.FONT_SIZE,
44 },
45 info: strings["settings-info-editor-font-size"],
46 category: categories.textLayout,
47 },
48 {
49 key: "lineHeight",
50 text: strings["line height"],
51 value: values.lineHeight,
52 prompt: strings["line height"],
53 promptType: "number",
54 promptOptions: {
55 test(value) {
56 value = Number.parseFloat(value);
57 return value >= 1 && value <= 2;
58 },
59 },
60 info: strings["settings-info-editor-line-height"],
61 category: categories.textLayout,
62 },
63 {
64 key: "textWrap",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected