@fresh-editor/fresh-editor 0.1.88 → 0.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/package.json +1 -1
- package/plugins/audit_mode.ts +6 -13
- package/plugins/config-schema.json +25 -0
- package/plugins/examples/bookmarks.ts +4 -10
- package/plugins/examples/hello_world.ts +3 -10
- package/plugins/git_log.ts +70 -165
- package/plugins/lib/finder.ts +19 -80
- package/plugins/lib/fresh.d.ts +118 -2
- package/plugins/merge_conflict.ts +8 -20
- package/plugins/pkg.i18n.json +314 -0
- package/plugins/pkg.ts +2514 -0
- package/plugins/schemas/package.schema.json +192 -0
- package/plugins/schemas/theme.schema.json +815 -0
- package/plugins/theme_editor.i18n.json +3822 -3796
- package/plugins/theme_editor.ts +5 -5
- package/plugins/calculator.i18n.json +0 -93
- package/plugins/calculator.ts +0 -769
- package/plugins/color_highlighter.i18n.json +0 -145
- package/plugins/color_highlighter.ts +0 -306
- package/plugins/examples/git_grep.ts +0 -262
- package/plugins/todo_highlighter.i18n.json +0 -184
- package/plugins/todo_highlighter.ts +0 -206
package/plugins/theme_editor.ts
CHANGED
|
@@ -741,12 +741,11 @@ function addColorOverlay(
|
|
|
741
741
|
color: RGB,
|
|
742
742
|
bold: boolean = false
|
|
743
743
|
): void {
|
|
744
|
-
editor.addOverlay(bufferId, "theme", start, end,
|
|
744
|
+
editor.addOverlay(bufferId, "theme", start, end, { fg: color, bold });
|
|
745
745
|
}
|
|
746
746
|
|
|
747
747
|
/**
|
|
748
748
|
* Helper to add a background highlight overlay
|
|
749
|
-
* addOverlay signature: (bufferId, namespace, start, end, r, g, b, underline, bold, italic, bg_r, bg_g, bg_b, extend_to_line_end)
|
|
750
749
|
*/
|
|
751
750
|
function addBackgroundHighlight(
|
|
752
751
|
bufferId: number,
|
|
@@ -754,7 +753,7 @@ function addBackgroundHighlight(
|
|
|
754
753
|
end: number,
|
|
755
754
|
bgColor: RGB
|
|
756
755
|
): void {
|
|
757
|
-
editor.addOverlay(bufferId, "theme-selection", start, end,
|
|
756
|
+
editor.addOverlay(bufferId, "theme-selection", start, end, { bg: bgColor, extendToLineEnd: true });
|
|
758
757
|
}
|
|
759
758
|
|
|
760
759
|
/**
|
|
@@ -831,7 +830,7 @@ function applyHighlighting(): void {
|
|
|
831
830
|
const swatchBgStart = swatchFgEnd;
|
|
832
831
|
const swatchBgEnd = swatchBgStart + 1;
|
|
833
832
|
// Use background color for the space
|
|
834
|
-
editor.addOverlay(bufferId, "theme", swatchBgStart, swatchBgEnd,
|
|
833
|
+
editor.addOverlay(bufferId, "theme", swatchBgStart, swatchBgEnd, { bg: rgb });
|
|
835
834
|
}
|
|
836
835
|
|
|
837
836
|
// Value (hex code) - custom color (green)
|
|
@@ -1334,7 +1333,8 @@ async function saveTheme(name?: string, restorePath?: string | null): Promise<bo
|
|
|
1334
1333
|
moveCursorToField(restorePath);
|
|
1335
1334
|
}
|
|
1336
1335
|
|
|
1337
|
-
//
|
|
1336
|
+
// Reload themes so the new/updated theme is available, then apply it
|
|
1337
|
+
editor.reloadThemes();
|
|
1338
1338
|
editor.applyTheme(themeName);
|
|
1339
1339
|
editor.setStatus(editor.t("status.saved_and_applied", { name: themeName }));
|
|
1340
1340
|
return true;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"en": {
|
|
3
|
-
"cmd.calculator": "Calculator",
|
|
4
|
-
"cmd.calculator_desc": "Open calculator",
|
|
5
|
-
"status.loaded": "Calculator plugin loaded",
|
|
6
|
-
"status.opened": "Calculator opened",
|
|
7
|
-
"status.copied": "Copied: %{value}"
|
|
8
|
-
},
|
|
9
|
-
"cs": {
|
|
10
|
-
"cmd.calculator": "Kalkulacka",
|
|
11
|
-
"cmd.calculator_desc": "Otevrit kalkulacku",
|
|
12
|
-
"status.loaded": "Plugin kalkulacky nacten",
|
|
13
|
-
"status.opened": "Kalkulacka otevrena",
|
|
14
|
-
"status.copied": "Zkopirovano: %{value}"
|
|
15
|
-
},
|
|
16
|
-
"de": {
|
|
17
|
-
"cmd.calculator": "Taschenrechner",
|
|
18
|
-
"cmd.calculator_desc": "Taschenrechner offnen",
|
|
19
|
-
"status.loaded": "Taschenrechner-Plugin geladen",
|
|
20
|
-
"status.opened": "Taschenrechner geoffnet",
|
|
21
|
-
"status.copied": "Kopiert: %{value}"
|
|
22
|
-
},
|
|
23
|
-
"es": {
|
|
24
|
-
"cmd.calculator": "Calculadora",
|
|
25
|
-
"cmd.calculator_desc": "Abrir calculadora",
|
|
26
|
-
"status.loaded": "Plugin de calculadora cargado",
|
|
27
|
-
"status.opened": "Calculadora abierta",
|
|
28
|
-
"status.copied": "Copiado: %{value}"
|
|
29
|
-
},
|
|
30
|
-
"fr": {
|
|
31
|
-
"cmd.calculator": "Calculatrice",
|
|
32
|
-
"cmd.calculator_desc": "Ouvrir la calculatrice",
|
|
33
|
-
"status.loaded": "Plugin calculatrice charge",
|
|
34
|
-
"status.opened": "Calculatrice ouverte",
|
|
35
|
-
"status.copied": "Copie: %{value}"
|
|
36
|
-
},
|
|
37
|
-
"it": {
|
|
38
|
-
"cmd.calculator": "Calcolatrice",
|
|
39
|
-
"cmd.calculator_desc": "Apri calcolatrice",
|
|
40
|
-
"status.loaded": "Plugin calcolatrice caricato",
|
|
41
|
-
"status.opened": "Calcolatrice aperta",
|
|
42
|
-
"status.copied": "Copiato: %{value}"
|
|
43
|
-
},
|
|
44
|
-
"ja": {
|
|
45
|
-
"cmd.calculator": "電卓",
|
|
46
|
-
"cmd.calculator_desc": "電卓を開く",
|
|
47
|
-
"status.loaded": "電卓プラグインが読み込まれました",
|
|
48
|
-
"status.opened": "電卓を開きました",
|
|
49
|
-
"status.copied": "コピーしました: %{value}"
|
|
50
|
-
},
|
|
51
|
-
"ko": {
|
|
52
|
-
"cmd.calculator": "계산기",
|
|
53
|
-
"cmd.calculator_desc": "계산기 열기",
|
|
54
|
-
"status.loaded": "계산기 플러그인이 로드되었습니다",
|
|
55
|
-
"status.opened": "계산기가 열렸습니다",
|
|
56
|
-
"status.copied": "복사됨: %{value}"
|
|
57
|
-
},
|
|
58
|
-
"pt-BR": {
|
|
59
|
-
"cmd.calculator": "Calculadora",
|
|
60
|
-
"cmd.calculator_desc": "Abrir calculadora",
|
|
61
|
-
"status.loaded": "Plugin de calculadora carregado",
|
|
62
|
-
"status.opened": "Calculadora aberta",
|
|
63
|
-
"status.copied": "Copiado: %{value}"
|
|
64
|
-
},
|
|
65
|
-
"ru": {
|
|
66
|
-
"cmd.calculator": "Калькулятор",
|
|
67
|
-
"cmd.calculator_desc": "Открыть калькулятор",
|
|
68
|
-
"status.loaded": "Плагин калькулятора загружен",
|
|
69
|
-
"status.opened": "Калькулятор открыт",
|
|
70
|
-
"status.copied": "Скопировано: %{value}"
|
|
71
|
-
},
|
|
72
|
-
"th": {
|
|
73
|
-
"cmd.calculator": "เครื่องคิดเลข",
|
|
74
|
-
"cmd.calculator_desc": "เปิดเครื่องคิดเลข",
|
|
75
|
-
"status.loaded": "โหลดปลั๊กอินเครื่องคิดเลขแล้ว",
|
|
76
|
-
"status.opened": "เปิดเครื่องคิดเลขแล้ว",
|
|
77
|
-
"status.copied": "คัดลอกแล้ว: %{value}"
|
|
78
|
-
},
|
|
79
|
-
"uk": {
|
|
80
|
-
"cmd.calculator": "Калькулятор",
|
|
81
|
-
"cmd.calculator_desc": "Відкрити калькулятор",
|
|
82
|
-
"status.loaded": "Плагін калькулятора завантажено",
|
|
83
|
-
"status.opened": "Калькулятор відкрито",
|
|
84
|
-
"status.copied": "Скопійовано: %{value}"
|
|
85
|
-
},
|
|
86
|
-
"zh-CN": {
|
|
87
|
-
"cmd.calculator": "计算器",
|
|
88
|
-
"cmd.calculator_desc": "打开计算器",
|
|
89
|
-
"status.loaded": "计算器插件已加载",
|
|
90
|
-
"status.opened": "计算器已打开",
|
|
91
|
-
"status.copied": "已复制: %{value}"
|
|
92
|
-
}
|
|
93
|
-
}
|