@involvex/fresh-editor 0.1.76 → 0.1.78
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/bin/CHANGELOG.md +1017 -0
- package/bin/LICENSE +117 -0
- package/bin/README.md +248 -0
- package/bin/fresh.exe +0 -0
- package/bin/plugins/README.md +71 -0
- package/bin/plugins/audit_mode.i18n.json +821 -0
- package/bin/plugins/audit_mode.ts +1810 -0
- package/bin/plugins/buffer_modified.i18n.json +67 -0
- package/bin/plugins/buffer_modified.ts +281 -0
- package/bin/plugins/calculator.i18n.json +93 -0
- package/bin/plugins/calculator.ts +770 -0
- package/bin/plugins/clangd-lsp.ts +168 -0
- package/bin/plugins/clangd_support.i18n.json +223 -0
- package/bin/plugins/clangd_support.md +20 -0
- package/bin/plugins/clangd_support.ts +325 -0
- package/bin/plugins/color_highlighter.i18n.json +145 -0
- package/bin/plugins/color_highlighter.ts +304 -0
- package/bin/plugins/config-schema.json +768 -0
- package/bin/plugins/csharp-lsp.ts +147 -0
- package/bin/plugins/csharp_support.i18n.json +80 -0
- package/bin/plugins/csharp_support.ts +170 -0
- package/bin/plugins/css-lsp.ts +143 -0
- package/bin/plugins/diagnostics_panel.i18n.json +236 -0
- package/bin/plugins/diagnostics_panel.ts +642 -0
- package/bin/plugins/examples/README.md +85 -0
- package/bin/plugins/examples/async_demo.ts +165 -0
- package/bin/plugins/examples/bookmarks.ts +329 -0
- package/bin/plugins/examples/buffer_query_demo.ts +110 -0
- package/bin/plugins/examples/git_grep.ts +262 -0
- package/bin/plugins/examples/hello_world.ts +93 -0
- package/bin/plugins/examples/virtual_buffer_demo.ts +116 -0
- package/bin/plugins/find_references.i18n.json +275 -0
- package/bin/plugins/find_references.ts +359 -0
- package/bin/plugins/git_blame.i18n.json +496 -0
- package/bin/plugins/git_blame.ts +707 -0
- package/bin/plugins/git_find_file.i18n.json +314 -0
- package/bin/plugins/git_find_file.ts +300 -0
- package/bin/plugins/git_grep.i18n.json +171 -0
- package/bin/plugins/git_grep.ts +191 -0
- package/bin/plugins/git_gutter.i18n.json +93 -0
- package/bin/plugins/git_gutter.ts +477 -0
- package/bin/plugins/git_log.i18n.json +481 -0
- package/bin/plugins/git_log.ts +1285 -0
- package/bin/plugins/go-lsp.ts +143 -0
- package/bin/plugins/html-lsp.ts +145 -0
- package/bin/plugins/json-lsp.ts +145 -0
- package/bin/plugins/lib/fresh.d.ts +1321 -0
- package/bin/plugins/lib/index.ts +24 -0
- package/bin/plugins/lib/navigation-controller.ts +214 -0
- package/bin/plugins/lib/panel-manager.ts +220 -0
- package/bin/plugins/lib/types.ts +72 -0
- package/bin/plugins/lib/virtual-buffer-factory.ts +130 -0
- package/bin/plugins/live_grep.i18n.json +171 -0
- package/bin/plugins/live_grep.ts +422 -0
- package/bin/plugins/markdown_compose.i18n.json +223 -0
- package/bin/plugins/markdown_compose.ts +630 -0
- package/bin/plugins/merge_conflict.i18n.json +821 -0
- package/bin/plugins/merge_conflict.ts +1810 -0
- package/bin/plugins/path_complete.i18n.json +80 -0
- package/bin/plugins/path_complete.ts +165 -0
- package/bin/plugins/python-lsp.ts +162 -0
- package/bin/plugins/rust-lsp.ts +166 -0
- package/bin/plugins/search_replace.i18n.json +405 -0
- package/bin/plugins/search_replace.ts +484 -0
- package/bin/plugins/test_i18n.i18n.json +67 -0
- package/bin/plugins/test_i18n.ts +18 -0
- package/bin/plugins/theme_editor.i18n.json +3746 -0
- package/bin/plugins/theme_editor.ts +2063 -0
- package/bin/plugins/todo_highlighter.i18n.json +184 -0
- package/bin/plugins/todo_highlighter.ts +206 -0
- package/bin/plugins/typescript-lsp.ts +167 -0
- package/bin/plugins/vi_mode.i18n.json +1549 -0
- package/bin/plugins/vi_mode.ts +2747 -0
- package/bin/plugins/welcome.i18n.json +236 -0
- package/bin/plugins/welcome.ts +76 -0
- package/bin/themes/dark.json +102 -0
- package/bin/themes/dracula.json +62 -0
- package/bin/themes/high-contrast.json +102 -0
- package/bin/themes/light.json +102 -0
- package/bin/themes/nord.json +62 -0
- package/bin/themes/nostalgia.json +102 -0
- package/bin/themes/solarized-dark.json +62 -0
- package/binary-install.js +1 -1
- package/dist/bin/fresh.js +9 -0
- package/dist/binary-install.js +149 -0
- package/dist/binary.js +30 -0
- package/dist/fresh-6yhknp07.exe +0 -0
- package/dist/install.js +158 -0
- package/dist/run-fresh.js +43 -0
- package/package.json +7 -2
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"cmd.grep": "Git Grep",
|
|
4
|
+
"cmd.grep_desc": "Search for text in git-tracked files",
|
|
5
|
+
"prompt.grep": "Git grep: ",
|
|
6
|
+
"status.ready": "Git Grep plugin ready",
|
|
7
|
+
"status.type_to_search": "Type to search...",
|
|
8
|
+
"status.found": "Found %{count} matches",
|
|
9
|
+
"status.no_matches": "No matches found",
|
|
10
|
+
"status.error": "Git grep error: %{error}",
|
|
11
|
+
"status.opened": "Opened %{location}",
|
|
12
|
+
"status.no_selection": "No file selected",
|
|
13
|
+
"status.cancelled": "Git grep cancelled"
|
|
14
|
+
},
|
|
15
|
+
"cs": {
|
|
16
|
+
"cmd.grep": "Git Grep",
|
|
17
|
+
"cmd.grep_desc": "Hledat text v souborech sledovanych gitem",
|
|
18
|
+
"prompt.grep": "Git grep: ",
|
|
19
|
+
"status.ready": "Plugin Git Grep pripraven",
|
|
20
|
+
"status.type_to_search": "Piste pro hledani...",
|
|
21
|
+
"status.found": "Nalezeno %{count} shod",
|
|
22
|
+
"status.no_matches": "Zadne shody nenalezeny",
|
|
23
|
+
"status.error": "Chyba git grep: %{error}",
|
|
24
|
+
"status.opened": "Otevreno: %{location}",
|
|
25
|
+
"status.no_selection": "Zadny soubor nevybran",
|
|
26
|
+
"status.cancelled": "Git grep zrusen"
|
|
27
|
+
},
|
|
28
|
+
"de": {
|
|
29
|
+
"cmd.grep": "Git Grep",
|
|
30
|
+
"cmd.grep_desc": "Text in git-verfolgten Dateien suchen",
|
|
31
|
+
"prompt.grep": "Git grep: ",
|
|
32
|
+
"status.ready": "Git Grep Plugin bereit",
|
|
33
|
+
"status.type_to_search": "Tippen zum Suchen...",
|
|
34
|
+
"status.found": "%{count} Treffer gefunden",
|
|
35
|
+
"status.no_matches": "Keine Treffer gefunden",
|
|
36
|
+
"status.error": "Git grep Fehler: %{error}",
|
|
37
|
+
"status.opened": "Geoeffnet: %{location}",
|
|
38
|
+
"status.no_selection": "Keine Datei ausgewaehlt",
|
|
39
|
+
"status.cancelled": "Git grep abgebrochen"
|
|
40
|
+
},
|
|
41
|
+
"es": {
|
|
42
|
+
"cmd.grep": "Git Grep",
|
|
43
|
+
"cmd.grep_desc": "Buscar texto en archivos rastreados por git",
|
|
44
|
+
"prompt.grep": "Git grep: ",
|
|
45
|
+
"status.ready": "Plugin Git Grep listo",
|
|
46
|
+
"status.type_to_search": "Escribe para buscar...",
|
|
47
|
+
"status.found": "Encontradas %{count} coincidencias",
|
|
48
|
+
"status.no_matches": "No se encontraron coincidencias",
|
|
49
|
+
"status.error": "Error de git grep: %{error}",
|
|
50
|
+
"status.opened": "Abierto %{location}",
|
|
51
|
+
"status.no_selection": "Ningun archivo seleccionado",
|
|
52
|
+
"status.cancelled": "Git grep cancelado"
|
|
53
|
+
},
|
|
54
|
+
"fr": {
|
|
55
|
+
"cmd.grep": "Git Grep",
|
|
56
|
+
"cmd.grep_desc": "Rechercher du texte dans les fichiers suivis par git",
|
|
57
|
+
"prompt.grep": "Git grep: ",
|
|
58
|
+
"status.ready": "Plugin Git Grep pret",
|
|
59
|
+
"status.type_to_search": "Tapez pour rechercher...",
|
|
60
|
+
"status.found": "%{count} correspondances trouvees",
|
|
61
|
+
"status.no_matches": "Aucune correspondance trouvee",
|
|
62
|
+
"status.error": "Erreur git grep: %{error}",
|
|
63
|
+
"status.opened": "Ouvert: %{location}",
|
|
64
|
+
"status.no_selection": "Aucun fichier selectionne",
|
|
65
|
+
"status.cancelled": "Git grep annule"
|
|
66
|
+
},
|
|
67
|
+
"it": {
|
|
68
|
+
"cmd.grep": "Git Grep",
|
|
69
|
+
"cmd.grep_desc": "Cerca testo nei file tracciati da git",
|
|
70
|
+
"prompt.grep": "Git grep: ",
|
|
71
|
+
"status.ready": "Plugin Git Grep pronto",
|
|
72
|
+
"status.type_to_search": "Scrivi per cercare...",
|
|
73
|
+
"status.found": "Trovate %{count} corrispondenze",
|
|
74
|
+
"status.no_matches": "Nessuna corrispondenza trovata",
|
|
75
|
+
"status.error": "Errore git grep: %{error}",
|
|
76
|
+
"status.opened": "Aperto %{location}",
|
|
77
|
+
"status.no_selection": "Nessun file selezionato",
|
|
78
|
+
"status.cancelled": "Git grep annullato"
|
|
79
|
+
},
|
|
80
|
+
"ja": {
|
|
81
|
+
"cmd.grep": "Git Grep",
|
|
82
|
+
"cmd.grep_desc": "Git追跡ファイル内でテキストを検索",
|
|
83
|
+
"prompt.grep": "Git grep: ",
|
|
84
|
+
"status.ready": "Git Grepプラグイン準備完了",
|
|
85
|
+
"status.type_to_search": "入力して検索...",
|
|
86
|
+
"status.found": "%{count}件の一致",
|
|
87
|
+
"status.no_matches": "一致なし",
|
|
88
|
+
"status.error": "Git grepエラー: %{error}",
|
|
89
|
+
"status.opened": "開きました: %{location}",
|
|
90
|
+
"status.no_selection": "ファイルが選択されていません",
|
|
91
|
+
"status.cancelled": "Git grepキャンセル"
|
|
92
|
+
},
|
|
93
|
+
"ko": {
|
|
94
|
+
"cmd.grep": "Git Grep",
|
|
95
|
+
"cmd.grep_desc": "Git 추적 파일에서 텍스트 검색",
|
|
96
|
+
"prompt.grep": "Git grep: ",
|
|
97
|
+
"status.ready": "Git Grep 플러그인 준비됨",
|
|
98
|
+
"status.type_to_search": "검색어를 입력하세요...",
|
|
99
|
+
"status.found": "%{count}개 일치 항목 찾음",
|
|
100
|
+
"status.no_matches": "일치 항목 없음",
|
|
101
|
+
"status.error": "Git grep 오류: %{error}",
|
|
102
|
+
"status.opened": "열림: %{location}",
|
|
103
|
+
"status.no_selection": "선택된 파일 없음",
|
|
104
|
+
"status.cancelled": "Git grep 취소됨"
|
|
105
|
+
},
|
|
106
|
+
"pt-BR": {
|
|
107
|
+
"cmd.grep": "Git Grep",
|
|
108
|
+
"cmd.grep_desc": "Pesquisar texto em arquivos rastreados pelo git",
|
|
109
|
+
"prompt.grep": "Git grep: ",
|
|
110
|
+
"status.ready": "Plugin Git Grep pronto",
|
|
111
|
+
"status.type_to_search": "Digite para pesquisar...",
|
|
112
|
+
"status.found": "Encontradas %{count} correspondencias",
|
|
113
|
+
"status.no_matches": "Nenhuma correspondencia encontrada",
|
|
114
|
+
"status.error": "Erro git grep: %{error}",
|
|
115
|
+
"status.opened": "Aberto: %{location}",
|
|
116
|
+
"status.no_selection": "Nenhum arquivo selecionado",
|
|
117
|
+
"status.cancelled": "Git grep cancelado"
|
|
118
|
+
},
|
|
119
|
+
"ru": {
|
|
120
|
+
"cmd.grep": "Git Grep",
|
|
121
|
+
"cmd.grep_desc": "Poiskat' tekst v faylakh otslezhivaemykh git",
|
|
122
|
+
"prompt.grep": "Git grep: ",
|
|
123
|
+
"status.ready": "Plugin Git Grep gotov",
|
|
124
|
+
"status.type_to_search": "Vvedite dlya poiska...",
|
|
125
|
+
"status.found": "Naydeno %{count} sovpadeniy",
|
|
126
|
+
"status.no_matches": "Sovpadeniya ne naydeny",
|
|
127
|
+
"status.error": "Oshibka git grep: %{error}",
|
|
128
|
+
"status.opened": "Otkryto: %{location}",
|
|
129
|
+
"status.no_selection": "Fayl ne vybran",
|
|
130
|
+
"status.cancelled": "Git grep otmenen"
|
|
131
|
+
},
|
|
132
|
+
"th": {
|
|
133
|
+
"cmd.grep": "Git Grep",
|
|
134
|
+
"cmd.grep_desc": "ค้นหาข้อความในไฟล์ที่ git ติดตาม",
|
|
135
|
+
"prompt.grep": "Git grep: ",
|
|
136
|
+
"status.ready": "ปลั๊กอิน Git Grep พร้อมใช้งาน",
|
|
137
|
+
"status.type_to_search": "พิมพ์เพื่อค้นหา...",
|
|
138
|
+
"status.found": "พบ %{count} รายการที่ตรงกัน",
|
|
139
|
+
"status.no_matches": "ไม่พบรายการที่ตรงกัน",
|
|
140
|
+
"status.error": "ข้อผิดพลาด git grep: %{error}",
|
|
141
|
+
"status.opened": "เปิดแล้ว: %{location}",
|
|
142
|
+
"status.no_selection": "ไม่ได้เลือกไฟล์",
|
|
143
|
+
"status.cancelled": "ยกเลิก git grep"
|
|
144
|
+
},
|
|
145
|
+
"uk": {
|
|
146
|
+
"cmd.grep": "Git Grep",
|
|
147
|
+
"cmd.grep_desc": "Shukaty tekst u faylakh vidstezhuvanyikh git",
|
|
148
|
+
"prompt.grep": "Git grep: ",
|
|
149
|
+
"status.ready": "Plahin Git Grep hotovyy",
|
|
150
|
+
"status.type_to_search": "Vvedit' dlya poshuku...",
|
|
151
|
+
"status.found": "Znaydeno %{count} zbihiv",
|
|
152
|
+
"status.no_matches": "Zbihiv ne znaydeno",
|
|
153
|
+
"status.error": "Pomylka git grep: %{error}",
|
|
154
|
+
"status.opened": "Vidkryto: %{location}",
|
|
155
|
+
"status.no_selection": "Fayl ne vybrano",
|
|
156
|
+
"status.cancelled": "Git grep skasovano"
|
|
157
|
+
},
|
|
158
|
+
"zh-CN": {
|
|
159
|
+
"cmd.grep": "Git Grep",
|
|
160
|
+
"cmd.grep_desc": "在Git跟踪的文件中搜索文本",
|
|
161
|
+
"prompt.grep": "Git grep: ",
|
|
162
|
+
"status.ready": "Git Grep插件已就绪",
|
|
163
|
+
"status.type_to_search": "输入以搜索...",
|
|
164
|
+
"status.found": "找到%{count}个匹配",
|
|
165
|
+
"status.no_matches": "未找到匹配",
|
|
166
|
+
"status.error": "Git grep错误: %{error}",
|
|
167
|
+
"status.opened": "已打开: %{location}",
|
|
168
|
+
"status.no_selection": "未选择文件",
|
|
169
|
+
"status.cancelled": "Git grep已取消"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/// <reference path="../types/fresh.d.ts" />
|
|
2
|
+
const editor = getEditor();
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Git Grep Plugin
|
|
7
|
+
*
|
|
8
|
+
* Provides interactive git grep functionality with live search results.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
interface GrepMatch {
|
|
12
|
+
file: string;
|
|
13
|
+
line: number;
|
|
14
|
+
column: number;
|
|
15
|
+
content: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// State management
|
|
19
|
+
let gitGrepResults: GrepMatch[] = [];
|
|
20
|
+
|
|
21
|
+
// Parse git grep output line
|
|
22
|
+
// Format: file:line:column:content
|
|
23
|
+
function parseGitGrepLine(line: string): GrepMatch | null {
|
|
24
|
+
const match = line.match(/^([^:]+):(\d+):(\d+):(.*)$/);
|
|
25
|
+
if (match) {
|
|
26
|
+
return {
|
|
27
|
+
file: match[1],
|
|
28
|
+
line: parseInt(match[2], 10),
|
|
29
|
+
column: parseInt(match[3], 10),
|
|
30
|
+
content: match[4].trimStart(),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Parse git grep output into suggestions
|
|
37
|
+
function parseGitGrepOutput(stdout: string): {
|
|
38
|
+
results: GrepMatch[];
|
|
39
|
+
suggestions: PromptSuggestion[];
|
|
40
|
+
} {
|
|
41
|
+
const results: GrepMatch[] = [];
|
|
42
|
+
const suggestions: PromptSuggestion[] = [];
|
|
43
|
+
|
|
44
|
+
for (const line of stdout.split("\n")) {
|
|
45
|
+
if (!line.trim()) continue;
|
|
46
|
+
const match = parseGitGrepLine(line);
|
|
47
|
+
if (match) {
|
|
48
|
+
results.push(match);
|
|
49
|
+
suggestions.push({
|
|
50
|
+
text: `${match.file}:${match.line}:${match.column}`,
|
|
51
|
+
description: match.content,
|
|
52
|
+
value: `${match.file}:${match.line}:${match.column}`,
|
|
53
|
+
disabled: false,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// Limit to 100 results for performance
|
|
57
|
+
if (results.length >= 100) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return { results, suggestions };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Global function to start git grep
|
|
67
|
+
globalThis.start_git_grep = function(): void {
|
|
68
|
+
// Clear previous results
|
|
69
|
+
gitGrepResults = [];
|
|
70
|
+
|
|
71
|
+
// Start the prompt
|
|
72
|
+
editor.startPrompt(editor.t("prompt.grep"), "git-grep");
|
|
73
|
+
editor.setStatus(editor.t("status.type_to_search"));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// React to prompt input changes
|
|
77
|
+
globalThis.onGitGrepPromptChanged = function(args: {
|
|
78
|
+
prompt_type: string;
|
|
79
|
+
input: string;
|
|
80
|
+
}): boolean {
|
|
81
|
+
if (args.prompt_type !== "git-grep") {
|
|
82
|
+
return true; // Not our prompt
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const query = args.input;
|
|
86
|
+
|
|
87
|
+
// Don't search for empty queries
|
|
88
|
+
if (!query || query.trim() === "") {
|
|
89
|
+
editor.setPromptSuggestions([]);
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Spawn git grep asynchronously
|
|
94
|
+
const cwd = editor.getCwd();
|
|
95
|
+
editor.spawnProcess("git", ["grep", "-n", "--column", "-I", "--", query], cwd)
|
|
96
|
+
.then((result) => {
|
|
97
|
+
if (result.exit_code === 0) {
|
|
98
|
+
// Parse results and update suggestions
|
|
99
|
+
const { results, suggestions } = parseGitGrepOutput(result.stdout);
|
|
100
|
+
gitGrepResults = results;
|
|
101
|
+
|
|
102
|
+
// Update prompt with suggestions
|
|
103
|
+
editor.setPromptSuggestions(suggestions);
|
|
104
|
+
|
|
105
|
+
// Update status
|
|
106
|
+
if (results.length > 0) {
|
|
107
|
+
editor.setStatus(editor.t("status.found", { count: String(results.length) }));
|
|
108
|
+
} else {
|
|
109
|
+
editor.setStatus(editor.t("status.no_matches"));
|
|
110
|
+
}
|
|
111
|
+
} else if (result.exit_code === 1) {
|
|
112
|
+
// No matches found (git grep returns 1)
|
|
113
|
+
gitGrepResults = [];
|
|
114
|
+
editor.setPromptSuggestions([]);
|
|
115
|
+
editor.setStatus(editor.t("status.no_matches"));
|
|
116
|
+
} else {
|
|
117
|
+
// Error occurred
|
|
118
|
+
editor.setStatus(editor.t("status.error", { error: result.stderr }));
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
.catch((e) => {
|
|
122
|
+
editor.setStatus(editor.t("status.error", { error: String(e) }));
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
return true;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// Handle prompt confirmation (user pressed Enter)
|
|
129
|
+
globalThis.onGitGrepPromptConfirmed = function(args: {
|
|
130
|
+
prompt_type: string;
|
|
131
|
+
selected_index: number | null;
|
|
132
|
+
input: string;
|
|
133
|
+
}): boolean {
|
|
134
|
+
if (args.prompt_type !== "git-grep") {
|
|
135
|
+
return true; // Not our prompt
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
editor.debug(
|
|
139
|
+
`prompt-confirmed: selected_index=${args.selected_index}, num_results=${gitGrepResults.length}`
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
// Check if user selected a suggestion
|
|
143
|
+
if (args.selected_index !== null && gitGrepResults[args.selected_index]) {
|
|
144
|
+
const selected = gitGrepResults[args.selected_index];
|
|
145
|
+
|
|
146
|
+
editor.debug(`Opening file: ${selected.file}:${selected.line}:${selected.column}`);
|
|
147
|
+
|
|
148
|
+
// Open the file at the specific location
|
|
149
|
+
editor.openFile(selected.file, selected.line, selected.column);
|
|
150
|
+
editor.setStatus(editor.t("status.opened", { location: `${selected.file}:${selected.line}:${selected.column}` }));
|
|
151
|
+
} else {
|
|
152
|
+
// No selection
|
|
153
|
+
editor.debug("No file selected - selected_index is null or out of bounds");
|
|
154
|
+
editor.setStatus(editor.t("status.no_selection"));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return true;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// Handle prompt cancellation (user pressed Escape)
|
|
161
|
+
globalThis.onGitGrepPromptCancelled = function(args: {
|
|
162
|
+
prompt_type: string;
|
|
163
|
+
}): boolean {
|
|
164
|
+
if (args.prompt_type !== "git-grep") {
|
|
165
|
+
return true; // Not our prompt
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Clear results
|
|
169
|
+
gitGrepResults = [];
|
|
170
|
+
editor.setStatus(editor.t("status.cancelled"));
|
|
171
|
+
|
|
172
|
+
return true;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// Register event handlers
|
|
176
|
+
editor.on("prompt_changed", "onGitGrepPromptChanged");
|
|
177
|
+
editor.on("prompt_confirmed", "onGitGrepPromptConfirmed");
|
|
178
|
+
editor.on("prompt_cancelled", "onGitGrepPromptCancelled");
|
|
179
|
+
|
|
180
|
+
// Register command
|
|
181
|
+
editor.registerCommand(
|
|
182
|
+
"%cmd.grep",
|
|
183
|
+
"%cmd.grep_desc",
|
|
184
|
+
"start_git_grep",
|
|
185
|
+
"normal"
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
// Log that plugin loaded successfully
|
|
189
|
+
editor.debug("Git Grep plugin loaded successfully (TypeScript)");
|
|
190
|
+
editor.debug("Usage: Call start_git_grep() or use command palette 'Git Grep'");
|
|
191
|
+
editor.setStatus(editor.t("status.ready"));
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"cmd.refresh": "Git Gutter: Refresh",
|
|
4
|
+
"cmd.refresh_desc": "Refresh git gutter indicators for the current buffer",
|
|
5
|
+
"status.ready": "Git Gutter plugin ready",
|
|
6
|
+
"status.no_file": "Git Gutter: No file open",
|
|
7
|
+
"status.changes": "Git Gutter: %{count} change(s) detected"
|
|
8
|
+
},
|
|
9
|
+
"cs": {
|
|
10
|
+
"cmd.refresh": "Git Gutter: Obnovit",
|
|
11
|
+
"cmd.refresh_desc": "Obnovit indikatory git gutter pro aktualni buffer",
|
|
12
|
+
"status.ready": "Plugin Git Gutter pripraven",
|
|
13
|
+
"status.no_file": "Git Gutter: Zadny soubor neni otevren",
|
|
14
|
+
"status.changes": "Git Gutter: Detekovano %{count} zmen(y)"
|
|
15
|
+
},
|
|
16
|
+
"de": {
|
|
17
|
+
"cmd.refresh": "Git Gutter: Aktualisieren",
|
|
18
|
+
"cmd.refresh_desc": "Git Gutter-Indikatoren fuer den aktuellen Buffer aktualisieren",
|
|
19
|
+
"status.ready": "Git Gutter Plugin bereit",
|
|
20
|
+
"status.no_file": "Git Gutter: Keine Datei geoeffnet",
|
|
21
|
+
"status.changes": "Git Gutter: %{count} Aenderung(en) erkannt"
|
|
22
|
+
},
|
|
23
|
+
"es": {
|
|
24
|
+
"cmd.refresh": "Git Gutter: Actualizar",
|
|
25
|
+
"cmd.refresh_desc": "Actualizar indicadores de git gutter para el buffer actual",
|
|
26
|
+
"status.ready": "Plugin Git Gutter listo",
|
|
27
|
+
"status.no_file": "Git Gutter: Ningun archivo abierto",
|
|
28
|
+
"status.changes": "Git Gutter: %{count} cambio(s) detectado(s)"
|
|
29
|
+
},
|
|
30
|
+
"fr": {
|
|
31
|
+
"cmd.refresh": "Git Gutter: Rafraichir",
|
|
32
|
+
"cmd.refresh_desc": "Rafraichir les indicateurs git gutter pour le tampon actuel",
|
|
33
|
+
"status.ready": "Plugin Git Gutter pret",
|
|
34
|
+
"status.no_file": "Git Gutter: Aucun fichier ouvert",
|
|
35
|
+
"status.changes": "Git Gutter: %{count} modification(s) detectee(s)"
|
|
36
|
+
},
|
|
37
|
+
"it": {
|
|
38
|
+
"cmd.refresh": "Git Gutter: Aggiorna",
|
|
39
|
+
"cmd.refresh_desc": "Aggiorna gli indicatori git gutter per il buffer corrente",
|
|
40
|
+
"status.ready": "Plugin Git Gutter pronto",
|
|
41
|
+
"status.no_file": "Git Gutter: Nessun file aperto",
|
|
42
|
+
"status.changes": "Git Gutter: rilevate %{count} modifiche"
|
|
43
|
+
},
|
|
44
|
+
"ja": {
|
|
45
|
+
"cmd.refresh": "Git Gutter: 更新",
|
|
46
|
+
"cmd.refresh_desc": "現在のバッファのGit Gutterインジケーターを更新",
|
|
47
|
+
"status.ready": "Git Gutterプラグイン準備完了",
|
|
48
|
+
"status.no_file": "Git Gutter: ファイルが開かれていません",
|
|
49
|
+
"status.changes": "Git Gutter: %{count}件の変更を検出"
|
|
50
|
+
},
|
|
51
|
+
"ko": {
|
|
52
|
+
"cmd.refresh": "Git Gutter: 새로고침",
|
|
53
|
+
"cmd.refresh_desc": "현재 버퍼의 Git Gutter 표시기 새로고침",
|
|
54
|
+
"status.ready": "Git Gutter 플러그인 준비됨",
|
|
55
|
+
"status.no_file": "Git Gutter: 열린 파일 없음",
|
|
56
|
+
"status.changes": "Git Gutter: %{count}개 변경 감지됨"
|
|
57
|
+
},
|
|
58
|
+
"pt-BR": {
|
|
59
|
+
"cmd.refresh": "Git Gutter: Atualizar",
|
|
60
|
+
"cmd.refresh_desc": "Atualizar indicadores git gutter para o buffer atual",
|
|
61
|
+
"status.ready": "Plugin Git Gutter pronto",
|
|
62
|
+
"status.no_file": "Git Gutter: Nenhum arquivo aberto",
|
|
63
|
+
"status.changes": "Git Gutter: %{count} alteracao(oes) detectada(s)"
|
|
64
|
+
},
|
|
65
|
+
"ru": {
|
|
66
|
+
"cmd.refresh": "Git Gutter: Obnovit'",
|
|
67
|
+
"cmd.refresh_desc": "Obnovit' indikatory git gutter dlya tekushchego bufera",
|
|
68
|
+
"status.ready": "Plugin Git Gutter gotov",
|
|
69
|
+
"status.no_file": "Git Gutter: Net otkrytogo fayla",
|
|
70
|
+
"status.changes": "Git Gutter: Obnaruzheno %{count} izmenenie(iy)"
|
|
71
|
+
},
|
|
72
|
+
"th": {
|
|
73
|
+
"cmd.refresh": "Git Gutter: รีเฟรช",
|
|
74
|
+
"cmd.refresh_desc": "รีเฟรชตัวบ่งชี้ git gutter สำหรับบัฟเฟอร์ปัจจุบัน",
|
|
75
|
+
"status.ready": "ปลั๊กอิน Git Gutter พร้อมใช้งาน",
|
|
76
|
+
"status.no_file": "Git Gutter: ไม่มีไฟล์เปิดอยู่",
|
|
77
|
+
"status.changes": "Git Gutter: ตรวจพบ %{count} การเปลี่ยนแปลง"
|
|
78
|
+
},
|
|
79
|
+
"uk": {
|
|
80
|
+
"cmd.refresh": "Git Gutter: Onovyty",
|
|
81
|
+
"cmd.refresh_desc": "Onovyty indykatory git gutter dlya potochnoho bufera",
|
|
82
|
+
"status.ready": "Plahin Git Gutter hotovyy",
|
|
83
|
+
"status.no_file": "Git Gutter: Nemaye vidkrytoho faylu",
|
|
84
|
+
"status.changes": "Git Gutter: Vyyavleno %{count} zmin(y)"
|
|
85
|
+
},
|
|
86
|
+
"zh-CN": {
|
|
87
|
+
"cmd.refresh": "Git Gutter: 刷新",
|
|
88
|
+
"cmd.refresh_desc": "刷新当前缓冲区的Git Gutter指示器",
|
|
89
|
+
"status.ready": "Git Gutter插件已就绪",
|
|
90
|
+
"status.no_file": "Git Gutter: 没有打开的文件",
|
|
91
|
+
"status.changes": "Git Gutter: 检测到%{count}处更改"
|
|
92
|
+
}
|
|
93
|
+
}
|