@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,168 @@
|
|
|
1
|
+
/// <reference path="./lib/fresh.d.ts" />
|
|
2
|
+
const editor = getEditor();
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* C/C++ LSP Helper Plugin
|
|
7
|
+
*
|
|
8
|
+
* Provides user-friendly error handling for C/C++ LSP server issues.
|
|
9
|
+
* When clangd fails to start, this plugin shows an actionable
|
|
10
|
+
* popup with installation instructions.
|
|
11
|
+
*
|
|
12
|
+
* Features:
|
|
13
|
+
* - Detects C/C++ LSP server errors (clangd)
|
|
14
|
+
* - Shows popup with install commands (apt, brew, etc.)
|
|
15
|
+
* - Allows copying install commands to clipboard
|
|
16
|
+
* - Provides option to disable C/C++ LSP
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
interface LspServerErrorData {
|
|
20
|
+
language: string;
|
|
21
|
+
server_command: string;
|
|
22
|
+
error_type: string;
|
|
23
|
+
message: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface LspStatusClickedData {
|
|
27
|
+
language: string;
|
|
28
|
+
has_error: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface ActionPopupResultData {
|
|
32
|
+
popup_id: string;
|
|
33
|
+
action_id: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Install commands for C/C++ LSP server (clangd)
|
|
37
|
+
// See: https://clangd.llvm.org/installation
|
|
38
|
+
const INSTALL_COMMANDS = {
|
|
39
|
+
apt: "sudo apt install clangd",
|
|
40
|
+
brew: "brew install llvm",
|
|
41
|
+
pacman: "sudo pacman -S clang",
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Languages handled by this plugin
|
|
45
|
+
const HANDLED_LANGUAGES = ["c", "cpp"];
|
|
46
|
+
|
|
47
|
+
// Track error state for C/C++ LSP
|
|
48
|
+
let clangdLspError: {
|
|
49
|
+
serverCommand: string;
|
|
50
|
+
message: string;
|
|
51
|
+
language: string;
|
|
52
|
+
} | null = null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Handle LSP server errors for C/C++
|
|
56
|
+
*/
|
|
57
|
+
globalThis.on_clangd_lsp_server_error = function (
|
|
58
|
+
data: LspServerErrorData
|
|
59
|
+
): void {
|
|
60
|
+
// Only handle C/C++ language errors
|
|
61
|
+
if (!HANDLED_LANGUAGES.includes(data.language)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
editor.debug(`clangd-lsp: Server error - ${data.error_type}: ${data.message}`);
|
|
66
|
+
|
|
67
|
+
// Store error state for later reference
|
|
68
|
+
clangdLspError = {
|
|
69
|
+
serverCommand: data.server_command,
|
|
70
|
+
message: data.message,
|
|
71
|
+
language: data.language,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// Show a status message for immediate feedback
|
|
75
|
+
if (data.error_type === "not_found") {
|
|
76
|
+
editor.setStatus(
|
|
77
|
+
`C/C++ LSP server '${data.server_command}' not found. Click status bar for help.`
|
|
78
|
+
);
|
|
79
|
+
} else {
|
|
80
|
+
editor.setStatus(`C/C++ LSP error: ${data.message}`);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// Register hook for LSP server errors
|
|
85
|
+
editor.on("lsp_server_error", "on_clangd_lsp_server_error");
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Handle status bar click when there's a C/C++ LSP error
|
|
89
|
+
*/
|
|
90
|
+
globalThis.on_clangd_lsp_status_clicked = function (
|
|
91
|
+
data: LspStatusClickedData
|
|
92
|
+
): void {
|
|
93
|
+
// Only handle C/C++ language clicks when there's an error
|
|
94
|
+
if (!HANDLED_LANGUAGES.includes(data.language) || !clangdLspError) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
editor.debug("clangd-lsp: Status clicked, showing help popup");
|
|
99
|
+
|
|
100
|
+
// Show action popup with install options
|
|
101
|
+
editor.showActionPopup({
|
|
102
|
+
id: "clangd-lsp-help",
|
|
103
|
+
title: "C/C++ Language Server Not Found",
|
|
104
|
+
message: `"${clangdLspError.serverCommand}" provides code completion, diagnostics, and navigation for C/C++ files. Copy a command below to install it for your platform.`,
|
|
105
|
+
actions: [
|
|
106
|
+
{ id: "copy_apt", label: `Copy: ${INSTALL_COMMANDS.apt}` },
|
|
107
|
+
{ id: "copy_brew", label: `Copy: ${INSTALL_COMMANDS.brew}` },
|
|
108
|
+
{ id: "copy_pacman", label: `Copy: ${INSTALL_COMMANDS.pacman}` },
|
|
109
|
+
{ id: "disable", label: "Disable C/C++ LSP" },
|
|
110
|
+
{ id: "dismiss", label: "Dismiss (ESC)" },
|
|
111
|
+
],
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// Register hook for status bar clicks
|
|
116
|
+
editor.on("lsp_status_clicked", "on_clangd_lsp_status_clicked");
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Handle action popup results for C/C++ LSP help
|
|
120
|
+
*/
|
|
121
|
+
globalThis.on_clangd_lsp_action_result = function (
|
|
122
|
+
data: ActionPopupResultData
|
|
123
|
+
): void {
|
|
124
|
+
// Only handle our popup
|
|
125
|
+
if (data.popup_id !== "clangd-lsp-help") {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
editor.debug(`clangd-lsp: Action selected - ${data.action_id}`);
|
|
130
|
+
|
|
131
|
+
switch (data.action_id) {
|
|
132
|
+
case "copy_apt":
|
|
133
|
+
editor.setClipboard(INSTALL_COMMANDS.apt);
|
|
134
|
+
editor.setStatus("Copied: " + INSTALL_COMMANDS.apt);
|
|
135
|
+
break;
|
|
136
|
+
|
|
137
|
+
case "copy_brew":
|
|
138
|
+
editor.setClipboard(INSTALL_COMMANDS.brew);
|
|
139
|
+
editor.setStatus("Copied: " + INSTALL_COMMANDS.brew);
|
|
140
|
+
break;
|
|
141
|
+
|
|
142
|
+
case "copy_pacman":
|
|
143
|
+
editor.setClipboard(INSTALL_COMMANDS.pacman);
|
|
144
|
+
editor.setStatus("Copied: " + INSTALL_COMMANDS.pacman);
|
|
145
|
+
break;
|
|
146
|
+
|
|
147
|
+
case "disable":
|
|
148
|
+
// Disable for both C and C++
|
|
149
|
+
editor.disableLspForLanguage("c");
|
|
150
|
+
editor.disableLspForLanguage("cpp");
|
|
151
|
+
editor.setStatus("C/C++ LSP disabled");
|
|
152
|
+
clangdLspError = null;
|
|
153
|
+
break;
|
|
154
|
+
|
|
155
|
+
case "dismiss":
|
|
156
|
+
case "dismissed":
|
|
157
|
+
// Just close the popup without action
|
|
158
|
+
break;
|
|
159
|
+
|
|
160
|
+
default:
|
|
161
|
+
editor.debug(`clangd-lsp: Unknown action: ${data.action_id}`);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// Register hook for action popup results
|
|
166
|
+
editor.on("action_popup_result", "on_clangd_lsp_action_result");
|
|
167
|
+
|
|
168
|
+
editor.debug("clangd-lsp: Plugin loaded");
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"cmd.project_setup": "Clangd: Project Setup",
|
|
4
|
+
"cmd.project_setup_desc": "Analyze C/C++ clangd readiness (compile_commands.json, .clangd)",
|
|
5
|
+
"cmd.switch_source_header": "Clangd: Switch Source/Header",
|
|
6
|
+
"cmd.switch_source_header_desc": "Jump to header/source pair using clangd",
|
|
7
|
+
"cmd.open_project_config": "Clangd: Open Project Config",
|
|
8
|
+
"cmd.open_project_config_desc": "Open the nearest .clangd file",
|
|
9
|
+
"status.plugin_loaded": "Clangd support plugin loaded (switch header + config commands)",
|
|
10
|
+
"status.no_active_file": "Clangd: there is no active file to switch",
|
|
11
|
+
"status.unsupported_file_type": "Clangd: unsupported file type for switch header",
|
|
12
|
+
"status.opened_corresponding_file": "Clangd: opened corresponding file",
|
|
13
|
+
"status.no_matching_found": "Clangd: no matching header/source found",
|
|
14
|
+
"status.switch_failed": "Clangd switch source/header failed: {error}",
|
|
15
|
+
"status.opened_config": "Opened .clangd configuration",
|
|
16
|
+
"status.config_not_found": "Could not find .clangd configuration in workspace",
|
|
17
|
+
"status.file_status": "Clangd file status: {status}"
|
|
18
|
+
},
|
|
19
|
+
"cs": {
|
|
20
|
+
"cmd.project_setup": "Clangd: Nastaveni projektu",
|
|
21
|
+
"cmd.project_setup_desc": "Analyzovat pripravenost C/C++ clangd (compile_commands.json, .clangd)",
|
|
22
|
+
"cmd.switch_source_header": "Clangd: Prepnout zdroj/hlavicku",
|
|
23
|
+
"cmd.switch_source_header_desc": "Prejit na par hlavicka/zdroj pomoci clangd",
|
|
24
|
+
"cmd.open_project_config": "Clangd: Otevrit konfiguraci projektu",
|
|
25
|
+
"cmd.open_project_config_desc": "Otevrit nejblizsi soubor .clangd",
|
|
26
|
+
"status.plugin_loaded": "Plugin podpory Clangd nacten (prepinani hlavicek + konfiguracni prikazy)",
|
|
27
|
+
"status.no_active_file": "Clangd: zadny aktivni soubor k prepnuti",
|
|
28
|
+
"status.unsupported_file_type": "Clangd: nepodporovany typ souboru pro prepnuti hlavicky",
|
|
29
|
+
"status.opened_corresponding_file": "Clangd: odpovidajici soubor otevren",
|
|
30
|
+
"status.no_matching_found": "Clangd: nenalezena odpovidajici hlavicka/zdroj",
|
|
31
|
+
"status.switch_failed": "Clangd prepnuti zdroj/hlavicka selhalo: {error}",
|
|
32
|
+
"status.opened_config": "Konfigurace .clangd otevrena",
|
|
33
|
+
"status.config_not_found": "Nelze najit konfiguraci .clangd v pracovnim prostoru",
|
|
34
|
+
"status.file_status": "Clangd stav souboru: {status}"
|
|
35
|
+
},
|
|
36
|
+
"de": {
|
|
37
|
+
"cmd.project_setup": "Clangd: Projekteinrichtung",
|
|
38
|
+
"cmd.project_setup_desc": "C/C++ clangd-Bereitschaft analysieren (compile_commands.json, .clangd)",
|
|
39
|
+
"cmd.switch_source_header": "Clangd: Quelle/Header wechseln",
|
|
40
|
+
"cmd.switch_source_header_desc": "Zum Header/Quell-Paar mit clangd springen",
|
|
41
|
+
"cmd.open_project_config": "Clangd: Projektkonfiguration offnen",
|
|
42
|
+
"cmd.open_project_config_desc": "Die nachste .clangd-Datei offnen",
|
|
43
|
+
"status.plugin_loaded": "Clangd-Support-Plugin geladen (Header-Wechsel + Konfigurations-Befehle)",
|
|
44
|
+
"status.no_active_file": "Clangd: keine aktive Datei zum Wechseln",
|
|
45
|
+
"status.unsupported_file_type": "Clangd: nicht unterstutzter Dateityp fur Header-Wechsel",
|
|
46
|
+
"status.opened_corresponding_file": "Clangd: entsprechende Datei geoffnet",
|
|
47
|
+
"status.no_matching_found": "Clangd: kein passendes Header/Quelle gefunden",
|
|
48
|
+
"status.switch_failed": "Clangd Quelle/Header-Wechsel fehlgeschlagen: {error}",
|
|
49
|
+
"status.opened_config": ".clangd-Konfiguration geoffnet",
|
|
50
|
+
"status.config_not_found": "Konnte .clangd-Konfiguration im Arbeitsbereich nicht finden",
|
|
51
|
+
"status.file_status": "Clangd Dateistatus: {status}"
|
|
52
|
+
},
|
|
53
|
+
"es": {
|
|
54
|
+
"cmd.project_setup": "Clangd: Configuracion del Proyecto",
|
|
55
|
+
"cmd.project_setup_desc": "Analizar preparacion de clangd para C/C++ (compile_commands.json, .clangd)",
|
|
56
|
+
"cmd.switch_source_header": "Clangd: Alternar Fuente/Cabecera",
|
|
57
|
+
"cmd.switch_source_header_desc": "Saltar al par cabecera/fuente usando clangd",
|
|
58
|
+
"cmd.open_project_config": "Clangd: Abrir Configuracion del Proyecto",
|
|
59
|
+
"cmd.open_project_config_desc": "Abrir el archivo .clangd mas cercano",
|
|
60
|
+
"status.plugin_loaded": "Plugin de soporte Clangd cargado (comandos de alternar cabecera + configuracion)",
|
|
61
|
+
"status.no_active_file": "Clangd: no hay archivo activo para alternar",
|
|
62
|
+
"status.unsupported_file_type": "Clangd: tipo de archivo no soportado para alternar cabecera",
|
|
63
|
+
"status.opened_corresponding_file": "Clangd: archivo correspondiente abierto",
|
|
64
|
+
"status.no_matching_found": "Clangd: no se encontro cabecera/fuente coincidente",
|
|
65
|
+
"status.switch_failed": "Clangd alternar fuente/cabecera fallo: {error}",
|
|
66
|
+
"status.opened_config": "Configuracion .clangd abierta",
|
|
67
|
+
"status.config_not_found": "No se pudo encontrar configuracion .clangd en el espacio de trabajo",
|
|
68
|
+
"status.file_status": "Estado del archivo Clangd: {status}"
|
|
69
|
+
},
|
|
70
|
+
"fr": {
|
|
71
|
+
"cmd.project_setup": "Clangd: Configuration du Projet",
|
|
72
|
+
"cmd.project_setup_desc": "Analyser la disponibilite de clangd pour C/C++ (compile_commands.json, .clangd)",
|
|
73
|
+
"cmd.switch_source_header": "Clangd: Basculer Source/En-tete",
|
|
74
|
+
"cmd.switch_source_header_desc": "Aller a la paire en-tete/source avec clangd",
|
|
75
|
+
"cmd.open_project_config": "Clangd: Ouvrir la Configuration du Projet",
|
|
76
|
+
"cmd.open_project_config_desc": "Ouvrir le fichier .clangd le plus proche",
|
|
77
|
+
"status.plugin_loaded": "Plugin de support Clangd charge (commandes de bascule en-tete + configuration)",
|
|
78
|
+
"status.no_active_file": "Clangd: aucun fichier actif a basculer",
|
|
79
|
+
"status.unsupported_file_type": "Clangd: type de fichier non supporte pour la bascule d'en-tete",
|
|
80
|
+
"status.opened_corresponding_file": "Clangd: fichier correspondant ouvert",
|
|
81
|
+
"status.no_matching_found": "Clangd: aucun en-tete/source correspondant trouve",
|
|
82
|
+
"status.switch_failed": "Clangd bascule source/en-tete echouee: {error}",
|
|
83
|
+
"status.opened_config": "Configuration .clangd ouverte",
|
|
84
|
+
"status.config_not_found": "Impossible de trouver la configuration .clangd dans l'espace de travail",
|
|
85
|
+
"status.file_status": "Statut du fichier Clangd: {status}"
|
|
86
|
+
},
|
|
87
|
+
"it": {
|
|
88
|
+
"cmd.project_setup": "Clangd: Configurazione progetto",
|
|
89
|
+
"cmd.project_setup_desc": "Analizza la disponibilità di clangd per C/C++ (compile_commands.json, .clangd)",
|
|
90
|
+
"cmd.switch_source_header": "Clangd: Passa a Sorgente/Header",
|
|
91
|
+
"cmd.switch_source_header_desc": "Passa alla coppia header/sorgente usando clangd",
|
|
92
|
+
"cmd.open_project_config": "Clangd: Apri configurazione progetto",
|
|
93
|
+
"cmd.open_project_config_desc": "Apri il file .clangd più vicino",
|
|
94
|
+
"status.plugin_loaded": "Plugin di supporto Clangd caricato (comandi passa a header + configurazione)",
|
|
95
|
+
"status.no_active_file": "Clangd: nessun file attivo per il cambio",
|
|
96
|
+
"status.unsupported_file_type": "Clangd: tipo di file non supportato per il cambio header",
|
|
97
|
+
"status.opened_corresponding_file": "Clangd: aperto file corrispondente",
|
|
98
|
+
"status.no_matching_found": "Clangd: nessuna corrispondenza header/sorgente trovata",
|
|
99
|
+
"status.switch_failed": "Cambio sorgente/header Clangd fallito: {error}",
|
|
100
|
+
"status.opened_config": "Configurazione .clangd aperta",
|
|
101
|
+
"status.config_not_found": "Impossibile trovare la configurazione .clangd nell'area di lavoro",
|
|
102
|
+
"status.file_status": "Stato del file Clangd: {status}"
|
|
103
|
+
},
|
|
104
|
+
"ja": {
|
|
105
|
+
"cmd.project_setup": "Clangd: プロジェクト設定",
|
|
106
|
+
"cmd.project_setup_desc": "C/C++ clangdの準備状況を分析 (compile_commands.json, .clangd)",
|
|
107
|
+
"cmd.switch_source_header": "Clangd: ソース/ヘッダー切り替え",
|
|
108
|
+
"cmd.switch_source_header_desc": "clangdを使用してヘッダー/ソースのペアにジャンプ",
|
|
109
|
+
"cmd.open_project_config": "Clangd: プロジェクト設定を開く",
|
|
110
|
+
"cmd.open_project_config_desc": "最も近い.clangdファイルを開く",
|
|
111
|
+
"status.plugin_loaded": "Clangdサポートプラグインがロードされました(ヘッダー切り替え + 設定コマンド)",
|
|
112
|
+
"status.no_active_file": "Clangd: 切り替えるアクティブなファイルがありません",
|
|
113
|
+
"status.unsupported_file_type": "Clangd: ヘッダー切り替えに対応していないファイル形式です",
|
|
114
|
+
"status.opened_corresponding_file": "Clangd: 対応するファイルを開きました",
|
|
115
|
+
"status.no_matching_found": "Clangd: 一致するヘッダー/ソースが見つかりません",
|
|
116
|
+
"status.switch_failed": "Clangdソース/ヘッダー切り替えに失敗しました: {error}",
|
|
117
|
+
"status.opened_config": ".clangd設定を開きました",
|
|
118
|
+
"status.config_not_found": "ワークスペース内に.clangd設定が見つかりません",
|
|
119
|
+
"status.file_status": "Clangdファイルステータス: {status}"
|
|
120
|
+
},
|
|
121
|
+
"ko": {
|
|
122
|
+
"cmd.project_setup": "Clangd: 프로젝트 설정",
|
|
123
|
+
"cmd.project_setup_desc": "C/C++ clangd 준비 상태 분석 (compile_commands.json, .clangd)",
|
|
124
|
+
"cmd.switch_source_header": "Clangd: 소스/헤더 전환",
|
|
125
|
+
"cmd.switch_source_header_desc": "clangd를 사용하여 헤더/소스 쌍으로 이동",
|
|
126
|
+
"cmd.open_project_config": "Clangd: 프로젝트 설정 열기",
|
|
127
|
+
"cmd.open_project_config_desc": "가장 가까운 .clangd 파일 열기",
|
|
128
|
+
"status.plugin_loaded": "Clangd 지원 플러그인이 로드되었습니다 (헤더 전환 + 설정 명령)",
|
|
129
|
+
"status.no_active_file": "Clangd: 전환할 활성 파일이 없습니다",
|
|
130
|
+
"status.unsupported_file_type": "Clangd: 헤더 전환에 지원되지 않는 파일 형식",
|
|
131
|
+
"status.opened_corresponding_file": "Clangd: 해당 파일을 열었습니다",
|
|
132
|
+
"status.no_matching_found": "Clangd: 일치하는 헤더/소스를 찾을 수 없습니다",
|
|
133
|
+
"status.switch_failed": "Clangd 소스/헤더 전환 실패: {error}",
|
|
134
|
+
"status.opened_config": ".clangd 설정을 열었습니다",
|
|
135
|
+
"status.config_not_found": "작업 공간에서 .clangd 설정을 찾을 수 없습니다",
|
|
136
|
+
"status.file_status": "Clangd 파일 상태: {status}"
|
|
137
|
+
},
|
|
138
|
+
"pt-BR": {
|
|
139
|
+
"cmd.project_setup": "Clangd: Configuracao do Projeto",
|
|
140
|
+
"cmd.project_setup_desc": "Analisar disponibilidade do clangd para C/C++ (compile_commands.json, .clangd)",
|
|
141
|
+
"cmd.switch_source_header": "Clangd: Alternar Fonte/Cabecalho",
|
|
142
|
+
"cmd.switch_source_header_desc": "Ir para o par cabecalho/fonte usando clangd",
|
|
143
|
+
"cmd.open_project_config": "Clangd: Abrir Configuracao do Projeto",
|
|
144
|
+
"cmd.open_project_config_desc": "Abrir o arquivo .clangd mais proximo",
|
|
145
|
+
"status.plugin_loaded": "Plugin de suporte Clangd carregado (comandos de alternar cabecalho + configuracao)",
|
|
146
|
+
"status.no_active_file": "Clangd: nenhum arquivo ativo para alternar",
|
|
147
|
+
"status.unsupported_file_type": "Clangd: tipo de arquivo nao suportado para alternar cabecalho",
|
|
148
|
+
"status.opened_corresponding_file": "Clangd: arquivo correspondente aberto",
|
|
149
|
+
"status.no_matching_found": "Clangd: nenhum cabecalho/fonte correspondente encontrado",
|
|
150
|
+
"status.switch_failed": "Clangd alternar fonte/cabecalho falhou: {error}",
|
|
151
|
+
"status.opened_config": "Configuracao .clangd aberta",
|
|
152
|
+
"status.config_not_found": "Nao foi possivel encontrar configuracao .clangd no espaco de trabalho",
|
|
153
|
+
"status.file_status": "Status do arquivo Clangd: {status}"
|
|
154
|
+
},
|
|
155
|
+
"ru": {
|
|
156
|
+
"cmd.project_setup": "Clangd: Настройка проекта",
|
|
157
|
+
"cmd.project_setup_desc": "Анализ готовности C/C++ clangd (compile_commands.json, .clangd)",
|
|
158
|
+
"cmd.switch_source_header": "Clangd: Переключить исходник/заголовок",
|
|
159
|
+
"cmd.switch_source_header_desc": "Перейти к паре заголовок/исходник с помощью clangd",
|
|
160
|
+
"cmd.open_project_config": "Clangd: Открыть конфигурацию проекта",
|
|
161
|
+
"cmd.open_project_config_desc": "Открыть ближайший файл .clangd",
|
|
162
|
+
"status.plugin_loaded": "Плагин поддержки Clangd загружен (переключение заголовков + команды конфигурации)",
|
|
163
|
+
"status.no_active_file": "Clangd: нет активного файла для переключения",
|
|
164
|
+
"status.unsupported_file_type": "Clangd: неподдерживаемый тип файла для переключения заголовка",
|
|
165
|
+
"status.opened_corresponding_file": "Clangd: соответствующий файл открыт",
|
|
166
|
+
"status.no_matching_found": "Clangd: соответствующий заголовок/исходник не найден",
|
|
167
|
+
"status.switch_failed": "Clangd переключение исходник/заголовок не удалось: {error}",
|
|
168
|
+
"status.opened_config": "Конфигурация .clangd открыта",
|
|
169
|
+
"status.config_not_found": "Не удалось найти конфигурацию .clangd в рабочем пространстве",
|
|
170
|
+
"status.file_status": "Статус файла Clangd: {status}"
|
|
171
|
+
},
|
|
172
|
+
"th": {
|
|
173
|
+
"cmd.project_setup": "Clangd: ตั้งค่าโปรเจกต์",
|
|
174
|
+
"cmd.project_setup_desc": "วิเคราะห์ความพร้อมของ clangd สำหรับ C/C++ (compile_commands.json, .clangd)",
|
|
175
|
+
"cmd.switch_source_header": "Clangd: สลับซอร์ส/เฮดเดอร์",
|
|
176
|
+
"cmd.switch_source_header_desc": "ข้ามไปยังคู่เฮดเดอร์/ซอร์สโดยใช้ clangd",
|
|
177
|
+
"cmd.open_project_config": "Clangd: เปิดการตั้งค่าโปรเจกต์",
|
|
178
|
+
"cmd.open_project_config_desc": "เปิดไฟล์ .clangd ที่ใกล้ที่สุด",
|
|
179
|
+
"status.plugin_loaded": "โหลดปลั๊กอินรองรับ Clangd แล้ว (สลับเฮดเดอร์ + คำสั่งการตั้งค่า)",
|
|
180
|
+
"status.no_active_file": "Clangd: ไม่มีไฟล์ที่ใช้งานอยู่ให้สลับ",
|
|
181
|
+
"status.unsupported_file_type": "Clangd: ไม่รองรับประเภทไฟล์สำหรับสลับเฮดเดอร์",
|
|
182
|
+
"status.opened_corresponding_file": "Clangd: เปิดไฟล์ที่เกี่ยวข้องแล้ว",
|
|
183
|
+
"status.no_matching_found": "Clangd: ไม่พบเฮดเดอร์/ซอร์สที่ตรงกัน",
|
|
184
|
+
"status.switch_failed": "Clangd สลับซอร์ส/เฮดเดอร์ล้มเหลว: {error}",
|
|
185
|
+
"status.opened_config": "เปิดการตั้งค่า .clangd แล้ว",
|
|
186
|
+
"status.config_not_found": "ไม่พบการตั้งค่า .clangd ในพื้นที่ทำงาน",
|
|
187
|
+
"status.file_status": "สถานะไฟล์ Clangd: {status}"
|
|
188
|
+
},
|
|
189
|
+
"uk": {
|
|
190
|
+
"cmd.project_setup": "Clangd: Налаштування проекту",
|
|
191
|
+
"cmd.project_setup_desc": "Аналіз готовності C/C++ clangd (compile_commands.json, .clangd)",
|
|
192
|
+
"cmd.switch_source_header": "Clangd: Перемкнути вихідний/заголовний файл",
|
|
193
|
+
"cmd.switch_source_header_desc": "Перейти до пари заголовок/вихідний файл за допомогою clangd",
|
|
194
|
+
"cmd.open_project_config": "Clangd: Відкрити конфігурацію проекту",
|
|
195
|
+
"cmd.open_project_config_desc": "Відкрити найближчий файл .clangd",
|
|
196
|
+
"status.plugin_loaded": "Плагін підтримки Clangd завантажено (перемикання заголовків + команди конфігурації)",
|
|
197
|
+
"status.no_active_file": "Clangd: немає активного файлу для перемикання",
|
|
198
|
+
"status.unsupported_file_type": "Clangd: непідтримуваний тип файлу для перемикання заголовка",
|
|
199
|
+
"status.opened_corresponding_file": "Clangd: відповідний файл відкрито",
|
|
200
|
+
"status.no_matching_found": "Clangd: відповідний заголовок/вихідний файл не знайдено",
|
|
201
|
+
"status.switch_failed": "Clangd перемикання вихідний/заголовний файл не вдалося: {error}",
|
|
202
|
+
"status.opened_config": "Конфігурацію .clangd відкрито",
|
|
203
|
+
"status.config_not_found": "Не вдалося знайти конфігурацію .clangd у робочому просторі",
|
|
204
|
+
"status.file_status": "Статус файлу Clangd: {status}"
|
|
205
|
+
},
|
|
206
|
+
"zh-CN": {
|
|
207
|
+
"cmd.project_setup": "Clangd: 项目设置",
|
|
208
|
+
"cmd.project_setup_desc": "分析C/C++ clangd就绪状态 (compile_commands.json, .clangd)",
|
|
209
|
+
"cmd.switch_source_header": "Clangd: 切换源文件/头文件",
|
|
210
|
+
"cmd.switch_source_header_desc": "使用clangd跳转到头文件/源文件对",
|
|
211
|
+
"cmd.open_project_config": "Clangd: 打开项目配置",
|
|
212
|
+
"cmd.open_project_config_desc": "打开最近的.clangd文件",
|
|
213
|
+
"status.plugin_loaded": "Clangd支持插件已加载(切换头文件 + 配置命令)",
|
|
214
|
+
"status.no_active_file": "Clangd: 没有活动文件可切换",
|
|
215
|
+
"status.unsupported_file_type": "Clangd: 不支持的文件类型,无法切换头文件",
|
|
216
|
+
"status.opened_corresponding_file": "Clangd: 已打开对应文件",
|
|
217
|
+
"status.no_matching_found": "Clangd: 未找到匹配的头文件/源文件",
|
|
218
|
+
"status.switch_failed": "Clangd切换源文件/头文件失败: {error}",
|
|
219
|
+
"status.opened_config": "已打开.clangd配置",
|
|
220
|
+
"status.config_not_found": "在工作区中找不到.clangd配置",
|
|
221
|
+
"status.file_status": "Clangd文件状态: {status}"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Clangd Helper Plugin
|
|
2
|
+
|
|
3
|
+
Fresh bundles `plugins/clangd_support.ts` so clangd users get a small helper plugin out of the box.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
* `Clangd: Switch Source/Header` calls `textDocument/switchSourceHeader` for the active cpp-style buffer and opens the returned URI if there is a match.
|
|
8
|
+
* `Clangd: Open Project Config` searches the current directory tree for a `.clangd` file and opens it in the editor.
|
|
9
|
+
|
|
10
|
+
Those commands are registered in the command palette after the plugin loads; TypeScript plugins can register their own commands by calling `editor.registerCommand`.
|
|
11
|
+
|
|
12
|
+
## Notifications
|
|
13
|
+
|
|
14
|
+
The plugin listens for `lsp/custom_notification` events emitted by the core and filters for clangd-specific methods (`textDocument/clangd.fileStatus`, `$/memoryUsage`, etc.). When clangd sends `textDocument/clangd.fileStatus`, the plugin surfaces it as a status message (`Clangd file status: …`). The editor renders this plugin-provided status slot alongside the usual diagnostics/cursor info, so the notification stays visible without overwriting core messages.
|
|
15
|
+
|
|
16
|
+
Use `editor.setStatus` to set a plugin status message and `editor.setStatus("")` to clear it; the core `Editor::set_status_message` call clears the plugin slot so core actions regain priority.
|
|
17
|
+
|
|
18
|
+
## Project setup heuristic
|
|
19
|
+
|
|
20
|
+
`Clangd: Project Setup` opens a readonly panel that inspects the current workspace root and reports whether the files clangd needs are present (`compile_commands.json`, `.clangd`, etc.). The panel also guesses the build system (CMake, Bazel, Make) by looking for markers like `CMakeLists.txt` or `WORKSPACE` and prints quick tips for generating the missing artifacts (e.g., `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON build`, `bear -- make`). This panel gives you a quick readiness check before enabling heavier clangd features on projects such as Lustre or other Makefile-heavy trees.
|