Monaco editor refactoring (#4225)

* monaco editor refactoring

Signed-off-by: Roman <ixrock@gmail.com>

* clean up / responding to comments

Signed-off-by: Roman <ixrock@gmail.com>

* move custom monaco themes to own folder

Signed-off-by: Roman <ixrock@gmail.com>

* fix lint

Signed-off-by: Roman <ixrock@gmail.com>

* removed unused rules from webpack's config (renderer)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman authored and GitHub committed 2021-11-03 17:19:17 +02:00
1 parent 0ae4dfbeab
commit 368e2d9a00
44 files changed
+817 -520

No files matched your search

+10 -11
View File
@@ -24,7 +24,7 @@ import path from "path";
import os from "os";
import { ThemeStore } from "../../renderer/theme.store";
import { getAppVersion, ObservableToggleSet } from "../utils";
import type { monaco } from "react-monaco-editor";
import type { editor } from "monaco-editor";
import merge from "lodash/merge";
import { SemVer } from "semver";
@@ -32,20 +32,19 @@ export interface KubeconfigSyncEntry extends KubeconfigSyncValue {
filePath: string;
}
export interface KubeconfigSyncValue { }
export interface EditorConfiguration {
miniMap?: monaco.editor.IEditorMinimapOptions;
lineNumbers?: monaco.editor.LineNumbersType;
tabSize?: number;
export interface KubeconfigSyncValue {
}
export type EditorConfiguration = Pick<editor.IStandaloneEditorConstructionOptions,
"minimap" | "tabSize" | "lineNumbers">;
export const defaultEditorConfig: EditorConfiguration = {
lineNumbers: "on",
miniMap: {
enabled: true,
},
tabSize: 2,
lineNumbers: "on",
minimap: {
enabled: true,
side: "right",
},
};
interface PreferenceDescription<T, R = T> {