Step 146: add Emacs buffer bridge
This commit is contained in:
@@ -360,6 +360,7 @@ int main(int, char**) {
|
||||
ImGui::MenuItem("Libraries", nullptr, &state.showLibraryBrowserPanel);
|
||||
ImGui::MenuItem("Compose", nullptr, &state.showCompositionPanel);
|
||||
ImGui::MenuItem("Emacs Packages", nullptr, &state.showEmacsPackagesPanel);
|
||||
ImGui::MenuItem("Emacs Bridge", nullptr, &state.showEmacsBridgePanel);
|
||||
ImGui::MenuItem("Settings", nullptr, &state.showSettingsPanel);
|
||||
ImGui::MenuItem("LSP Servers...", nullptr, &state.showLspSettings);
|
||||
if (state.active()) {
|
||||
@@ -674,6 +675,30 @@ int main(int, char**) {
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
if (state.showEmacsBridgePanel) {
|
||||
ImGui::Begin("Emacs Bridge", &state.showEmacsBridgePanel);
|
||||
ImGui::PushFont(uiFont);
|
||||
if (state.active()) {
|
||||
ImGui::Text("Active file: %s", state.active()->path.c_str());
|
||||
} else {
|
||||
ImGui::TextDisabled("(no active buffer)");
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::Button("Open Emacs Frame")) {
|
||||
state.openInEmacsFrame();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Pull From Emacs")) {
|
||||
state.pullFromEmacs();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Push To Emacs")) {
|
||||
state.pushToEmacs();
|
||||
}
|
||||
ImGui::PopFont();
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
if (state.layoutPreset == LayoutPreset::Emacs && state.emacsKeys.minibufferActive) {
|
||||
ImGuiWindowFlags mbFlags = ImGuiWindowFlags_NoDecoration |
|
||||
ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings |
|
||||
|
||||
Reference in New Issue
Block a user