Fix formatting
This commit is contained in:
parent
de9bf6dfbd
commit
8136d8a8a6
19 changed files with 28 additions and 46 deletions
|
@ -10,9 +10,7 @@ use client::{
|
||||||
use collections::{BTreeMap, HashMap, HashSet};
|
use collections::{BTreeMap, HashMap, HashSet};
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
use futures::{FutureExt, StreamExt};
|
use futures::{FutureExt, StreamExt};
|
||||||
use gpui::{
|
use gpui::{AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, Task, WeakModelHandle};
|
||||||
AsyncAppContext, Entity, ModelContext, ModelHandle, AppContext, Task, WeakModelHandle,
|
|
||||||
};
|
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use live_kit_client::{LocalTrackPublication, LocalVideoTrack, RemoteVideoTrackUpdate};
|
use live_kit_client::{LocalTrackPublication, LocalVideoTrack, RemoteVideoTrackUpdate};
|
||||||
use postage::stream::Stream;
|
use postage::stream::Stream;
|
||||||
|
@ -70,10 +68,7 @@ impl Entity for Room {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app_will_quit(
|
fn app_will_quit(&mut self, cx: &mut AppContext) -> Option<Pin<Box<dyn Future<Output = ()>>>> {
|
||||||
&mut self,
|
|
||||||
cx: &mut AppContext,
|
|
||||||
) -> Option<Pin<Box<dyn Future<Output = ()>>>> {
|
|
||||||
if self.status.is_online() {
|
if self.status.is_online() {
|
||||||
let leave = self.leave_internal(cx);
|
let leave = self.leave_internal(cx);
|
||||||
Some(
|
Some(
|
||||||
|
|
|
@ -3,8 +3,8 @@ use std::sync::Arc;
|
||||||
use crate::notifications::render_user_notification;
|
use crate::notifications::render_user_notification;
|
||||||
use client::{ContactEventKind, User, UserStore};
|
use client::{ContactEventKind, User, UserStore};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
elements::*, impl_internal_actions, Entity, ModelHandle, AppContext, RenderContext,
|
elements::*, impl_internal_actions, AppContext, Entity, ModelHandle, RenderContext, View,
|
||||||
View, ViewContext,
|
ViewContext,
|
||||||
};
|
};
|
||||||
use workspace::notifications::Notification;
|
use workspace::notifications::Notification;
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ use futures::StreamExt;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
elements::*,
|
elements::*,
|
||||||
geometry::{rect::RectF, vector::vec2f},
|
geometry::{rect::RectF, vector::vec2f},
|
||||||
impl_internal_actions, CursorStyle, Entity, MouseButton, AppContext, RenderContext,
|
impl_internal_actions, AppContext, CursorStyle, Entity, MouseButton, RenderContext, View,
|
||||||
View, ViewContext, WindowBounds, WindowKind, WindowOptions,
|
ViewContext, WindowBounds, WindowKind, WindowOptions,
|
||||||
};
|
};
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
|
|
|
@ -5,8 +5,8 @@ use gpui::{
|
||||||
actions,
|
actions,
|
||||||
elements::*,
|
elements::*,
|
||||||
geometry::{rect::RectF, vector::vec2f},
|
geometry::{rect::RectF, vector::vec2f},
|
||||||
CursorStyle, Entity, MouseButton, AppContext, RenderContext, View, ViewContext,
|
AppContext, CursorStyle, Entity, MouseButton, RenderContext, View, ViewContext, WindowBounds,
|
||||||
WindowBounds, WindowKind, WindowOptions,
|
WindowKind, WindowOptions,
|
||||||
};
|
};
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
|
@ -2,7 +2,7 @@ use call::ActiveCall;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
color::Color,
|
color::Color,
|
||||||
elements::{MouseEventHandler, Svg},
|
elements::{MouseEventHandler, Svg},
|
||||||
Appearance, Element, ElementBox, Entity, MouseButton, AppContext, RenderContext, View,
|
AppContext, Appearance, Element, ElementBox, Entity, MouseButton, RenderContext, View,
|
||||||
};
|
};
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ use gpui::{
|
||||||
actions,
|
actions,
|
||||||
elements::{ChildView, Flex, Label, ParentElement},
|
elements::{ChildView, Flex, Label, ParentElement},
|
||||||
keymap_matcher::Keystroke,
|
keymap_matcher::Keystroke,
|
||||||
Action, AnyViewHandle, Element, Entity, MouseState, AppContext, RenderContext, View,
|
Action, AnyViewHandle, AppContext, Element, Entity, MouseState, RenderContext, View,
|
||||||
ViewContext, ViewHandle,
|
ViewContext, ViewHandle,
|
||||||
};
|
};
|
||||||
use picker::{Picker, PickerDelegate};
|
use picker::{Picker, PickerDelegate};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{request::PromptUserDeviceFlow, Copilot, Status};
|
use crate::{request::PromptUserDeviceFlow, Copilot, Status};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
elements::*, geometry::rect::RectF, ClipboardItem, Element, Entity, AppContext, View,
|
elements::*, geometry::rect::RectF, AppContext, ClipboardItem, Element, Entity, View,
|
||||||
ViewContext, ViewHandle, WindowKind, WindowOptions,
|
ViewContext, ViewHandle, WindowKind, WindowOptions,
|
||||||
};
|
};
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use collections::HashSet;
|
use collections::HashSet;
|
||||||
use editor::{Editor, GoToDiagnostic};
|
use editor::{Editor, GoToDiagnostic};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
elements::*, platform::CursorStyle, serde_json, Entity, ModelHandle, MouseButton,
|
elements::*, platform::CursorStyle, serde_json, AppContext, Entity, ModelHandle, MouseButton,
|
||||||
AppContext, RenderContext, Subscription, View, ViewContext, ViewHandle, WeakViewHandle,
|
RenderContext, Subscription, View, ViewContext, ViewHandle, WeakViewHandle,
|
||||||
};
|
};
|
||||||
use language::Diagnostic;
|
use language::Diagnostic;
|
||||||
use project::Project;
|
use project::Project;
|
||||||
|
|
|
@ -640,9 +640,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
fn test_long_lines_with_character_spanning_max_expansion_column(
|
fn test_long_lines_with_character_spanning_max_expansion_column(cx: &mut gpui::AppContext) {
|
||||||
cx: &mut gpui::AppContext,
|
|
||||||
) {
|
|
||||||
let max_expansion_column = 8;
|
let max_expansion_column = 8;
|
||||||
let input = "abcdefg⋯hij";
|
let input = "abcdefg⋯hij";
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ use std::{
|
||||||
|
|
||||||
use gpui::{
|
use gpui::{
|
||||||
geometry::vector::{vec2f, Vector2F},
|
geometry::vector::{vec2f, Vector2F},
|
||||||
Axis, AppContext, Task, ViewContext,
|
AppContext, Axis, Task, ViewContext,
|
||||||
};
|
};
|
||||||
use language::{Bias, Point};
|
use language::{Bias, Point};
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions, geometry::vector::Vector2F, impl_internal_actions, Axis, AppContext,
|
actions, geometry::vector::Vector2F, impl_internal_actions, AppContext, Axis, ViewContext,
|
||||||
ViewContext,
|
|
||||||
};
|
};
|
||||||
use language::Bias;
|
use language::Bias;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ pub mod submit_feedback_button;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
mod system_specs;
|
mod system_specs;
|
||||||
use gpui::{actions, impl_actions, ClipboardItem, AppContext, PromptLevel, ViewContext};
|
use gpui::{actions, impl_actions, AppContext, ClipboardItem, PromptLevel, ViewContext};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use system_specs::SystemSpecs;
|
use system_specs::SystemSpecs;
|
||||||
use workspace::{AppState, Workspace};
|
use workspace::{AppState, Workspace};
|
||||||
|
|
|
@ -4,8 +4,8 @@ use fuzzy::{StringMatch, StringMatchCandidate};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions,
|
actions,
|
||||||
elements::{ChildView, Flex, ParentElement},
|
elements::{ChildView, Flex, ParentElement},
|
||||||
AnyViewHandle, Element, ElementBox, Entity, AppContext, RenderContext, Task, View,
|
AnyViewHandle, AppContext, Element, ElementBox, Entity, RenderContext, Task, View, ViewContext,
|
||||||
ViewContext, ViewHandle,
|
ViewHandle,
|
||||||
};
|
};
|
||||||
use highlighted_workspace_location::HighlightedWorkspaceLocation;
|
use highlighted_workspace_location::HighlightedWorkspaceLocation;
|
||||||
use ordered_float::OrderedFloat;
|
use ordered_float::OrderedFloat;
|
||||||
|
|
|
@ -13,10 +13,7 @@ impl std::ops::Deref for StaffMode {
|
||||||
|
|
||||||
/// Despite what the type system requires me to tell you, the init function will only be called a once
|
/// Despite what the type system requires me to tell you, the init function will only be called a once
|
||||||
/// as soon as we know that the staff mode is enabled.
|
/// as soon as we know that the staff mode is enabled.
|
||||||
pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(
|
pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(cx: &mut AppContext, mut init: F) {
|
||||||
cx: &mut AppContext,
|
|
||||||
mut init: F,
|
|
||||||
) {
|
|
||||||
if **cx.default_global::<StaffMode>() {
|
if **cx.default_global::<StaffMode>() {
|
||||||
init(cx)
|
init(cx)
|
||||||
} else {
|
} else {
|
||||||
|
@ -32,10 +29,7 @@ pub fn staff_mode<F: FnMut(&mut AppContext) + 'static>(
|
||||||
|
|
||||||
/// Immediately checks and runs the init function if the staff mode is not enabled.
|
/// Immediately checks and runs the init function if the staff mode is not enabled.
|
||||||
/// This is only included for symettry with staff_mode() above
|
/// This is only included for symettry with staff_mode() above
|
||||||
pub fn not_staff_mode<F: FnOnce(&mut AppContext) + 'static>(
|
pub fn not_staff_mode<F: FnOnce(&mut AppContext) + 'static>(cx: &mut AppContext, init: F) {
|
||||||
cx: &mut AppContext,
|
|
||||||
init: F,
|
|
||||||
) {
|
|
||||||
if !**cx.default_global::<StaffMode>() {
|
if !**cx.default_global::<StaffMode>() {
|
||||||
init(cx)
|
init(cx)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
use context_menu::{ContextMenu, ContextMenuItem};
|
use context_menu::{ContextMenu, ContextMenuItem};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
elements::*, impl_internal_actions, CursorStyle, Element, ElementBox, Entity, MouseButton,
|
elements::*, impl_internal_actions, AppContext, CursorStyle, Element, ElementBox, Entity,
|
||||||
AppContext, RenderContext, View, ViewContext, ViewHandle, WeakModelHandle,
|
MouseButton, RenderContext, View, ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle,
|
||||||
WeakViewHandle,
|
|
||||||
};
|
};
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use std::any::TypeId;
|
use std::any::TypeId;
|
||||||
|
|
|
@ -2,7 +2,7 @@ use fuzzy::{match_strings, StringMatch, StringMatchCandidate};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions,
|
actions,
|
||||||
elements::{ChildView, Element as _, Label},
|
elements::{ChildView, Element as _, Label},
|
||||||
AnyViewHandle, Entity, AppContext, View, ViewContext, ViewHandle,
|
AnyViewHandle, AppContext, Entity, View, ViewContext, ViewHandle,
|
||||||
};
|
};
|
||||||
use picker::{Picker, PickerDelegate};
|
use picker::{Picker, PickerDelegate};
|
||||||
use settings::{settings_file::SettingsFile, BaseKeymap, Settings};
|
use settings::{settings_file::SettingsFile, BaseKeymap, Settings};
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::sync::Arc;
|
||||||
use db::kvp::KEY_VALUE_STORE;
|
use db::kvp::KEY_VALUE_STORE;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
elements::{Flex, Label, ParentElement},
|
elements::{Flex, Label, ParentElement},
|
||||||
Element, ElementBox, Entity, AppContext, Subscription, View, ViewContext,
|
AppContext, Element, ElementBox, Entity, Subscription, View, ViewContext,
|
||||||
};
|
};
|
||||||
use settings::{settings_file::SettingsFile, Settings};
|
use settings::{settings_file::SettingsFile, Settings};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use std::{any::TypeId, ops::DerefMut};
|
use std::{any::TypeId, ops::DerefMut};
|
||||||
|
|
||||||
use collections::HashSet;
|
use collections::HashSet;
|
||||||
use gpui::{AnyViewHandle, Entity, AppContext, View, ViewContext, ViewHandle};
|
use gpui::{AnyViewHandle, AppContext, Entity, View, ViewContext, ViewHandle};
|
||||||
|
|
||||||
use crate::Workspace;
|
use crate::Workspace;
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ pub mod simple_message_notification {
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions,
|
actions,
|
||||||
elements::{Flex, MouseEventHandler, Padding, ParentElement, Svg, Text},
|
elements::{Flex, MouseEventHandler, Padding, ParentElement, Svg, Text},
|
||||||
impl_actions, Action, CursorStyle, Element, Entity, MouseButton, AppContext, View,
|
impl_actions, Action, AppContext, CursorStyle, Element, Entity, MouseButton, View,
|
||||||
ViewContext,
|
ViewContext,
|
||||||
};
|
};
|
||||||
use menu::Cancel;
|
use menu::Cancel;
|
||||||
|
|
|
@ -99,10 +99,7 @@ impl LspAdapter for YamlLspAdapter {
|
||||||
.log_err()
|
.log_err()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn workspace_configuration(
|
fn workspace_configuration(&self, cx: &mut AppContext) -> Option<BoxFuture<'static, Value>> {
|
||||||
&self,
|
|
||||||
cx: &mut AppContext,
|
|
||||||
) -> Option<BoxFuture<'static, Value>> {
|
|
||||||
let settings = cx.global::<Settings>();
|
let settings = cx.global::<Settings>();
|
||||||
Some(
|
Some(
|
||||||
future::ready(serde_json::json!({
|
future::ready(serde_json::json!({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue