@fresh-editor/fresh-editor 0.2.22 → 0.2.24
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 +97 -0
- package/package.json +1 -1
- package/plugins/audit_mode.i18n.json +521 -381
- package/plugins/audit_mode.ts +3211 -567
- package/plugins/config-schema.json +153 -1
- package/plugins/git_blame.ts +1 -6
- package/plugins/git_explorer.ts +7 -7
- package/plugins/git_log.ts +616 -1025
- package/plugins/lib/fresh.d.ts +94 -4
- package/plugins/lib/git_history.ts +596 -0
- package/plugins/markdown_compose.ts +183 -7
- package/plugins/pkg.ts +151 -397
- package/plugins/search_replace.i18n.json +42 -14
- package/plugins/search_replace.ts +146 -96
- package/plugins/theme_editor.i18n.json +182 -14
- package/plugins/theme_editor.ts +192 -85
- package/plugins/vi_mode.ts +8 -3
|
@@ -42,6 +42,24 @@
|
|
|
42
42
|
"menu_bar_mnemonics": true,
|
|
43
43
|
"show_tab_bar": true,
|
|
44
44
|
"show_status_bar": true,
|
|
45
|
+
"status_bar": {
|
|
46
|
+
"left": [
|
|
47
|
+
"{filename}",
|
|
48
|
+
"{cursor}",
|
|
49
|
+
"{diagnostics}",
|
|
50
|
+
"{cursor_count}",
|
|
51
|
+
"{messages}"
|
|
52
|
+
],
|
|
53
|
+
"right": [
|
|
54
|
+
"{line_ending}",
|
|
55
|
+
"{encoding}",
|
|
56
|
+
"{language}",
|
|
57
|
+
"{lsp}",
|
|
58
|
+
"{warnings}",
|
|
59
|
+
"{update}",
|
|
60
|
+
"{palette}"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
45
63
|
"show_prompt_line": true,
|
|
46
64
|
"show_vertical_scrollbar": true,
|
|
47
65
|
"show_horizontal_scrollbar": false,
|
|
@@ -104,7 +122,8 @@
|
|
|
104
122
|
"show_hidden": false,
|
|
105
123
|
"show_gitignored": false,
|
|
106
124
|
"custom_ignore_patterns": [],
|
|
107
|
-
"width": 0.30000001192092896
|
|
125
|
+
"width": 0.30000001192092896,
|
|
126
|
+
"preview_tabs": true
|
|
108
127
|
}
|
|
109
128
|
},
|
|
110
129
|
"file_browser": {
|
|
@@ -327,6 +346,29 @@
|
|
|
327
346
|
"default": true,
|
|
328
347
|
"x-section": "Display"
|
|
329
348
|
},
|
|
349
|
+
"status_bar": {
|
|
350
|
+
"description": "Status bar layout and element configuration.\nControls which elements appear in the status bar and how they are arranged.",
|
|
351
|
+
"$ref": "#/$defs/StatusBarConfig",
|
|
352
|
+
"default": {
|
|
353
|
+
"left": [
|
|
354
|
+
"{filename}",
|
|
355
|
+
"{cursor}",
|
|
356
|
+
"{diagnostics}",
|
|
357
|
+
"{cursor_count}",
|
|
358
|
+
"{messages}"
|
|
359
|
+
],
|
|
360
|
+
"right": [
|
|
361
|
+
"{line_ending}",
|
|
362
|
+
"{encoding}",
|
|
363
|
+
"{language}",
|
|
364
|
+
"{lsp}",
|
|
365
|
+
"{warnings}",
|
|
366
|
+
"{update}",
|
|
367
|
+
"{palette}"
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
"x-section": "Status Bar"
|
|
371
|
+
},
|
|
330
372
|
"show_prompt_line": {
|
|
331
373
|
"description": "Whether the prompt line is visible by default.\nThe prompt line is the bottom-most line used for command input, search, file open, etc.\nWhen hidden, the prompt line only appears when a prompt is active.\nCan be toggled at runtime via command palette or keybinding.\nDefault: true",
|
|
332
374
|
"type": "boolean",
|
|
@@ -676,6 +718,111 @@
|
|
|
676
718
|
}
|
|
677
719
|
}
|
|
678
720
|
},
|
|
721
|
+
"StatusBarConfig": {
|
|
722
|
+
"description": "Status bar layout and element configuration.\n\nControls which elements appear in the status bar and how they are arranged.\nElements are placed in left and right containers and can be freely reordered.\n\nExample config:\n```json\n{\n \"status_bar\": {\n \"left\": [\"{filename}\", \"{cursor:compact}\"],\n \"right\": [\"{language}\", \"{encoding}\", \"{line_ending}\"]\n }\n}\n```",
|
|
723
|
+
"type": "object",
|
|
724
|
+
"properties": {
|
|
725
|
+
"left": {
|
|
726
|
+
"description": "Elements shown on the left side of the status bar.\nDefault: [\"{filename}\", \"{cursor}\", \"{diagnostics}\", \"{cursor_count}\", \"{messages}\"]",
|
|
727
|
+
"type": "array",
|
|
728
|
+
"items": {
|
|
729
|
+
"$ref": "#/$defs/StatusBarElement"
|
|
730
|
+
},
|
|
731
|
+
"default": [
|
|
732
|
+
"{filename}",
|
|
733
|
+
"{cursor}",
|
|
734
|
+
"{diagnostics}",
|
|
735
|
+
"{cursor_count}",
|
|
736
|
+
"{messages}"
|
|
737
|
+
],
|
|
738
|
+
"x-section": "Status Bar",
|
|
739
|
+
"x-dual-list-sibling": "/editor/status_bar/right"
|
|
740
|
+
},
|
|
741
|
+
"right": {
|
|
742
|
+
"description": "Elements shown on the right side of the status bar.\nDefault: [\"{line_ending}\", \"{encoding}\", \"{language}\", \"{lsp}\", \"{warnings}\", \"{update}\", \"{palette}\"]",
|
|
743
|
+
"type": "array",
|
|
744
|
+
"items": {
|
|
745
|
+
"$ref": "#/$defs/StatusBarElement"
|
|
746
|
+
},
|
|
747
|
+
"default": [
|
|
748
|
+
"{line_ending}",
|
|
749
|
+
"{encoding}",
|
|
750
|
+
"{language}",
|
|
751
|
+
"{lsp}",
|
|
752
|
+
"{warnings}",
|
|
753
|
+
"{update}",
|
|
754
|
+
"{palette}"
|
|
755
|
+
],
|
|
756
|
+
"x-section": "Status Bar",
|
|
757
|
+
"x-dual-list-sibling": "/editor/status_bar/left"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"StatusBarElement": {
|
|
762
|
+
"type": "string",
|
|
763
|
+
"x-dual-list-options": [
|
|
764
|
+
{
|
|
765
|
+
"value": "{filename}",
|
|
766
|
+
"name": "Filename"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"value": "{cursor}",
|
|
770
|
+
"name": "Cursor"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"value": "{cursor:compact}",
|
|
774
|
+
"name": "Cursor (compact)"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"value": "{diagnostics}",
|
|
778
|
+
"name": "Diagnostics"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"value": "{cursor_count}",
|
|
782
|
+
"name": "Cursor Count"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"value": "{messages}",
|
|
786
|
+
"name": "Messages"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"value": "{chord}",
|
|
790
|
+
"name": "Chord"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"value": "{line_ending}",
|
|
794
|
+
"name": "Line Ending"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"value": "{encoding}",
|
|
798
|
+
"name": "Encoding"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"value": "{language}",
|
|
802
|
+
"name": "Language"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"value": "{lsp}",
|
|
806
|
+
"name": "LSP"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"value": "{warnings}",
|
|
810
|
+
"name": "Warnings"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"value": "{update}",
|
|
814
|
+
"name": "Update"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"value": "{palette}",
|
|
818
|
+
"name": "Palette"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"value": "{clock}",
|
|
822
|
+
"name": "Clock"
|
|
823
|
+
}
|
|
824
|
+
]
|
|
825
|
+
},
|
|
679
826
|
"CursorStyle": {
|
|
680
827
|
"description": "Terminal cursor style",
|
|
681
828
|
"type": "string",
|
|
@@ -731,6 +878,11 @@
|
|
|
731
878
|
"type": "number",
|
|
732
879
|
"format": "float",
|
|
733
880
|
"default": 0.30000001192092896
|
|
881
|
+
},
|
|
882
|
+
"preview_tabs": {
|
|
883
|
+
"description": "Open files in a \"preview\" (ephemeral) tab on single-click in the\nfile explorer. The preview tab is replaced by the next single-click\ninstead of accumulating tabs. Editing the file, double-clicking\n(or pressing Enter) on it in the explorer, or dragging its tab\npromotes the tab to a permanent tab.\nDefault: true",
|
|
884
|
+
"type": "boolean",
|
|
885
|
+
"default": true
|
|
734
886
|
}
|
|
735
887
|
}
|
|
736
888
|
},
|
package/plugins/git_blame.ts
CHANGED
|
@@ -381,12 +381,7 @@ function addBlameHeaders(): void {
|
|
|
381
381
|
blameState.bufferId,
|
|
382
382
|
block.startByte, // anchor position
|
|
383
383
|
headerText, // text content
|
|
384
|
-
colors.headerFg
|
|
385
|
-
colors.headerFg[1], // fg_g
|
|
386
|
-
colors.headerFg[2], // fg_b
|
|
387
|
-
colors.headerBg[0], // bg_r
|
|
388
|
-
colors.headerBg[1], // bg_g
|
|
389
|
-
colors.headerBg[2], // bg_b
|
|
384
|
+
{ fg: colors.headerFg, bg: colors.headerBg }, // colors (RGB tuples; passing theme key strings would also work)
|
|
390
385
|
true, // above (LineAbove)
|
|
391
386
|
BLAME_NAMESPACE, // namespace for bulk removal
|
|
392
387
|
0 // priority
|
package/plugins/git_explorer.ts
CHANGED
|
@@ -10,12 +10,12 @@ const editor = getEditor();
|
|
|
10
10
|
const NAMESPACE = "git-explorer";
|
|
11
11
|
|
|
12
12
|
const COLORS = {
|
|
13
|
-
added:
|
|
14
|
-
modified:
|
|
15
|
-
deleted:
|
|
16
|
-
renamed:
|
|
17
|
-
untracked:
|
|
18
|
-
conflicted:
|
|
13
|
+
added: "ui.file_status_added_fg",
|
|
14
|
+
modified: "ui.file_status_modified_fg",
|
|
15
|
+
deleted: "ui.file_status_deleted_fg",
|
|
16
|
+
renamed: "ui.file_status_renamed_fg",
|
|
17
|
+
untracked: "ui.file_status_untracked_fg",
|
|
18
|
+
conflicted: "ui.file_status_conflicted_fg",
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const PRIORITY = {
|
|
@@ -58,7 +58,7 @@ function parseStatusOutput(output: string, repoRoot: string) {
|
|
|
58
58
|
.split(separator)
|
|
59
59
|
.map((entry) => entry.replace(/\r$/, ""))
|
|
60
60
|
.filter((entry) => entry.length > 0);
|
|
61
|
-
const byPath = new Map<string, { path: string; symbol: string; color:
|
|
61
|
+
const byPath = new Map<string, { path: string; symbol: string; color: string; priority: number }>();
|
|
62
62
|
|
|
63
63
|
for (let i = 0; i < entries.length; i++) {
|
|
64
64
|
const entry = entries[i];
|