Merge branch 'main' into fix-notification-positioning

This commit is contained in:
Conrad Irwin 2024-01-19 12:55:52 -07:00
commit cb84043400
59 changed files with 1753 additions and 631 deletions

View file

@ -349,7 +349,8 @@
"alt-cmd-]": "editor::UnfoldLines", "alt-cmd-]": "editor::UnfoldLines",
"ctrl-space": "editor::ShowCompletions", "ctrl-space": "editor::ShowCompletions",
"cmd-.": "editor::ToggleCodeActions", "cmd-.": "editor::ToggleCodeActions",
"alt-cmd-r": "editor::RevealInFinder" "alt-cmd-r": "editor::RevealInFinder",
"ctrl-cmd-c": "editor::DisplayCursorNames"
} }
}, },
{ {

View file

@ -66,7 +66,7 @@ impl Database {
.await .await
} }
/// Create a notification. If `avoid_duplicates` is set to true, then avoid /// Creates a notification. If `avoid_duplicates` is set to true, then avoid
/// creating a new notification if the given recipient already has an /// creating a new notification if the given recipient already has an
/// unread notification with the given kind and entity id. /// unread notification with the given kind and entity id.
pub async fn create_notification( pub async fn create_notification(

View file

@ -153,7 +153,7 @@ impl Database {
.await .await
} }
/// Set "connected_once" on the user for analytics. /// Sets "connected_once" on the user for analytics.
pub async fn set_user_connected_once(&self, id: UserId, connected_once: bool) -> Result<()> { pub async fn set_user_connected_once(&self, id: UserId, connected_once: bool) -> Result<()> {
self.transaction(|tx| async move { self.transaction(|tx| async move {
user::Entity::update_many() user::Entity::update_many()
@ -252,7 +252,7 @@ impl Database {
.await .await
} }
/// Return the active flags for the user. /// Returns the active flags for the user.
pub async fn get_user_flags(&self, user: UserId) -> Result<Vec<String>> { pub async fn get_user_flags(&self, user: UserId) -> Result<Vec<String>> {
self.transaction(|tx| async move { self.transaction(|tx| async move {
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)] #[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]

View file

@ -950,7 +950,7 @@ async fn ping(_: proto::Ping, response: Response<proto::Ping>, _session: Session
Ok(()) Ok(())
} }
/// Create a new room for calling (outside of channels) /// Creates a new room for calling (outside of channels)
async fn create_room( async fn create_room(
_request: proto::CreateRoom, _request: proto::CreateRoom,
response: Response<proto::CreateRoom>, response: Response<proto::CreateRoom>,
@ -1276,7 +1276,7 @@ async fn leave_room(
Ok(()) Ok(())
} }
/// Update the permissions of someone else in the room. /// Updates the permissions of someone else in the room.
async fn set_room_participant_role( async fn set_room_participant_role(
request: proto::SetRoomParticipantRole, request: proto::SetRoomParticipantRole,
response: Response<proto::SetRoomParticipantRole>, response: Response<proto::SetRoomParticipantRole>,
@ -1460,7 +1460,7 @@ async fn decline_call(message: proto::DeclineCall, session: Session) -> Result<(
Ok(()) Ok(())
} }
/// Update other participants in the room with your current location. /// Updates other participants in the room with your current location.
async fn update_participant_location( async fn update_participant_location(
request: proto::UpdateParticipantLocation, request: proto::UpdateParticipantLocation,
response: Response<proto::UpdateParticipantLocation>, response: Response<proto::UpdateParticipantLocation>,
@ -1673,7 +1673,7 @@ async fn leave_project(request: proto::LeaveProject, session: Session) -> Result
Ok(()) Ok(())
} }
/// Update other participants with changes to the project /// Updates other participants with changes to the project
async fn update_project( async fn update_project(
request: proto::UpdateProject, request: proto::UpdateProject,
response: Response<proto::UpdateProject>, response: Response<proto::UpdateProject>,
@ -1700,7 +1700,7 @@ async fn update_project(
Ok(()) Ok(())
} }
/// Update other participants with changes to the worktree /// Updates other participants with changes to the worktree
async fn update_worktree( async fn update_worktree(
request: proto::UpdateWorktree, request: proto::UpdateWorktree,
response: Response<proto::UpdateWorktree>, response: Response<proto::UpdateWorktree>,
@ -1725,7 +1725,7 @@ async fn update_worktree(
Ok(()) Ok(())
} }
/// Update other participants with changes to the diagnostics /// Updates other participants with changes to the diagnostics
async fn update_diagnostic_summary( async fn update_diagnostic_summary(
message: proto::UpdateDiagnosticSummary, message: proto::UpdateDiagnosticSummary,
session: Session, session: Session,
@ -1749,7 +1749,7 @@ async fn update_diagnostic_summary(
Ok(()) Ok(())
} }
/// Update other participants with changes to the worktree settings /// Updates other participants with changes to the worktree settings
async fn update_worktree_settings( async fn update_worktree_settings(
message: proto::UpdateWorktreeSettings, message: proto::UpdateWorktreeSettings,
session: Session, session: Session,
@ -2293,7 +2293,7 @@ async fn remove_contact(
Ok(()) Ok(())
} }
/// Create a new channel. /// Creates a new channel.
async fn create_channel( async fn create_channel(
request: proto::CreateChannel, request: proto::CreateChannel,
response: Response<proto::CreateChannel>, response: Response<proto::CreateChannel>,

View file

@ -713,6 +713,9 @@ impl Render for NotificationToast {
h_flex() h_flex()
.id("notification_panel_toast") .id("notification_panel_toast")
.elevation_3(cx)
.p_2()
.gap_2()
.children(user.map(|user| Avatar::new(user.avatar_uri.clone()))) .children(user.map(|user| Avatar::new(user.avatar_uri.clone())))
.child(Label::new(self.text.clone())) .child(Label::new(self.text.clone()))
.child( .child(

View file

@ -214,5 +214,6 @@ gpui::actions!(
Undo, Undo,
UndoSelection, UndoSelection,
UnfoldLines, UnfoldLines,
DisplayCursorNames
] ]
); );

View file

@ -367,7 +367,7 @@ pub struct Editor {
project: Option<Model<Project>>, project: Option<Model<Project>>,
collaboration_hub: Option<Box<dyn CollaborationHub>>, collaboration_hub: Option<Box<dyn CollaborationHub>>,
blink_manager: Model<BlinkManager>, blink_manager: Model<BlinkManager>,
recently_focused: bool, show_cursor_names: bool,
hovered_cursor: Option<HoveredCursor>, hovered_cursor: Option<HoveredCursor>,
pub show_local_selections: bool, pub show_local_selections: bool,
mode: EditorMode, mode: EditorMode,
@ -1613,7 +1613,7 @@ impl Editor {
pixel_position_of_newest_cursor: None, pixel_position_of_newest_cursor: None,
gutter_width: Default::default(), gutter_width: Default::default(),
style: None, style: None,
recently_focused: false, show_cursor_names: false,
hovered_cursor: Default::default(), hovered_cursor: Default::default(),
editor_actions: Default::default(), editor_actions: Default::default(),
show_copilot_suggestions: mode == EditorMode::Full, show_copilot_suggestions: mode == EditorMode::Full,
@ -3899,6 +3899,24 @@ impl Editor {
self.update_visible_copilot_suggestion(cx); self.update_visible_copilot_suggestion(cx);
} }
pub fn display_cursor_names(&mut self, _: &DisplayCursorNames, cx: &mut ViewContext<Self>) {
self.show_cursor_names(cx);
}
fn show_cursor_names(&mut self, cx: &mut ViewContext<Self>) {
self.show_cursor_names = true;
cx.notify();
cx.spawn(|this, mut cx| async move {
cx.background_executor().timer(Duration::from_secs(2)).await;
this.update(&mut cx, |this, cx| {
this.show_cursor_names = false;
cx.notify()
})
.ok()
})
.detach();
}
fn next_copilot_suggestion(&mut self, _: &copilot::NextSuggestion, cx: &mut ViewContext<Self>) { fn next_copilot_suggestion(&mut self, _: &copilot::NextSuggestion, cx: &mut ViewContext<Self>) {
if self.has_active_copilot_suggestion(cx) { if self.has_active_copilot_suggestion(cx) {
self.cycle_copilot_suggestions(Direction::Next, cx); self.cycle_copilot_suggestions(Direction::Next, cx);
@ -9003,17 +9021,7 @@ impl Editor {
cx.focus(&rename_editor_focus_handle); cx.focus(&rename_editor_focus_handle);
} else { } else {
self.blink_manager.update(cx, BlinkManager::enable); self.blink_manager.update(cx, BlinkManager::enable);
self.recently_focused = true; self.show_cursor_names(cx);
cx.notify();
cx.spawn(|this, mut cx| async move {
cx.background_executor().timer(Duration::from_secs(2)).await;
this.update(&mut cx, |this, cx| {
this.recently_focused = false;
cx.notify()
})
.ok()
})
.detach();
self.buffer.update(cx, |buffer, cx| { self.buffer.update(cx, |buffer, cx| {
buffer.finalize_last_transaction(cx); buffer.finalize_last_transaction(cx);
if self.leader_peer_id.is_none() { if self.leader_peer_id.is_none() {

View file

@ -327,6 +327,7 @@ impl EditorElement {
register_action(view, cx, Editor::context_menu_prev); register_action(view, cx, Editor::context_menu_prev);
register_action(view, cx, Editor::context_menu_next); register_action(view, cx, Editor::context_menu_next);
register_action(view, cx, Editor::context_menu_last); register_action(view, cx, Editor::context_menu_last);
register_action(view, cx, Editor::display_cursor_names);
} }
fn register_key_listeners(&self, cx: &mut WindowContext) { fn register_key_listeners(&self, cx: &mut WindowContext) {
@ -2000,7 +2001,7 @@ impl EditorElement {
if Some(selection.peer_id) == editor.leader_peer_id { if Some(selection.peer_id) == editor.leader_peer_id {
continue; continue;
} }
let is_shown = editor.recently_focused || editor.hovered_cursor.as_ref().is_some_and(|c| c.replica_id == selection.replica_id && c.selection_id == selection.selection.id); let is_shown = editor.show_cursor_names || editor.hovered_cursor.as_ref().is_some_and(|c| c.replica_id == selection.replica_id && c.selection_id == selection.selection.id);
remote_selections remote_selections
.entry(selection.replica_id) .entry(selection.replica_id)

View file

@ -864,7 +864,7 @@ impl AppContext {
.unwrap() .unwrap()
} }
/// Set the value of the global of the given type. /// Sets the value of the global of the given type.
pub fn set_global<G: Any>(&mut self, global: G) { pub fn set_global<G: Any>(&mut self, global: G) {
let global_type = TypeId::of::<G>(); let global_type = TypeId::of::<G>();
self.push_effect(Effect::NotifyGlobalObservers { global_type }); self.push_effect(Effect::NotifyGlobalObservers { global_type });
@ -889,7 +889,7 @@ impl AppContext {
.unwrap() .unwrap()
} }
/// Update the global of the given type with a closure. Unlike `global_mut`, this method provides /// Updates the global of the given type with a closure. Unlike `global_mut`, this method provides
/// your closure with mutable access to the `AppContext` and the global simultaneously. /// your closure with mutable access to the `AppContext` and the global simultaneously.
pub fn update_global<G: 'static, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R { pub fn update_global<G: 'static, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R {
self.update(|cx| { self.update(|cx| {
@ -1106,7 +1106,7 @@ impl AppContext {
.contains_key(&action.as_any().type_id()) .contains_key(&action.as_any().type_id())
} }
/// Set the menu bar for this application. This will replace any existing menu bar. /// Sets the menu bar for this application. This will replace any existing menu bar.
pub fn set_menus(&mut self, menus: Vec<Menu>) { pub fn set_menus(&mut self, menus: Vec<Menu>) {
self.platform.set_menus(menus, &self.keymap.lock()); self.platform.set_menus(menus, &self.keymap.lock());
} }
@ -1190,7 +1190,7 @@ impl Context for AppContext {
}) })
} }
/// Update the entity referenced by the given model. The function is passed a mutable reference to the /// Updates the entity referenced by the given model. The function is passed a mutable reference to the
/// entity along with a `ModelContext` for the entity. /// entity along with a `ModelContext` for the entity.
fn update_model<T: 'static, R>( fn update_model<T: 'static, R>(
&mut self, &mut self,

View file

@ -104,7 +104,7 @@ impl EntityMap {
} }
} }
/// Return an entity after moving it to the stack. /// Returns an entity after moving it to the stack.
pub fn end_lease<T>(&mut self, mut lease: Lease<T>) { pub fn end_lease<T>(&mut self, mut lease: Lease<T>) {
self.entities self.entities
.insert(lease.model.entity_id, lease.entity.take().unwrap()); .insert(lease.model.entity_id, lease.entity.take().unwrap());
@ -391,7 +391,7 @@ impl<T: 'static> Model<T> {
cx.read_model(self, f) cx.read_model(self, f)
} }
/// Update the entity referenced by this model with the given function. /// Updates the entity referenced by this model with the given function.
/// ///
/// The update function receives a context appropriate for its environment. /// The update function receives a context appropriate for its environment.
/// When updating in an `AppContext`, it receives a `ModelContext`. /// When updating in an `AppContext`, it receives a `ModelContext`.
@ -571,7 +571,7 @@ impl<T: 'static> WeakModel<T> {
Model::upgrade_from(self) Model::upgrade_from(self)
} }
/// Update the entity referenced by this model with the given function if /// Updates the entity referenced by this model with the given function if
/// the referenced entity still exists. Returns an error if the entity has /// the referenced entity still exists. Returns an error if the entity has
/// been released. /// been released.
pub fn update<C, R>( pub fn update<C, R>(

View file

@ -189,7 +189,7 @@ impl<'a, T: 'static> ModelContext<'a, T> {
} }
} }
/// Update the given global /// Updates the given global
pub fn update_global<G, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R pub fn update_global<G, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R
where where
G: 'static, G: 'static,

View file

@ -578,7 +578,7 @@ impl<'a> VisualTestContext {
self.cx.update_window(self.window, |_, cx| f(cx)).unwrap() self.cx.update_window(self.window, |_, cx| f(cx)).unwrap()
} }
/// Create a new VisualTestContext. You would typically shadow the passed in /// Creates a new VisualTestContext. You would typically shadow the passed in
/// TestAppContext with this, as this is typically more useful. /// TestAppContext with this, as this is typically more useful.
/// `let cx = VisualTestContext::from_window(window, cx);` /// `let cx = VisualTestContext::from_window(window, cx);`
pub fn from_window(window: AnyWindowHandle, cx: &TestAppContext) -> Self { pub fn from_window(window: AnyWindowHandle, cx: &TestAppContext) -> Self {

View file

@ -46,7 +46,7 @@ pub enum Task<T> {
} }
impl<T> Task<T> { impl<T> Task<T> {
/// Create a new task that will resolve with the value /// Creates a new task that will resolve with the value
pub fn ready(val: T) -> Self { pub fn ready(val: T) -> Self {
Task::Ready(Some(val)) Task::Ready(Some(val))
} }

View file

@ -514,25 +514,6 @@ impl MacWindow {
NSArray::arrayWithObject(nil, NSFilenamesPboardType) NSArray::arrayWithObject(nil, NSFilenamesPboardType)
]; ];
let screen = native_window.screen();
match options.bounds {
WindowBounds::Fullscreen => {
native_window.toggleFullScreen_(nil);
}
WindowBounds::Maximized => {
native_window.setFrame_display_(screen.visibleFrame(), YES);
}
WindowBounds::Fixed(bounds) => {
let display_bounds = display.bounds();
let frame = if bounds.intersects(&display_bounds) {
global_bounds_to_ns_rect(bounds)
} else {
global_bounds_to_ns_rect(display_bounds)
};
native_window.setFrame_display_(frame, YES);
}
}
let native_view: id = msg_send![VIEW_CLASS, alloc]; let native_view: id = msg_send![VIEW_CLASS, alloc];
let native_view = NSView::init(native_view); let native_view = NSView::init(native_view);
@ -654,6 +635,27 @@ impl MacWindow {
native_window.orderFront_(nil); native_window.orderFront_(nil);
} }
let screen = native_window.screen();
match options.bounds {
WindowBounds::Fullscreen => {
// We need to toggle full screen asynchronously as doing so may
// call back into the platform handlers.
window.toggle_full_screen()
}
WindowBounds::Maximized => {
native_window.setFrame_display_(screen.visibleFrame(), YES);
}
WindowBounds::Fixed(bounds) => {
let display_bounds = display.bounds();
let frame = if bounds.intersects(&display_bounds) {
global_bounds_to_ns_rect(bounds)
} else {
global_bounds_to_ns_rect(display_bounds)
};
native_window.setFrame_display_(frame, YES);
}
}
window.0.lock().move_traffic_light(); window.0.lock().move_traffic_light();
pool.drain(); pool.drain();

View file

@ -307,6 +307,13 @@ pub trait Styled: Sized {
self self
} }
/// Sets the initial size of flex items for this element.
/// [Docs](https://tailwindcss.com/docs/flex-basis)
fn flex_basis(mut self, basis: impl Into<Length>) -> Self {
self.style().flex_basis = Some(basis.into());
self
}
/// Sets the element to allow a flex item to grow to fill any available space. /// Sets the element to allow a flex item to grow to fill any available space.
/// [Docs](https://tailwindcss.com/docs/flex-grow) /// [Docs](https://tailwindcss.com/docs/flex-grow)
fn flex_grow(mut self) -> Self { fn flex_grow(mut self) -> Self {
@ -314,6 +321,20 @@ pub trait Styled: Sized {
self self
} }
/// Sets the element to allow a flex item to shrink if needed.
/// [Docs](https://tailwindcss.com/docs/flex-shrink)
fn flex_shrink(mut self) -> Self {
self.style().flex_shrink = Some(1.);
self
}
/// Sets the element to prevent a flex item from shrinking.
/// [Docs](https://tailwindcss.com/docs/flex-shrink#dont-shrink)
fn flex_shrink_0(mut self) -> Self {
self.style().flex_shrink = Some(0.);
self
}
/// Sets the element to align flex items to the start of the container's cross axis. /// Sets the element to align flex items to the start of the container's cross axis.
/// [Docs](https://tailwindcss.com/docs/align-items#start) /// [Docs](https://tailwindcss.com/docs/align-items#start)
fn items_start(mut self) -> Self { fn items_start(mut self) -> Self {

View file

@ -64,7 +64,7 @@ impl<V: 'static> View<V> {
Entity::downgrade(self) Entity::downgrade(self)
} }
/// Update the view's state with the given function, which is passed a mutable reference and a context. /// Updates the view's state with the given function, which is passed a mutable reference and a context.
pub fn update<C, R>( pub fn update<C, R>(
&self, &self,
cx: &mut C, cx: &mut C,
@ -156,7 +156,7 @@ impl<V: 'static> WeakView<V> {
Entity::upgrade_from(self) Entity::upgrade_from(self)
} }
/// Update this view's state if it hasn't been released. /// Updates this view's state if it hasn't been released.
/// Returns an error if this view has been released. /// Returns an error if this view has been released.
pub fn update<C, R>( pub fn update<C, R>(
&self, &self,

View file

@ -721,7 +721,7 @@ impl<'a> WindowContext<'a> {
subscription subscription
} }
/// Create an `AsyncWindowContext`, which has a static lifetime and can be held across /// Creates an [`AsyncWindowContext`], which has a static lifetime and can be held across
/// await points in async code. /// await points in async code.
pub fn to_async(&self) -> AsyncWindowContext { pub fn to_async(&self) -> AsyncWindowContext {
AsyncWindowContext::new(self.app.to_async(), self.window.handle) AsyncWindowContext::new(self.app.to_async(), self.window.handle)
@ -794,7 +794,7 @@ impl<'a> WindowContext<'a> {
.spawn(|app| f(AsyncWindowContext::new(app, self.window.handle))) .spawn(|app| f(AsyncWindowContext::new(app, self.window.handle)))
} }
/// Update the global of the given type. The given closure is given simultaneous mutable /// Updates the global of the given type. The given closure is given simultaneous mutable
/// access both to the global and the context. /// access both to the global and the context.
pub fn update_global<G, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R pub fn update_global<G, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R
where where
@ -913,7 +913,7 @@ impl<'a> WindowContext<'a> {
self.window.platform_window.zoom(); self.window.platform_window.zoom();
} }
/// Update the window's title at the platform level. /// Updates the window's title at the platform level.
pub fn set_window_title(&mut self, title: &str) { pub fn set_window_title(&mut self, title: &str) {
self.window.platform_window.set_title(title); self.window.platform_window.set_title(title);
} }
@ -1063,14 +1063,14 @@ impl<'a> WindowContext<'a> {
self.window.modifiers self.window.modifiers
} }
/// Update the cursor style at the platform level. /// Updates the cursor style at the platform level.
pub fn set_cursor_style(&mut self, style: CursorStyle) { pub fn set_cursor_style(&mut self, style: CursorStyle) {
let view_id = self.parent_view_id(); let view_id = self.parent_view_id();
self.window.next_frame.cursor_styles.insert(view_id, style); self.window.next_frame.cursor_styles.insert(view_id, style);
self.window.next_frame.requested_cursor_style = Some(style); self.window.next_frame.requested_cursor_style = Some(style);
} }
/// Set a tooltip to be rendered for the upcoming frame /// Sets a tooltip to be rendered for the upcoming frame
pub fn set_tooltip(&mut self, tooltip: AnyTooltip) { pub fn set_tooltip(&mut self, tooltip: AnyTooltip) {
let view_id = self.parent_view_id(); let view_id = self.parent_view_id();
self.window.next_frame.tooltip_request = Some(TooltipRequest { view_id, tooltip }); self.window.next_frame.tooltip_request = Some(TooltipRequest { view_id, tooltip });
@ -2080,8 +2080,8 @@ impl<'a> WindowContext<'a> {
}) })
} }
/// Update or initialize state for an element with the given id that lives across multiple /// Updates or initializes state for an element with the given id that lives across multiple
/// frames. If an element with this id existed in the rendered frame, its state will be passed /// frames. If an element with this ID existed in the rendered frame, its state will be passed
/// to the given closure. The state returned by the closure will be stored so it can be referenced /// to the given closure. The state returned by the closure will be stored so it can be referenced
/// when drawing the next frame. /// when drawing the next frame.
pub(crate) fn with_element_state<S, R>( pub(crate) fn with_element_state<S, R>(
@ -2182,7 +2182,7 @@ impl<'a> WindowContext<'a> {
.expect("a view should always be on the stack while drawing") .expect("a view should always be on the stack while drawing")
} }
/// Set an input handler, such as [`ElementInputHandler`][element_input_handler], which interfaces with the /// Sets an input handler, such as [`ElementInputHandler`][element_input_handler], which interfaces with the
/// platform to receive textual input with proper integration with concerns such /// platform to receive textual input with proper integration with concerns such
/// as IME interactions. This handler will be active for the upcoming frame until the following frame is /// as IME interactions. This handler will be active for the upcoming frame until the following frame is
/// rendered. /// rendered.
@ -2322,7 +2322,7 @@ impl VisualContext for WindowContext<'_> {
view view
} }
/// Update the given view. Prefer calling `View::update` instead, which calls this method. /// Updates the given view. Prefer calling [`View::update`] instead, which calls this method.
fn update_view<T: 'static, R>( fn update_view<T: 'static, R>(
&mut self, &mut self,
view: &View<T>, view: &View<T>,
@ -2491,7 +2491,7 @@ pub trait BorrowWindow: BorrowMut<Window> + BorrowMut<AppContext> {
result result
} }
/// Update the global element offset relative to the current offset. This is used to implement /// Updates the global element offset relative to the current offset. This is used to implement
/// scrolling. /// scrolling.
fn with_element_offset<R>( fn with_element_offset<R>(
&mut self, &mut self,
@ -2506,7 +2506,7 @@ pub trait BorrowWindow: BorrowMut<Window> + BorrowMut<AppContext> {
self.with_absolute_element_offset(abs_offset, f) self.with_absolute_element_offset(abs_offset, f)
} }
/// Update the global element offset based on the given offset. This is used to implement /// Updates the global element offset based on the given offset. This is used to implement
/// drag handles and other manual painting of elements. /// drag handles and other manual painting of elements.
fn with_absolute_element_offset<R>( fn with_absolute_element_offset<R>(
&mut self, &mut self,
@ -2629,7 +2629,7 @@ impl<'a, V: 'static> ViewContext<'a, V> {
&mut self.window_cx &mut self.window_cx
} }
/// Set a given callback to be run on the next frame. /// Sets a given callback to be run on the next frame.
pub fn on_next_frame(&mut self, f: impl FnOnce(&mut V, &mut ViewContext<V>) + 'static) pub fn on_next_frame(&mut self, f: impl FnOnce(&mut V, &mut ViewContext<V>) + 'static)
where where
V: 'static, V: 'static,
@ -2957,7 +2957,7 @@ impl<'a, V: 'static> ViewContext<'a, V> {
self.window_cx.spawn(|cx| f(view, cx)) self.window_cx.spawn(|cx| f(view, cx))
} }
/// Update the global state of the given type. /// Updates the global state of the given type.
pub fn update_global<G, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R pub fn update_global<G, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R
where where
G: 'static, G: 'static,
@ -3189,7 +3189,7 @@ pub struct WindowHandle<V> {
} }
impl<V: 'static + Render> WindowHandle<V> { impl<V: 'static + Render> WindowHandle<V> {
/// Create a new handle from a window ID. /// Creates a new handle from a window ID.
/// This does not check if the root type of the window is `V`. /// This does not check if the root type of the window is `V`.
pub fn new(id: WindowId) -> Self { pub fn new(id: WindowId) -> Self {
WindowHandle { WindowHandle {
@ -3215,7 +3215,7 @@ impl<V: 'static + Render> WindowHandle<V> {
})) }))
} }
/// Update the root view of this window. /// Updates the root view of this window.
/// ///
/// This will fail if the window has been closed or if the root view's type does not match /// This will fail if the window has been closed or if the root view's type does not match
pub fn update<C, R>( pub fn update<C, R>(
@ -3337,7 +3337,7 @@ impl AnyWindowHandle {
} }
} }
/// Update the state of the root view of this window. /// Updates the state of the root view of this window.
/// ///
/// This will fail if the window has been closed. /// This will fail if the window has been closed.
pub fn update<C, R>( pub fn update<C, R>(
@ -3477,7 +3477,7 @@ pub struct PaintQuad {
} }
impl PaintQuad { impl PaintQuad {
/// Set the corner radii of the quad. /// Sets the corner radii of the quad.
pub fn corner_radii(self, corner_radii: impl Into<Corners<Pixels>>) -> Self { pub fn corner_radii(self, corner_radii: impl Into<Corners<Pixels>>) -> Self {
PaintQuad { PaintQuad {
corner_radii: corner_radii.into(), corner_radii: corner_radii.into(),
@ -3485,7 +3485,7 @@ impl PaintQuad {
} }
} }
/// Set the border widths of the quad. /// Sets the border widths of the quad.
pub fn border_widths(self, border_widths: impl Into<Edges<Pixels>>) -> Self { pub fn border_widths(self, border_widths: impl Into<Edges<Pixels>>) -> Self {
PaintQuad { PaintQuad {
border_widths: border_widths.into(), border_widths: border_widths.into(),
@ -3493,7 +3493,7 @@ impl PaintQuad {
} }
} }
/// Set the border color of the quad. /// Sets the border color of the quad.
pub fn border_color(self, border_color: impl Into<Hsla>) -> Self { pub fn border_color(self, border_color: impl Into<Hsla>) -> Self {
PaintQuad { PaintQuad {
border_color: border_color.into(), border_color: border_color.into(),
@ -3501,7 +3501,7 @@ impl PaintQuad {
} }
} }
/// Set the background color of the quad. /// Sets the background color of the quad.
pub fn background(self, background: impl Into<Hsla>) -> Self { pub fn background(self, background: impl Into<Hsla>) -> Self {
PaintQuad { PaintQuad {
background: background.into(), background: background.into(),
@ -3510,7 +3510,7 @@ impl PaintQuad {
} }
} }
/// Create a quad with the given parameters. /// Creates a quad with the given parameters.
pub fn quad( pub fn quad(
bounds: Bounds<Pixels>, bounds: Bounds<Pixels>,
corner_radii: impl Into<Corners<Pixels>>, corner_radii: impl Into<Corners<Pixels>>,
@ -3527,7 +3527,7 @@ pub fn quad(
} }
} }
/// Create a filled quad with the given bounds and background color. /// Creates a filled quad with the given bounds and background color.
pub fn fill(bounds: impl Into<Bounds<Pixels>>, background: impl Into<Hsla>) -> PaintQuad { pub fn fill(bounds: impl Into<Bounds<Pixels>>, background: impl Into<Hsla>) -> PaintQuad {
PaintQuad { PaintQuad {
bounds: bounds.into(), bounds: bounds.into(),
@ -3538,7 +3538,7 @@ pub fn fill(bounds: impl Into<Bounds<Pixels>>, background: impl Into<Hsla>) -> P
} }
} }
/// Create a rectangle outline with the given bounds, border color, and a 1px border width /// Creates a rectangle outline with the given bounds, border color, and a 1px border width
pub fn outline(bounds: impl Into<Bounds<Pixels>>, border_color: impl Into<Hsla>) -> PaintQuad { pub fn outline(bounds: impl Into<Bounds<Pixels>>, border_color: impl Into<Hsla>) -> PaintQuad {
PaintQuad { PaintQuad {
bounds: bounds.into(), bounds: bounds.into(),

File diff suppressed because it is too large Load diff

View file

@ -9,20 +9,36 @@ use std::{
use sum_tree::{self, Bias, SumTree}; use sum_tree::{self, Bias, SumTree};
use text::{Anchor, FromAnchor, PointUtf16, ToOffset}; use text::{Anchor, FromAnchor, PointUtf16, ToOffset};
/// A set of diagnostics associated with a given buffer, provided
/// by a single language server.
///
/// The diagnostics are stored in a [SumTree], which allows this struct
/// to be cheaply copied, and allows for efficient retrieval of the
/// diagnostics that intersect a given range of the buffer.
#[derive(Clone, Debug, Default)] #[derive(Clone, Debug, Default)]
pub struct DiagnosticSet { pub struct DiagnosticSet {
diagnostics: SumTree<DiagnosticEntry<Anchor>>, diagnostics: SumTree<DiagnosticEntry<Anchor>>,
} }
/// A single diagnostic in a set. Generic over its range type, because
/// the diagnostics are stored internally as [Anchor]s, but can be
/// resolved to different coordinates types like [usize] byte offsets or
/// [Point]s.
#[derive(Clone, Debug, PartialEq, Eq)] #[derive(Clone, Debug, PartialEq, Eq)]
pub struct DiagnosticEntry<T> { pub struct DiagnosticEntry<T> {
/// The range of the buffer where the diagnostic applies.
pub range: Range<T>, pub range: Range<T>,
/// The information about the diagnostic.
pub diagnostic: Diagnostic, pub diagnostic: Diagnostic,
} }
/// A group of related diagnostics, ordered by their start position
/// in the buffer.
#[derive(Debug)] #[derive(Debug)]
pub struct DiagnosticGroup<T> { pub struct DiagnosticGroup<T> {
/// The diagnostics.
pub entries: Vec<DiagnosticEntry<T>>, pub entries: Vec<DiagnosticEntry<T>>,
/// The index into `entries` where the primary diagnostic is stored.
pub primary_ix: usize, pub primary_ix: usize,
} }
@ -36,7 +52,8 @@ pub struct Summary {
} }
impl<T> DiagnosticEntry<T> { impl<T> DiagnosticEntry<T> {
// Used to provide diagnostic context to lsp codeAction request /// Returns a raw LSP diagnostic ssed to provide diagnostic context to lsp
/// codeAction request
pub fn to_lsp_diagnostic_stub(&self) -> lsp::Diagnostic { pub fn to_lsp_diagnostic_stub(&self) -> lsp::Diagnostic {
let code = self let code = self
.diagnostic .diagnostic
@ -53,6 +70,8 @@ impl<T> DiagnosticEntry<T> {
} }
impl DiagnosticSet { impl DiagnosticSet {
/// Constructs a [DiagnosticSet] from a sequence of entries, ordered by
/// their position in the buffer.
pub fn from_sorted_entries<I>(iter: I, buffer: &text::BufferSnapshot) -> Self pub fn from_sorted_entries<I>(iter: I, buffer: &text::BufferSnapshot) -> Self
where where
I: IntoIterator<Item = DiagnosticEntry<Anchor>>, I: IntoIterator<Item = DiagnosticEntry<Anchor>>,
@ -62,6 +81,7 @@ impl DiagnosticSet {
} }
} }
/// Constructs a [DiagnosticSet] from a sequence of entries in an arbitrary order.
pub fn new<I>(iter: I, buffer: &text::BufferSnapshot) -> Self pub fn new<I>(iter: I, buffer: &text::BufferSnapshot) -> Self
where where
I: IntoIterator<Item = DiagnosticEntry<PointUtf16>>, I: IntoIterator<Item = DiagnosticEntry<PointUtf16>>,
@ -80,14 +100,18 @@ impl DiagnosticSet {
} }
} }
/// Returns the number of diagnostics in the set.
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
self.diagnostics.summary().count self.diagnostics.summary().count
} }
/// Returns an iterator over the diagnostic entries in the set.
pub fn iter(&self) -> impl Iterator<Item = &DiagnosticEntry<Anchor>> { pub fn iter(&self) -> impl Iterator<Item = &DiagnosticEntry<Anchor>> {
self.diagnostics.iter() self.diagnostics.iter()
} }
/// Returns an iterator over the diagnostic entries that intersect the
/// given range of the buffer.
pub fn range<'a, T, O>( pub fn range<'a, T, O>(
&'a self, &'a self,
range: Range<T>, range: Range<T>,
@ -134,6 +158,7 @@ impl DiagnosticSet {
}) })
} }
/// Adds all of this set's diagnostic groups to the given output vector.
pub fn groups( pub fn groups(
&self, &self,
language_server_id: LanguageServerId, language_server_id: LanguageServerId,
@ -173,6 +198,8 @@ impl DiagnosticSet {
}); });
} }
/// Returns all of the diagnostics in a particular diagnostic group,
/// in order of their position in the buffer.
pub fn group<'a, O: FromAnchor>( pub fn group<'a, O: FromAnchor>(
&'a self, &'a self,
group_id: usize, group_id: usize,
@ -183,6 +210,7 @@ impl DiagnosticSet {
.map(|entry| entry.resolve(buffer)) .map(|entry| entry.resolve(buffer))
} }
} }
impl sum_tree::Item for DiagnosticEntry<Anchor> { impl sum_tree::Item for DiagnosticEntry<Anchor> {
type Summary = Summary; type Summary = Summary;
@ -198,6 +226,7 @@ impl sum_tree::Item for DiagnosticEntry<Anchor> {
} }
impl DiagnosticEntry<Anchor> { impl DiagnosticEntry<Anchor> {
/// Converts the [DiagnosticEntry] to a different buffer coordinate type.
pub fn resolve<O: FromAnchor>(&self, buffer: &text::BufferSnapshot) -> DiagnosticEntry<O> { pub fn resolve<O: FromAnchor>(&self, buffer: &text::BufferSnapshot) -> DiagnosticEntry<O> {
DiagnosticEntry { DiagnosticEntry {
range: O::from_anchor(&self.range.start, buffer) range: O::from_anchor(&self.range.start, buffer)

View file

@ -11,7 +11,7 @@ pub struct HighlightId(pub u32);
const DEFAULT_SYNTAX_HIGHLIGHT_ID: HighlightId = HighlightId(u32::MAX); const DEFAULT_SYNTAX_HIGHLIGHT_ID: HighlightId = HighlightId(u32::MAX);
impl HighlightMap { impl HighlightMap {
pub fn new(capture_names: &[&str], theme: &SyntaxTheme) -> Self { pub(crate) fn new(capture_names: &[&str], theme: &SyntaxTheme) -> Self {
// For each capture name in the highlight query, find the longest // For each capture name in the highlight query, find the longest
// key in the theme's syntax styles that matches all of the // key in the theme's syntax styles that matches all of the
// dot-separated components of the capture name. // dot-separated components of the capture name.
@ -51,7 +51,7 @@ impl HighlightMap {
} }
impl HighlightId { impl HighlightId {
pub fn is_default(&self) -> bool { pub(crate) fn is_default(&self) -> bool {
*self == DEFAULT_SYNTAX_HIGHLIGHT_ID *self == DEFAULT_SYNTAX_HIGHLIGHT_ID
} }

View file

@ -1,3 +1,11 @@
//! The `language` crate provides a large chunk of Zed's language-related
//! features (the other big contributors being project and lsp crates that revolve around LSP features).
//! Namely, this crate:
//! - Provides [`Language`], [`Grammar`] and [`LanguageRegistry`] types that
//! use Tree-sitter to provide syntax highlighting to the editor; note though that `language` doesn't perform the highlighting by itself. It only maps ranges in a buffer to colors. Treesitter is also used for buffer outlines (lists of symbols in a buffer)
//! - Exposes [`LanguageConfig`] that describes how constructs (like brackets or line comments) should be handled by the editor for a source file of a particular language.
//!
//! Notably we do *not* assign a single language to a single file; in real world a single file can consist of multiple programming languages - HTML is a good example of that - and `language` crate tends to reflect that status quo in it's API.
mod buffer; mod buffer;
mod diagnostic_set; mod diagnostic_set;
mod highlight_map; mod highlight_map;
@ -54,10 +62,13 @@ pub use buffer::*;
pub use diagnostic_set::DiagnosticEntry; pub use diagnostic_set::DiagnosticEntry;
pub use lsp::LanguageServerId; pub use lsp::LanguageServerId;
pub use outline::{Outline, OutlineItem}; pub use outline::{Outline, OutlineItem};
pub use syntax_map::{OwnedSyntaxLayerInfo, SyntaxLayerInfo}; pub use syntax_map::{OwnedSyntaxLayer, SyntaxLayer};
pub use text::LineEnding; pub use text::LineEnding;
pub use tree_sitter::{Parser, Tree}; pub use tree_sitter::{Parser, Tree};
/// Initializes the `language` crate.
///
/// This should be called before making use of items from the create.
pub fn init(cx: &mut AppContext) { pub fn init(cx: &mut AppContext) {
language_settings::init(cx); language_settings::init(cx);
} }
@ -90,7 +101,9 @@ thread_local! {
} }
lazy_static! { lazy_static! {
pub static ref NEXT_GRAMMAR_ID: AtomicUsize = Default::default(); pub(crate) static ref NEXT_GRAMMAR_ID: AtomicUsize = Default::default();
/// A shared grammar for plain text, exposed for reuse by downstream crates.
#[doc(hidden)]
pub static ref PLAIN_TEXT: Arc<Language> = Arc::new(Language::new( pub static ref PLAIN_TEXT: Arc<Language> = Arc::new(Language::new(
LanguageConfig { LanguageConfig {
name: "Plain Text".into(), name: "Plain Text".into(),
@ -100,10 +113,14 @@ lazy_static! {
)); ));
} }
/// Types that represent a position in a buffer, and can be converted into
/// an LSP position, to send to a language server.
pub trait ToLspPosition { pub trait ToLspPosition {
/// Converts the value into an LSP position.
fn to_lsp_position(self) -> lsp::Position; fn to_lsp_position(self) -> lsp::Position;
} }
/// A name of a language server.
#[derive(Clone, Debug, PartialEq, Eq, Hash)] #[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct LanguageServerName(pub Arc<str>); pub struct LanguageServerName(pub Arc<str>);
@ -239,6 +256,8 @@ impl CachedLspAdapter {
} }
} }
/// [`LspAdapterDelegate`] allows [`LspAdapter]` implementations to interface with the application
// e.g. to display a notification or fetch data from the web.
pub trait LspAdapterDelegate: Send + Sync { pub trait LspAdapterDelegate: Send + Sync {
fn show_notification(&self, message: &str, cx: &mut AppContext); fn show_notification(&self, message: &str, cx: &mut AppContext);
fn http_client(&self) -> Arc<dyn HttpClient>; fn http_client(&self) -> Arc<dyn HttpClient>;
@ -284,6 +303,10 @@ pub trait LspAdapter: 'static + Send + Sync {
delegate: &dyn LspAdapterDelegate, delegate: &dyn LspAdapterDelegate,
) -> Option<LanguageServerBinary>; ) -> Option<LanguageServerBinary>;
/// Returns true if a language server can be reinstalled.
/// If language server initialization fails, a reinstallation will be attempted unless the value returned from this method is false.
/// Implementations that rely on software already installed on user's system
/// should have [`can_be_reinstalled`] return false.
fn can_be_reinstalled(&self) -> bool { fn can_be_reinstalled(&self) -> bool {
true true
} }
@ -295,6 +318,9 @@ pub trait LspAdapter: 'static + Send + Sync {
fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {} fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
/// A callback called for each [`lsp_types::CompletionItem`] obtained from LSP server.
/// Some LspAdapter implementations might want to modify the obtained item to
/// change how it's displayed.
async fn process_completion(&self, _: &mut lsp::CompletionItem) {} async fn process_completion(&self, _: &mut lsp::CompletionItem) {}
async fn label_for_completion( async fn label_for_completion(
@ -314,6 +340,7 @@ pub trait LspAdapter: 'static + Send + Sync {
None None
} }
/// Returns initialization options that are going to be sent to a LSP server as a part of [`lsp_types::InitializeParams`]
async fn initialization_options(&self) -> Option<Value> { async fn initialization_options(&self) -> Option<Value> {
None None
} }
@ -322,6 +349,7 @@ pub trait LspAdapter: 'static + Send + Sync {
futures::future::ready(serde_json::json!({})).boxed() futures::future::ready(serde_json::json!({})).boxed()
} }
/// Returns a list of code actions supported by a given LspAdapter
fn code_action_kinds(&self) -> Option<Vec<CodeActionKind>> { fn code_action_kinds(&self) -> Option<Vec<CodeActionKind>> {
Some(vec![ Some(vec![
CodeActionKind::EMPTY, CodeActionKind::EMPTY,
@ -358,36 +386,59 @@ pub struct CodeLabel {
#[derive(Clone, Deserialize)] #[derive(Clone, Deserialize)]
pub struct LanguageConfig { pub struct LanguageConfig {
/// Human-readable name of the language.
pub name: Arc<str>, pub name: Arc<str>,
// The name of the grammar in a WASM bundle (experimental).
pub grammar_name: Option<Arc<str>>, pub grammar_name: Option<Arc<str>>,
/// Given a list of `LanguageConfig`'s, the language of a file can be determined based on the path extension matching any of the `path_suffixes`.
pub path_suffixes: Vec<String>, pub path_suffixes: Vec<String>,
/// List of bracket types in a language.
pub brackets: BracketPairConfig, pub brackets: BracketPairConfig,
/// A regex pattern that determines whether the language should be assigned to a file or not.
#[serde(default, deserialize_with = "deserialize_regex")] #[serde(default, deserialize_with = "deserialize_regex")]
pub first_line_pattern: Option<Regex>, pub first_line_pattern: Option<Regex>,
/// If set to true, auto indentation uses last non empty line to determine
/// the indentation level for a new line.
#[serde(default = "auto_indent_using_last_non_empty_line_default")] #[serde(default = "auto_indent_using_last_non_empty_line_default")]
pub auto_indent_using_last_non_empty_line: bool, pub auto_indent_using_last_non_empty_line: bool,
/// A regex that is used to determine whether the indentation level should be
/// increased in the following line.
#[serde(default, deserialize_with = "deserialize_regex")] #[serde(default, deserialize_with = "deserialize_regex")]
pub increase_indent_pattern: Option<Regex>, pub increase_indent_pattern: Option<Regex>,
/// A regex that is used to determine whether the indentation level should be
/// decreased in the following line.
#[serde(default, deserialize_with = "deserialize_regex")] #[serde(default, deserialize_with = "deserialize_regex")]
pub decrease_indent_pattern: Option<Regex>, pub decrease_indent_pattern: Option<Regex>,
/// A list of characters that trigger the automatic insertion of a closing
/// bracket when they immediately precede the point where an opening
/// bracket is inserted.
#[serde(default)] #[serde(default)]
pub autoclose_before: String, pub autoclose_before: String,
#[serde(default)] /// A placeholder used internally by Semantic Index.
pub line_comment: Option<Arc<str>>,
#[serde(default)] #[serde(default)]
pub collapsed_placeholder: String, pub collapsed_placeholder: String,
/// A line comment string that is inserted in e.g. `toggle comments` action.
#[serde(default)]
pub line_comment: Option<Arc<str>>,
/// Starting and closing characters of a block comment.
#[serde(default)] #[serde(default)]
pub block_comment: Option<(Arc<str>, Arc<str>)>, pub block_comment: Option<(Arc<str>, Arc<str>)>,
/// A list of language servers that are allowed to run on subranges of a given language.
#[serde(default)] #[serde(default)]
pub scope_opt_in_language_servers: Vec<String>, pub scope_opt_in_language_servers: Vec<String>,
#[serde(default)] #[serde(default)]
pub overrides: HashMap<String, LanguageConfigOverride>, pub overrides: HashMap<String, LanguageConfigOverride>,
/// A list of characters that Zed should treat as word characters for the
/// purpose of features that operate on word boundaries, like 'move to next word end'
/// or a whole-word search in buffer search.
#[serde(default)] #[serde(default)]
pub word_characters: HashSet<char>, pub word_characters: HashSet<char>,
/// The name of a Prettier parser that should be used for this language.
#[serde(default)] #[serde(default)]
pub prettier_parser_name: Option<String>, pub prettier_parser_name: Option<String>,
} }
/// Tree-sitter language queries for a given language.
#[derive(Debug, Default)] #[derive(Debug, Default)]
pub struct LanguageQueries { pub struct LanguageQueries {
pub highlights: Option<Cow<'static, str>>, pub highlights: Option<Cow<'static, str>>,
@ -399,6 +450,9 @@ pub struct LanguageQueries {
pub overrides: Option<Cow<'static, str>>, pub overrides: Option<Cow<'static, str>>,
} }
/// Represents a language for the given range. Some languages (e.g. HTML)
/// interleave several languages together, thus a single buffer might actually contain
/// several nested scopes.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct LanguageScope { pub struct LanguageScope {
language: Arc<Language>, language: Arc<Language>,
@ -458,9 +512,9 @@ impl Default for LanguageConfig {
block_comment: Default::default(), block_comment: Default::default(),
scope_opt_in_language_servers: Default::default(), scope_opt_in_language_servers: Default::default(),
overrides: Default::default(), overrides: Default::default(),
collapsed_placeholder: Default::default(),
word_characters: Default::default(), word_characters: Default::default(),
prettier_parser_name: None, prettier_parser_name: None,
collapsed_placeholder: Default::default(),
} }
} }
} }
@ -478,6 +532,7 @@ fn deserialize_regex<'de, D: Deserializer<'de>>(d: D) -> Result<Option<Regex>, D
} }
} }
#[doc(hidden)]
#[cfg(any(test, feature = "test-support"))] #[cfg(any(test, feature = "test-support"))]
pub struct FakeLspAdapter { pub struct FakeLspAdapter {
pub name: &'static str, pub name: &'static str,
@ -489,9 +544,16 @@ pub struct FakeLspAdapter {
pub prettier_plugins: Vec<&'static str>, pub prettier_plugins: Vec<&'static str>,
} }
/// Configuration of handling bracket pairs for a given language.
///
/// This struct includes settings for defining which pairs of characters are considered brackets and
/// also specifies any language-specific scopes where these pairs should be ignored for bracket matching purposes.
#[derive(Clone, Debug, Default)] #[derive(Clone, Debug, Default)]
pub struct BracketPairConfig { pub struct BracketPairConfig {
/// A list of character pairs that should be treated as brackets in the context of a given language.
pub pairs: Vec<BracketPair>, pub pairs: Vec<BracketPair>,
/// A list of tree-sitter scopes for which a given bracket should not be active.
/// N-th entry in `[Self::disabled_scopes_by_bracket_ix]` contains a list of disabled scopes for an n-th entry in `[Self::pairs]`
pub disabled_scopes_by_bracket_ix: Vec<Vec<String>>, pub disabled_scopes_by_bracket_ix: Vec<Vec<String>>,
} }
@ -523,11 +585,18 @@ impl<'de> Deserialize<'de> for BracketPairConfig {
} }
} }
/// Describes a single bracket pair and how an editor should react to e.g. inserting
/// an opening bracket or to a newline character insertion inbetween `start` and `end` characters.
#[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[derive(Clone, Debug, Default, Deserialize, PartialEq)]
pub struct BracketPair { pub struct BracketPair {
/// Starting substring for a bracket.
pub start: String, pub start: String,
/// Ending substring for a bracket.
pub end: String, pub end: String,
/// True if `end` should be automatically inserted right after `start` characters.
pub close: bool, pub close: bool,
/// True if an extra newline should be inserted while the cursor is in the middle
/// of that bracket pair.
pub newline: bool, pub newline: bool,
} }
@ -1641,6 +1710,8 @@ impl LanguageScope {
self.language.config.collapsed_placeholder.as_ref() self.language.config.collapsed_placeholder.as_ref()
} }
/// Returns line prefix that is inserted in e.g. line continuations or
/// in `toggle comments` action.
pub fn line_comment_prefix(&self) -> Option<&Arc<str>> { pub fn line_comment_prefix(&self) -> Option<&Arc<str>> {
Override::as_option( Override::as_option(
self.config_override().map(|o| &o.line_comment), self.config_override().map(|o| &o.line_comment),
@ -1656,6 +1727,11 @@ impl LanguageScope {
.map(|e| (&e.0, &e.1)) .map(|e| (&e.0, &e.1))
} }
/// Returns a list of language-specific word characters.
///
/// By default, Zed treats alphanumeric characters (and '_') as word characters for
/// the purpose of actions like 'move to next word end` or whole-word search.
/// It additionally accounts for language's additional word characters.
pub fn word_characters(&self) -> Option<&HashSet<char>> { pub fn word_characters(&self) -> Option<&HashSet<char>> {
Override::as_option( Override::as_option(
self.config_override().map(|o| &o.word_characters), self.config_override().map(|o| &o.word_characters),
@ -1663,6 +1739,8 @@ impl LanguageScope {
) )
} }
/// Returns a list of bracket pairs for a given language with an additional
/// piece of information about whether the particular bracket pair is currently active for a given language.
pub fn brackets(&self) -> impl Iterator<Item = (&BracketPair, bool)> { pub fn brackets(&self) -> impl Iterator<Item = (&BracketPair, bool)> {
let mut disabled_ids = self let mut disabled_ids = self
.config_override() .config_override()

View file

@ -1,3 +1,5 @@
//! Provides `language`-related settings.
use crate::{File, Language}; use crate::{File, Language};
use anyhow::Result; use anyhow::Result;
use collections::{HashMap, HashSet}; use collections::{HashMap, HashSet};
@ -11,10 +13,12 @@ use serde::{Deserialize, Serialize};
use settings::Settings; use settings::Settings;
use std::{num::NonZeroU32, path::Path, sync::Arc}; use std::{num::NonZeroU32, path::Path, sync::Arc};
/// Initializes the language settings.
pub fn init(cx: &mut AppContext) { pub fn init(cx: &mut AppContext) {
AllLanguageSettings::register(cx); AllLanguageSettings::register(cx);
} }
/// Returns the settings for the specified language from the provided file.
pub fn language_settings<'a>( pub fn language_settings<'a>(
language: Option<&Arc<Language>>, language: Option<&Arc<Language>>,
file: Option<&Arc<dyn File>>, file: Option<&Arc<dyn File>>,
@ -24,6 +28,7 @@ pub fn language_settings<'a>(
all_language_settings(file, cx).language(language_name.as_deref()) all_language_settings(file, cx).language(language_name.as_deref())
} }
/// Returns the settings for all languages from the provided file.
pub fn all_language_settings<'a>( pub fn all_language_settings<'a>(
file: Option<&Arc<dyn File>>, file: Option<&Arc<dyn File>>,
cx: &'a AppContext, cx: &'a AppContext,
@ -32,51 +37,89 @@ pub fn all_language_settings<'a>(
AllLanguageSettings::get(location, cx) AllLanguageSettings::get(location, cx)
} }
/// The settings for all languages.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct AllLanguageSettings { pub struct AllLanguageSettings {
/// The settings for GitHub Copilot.
pub copilot: CopilotSettings, pub copilot: CopilotSettings,
defaults: LanguageSettings, defaults: LanguageSettings,
languages: HashMap<Arc<str>, LanguageSettings>, languages: HashMap<Arc<str>, LanguageSettings>,
} }
/// The settings for a particular language.
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct LanguageSettings { pub struct LanguageSettings {
/// How many columns a tab should occupy.
pub tab_size: NonZeroU32, pub tab_size: NonZeroU32,
/// Whether to indent lines using tab characters, as opposed to multiple
/// spaces.
pub hard_tabs: bool, pub hard_tabs: bool,
/// How to soft-wrap long lines of text.
pub soft_wrap: SoftWrap, pub soft_wrap: SoftWrap,
/// The column at which to soft-wrap lines, for buffers where soft-wrap
/// is enabled.
pub preferred_line_length: u32, pub preferred_line_length: u32,
/// Whether to show wrap guides in the editor. Setting this to true will
/// show a guide at the 'preferred_line_length' value if softwrap is set to
/// 'preferred_line_length', and will show any additional guides as specified
/// by the 'wrap_guides' setting.
pub show_wrap_guides: bool, pub show_wrap_guides: bool,
/// Character counts at which to show wrap guides in the editor.
pub wrap_guides: Vec<usize>, pub wrap_guides: Vec<usize>,
/// Whether or not to perform a buffer format before saving.
pub format_on_save: FormatOnSave, pub format_on_save: FormatOnSave,
/// Whether or not to remove any trailing whitespace from lines of a buffer
/// before saving it.
pub remove_trailing_whitespace_on_save: bool, pub remove_trailing_whitespace_on_save: bool,
/// Whether or not to ensure there's a single newline at the end of a buffer
/// when saving it.
pub ensure_final_newline_on_save: bool, pub ensure_final_newline_on_save: bool,
/// How to perform a buffer format.
pub formatter: Formatter, pub formatter: Formatter,
/// Zed's Prettier integration settings.
/// If Prettier is enabled, Zed will use this its Prettier instance for any applicable file, if
/// the project has no other Prettier installed.
pub prettier: HashMap<String, serde_json::Value>, pub prettier: HashMap<String, serde_json::Value>,
/// Whether to use language servers to provide code intelligence.
pub enable_language_server: bool, pub enable_language_server: bool,
/// Controls whether Copilot provides suggestion immediately (true)
/// or waits for a `copilot::Toggle` (false).
pub show_copilot_suggestions: bool, pub show_copilot_suggestions: bool,
/// Whether to show tabs and spaces in the editor.
pub show_whitespaces: ShowWhitespaceSetting, pub show_whitespaces: ShowWhitespaceSetting,
/// Whether to start a new line with a comment when a previous line is a comment as well.
pub extend_comment_on_newline: bool, pub extend_comment_on_newline: bool,
/// Inlay hint related settings.
pub inlay_hints: InlayHintSettings, pub inlay_hints: InlayHintSettings,
} }
/// The settings for [GitHub Copilot](https://github.com/features/copilot).
#[derive(Clone, Debug, Default)] #[derive(Clone, Debug, Default)]
pub struct CopilotSettings { pub struct CopilotSettings {
/// Whether Copilot is enabled.
pub feature_enabled: bool, pub feature_enabled: bool,
/// A list of globs representing files that Copilot should be disabled for.
pub disabled_globs: Vec<GlobMatcher>, pub disabled_globs: Vec<GlobMatcher>,
} }
/// The settings for all languages.
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)] #[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
pub struct AllLanguageSettingsContent { pub struct AllLanguageSettingsContent {
/// The settings for enabling/disabling features.
#[serde(default)] #[serde(default)]
pub features: Option<FeaturesContent>, pub features: Option<FeaturesContent>,
/// The settings for GitHub Copilot.
#[serde(default)] #[serde(default)]
pub copilot: Option<CopilotSettingsContent>, pub copilot: Option<CopilotSettingsContent>,
/// The default language settings.
#[serde(flatten)] #[serde(flatten)]
pub defaults: LanguageSettingsContent, pub defaults: LanguageSettingsContent,
/// The settings for individual languages.
#[serde(default, alias = "language_overrides")] #[serde(default, alias = "language_overrides")]
pub languages: HashMap<Arc<str>, LanguageSettingsContent>, pub languages: HashMap<Arc<str>, LanguageSettingsContent>,
} }
/// The settings for a particular language.
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)] #[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
pub struct LanguageSettingsContent { pub struct LanguageSettingsContent {
/// How many columns a tab should occupy. /// How many columns a tab should occupy.
@ -138,7 +181,7 @@ pub struct LanguageSettingsContent {
pub formatter: Option<Formatter>, pub formatter: Option<Formatter>,
/// Zed's Prettier integration settings. /// Zed's Prettier integration settings.
/// If Prettier is enabled, Zed will use this its Prettier instance for any applicable file, if /// If Prettier is enabled, Zed will use this its Prettier instance for any applicable file, if
/// project has no other Prettier installed. /// the project has no other Prettier installed.
/// ///
/// Default: {} /// Default: {}
#[serde(default)] #[serde(default)]
@ -148,7 +191,7 @@ pub struct LanguageSettingsContent {
/// Default: true /// Default: true
#[serde(default)] #[serde(default)]
pub enable_language_server: Option<bool>, pub enable_language_server: Option<bool>,
/// Controls whether copilot provides suggestion immediately (true) /// Controls whether Copilot provides suggestion immediately (true)
/// or waits for a `copilot::Toggle` (false). /// or waits for a `copilot::Toggle` (false).
/// ///
/// Default: true /// Default: true
@ -167,18 +210,23 @@ pub struct LanguageSettingsContent {
pub inlay_hints: Option<InlayHintSettings>, pub inlay_hints: Option<InlayHintSettings>,
} }
/// The contents of the GitHub Copilot settings.
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)] #[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)]
pub struct CopilotSettingsContent { pub struct CopilotSettingsContent {
/// A list of globs representing files that Copilot should be disabled for.
#[serde(default)] #[serde(default)]
pub disabled_globs: Option<Vec<String>>, pub disabled_globs: Option<Vec<String>>,
} }
/// The settings for enabling/disabling features.
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)] #[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
pub struct FeaturesContent { pub struct FeaturesContent {
/// Whether the GitHub Copilot feature is enabled.
pub copilot: Option<bool>, pub copilot: Option<bool>,
} }
/// Controls the soft-wrapping behavior in the editor.
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
pub enum SoftWrap { pub enum SoftWrap {
@ -190,29 +238,38 @@ pub enum SoftWrap {
PreferredLineLength, PreferredLineLength,
} }
/// Controls the behavior of formatting files when they are saved.
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema)] #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
pub enum FormatOnSave { pub enum FormatOnSave {
/// Files should be formatted on save.
On, On,
/// Files should not be formatted on save.
Off, Off,
/// Files should be formatted using the current language server.
LanguageServer, LanguageServer,
/// The external program to use to format the files on save.
External { External {
/// The external program to run.
command: Arc<str>, command: Arc<str>,
/// The arguments to pass to the program.
arguments: Arc<[String]>, arguments: Arc<[String]>,
}, },
} }
/// Controls how whitespace should be displayedin the editor.
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
pub enum ShowWhitespaceSetting { pub enum ShowWhitespaceSetting {
/// Draw tabs and spaces only for the selected text. /// Draw whitespace only for the selected text.
Selection, Selection,
/// Do not draw any tabs or spaces /// Do not draw any tabs or spaces.
None, None,
/// Draw all invisible symbols /// Draw all invisible symbols.
All, All,
} }
/// Controls which formatter should be used when formatting code.
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema)] #[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
pub enum Formatter { pub enum Formatter {
@ -226,11 +283,14 @@ pub enum Formatter {
Prettier, Prettier,
/// Format code using an external command. /// Format code using an external command.
External { External {
/// The external program to run.
command: Arc<str>, command: Arc<str>,
/// The arguments to pass to the program.
arguments: Arc<[String]>, arguments: Arc<[String]>,
}, },
} }
/// The settings for inlay hints.
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
pub struct InlayHintSettings { pub struct InlayHintSettings {
/// Global switch to toggle hints on and off. /// Global switch to toggle hints on and off.
@ -238,10 +298,19 @@ pub struct InlayHintSettings {
/// Default: false /// Default: false
#[serde(default)] #[serde(default)]
pub enabled: bool, pub enabled: bool,
/// Whether type hints should be shown.
///
/// Default: true
#[serde(default = "default_true")] #[serde(default = "default_true")]
pub show_type_hints: bool, pub show_type_hints: bool,
/// Whether parameter hints should be shown.
///
/// Default: true
#[serde(default = "default_true")] #[serde(default = "default_true")]
pub show_parameter_hints: bool, pub show_parameter_hints: bool,
/// Whether other hints should be shown.
///
/// Default: true
#[serde(default = "default_true")] #[serde(default = "default_true")]
pub show_other_hints: bool, pub show_other_hints: bool,
} }
@ -251,6 +320,7 @@ fn default_true() -> bool {
} }
impl InlayHintSettings { impl InlayHintSettings {
/// Returns the kinds of inlay hints that are enabled based on the settings.
pub fn enabled_inlay_hint_kinds(&self) -> HashSet<Option<InlayHintKind>> { pub fn enabled_inlay_hint_kinds(&self) -> HashSet<Option<InlayHintKind>> {
let mut kinds = HashSet::default(); let mut kinds = HashSet::default();
if self.show_type_hints { if self.show_type_hints {
@ -267,6 +337,7 @@ impl InlayHintSettings {
} }
impl AllLanguageSettings { impl AllLanguageSettings {
/// Returns the [`LanguageSettings`] for the language with the specified name.
pub fn language<'a>(&'a self, language_name: Option<&str>) -> &'a LanguageSettings { pub fn language<'a>(&'a self, language_name: Option<&str>) -> &'a LanguageSettings {
if let Some(name) = language_name { if let Some(name) = language_name {
if let Some(overrides) = self.languages.get(name) { if let Some(overrides) = self.languages.get(name) {
@ -276,6 +347,7 @@ impl AllLanguageSettings {
&self.defaults &self.defaults
} }
/// Returns whether GitHub Copilot is enabled for the given path.
pub fn copilot_enabled_for_path(&self, path: &Path) -> bool { pub fn copilot_enabled_for_path(&self, path: &Path) -> bool {
!self !self
.copilot .copilot
@ -284,6 +356,7 @@ impl AllLanguageSettings {
.any(|glob| glob.is_match(path)) .any(|glob| glob.is_match(path))
} }
/// Returns whether GitHub Copilot is enabled for the given language and path.
pub fn copilot_enabled(&self, language: Option<&Arc<Language>>, path: Option<&Path>) -> bool { pub fn copilot_enabled(&self, language: Option<&Arc<Language>>, path: Option<&Path>) -> bool {
if !self.copilot.feature_enabled { if !self.copilot.feature_enabled {
return false; return false;
@ -300,13 +373,20 @@ impl AllLanguageSettings {
} }
} }
/// The kind of an inlay hint.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum InlayHintKind { pub enum InlayHintKind {
/// An inlay hint for a type.
Type, Type,
/// An inlay hint for a parameter.
Parameter, Parameter,
} }
impl InlayHintKind { impl InlayHintKind {
/// Returns the [`InlayHintKind`] from the given name.
///
/// Returns `None` if `name` does not match any of the expected
/// string representations.
pub fn from_name(name: &str) -> Option<Self> { pub fn from_name(name: &str) -> Option<Self> {
match name { match name {
"type" => Some(InlayHintKind::Type), "type" => Some(InlayHintKind::Type),
@ -315,6 +395,7 @@ impl InlayHintKind {
} }
} }
/// Returns the name of this [`InlayHintKind`].
pub fn name(&self) -> &'static str { pub fn name(&self) -> &'static str {
match self { match self {
InlayHintKind::Type => "type", InlayHintKind::Type => "type",

View file

@ -1,3 +1,5 @@
//! Provides Markdown-related constructs.
use std::sync::Arc; use std::sync::Arc;
use std::{ops::Range, path::PathBuf}; use std::{ops::Range, path::PathBuf};
@ -5,21 +7,30 @@ use crate::{HighlightId, Language, LanguageRegistry};
use gpui::{px, FontStyle, FontWeight, HighlightStyle, UnderlineStyle}; use gpui::{px, FontStyle, FontWeight, HighlightStyle, UnderlineStyle};
use pulldown_cmark::{CodeBlockKind, Event, Options, Parser, Tag}; use pulldown_cmark::{CodeBlockKind, Event, Options, Parser, Tag};
/// Parsed Markdown content.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct ParsedMarkdown { pub struct ParsedMarkdown {
/// The Markdown text.
pub text: String, pub text: String,
/// The list of highlights contained in the Markdown document.
pub highlights: Vec<(Range<usize>, MarkdownHighlight)>, pub highlights: Vec<(Range<usize>, MarkdownHighlight)>,
/// The regions of the various ranges in the Markdown document.
pub region_ranges: Vec<Range<usize>>, pub region_ranges: Vec<Range<usize>>,
/// The regions of the Markdown document.
pub regions: Vec<ParsedRegion>, pub regions: Vec<ParsedRegion>,
} }
/// A run of highlighted Markdown text.
#[derive(Debug, Clone, PartialEq, Eq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum MarkdownHighlight { pub enum MarkdownHighlight {
/// A styled Markdown highlight.
Style(MarkdownHighlightStyle), Style(MarkdownHighlightStyle),
/// A highlighted code block.
Code(HighlightId), Code(HighlightId),
} }
impl MarkdownHighlight { impl MarkdownHighlight {
/// Converts this [`MarkdownHighlight`] to a [`HighlightStyle`].
pub fn to_highlight_style(&self, theme: &theme::SyntaxTheme) -> Option<HighlightStyle> { pub fn to_highlight_style(&self, theme: &theme::SyntaxTheme) -> Option<HighlightStyle> {
match self { match self {
MarkdownHighlight::Style(style) => { MarkdownHighlight::Style(style) => {
@ -48,23 +59,39 @@ impl MarkdownHighlight {
} }
} }
/// The style for a Markdown highlight.
#[derive(Debug, Clone, Default, PartialEq, Eq)] #[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct MarkdownHighlightStyle { pub struct MarkdownHighlightStyle {
/// Whether the text should be italicized.
pub italic: bool, pub italic: bool,
/// Whether the text should be underlined.
pub underline: bool, pub underline: bool,
/// The weight of the text.
pub weight: FontWeight, pub weight: FontWeight,
} }
/// A parsed region in a Markdown document.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct ParsedRegion { pub struct ParsedRegion {
/// Whether the region is a code block.
pub code: bool, pub code: bool,
/// The link contained in this region, if it has one.
pub link: Option<Link>, pub link: Option<Link>,
} }
/// A Markdown link.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub enum Link { pub enum Link {
Web { url: String }, /// A link to a webpage.
Path { path: PathBuf }, Web {
/// The URL of the webpage.
url: String,
},
/// A link to a path on the filesystem.
Path {
/// The path to the item.
path: PathBuf,
},
} }
impl Link { impl Link {
@ -82,6 +109,7 @@ impl Link {
} }
} }
/// Parses a string of Markdown.
pub async fn parse_markdown( pub async fn parse_markdown(
markdown: &str, markdown: &str,
language_registry: &Arc<LanguageRegistry>, language_registry: &Arc<LanguageRegistry>,
@ -111,6 +139,7 @@ pub async fn parse_markdown(
} }
} }
/// Parses a Markdown block.
pub async fn parse_markdown_block( pub async fn parse_markdown_block(
markdown: &str, markdown: &str,
language_registry: &Arc<LanguageRegistry>, language_registry: &Arc<LanguageRegistry>,
@ -261,6 +290,7 @@ pub async fn parse_markdown_block(
} }
} }
/// Appends a highlighted run of text to the provided `text` buffer.
pub fn highlight_code( pub fn highlight_code(
text: &mut String, text: &mut String,
highlights: &mut Vec<(Range<usize>, MarkdownHighlight)>, highlights: &mut Vec<(Range<usize>, MarkdownHighlight)>,
@ -275,6 +305,7 @@ pub fn highlight_code(
} }
} }
/// Appends a new paragraph to the provided `text` buffer.
pub fn new_paragraph(text: &mut String, list_stack: &mut Vec<(Option<u64>, bool)>) { pub fn new_paragraph(text: &mut String, list_stack: &mut Vec<(Option<u64>, bool)>) {
let mut is_subsequent_paragraph_of_list = false; let mut is_subsequent_paragraph_of_list = false;
if let Some((_, has_content)) = list_stack.last_mut() { if let Some((_, has_content)) = list_stack.last_mut() {

View file

@ -2,6 +2,7 @@ use fuzzy::{StringMatch, StringMatchCandidate};
use gpui::{BackgroundExecutor, HighlightStyle}; use gpui::{BackgroundExecutor, HighlightStyle};
use std::ops::Range; use std::ops::Range;
/// An outline of all the symbols contained in a buffer.
#[derive(Debug)] #[derive(Debug)]
pub struct Outline<T> { pub struct Outline<T> {
pub items: Vec<OutlineItem<T>>, pub items: Vec<OutlineItem<T>>,

View file

@ -1,3 +1,5 @@
//! Handles conversions of `language` items to and from the [`rpc`] protocol.
use crate::{ use crate::{
diagnostic_set::DiagnosticEntry, CodeAction, CodeLabel, Completion, CursorShape, Diagnostic, diagnostic_set::DiagnosticEntry, CodeAction, CodeLabel, Completion, CursorShape, Diagnostic,
Language, Language,
@ -11,15 +13,18 @@ use text::*;
pub use proto::{BufferState, Operation}; pub use proto::{BufferState, Operation};
/// Serializes a [`RopeFingerprint`] to be sent over RPC.
pub fn serialize_fingerprint(fingerprint: RopeFingerprint) -> String { pub fn serialize_fingerprint(fingerprint: RopeFingerprint) -> String {
fingerprint.to_hex() fingerprint.to_hex()
} }
/// Deserializes a [`RopeFingerprint`] from the RPC representation.
pub fn deserialize_fingerprint(fingerprint: &str) -> Result<RopeFingerprint> { pub fn deserialize_fingerprint(fingerprint: &str) -> Result<RopeFingerprint> {
RopeFingerprint::from_hex(fingerprint) RopeFingerprint::from_hex(fingerprint)
.map_err(|error| anyhow!("invalid fingerprint: {}", error)) .map_err(|error| anyhow!("invalid fingerprint: {}", error))
} }
/// Deserializes a `[text::LineEnding]` from the RPC representation.
pub fn deserialize_line_ending(message: proto::LineEnding) -> text::LineEnding { pub fn deserialize_line_ending(message: proto::LineEnding) -> text::LineEnding {
match message { match message {
proto::LineEnding::Unix => text::LineEnding::Unix, proto::LineEnding::Unix => text::LineEnding::Unix,
@ -27,6 +32,7 @@ pub fn deserialize_line_ending(message: proto::LineEnding) -> text::LineEnding {
} }
} }
/// Serializes a [`text::LineEnding`] to be sent over RPC.
pub fn serialize_line_ending(message: text::LineEnding) -> proto::LineEnding { pub fn serialize_line_ending(message: text::LineEnding) -> proto::LineEnding {
match message { match message {
text::LineEnding::Unix => proto::LineEnding::Unix, text::LineEnding::Unix => proto::LineEnding::Unix,
@ -34,6 +40,7 @@ pub fn serialize_line_ending(message: text::LineEnding) -> proto::LineEnding {
} }
} }
/// Serializes a [`crate::Operation`] to be sent over RPC.
pub fn serialize_operation(operation: &crate::Operation) -> proto::Operation { pub fn serialize_operation(operation: &crate::Operation) -> proto::Operation {
proto::Operation { proto::Operation {
variant: Some(match operation { variant: Some(match operation {
@ -96,6 +103,7 @@ pub fn serialize_operation(operation: &crate::Operation) -> proto::Operation {
} }
} }
/// Serializes an [`operation::EditOperation`] to be sent over RPC.
pub fn serialize_edit_operation(operation: &EditOperation) -> proto::operation::Edit { pub fn serialize_edit_operation(operation: &EditOperation) -> proto::operation::Edit {
proto::operation::Edit { proto::operation::Edit {
replica_id: operation.timestamp.replica_id as u32, replica_id: operation.timestamp.replica_id as u32,
@ -110,6 +118,7 @@ pub fn serialize_edit_operation(operation: &EditOperation) -> proto::operation::
} }
} }
/// Serializes an entry in the undo map to be sent over RPC.
pub fn serialize_undo_map_entry( pub fn serialize_undo_map_entry(
(edit_id, counts): (&clock::Lamport, &[(clock::Lamport, u32)]), (edit_id, counts): (&clock::Lamport, &[(clock::Lamport, u32)]),
) -> proto::UndoMapEntry { ) -> proto::UndoMapEntry {
@ -127,6 +136,7 @@ pub fn serialize_undo_map_entry(
} }
} }
/// Splits the given list of operations into chunks.
pub fn split_operations( pub fn split_operations(
mut operations: Vec<proto::Operation>, mut operations: Vec<proto::Operation>,
) -> impl Iterator<Item = Vec<proto::Operation>> { ) -> impl Iterator<Item = Vec<proto::Operation>> {
@ -152,10 +162,12 @@ pub fn split_operations(
}) })
} }
/// Serializes selections to be sent over RPC.
pub fn serialize_selections(selections: &Arc<[Selection<Anchor>]>) -> Vec<proto::Selection> { pub fn serialize_selections(selections: &Arc<[Selection<Anchor>]>) -> Vec<proto::Selection> {
selections.iter().map(serialize_selection).collect() selections.iter().map(serialize_selection).collect()
} }
/// Serializes a [`Selection`] to be sent over RPC.
pub fn serialize_selection(selection: &Selection<Anchor>) -> proto::Selection { pub fn serialize_selection(selection: &Selection<Anchor>) -> proto::Selection {
proto::Selection { proto::Selection {
id: selection.id as u64, id: selection.id as u64,
@ -171,6 +183,7 @@ pub fn serialize_selection(selection: &Selection<Anchor>) -> proto::Selection {
} }
} }
/// Serializes a [`CursorShape`] to be sent over RPC.
pub fn serialize_cursor_shape(cursor_shape: &CursorShape) -> proto::CursorShape { pub fn serialize_cursor_shape(cursor_shape: &CursorShape) -> proto::CursorShape {
match cursor_shape { match cursor_shape {
CursorShape::Bar => proto::CursorShape::CursorBar, CursorShape::Bar => proto::CursorShape::CursorBar,
@ -180,6 +193,7 @@ pub fn serialize_cursor_shape(cursor_shape: &CursorShape) -> proto::CursorShape
} }
} }
/// Deserializes a [`CursorShape`] from the RPC representation.
pub fn deserialize_cursor_shape(cursor_shape: proto::CursorShape) -> CursorShape { pub fn deserialize_cursor_shape(cursor_shape: proto::CursorShape) -> CursorShape {
match cursor_shape { match cursor_shape {
proto::CursorShape::CursorBar => CursorShape::Bar, proto::CursorShape::CursorBar => CursorShape::Bar,
@ -189,6 +203,7 @@ pub fn deserialize_cursor_shape(cursor_shape: proto::CursorShape) -> CursorShape
} }
} }
/// Serializes a list of diagnostics to be sent over RPC.
pub fn serialize_diagnostics<'a>( pub fn serialize_diagnostics<'a>(
diagnostics: impl IntoIterator<Item = &'a DiagnosticEntry<Anchor>>, diagnostics: impl IntoIterator<Item = &'a DiagnosticEntry<Anchor>>,
) -> Vec<proto::Diagnostic> { ) -> Vec<proto::Diagnostic> {
@ -208,7 +223,7 @@ pub fn serialize_diagnostics<'a>(
} as i32, } as i32,
group_id: entry.diagnostic.group_id as u64, group_id: entry.diagnostic.group_id as u64,
is_primary: entry.diagnostic.is_primary, is_primary: entry.diagnostic.is_primary,
is_valid: entry.diagnostic.is_valid, is_valid: true,
code: entry.diagnostic.code.clone(), code: entry.diagnostic.code.clone(),
is_disk_based: entry.diagnostic.is_disk_based, is_disk_based: entry.diagnostic.is_disk_based,
is_unnecessary: entry.diagnostic.is_unnecessary, is_unnecessary: entry.diagnostic.is_unnecessary,
@ -216,6 +231,7 @@ pub fn serialize_diagnostics<'a>(
.collect() .collect()
} }
/// Serializes an [`Anchor`] to be sent over RPC.
pub fn serialize_anchor(anchor: &Anchor) -> proto::Anchor { pub fn serialize_anchor(anchor: &Anchor) -> proto::Anchor {
proto::Anchor { proto::Anchor {
replica_id: anchor.timestamp.replica_id as u32, replica_id: anchor.timestamp.replica_id as u32,
@ -230,6 +246,7 @@ pub fn serialize_anchor(anchor: &Anchor) -> proto::Anchor {
} }
// This behavior is currently copied in the collab database, for snapshotting channel notes // This behavior is currently copied in the collab database, for snapshotting channel notes
/// Deserializes an [`crate::Operation`] from the RPC representation.
pub fn deserialize_operation(message: proto::Operation) -> Result<crate::Operation> { pub fn deserialize_operation(message: proto::Operation) -> Result<crate::Operation> {
Ok( Ok(
match message match message
@ -312,6 +329,7 @@ pub fn deserialize_operation(message: proto::Operation) -> Result<crate::Operati
) )
} }
/// Deserializes an [`EditOperation`] from the RPC representation.
pub fn deserialize_edit_operation(edit: proto::operation::Edit) -> EditOperation { pub fn deserialize_edit_operation(edit: proto::operation::Edit) -> EditOperation {
EditOperation { EditOperation {
timestamp: clock::Lamport { timestamp: clock::Lamport {
@ -324,6 +342,7 @@ pub fn deserialize_edit_operation(edit: proto::operation::Edit) -> EditOperation
} }
} }
/// Deserializes an entry in the undo map from the RPC representation.
pub fn deserialize_undo_map_entry( pub fn deserialize_undo_map_entry(
entry: proto::UndoMapEntry, entry: proto::UndoMapEntry,
) -> (clock::Lamport, Vec<(clock::Lamport, u32)>) { ) -> (clock::Lamport, Vec<(clock::Lamport, u32)>) {
@ -348,6 +367,7 @@ pub fn deserialize_undo_map_entry(
) )
} }
/// Deserializes selections from the RPC representation.
pub fn deserialize_selections(selections: Vec<proto::Selection>) -> Arc<[Selection<Anchor>]> { pub fn deserialize_selections(selections: Vec<proto::Selection>) -> Arc<[Selection<Anchor>]> {
Arc::from( Arc::from(
selections selections
@ -357,6 +377,7 @@ pub fn deserialize_selections(selections: Vec<proto::Selection>) -> Arc<[Selecti
) )
} }
/// Deserializes a [`Selection`] from the RPC representation.
pub fn deserialize_selection(selection: proto::Selection) -> Option<Selection<Anchor>> { pub fn deserialize_selection(selection: proto::Selection) -> Option<Selection<Anchor>> {
Some(Selection { Some(Selection {
id: selection.id as usize, id: selection.id as usize,
@ -367,6 +388,7 @@ pub fn deserialize_selection(selection: proto::Selection) -> Option<Selection<An
}) })
} }
/// Deserializes a list of diagnostics from the RPC representation.
pub fn deserialize_diagnostics( pub fn deserialize_diagnostics(
diagnostics: Vec<proto::Diagnostic>, diagnostics: Vec<proto::Diagnostic>,
) -> Arc<[DiagnosticEntry<Anchor>]> { ) -> Arc<[DiagnosticEntry<Anchor>]> {
@ -387,7 +409,6 @@ pub fn deserialize_diagnostics(
message: diagnostic.message, message: diagnostic.message,
group_id: diagnostic.group_id as usize, group_id: diagnostic.group_id as usize,
code: diagnostic.code, code: diagnostic.code,
is_valid: diagnostic.is_valid,
is_primary: diagnostic.is_primary, is_primary: diagnostic.is_primary,
is_disk_based: diagnostic.is_disk_based, is_disk_based: diagnostic.is_disk_based,
is_unnecessary: diagnostic.is_unnecessary, is_unnecessary: diagnostic.is_unnecessary,
@ -397,6 +418,7 @@ pub fn deserialize_diagnostics(
.collect() .collect()
} }
/// Deserializes an [`Anchor`] from the RPC representation.
pub fn deserialize_anchor(anchor: proto::Anchor) -> Option<Anchor> { pub fn deserialize_anchor(anchor: proto::Anchor) -> Option<Anchor> {
Some(Anchor { Some(Anchor {
timestamp: clock::Lamport { timestamp: clock::Lamport {
@ -412,6 +434,7 @@ pub fn deserialize_anchor(anchor: proto::Anchor) -> Option<Anchor> {
}) })
} }
/// Returns a `[clock::Lamport`] timestamp for the given [`proto::Operation`].
pub fn lamport_timestamp_for_operation(operation: &proto::Operation) -> Option<clock::Lamport> { pub fn lamport_timestamp_for_operation(operation: &proto::Operation) -> Option<clock::Lamport> {
let replica_id; let replica_id;
let value; let value;
@ -444,6 +467,7 @@ pub fn lamport_timestamp_for_operation(operation: &proto::Operation) -> Option<c
}) })
} }
/// Serializes a [`Completion`] to be sent over RPC.
pub fn serialize_completion(completion: &Completion) -> proto::Completion { pub fn serialize_completion(completion: &Completion) -> proto::Completion {
proto::Completion { proto::Completion {
old_start: Some(serialize_anchor(&completion.old_range.start)), old_start: Some(serialize_anchor(&completion.old_range.start)),
@ -454,6 +478,7 @@ pub fn serialize_completion(completion: &Completion) -> proto::Completion {
} }
} }
/// Deserializes a [`Completion`] from the RPC representation.
pub async fn deserialize_completion( pub async fn deserialize_completion(
completion: proto::Completion, completion: proto::Completion,
language: Option<Arc<Language>>, language: Option<Arc<Language>>,
@ -488,6 +513,7 @@ pub async fn deserialize_completion(
}) })
} }
/// Serializes a [`CodeAction`] to be sent over RPC.
pub fn serialize_code_action(action: &CodeAction) -> proto::CodeAction { pub fn serialize_code_action(action: &CodeAction) -> proto::CodeAction {
proto::CodeAction { proto::CodeAction {
server_id: action.server_id.0 as u64, server_id: action.server_id.0 as u64,
@ -497,6 +523,7 @@ pub fn serialize_code_action(action: &CodeAction) -> proto::CodeAction {
} }
} }
/// Deserializes a [`CodeAction`] from the RPC representation.
pub fn deserialize_code_action(action: proto::CodeAction) -> Result<CodeAction> { pub fn deserialize_code_action(action: proto::CodeAction) -> Result<CodeAction> {
let start = action let start = action
.start .start
@ -514,6 +541,7 @@ pub fn deserialize_code_action(action: proto::CodeAction) -> Result<CodeAction>
}) })
} }
/// Serializes a [`Transaction`] to be sent over RPC.
pub fn serialize_transaction(transaction: &Transaction) -> proto::Transaction { pub fn serialize_transaction(transaction: &Transaction) -> proto::Transaction {
proto::Transaction { proto::Transaction {
id: Some(serialize_timestamp(transaction.id)), id: Some(serialize_timestamp(transaction.id)),
@ -527,6 +555,7 @@ pub fn serialize_transaction(transaction: &Transaction) -> proto::Transaction {
} }
} }
/// Deserializes a [`Transaction`] from the RPC representation.
pub fn deserialize_transaction(transaction: proto::Transaction) -> Result<Transaction> { pub fn deserialize_transaction(transaction: proto::Transaction) -> Result<Transaction> {
Ok(Transaction { Ok(Transaction {
id: deserialize_timestamp( id: deserialize_timestamp(
@ -543,6 +572,7 @@ pub fn deserialize_transaction(transaction: proto::Transaction) -> Result<Transa
}) })
} }
/// Serializes a [`clock::Lamport`] timestamp to be sent over RPC.
pub fn serialize_timestamp(timestamp: clock::Lamport) -> proto::LamportTimestamp { pub fn serialize_timestamp(timestamp: clock::Lamport) -> proto::LamportTimestamp {
proto::LamportTimestamp { proto::LamportTimestamp {
replica_id: timestamp.replica_id as u32, replica_id: timestamp.replica_id as u32,
@ -550,6 +580,7 @@ pub fn serialize_timestamp(timestamp: clock::Lamport) -> proto::LamportTimestamp
} }
} }
/// Deserializes a [`clock::Lamport`] timestamp from the RPC representation.
pub fn deserialize_timestamp(timestamp: proto::LamportTimestamp) -> clock::Lamport { pub fn deserialize_timestamp(timestamp: proto::LamportTimestamp) -> clock::Lamport {
clock::Lamport { clock::Lamport {
replica_id: timestamp.replica_id as ReplicaId, replica_id: timestamp.replica_id as ReplicaId,
@ -557,6 +588,7 @@ pub fn deserialize_timestamp(timestamp: proto::LamportTimestamp) -> clock::Lampo
} }
} }
/// Serializes a range of [`FullOffset`]s to be sent over RPC.
pub fn serialize_range(range: &Range<FullOffset>) -> proto::Range { pub fn serialize_range(range: &Range<FullOffset>) -> proto::Range {
proto::Range { proto::Range {
start: range.start.0 as u64, start: range.start.0 as u64,
@ -564,10 +596,12 @@ pub fn serialize_range(range: &Range<FullOffset>) -> proto::Range {
} }
} }
/// Deserializes a range of [`FullOffset`]s from the RPC representation.
pub fn deserialize_range(range: proto::Range) -> Range<FullOffset> { pub fn deserialize_range(range: proto::Range) -> Range<FullOffset> {
FullOffset(range.start as usize)..FullOffset(range.end as usize) FullOffset(range.start as usize)..FullOffset(range.end as usize)
} }
/// Deserializes a clock version from the RPC representation.
pub fn deserialize_version(message: &[proto::VectorClockEntry]) -> clock::Global { pub fn deserialize_version(message: &[proto::VectorClockEntry]) -> clock::Global {
let mut version = clock::Global::new(); let mut version = clock::Global::new();
for entry in message { for entry in message {
@ -579,6 +613,7 @@ pub fn deserialize_version(message: &[proto::VectorClockEntry]) -> clock::Global
version version
} }
/// Serializes a clock version to be sent over RPC.
pub fn serialize_version(version: &clock::Global) -> Vec<proto::VectorClockEntry> { pub fn serialize_version(version: &clock::Global) -> Vec<proto::VectorClockEntry> {
version version
.iter() .iter()

View file

@ -29,7 +29,7 @@ pub struct SyntaxMap {
#[derive(Clone, Default)] #[derive(Clone, Default)]
pub struct SyntaxSnapshot { pub struct SyntaxSnapshot {
layers: SumTree<SyntaxLayer>, layers: SumTree<SyntaxLayerEntry>,
parsed_version: clock::Global, parsed_version: clock::Global,
interpolated_version: clock::Global, interpolated_version: clock::Global,
language_registry_version: usize, language_registry_version: usize,
@ -84,7 +84,7 @@ struct SyntaxMapMatchesLayer<'a> {
} }
#[derive(Clone)] #[derive(Clone)]
struct SyntaxLayer { struct SyntaxLayerEntry {
depth: usize, depth: usize,
range: Range<Anchor>, range: Range<Anchor>,
content: SyntaxLayerContent, content: SyntaxLayerContent,
@ -117,17 +117,22 @@ impl SyntaxLayerContent {
} }
} }
/// A layer of syntax highlighting, corresponding to a single syntax
/// tree in a particular language.
#[derive(Debug)] #[derive(Debug)]
pub struct SyntaxLayerInfo<'a> { pub struct SyntaxLayer<'a> {
pub depth: usize, /// The language for this layer.
pub language: &'a Arc<Language>, pub language: &'a Arc<Language>,
depth: usize,
tree: &'a Tree, tree: &'a Tree,
offset: (usize, tree_sitter::Point), offset: (usize, tree_sitter::Point),
} }
/// A layer of syntax highlighting. Like [SyntaxLayer], but holding
/// owned data instead of references.
#[derive(Clone)] #[derive(Clone)]
pub struct OwnedSyntaxLayerInfo { pub struct OwnedSyntaxLayer {
pub depth: usize, /// The language for this layer.
pub language: Arc<Language>, pub language: Arc<Language>,
tree: tree_sitter::Tree, tree: tree_sitter::Tree,
offset: (usize, tree_sitter::Point), offset: (usize, tree_sitter::Point),
@ -691,7 +696,7 @@ impl SyntaxSnapshot {
}; };
layers.push( layers.push(
SyntaxLayer { SyntaxLayerEntry {
depth: step.depth, depth: step.depth,
range: step.range, range: step.range,
content, content,
@ -741,7 +746,7 @@ impl SyntaxSnapshot {
SyntaxMapCaptures::new( SyntaxMapCaptures::new(
range.clone(), range.clone(),
text, text,
[SyntaxLayerInfo { [SyntaxLayer {
language, language,
tree, tree,
depth: 0, depth: 0,
@ -781,7 +786,7 @@ impl SyntaxSnapshot {
} }
#[cfg(test)] #[cfg(test)]
pub fn layers<'a>(&'a self, buffer: &'a BufferSnapshot) -> Vec<SyntaxLayerInfo> { pub fn layers<'a>(&'a self, buffer: &'a BufferSnapshot) -> Vec<SyntaxLayer> {
self.layers_for_range(0..buffer.len(), buffer).collect() self.layers_for_range(0..buffer.len(), buffer).collect()
} }
@ -789,7 +794,7 @@ impl SyntaxSnapshot {
&'a self, &'a self,
range: Range<T>, range: Range<T>,
buffer: &'a BufferSnapshot, buffer: &'a BufferSnapshot,
) -> impl 'a + Iterator<Item = SyntaxLayerInfo> { ) -> impl 'a + Iterator<Item = SyntaxLayer> {
let start_offset = range.start.to_offset(buffer); let start_offset = range.start.to_offset(buffer);
let end_offset = range.end.to_offset(buffer); let end_offset = range.end.to_offset(buffer);
let start = buffer.anchor_before(start_offset); let start = buffer.anchor_before(start_offset);
@ -813,7 +818,7 @@ impl SyntaxSnapshot {
let layer_start_offset = layer.range.start.to_offset(buffer); let layer_start_offset = layer.range.start.to_offset(buffer);
let layer_start_point = layer.range.start.to_point(buffer).to_ts_point(); let layer_start_point = layer.range.start.to_point(buffer).to_ts_point();
info = Some(SyntaxLayerInfo { info = Some(SyntaxLayer {
tree, tree,
language, language,
depth: layer.depth, depth: layer.depth,
@ -842,7 +847,7 @@ impl<'a> SyntaxMapCaptures<'a> {
fn new( fn new(
range: Range<usize>, range: Range<usize>,
text: &'a Rope, text: &'a Rope,
layers: impl Iterator<Item = SyntaxLayerInfo<'a>>, layers: impl Iterator<Item = SyntaxLayer<'a>>,
query: fn(&Grammar) -> Option<&Query>, query: fn(&Grammar) -> Option<&Query>,
) -> Self { ) -> Self {
let mut result = Self { let mut result = Self {
@ -964,7 +969,7 @@ impl<'a> SyntaxMapMatches<'a> {
fn new( fn new(
range: Range<usize>, range: Range<usize>,
text: &'a Rope, text: &'a Rope,
layers: impl Iterator<Item = SyntaxLayerInfo<'a>>, layers: impl Iterator<Item = SyntaxLayer<'a>>,
query: fn(&Grammar) -> Option<&Query>, query: fn(&Grammar) -> Option<&Query>,
) -> Self { ) -> Self {
let mut result = Self::default(); let mut result = Self::default();
@ -1296,7 +1301,7 @@ fn get_injections(
} }
} }
/// Update the given list of included `ranges`, removing any ranges that intersect /// Updates the given list of included `ranges`, removing any ranges that intersect
/// `removed_ranges`, and inserting the given `new_ranges`. /// `removed_ranges`, and inserting the given `new_ranges`.
/// ///
/// Returns a new vector of ranges, and the range of the vector that was changed, /// Returns a new vector of ranges, and the range of the vector that was changed,
@ -1436,23 +1441,25 @@ fn insert_newlines_between_ranges(
} }
} }
impl OwnedSyntaxLayerInfo { impl OwnedSyntaxLayer {
/// Returns the root syntax node for this layer.
pub fn node(&self) -> Node { pub fn node(&self) -> Node {
self.tree self.tree
.root_node_with_offset(self.offset.0, self.offset.1) .root_node_with_offset(self.offset.0, self.offset.1)
} }
} }
impl<'a> SyntaxLayerInfo<'a> { impl<'a> SyntaxLayer<'a> {
pub fn to_owned(&self) -> OwnedSyntaxLayerInfo { /// Returns an owned version of this layer.
OwnedSyntaxLayerInfo { pub fn to_owned(&self) -> OwnedSyntaxLayer {
OwnedSyntaxLayer {
tree: self.tree.clone(), tree: self.tree.clone(),
offset: self.offset, offset: self.offset,
depth: self.depth,
language: self.language.clone(), language: self.language.clone(),
} }
} }
/// Returns the root node for this layer.
pub fn node(&self) -> Node<'a> { pub fn node(&self) -> Node<'a> {
self.tree self.tree
.root_node_with_offset(self.offset.0, self.offset.1) .root_node_with_offset(self.offset.0, self.offset.1)
@ -1564,7 +1571,7 @@ impl ChangeRegionSet {
) )
} }
fn intersects(&self, layer: &SyntaxLayer, text: &BufferSnapshot) -> bool { fn intersects(&self, layer: &SyntaxLayerEntry, text: &BufferSnapshot) -> bool {
for region in &self.0 { for region in &self.0 {
if region.depth < layer.depth { if region.depth < layer.depth {
continue; continue;
@ -1675,7 +1682,7 @@ impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary>
} }
} }
impl sum_tree::Item for SyntaxLayer { impl sum_tree::Item for SyntaxLayerEntry {
type Summary = SyntaxLayerSummary; type Summary = SyntaxLayerSummary;
fn summary(&self) -> Self::Summary { fn summary(&self) -> Self::Summary {
@ -1690,7 +1697,7 @@ impl sum_tree::Item for SyntaxLayer {
} }
} }
impl std::fmt::Debug for SyntaxLayer { impl std::fmt::Debug for SyntaxLayerEntry {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("SyntaxLayer") f.debug_struct("SyntaxLayer")
.field("depth", &self.depth) .field("depth", &self.depth)

View file

@ -5,7 +5,7 @@ use gpui::{
MouseButton, MouseDownEvent, MouseMoveEvent, ParentElement, Render, Styled, MouseButton, MouseDownEvent, MouseMoveEvent, ParentElement, Render, Styled,
UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WindowContext, UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WindowContext,
}; };
use language::{Buffer, OwnedSyntaxLayerInfo}; use language::{Buffer, OwnedSyntaxLayer};
use std::{mem, ops::Range}; use std::{mem, ops::Range};
use theme::ActiveTheme; use theme::ActiveTheme;
use tree_sitter::{Node, TreeCursor}; use tree_sitter::{Node, TreeCursor};
@ -54,7 +54,7 @@ struct EditorState {
struct BufferState { struct BufferState {
buffer: Model<Buffer>, buffer: Model<Buffer>,
excerpt_id: ExcerptId, excerpt_id: ExcerptId,
active_layer: Option<OwnedSyntaxLayerInfo>, active_layer: Option<OwnedSyntaxLayer>,
} }
impl SyntaxTreeView { impl SyntaxTreeView {
@ -477,7 +477,7 @@ impl SyntaxTreeToolbarItemView {
}) })
} }
fn render_header(active_layer: &OwnedSyntaxLayerInfo) -> ButtonLike { fn render_header(active_layer: &OwnedSyntaxLayer) -> ButtonLike {
ButtonLike::new("syntax tree header") ButtonLike::new("syntax tree header")
.child(Label::new(active_layer.language.name())) .child(Label::new(active_layer.language.name()))
.child(Label::new(format_node_range(active_layer.node()))) .child(Label::new(format_node_range(active_layer.node())))

View file

@ -3028,7 +3028,7 @@ impl MultiBufferSnapshot {
pub fn has_git_diffs(&self) -> bool { pub fn has_git_diffs(&self) -> bool {
for excerpt in self.excerpts.iter() { for excerpt in self.excerpts.iter() {
if !excerpt.buffer.git_diff.is_empty() { if excerpt.buffer.has_git_diff() {
return true; return true;
} }
} }

View file

@ -69,7 +69,7 @@ impl Default for Metering {
} }
/// This struct is used to build a new [`Plugin`], using the builder pattern. /// This struct is used to build a new [`Plugin`], using the builder pattern.
/// Create a new default plugin with `PluginBuilder::new_with_default_ctx`, /// Creates a new default plugin with `PluginBuilder::new_with_default_ctx`,
/// and add host-side exported functions using `host_function` and `host_function_async`. /// and add host-side exported functions using `host_function` and `host_function_async`.
/// Finalize the plugin by calling [`init`]. /// Finalize the plugin by calling [`init`].
pub struct PluginBuilder { pub struct PluginBuilder {
@ -90,7 +90,7 @@ fn create_default_engine() -> Result<Engine, Error> {
} }
impl PluginBuilder { impl PluginBuilder {
/// Create a new [`PluginBuilder`] with the given WASI context. /// Creates a new [`PluginBuilder`] with the given WASI context.
/// Using the default context is a safe bet, see [`new_with_default_context`]. /// Using the default context is a safe bet, see [`new_with_default_context`].
/// This plugin will yield after a configurable amount of fuel is consumed. /// This plugin will yield after a configurable amount of fuel is consumed.
pub fn new(wasi_ctx: WasiCtx, metering: Metering) -> Result<Self, Error> { pub fn new(wasi_ctx: WasiCtx, metering: Metering) -> Result<Self, Error> {
@ -105,7 +105,7 @@ impl PluginBuilder {
}) })
} }
/// Create a new `PluginBuilder` with the default `WasiCtx` (see [`default_ctx`]). /// Creates a new `PluginBuilder` with the default `WasiCtx` (see [`default_ctx`]).
/// This plugin will yield after a configurable amount of fuel is consumed. /// This plugin will yield after a configurable amount of fuel is consumed.
pub fn new_default() -> Result<Self, Error> { pub fn new_default() -> Result<Self, Error> {
let default_ctx = WasiCtxBuilder::new() let default_ctx = WasiCtxBuilder::new()

View file

@ -3910,7 +3910,6 @@ impl Project {
message: diagnostic.message.clone(), message: diagnostic.message.clone(),
group_id, group_id,
is_primary: true, is_primary: true,
is_valid: true,
is_disk_based, is_disk_based,
is_unnecessary, is_unnecessary,
}, },
@ -3928,7 +3927,6 @@ impl Project {
message: info.message.clone(), message: info.message.clone(),
group_id, group_id,
is_primary: false, is_primary: false,
is_valid: true,
is_disk_based, is_disk_based,
is_unnecessary: false, is_unnecessary: false,
}, },

View file

@ -1866,7 +1866,7 @@ impl Snapshot {
}) })
} }
/// Update the `git_status` of the given entries such that files' /// Updates the `git_status` of the given entries such that files'
/// statuses bubble up to their ancestor directories. /// statuses bubble up to their ancestor directories.
pub fn propagate_git_statuses(&self, result: &mut [Entry]) { pub fn propagate_git_statuses(&self, result: &mut [Entry]) {
let mut cursor = self let mut cursor = self

View file

@ -1472,7 +1472,10 @@ message Diagnostic {
optional string code = 6; optional string code = 6;
uint64 group_id = 7; uint64 group_id = 7;
bool is_primary = 8; bool is_primary = 8;
// TODO: remove this field
bool is_valid = 9; bool is_valid = 9;
bool is_disk_based = 10; bool is_disk_based = 10;
bool is_unnecessary = 11; bool is_unnecessary = 11;

View file

@ -246,7 +246,7 @@ impl SettingsStore {
this this
} }
/// Update the value of a setting in the user's global configuration. /// Updates the value of a setting in the user's global configuration.
/// ///
/// This is only for tests. Normally, settings are only loaded from /// This is only for tests. Normally, settings are only loaded from
/// JSON files. /// JSON files.
@ -261,7 +261,7 @@ impl SettingsStore {
self.set_user_settings(&new_text, cx).unwrap(); self.set_user_settings(&new_text, cx).unwrap();
} }
/// Update the value of a setting in a JSON file, returning the new text /// Updates the value of a setting in a JSON file, returning the new text
/// for that JSON file. /// for that JSON file.
pub fn new_text_for_update<T: Settings>( pub fn new_text_for_update<T: Settings>(
&self, &self,
@ -276,7 +276,7 @@ impl SettingsStore {
new_text new_text
} }
/// Update the value of a setting in a JSON file, returning a list /// Updates the value of a setting in a JSON file, returning a list
/// of edits to apply to the JSON file. /// of edits to apply to the JSON file.
pub fn edits_for_update<T: Settings>( pub fn edits_for_update<T: Settings>(
&self, &self,
@ -344,7 +344,7 @@ impl SettingsStore {
DEFAULT_JSON_TAB_SIZE DEFAULT_JSON_TAB_SIZE
} }
/// Set the default settings via a JSON string. /// Sets the default settings via a JSON string.
/// ///
/// The string should contain a JSON object with a default value for every setting. /// The string should contain a JSON object with a default value for every setting.
pub fn set_default_settings( pub fn set_default_settings(
@ -362,7 +362,7 @@ impl SettingsStore {
} }
} }
/// Set the user settings via a JSON string. /// Sets the user settings via a JSON string.
pub fn set_user_settings( pub fn set_user_settings(
&mut self, &mut self,
user_settings_content: &str, user_settings_content: &str,

View file

@ -52,9 +52,9 @@ use std::{
use thiserror::Error; use thiserror::Error;
use gpui::{ use gpui::{
actions, black, px, red, AnyWindowHandle, AppContext, Bounds, ClipboardItem, EventEmitter, actions, black, px, AnyWindowHandle, AppContext, Bounds, ClipboardItem, EventEmitter, Hsla,
Hsla, Keystroke, ModelContext, Modifiers, MouseButton, MouseDownEvent, MouseMoveEvent, Keystroke, ModelContext, Modifiers, MouseButton, MouseDownEvent, MouseMoveEvent, MouseUpEvent,
MouseUpEvent, Pixels, Point, Rgba, ScrollWheelEvent, Size, Task, TouchPhase, Pixels, Point, Rgba, ScrollWheelEvent, Size, Task, TouchPhase,
}; };
use crate::mappings::{colors::to_alac_rgb, keys::to_esc_str}; use crate::mappings::{colors::to_alac_rgb, keys::to_esc_str};
@ -599,7 +599,7 @@ impl Terminal {
} }
} }
/// Update the cached process info, returns whether the Zed-relevant info has changed /// Updates the cached process info, returns whether the Zed-relevant info has changed
fn update_process_info(&mut self) -> bool { fn update_process_info(&mut self) -> bool {
let mut pid = unsafe { libc::tcgetpgrp(self.shell_fd as i32) }; let mut pid = unsafe { libc::tcgetpgrp(self.shell_fd as i32) };
if pid < 0 { if pid < 0 {
@ -1380,7 +1380,7 @@ pub fn get_color_at_index(index: usize, theme: &Theme) -> Hsla {
let colors = theme.colors(); let colors = theme.colors();
match index { match index {
//0-15 are the same as the named colors above // 0-15 are the same as the named colors above
0 => colors.terminal_ansi_black, 0 => colors.terminal_ansi_black,
1 => colors.terminal_ansi_red, 1 => colors.terminal_ansi_red,
2 => colors.terminal_ansi_green, 2 => colors.terminal_ansi_green,
@ -1397,34 +1397,32 @@ pub fn get_color_at_index(index: usize, theme: &Theme) -> Hsla {
13 => colors.terminal_ansi_bright_magenta, 13 => colors.terminal_ansi_bright_magenta,
14 => colors.terminal_ansi_bright_cyan, 14 => colors.terminal_ansi_bright_cyan,
15 => colors.terminal_ansi_bright_white, 15 => colors.terminal_ansi_bright_white,
//16-231 are mapped to their RGB colors on a 0-5 range per channel // 16-231 are mapped to their RGB colors on a 0-5 range per channel
16..=231 => { 16..=231 => {
let (r, g, b) = rgb_for_index(&(index as u8)); //Split the index into it's ANSI-RGB components let (r, g, b) = rgb_for_index(&(index as u8)); // Split the index into it's ANSI-RGB components
let step = (u8::MAX as f32 / 5.).floor() as u8; //Split the RGB range into 5 chunks, with floor so no overflow let step = (u8::MAX as f32 / 5.).floor() as u8; // Split the RGB range into 5 chunks, with floor so no overflow
rgba_color(r * step, g * step, b * step) //Map the ANSI-RGB components to an RGB color rgba_color(r * step, g * step, b * step) // Map the ANSI-RGB components to an RGB color
} }
//232-255 are a 24 step grayscale from black to white // 232-255 are a 24 step grayscale from black to white
232..=255 => { 232..=255 => {
let i = index as u8 - 232; //Align index to 0..24 let i = index as u8 - 232; // Align index to 0..24
let step = (u8::MAX as f32 / 24.).floor() as u8; //Split the RGB grayscale values into 24 chunks let step = (u8::MAX as f32 / 24.).floor() as u8; // Split the RGB grayscale values into 24 chunks
rgba_color(i * step, i * step, i * step) //Map the ANSI-grayscale components to the RGB-grayscale rgba_color(i * step, i * step, i * step) // Map the ANSI-grayscale components to the RGB-grayscale
} }
//For compatibility with the alacritty::Colors interface // For compatibility with the alacritty::Colors interface
256 => colors.text, 256 => colors.text,
257 => colors.background, 257 => colors.background,
258 => theme.players().local().cursor, 258 => theme.players().local().cursor,
259 => colors.terminal_ansi_dim_black,
// todo!(more colors) 260 => colors.terminal_ansi_dim_red,
259 => red(), //style.dim_black, 261 => colors.terminal_ansi_dim_green,
260 => red(), //style.dim_red, 262 => colors.terminal_ansi_dim_yellow,
261 => red(), //style.dim_green, 263 => colors.terminal_ansi_dim_blue,
262 => red(), //style.dim_yellow, 264 => colors.terminal_ansi_dim_magenta,
263 => red(), //style.dim_blue, 265 => colors.terminal_ansi_dim_cyan,
264 => red(), //style.dim_magenta, 266 => colors.terminal_ansi_dim_white,
265 => red(), //style.dim_cyan, 267 => colors.terminal_bright_foreground,
266 => red(), //style.dim_white, 268 => colors.terminal_ansi_black, // 'Dim Background', non-standard color
267 => red(), //style.bright_foreground,
268 => colors.terminal_ansi_black, //'Dim Background', non-standard color
_ => black(), _ => black(),
} }

View file

@ -90,17 +90,17 @@ pub struct TerminalSettingsContent {
/// ///
/// Default: current_project_directory /// Default: current_project_directory
pub working_directory: Option<WorkingDirectory>, pub working_directory: Option<WorkingDirectory>,
/// Set the terminal's font size. /// Sets the terminal's font size.
/// ///
/// If this option is not included, /// If this option is not included,
/// the terminal will default to matching the buffer's font size. /// the terminal will default to matching the buffer's font size.
pub font_size: Option<f32>, pub font_size: Option<f32>,
/// Set the terminal's font family. /// Sets the terminal's font family.
/// ///
/// If this option is not included, /// If this option is not included,
/// the terminal will default to matching the buffer's font family. /// the terminal will default to matching the buffer's font family.
pub font_family: Option<String>, pub font_family: Option<String>,
/// Set the terminal's line height. /// Sets the terminal's line height.
/// ///
/// Default: comfortable /// Default: comfortable
pub line_height: Option<TerminalLineHeight>, pub line_height: Option<TerminalLineHeight>,
@ -110,18 +110,18 @@ pub struct TerminalSettingsContent {
/// ///
/// Default: {} /// Default: {}
pub env: Option<HashMap<String, String>>, pub env: Option<HashMap<String, String>>,
/// Set the cursor blinking behavior in the terminal. /// Sets the cursor blinking behavior in the terminal.
/// ///
/// Default: terminal_controlled /// Default: terminal_controlled
pub blinking: Option<TerminalBlink>, pub blinking: Option<TerminalBlink>,
/// Set whether Alternate Scroll mode (code: ?1007) is active by default. /// Sets whether Alternate Scroll mode (code: ?1007) is active by default.
/// Alternate Scroll mode converts mouse scroll events into up / down key /// Alternate Scroll mode converts mouse scroll events into up / down key
/// presses when in the alternate screen (e.g. when running applications /// presses when in the alternate screen (e.g. when running applications
/// like vim or less). The terminal can still set and unset this mode. /// like vim or less). The terminal can still set and unset this mode.
/// ///
/// Default: off /// Default: off
pub alternate_scroll: Option<AlternateScroll>, pub alternate_scroll: Option<AlternateScroll>,
/// Set whether the option key behaves as the meta key. /// Sets whether the option key behaves as the meta key.
/// ///
/// Default: false /// Default: false
pub option_as_meta: Option<bool>, pub option_as_meta: Option<bool>,
@ -139,7 +139,7 @@ pub struct TerminalSettingsContent {
/// ///
/// Default: 320 /// Default: 320
pub default_height: Option<f32>, pub default_height: Option<f32>,
/// Activate the python virtual environment, if one is found, in the /// Activates the python virtual environment, if one is found, in the
/// terminal's working directory (as resolved by the working_directory /// terminal's working directory (as resolved by the working_directory
/// setting). Set this to "off" to disable this behavior. /// setting). Set this to "off" to disable this behavior.
/// ///

View file

@ -1,12 +1,11 @@
use editor::{Cursor, HighlightedRange, HighlightedRangeLine}; use editor::{Cursor, HighlightedRange, HighlightedRangeLine};
use gpui::{ use gpui::{
div, fill, point, px, red, relative, AnyElement, AsyncWindowContext, AvailableSpace, div, fill, point, px, relative, AnyElement, AsyncWindowContext, AvailableSpace, BorrowWindow,
BorrowWindow, Bounds, DispatchPhase, Element, ElementId, FocusHandle, Font, FontStyle, Bounds, DispatchPhase, Element, ElementId, FocusHandle, Font, FontStyle, FontWeight,
FontWeight, HighlightStyle, Hsla, InteractiveBounds, InteractiveElement, HighlightStyle, Hsla, InteractiveBounds, InteractiveElement, InteractiveElementState,
InteractiveElementState, Interactivity, IntoElement, LayoutId, Model, ModelContext, Interactivity, IntoElement, LayoutId, Model, ModelContext, ModifiersChangedEvent, MouseButton,
ModifiersChangedEvent, MouseButton, MouseMoveEvent, Pixels, PlatformInputHandler, Point, MouseMoveEvent, Pixels, PlatformInputHandler, Point, ShapedLine, StatefulInteractiveElement,
ShapedLine, StatefulInteractiveElement, Styled, TextRun, TextStyle, TextSystem, UnderlineStyle, Styled, TextRun, TextStyle, TextSystem, UnderlineStyle, WeakView, WhiteSpace, WindowContext,
WeakView, WhiteSpace, WindowContext,
}; };
use itertools::Itertools; use itertools::Itertools;
use language::CursorShape; use language::CursorShape;
@ -29,7 +28,7 @@ use workspace::Workspace;
use std::mem; use std::mem;
use std::{fmt::Debug, ops::RangeInclusive}; use std::{fmt::Debug, ops::RangeInclusive};
///The information generated during layout that is necessary for painting /// The information generated during layout that is necessary for painting.
pub struct LayoutState { pub struct LayoutState {
cells: Vec<LayoutCell>, cells: Vec<LayoutCell>,
rects: Vec<LayoutRect>, rects: Vec<LayoutRect>,
@ -43,7 +42,7 @@ pub struct LayoutState {
gutter: Pixels, gutter: Pixels,
} }
///Helper struct for converting data between alacritty's cursor points, and displayed cursor points /// Helper struct for converting data between Alacritty's cursor points, and displayed cursor points.
struct DisplayCursor { struct DisplayCursor {
line: i32, line: i32,
col: usize, col: usize,
@ -139,8 +138,8 @@ impl LayoutRect {
} }
} }
///The GPUI element that paints the terminal. /// The GPUI element that paints the terminal.
///We need to keep a reference to the view for mouse events, do we need it for any other terminal stuff, or can we move that to connection? /// We need to keep a reference to the view for mouse events, do we need it for any other terminal stuff, or can we move that to connection?
pub struct TerminalElement { pub struct TerminalElement {
terminal: Model<Terminal>, terminal: Model<Terminal>,
workspace: WeakView<Workspace>, workspace: WeakView<Workspace>,
@ -278,8 +277,8 @@ impl TerminalElement {
(cells, rects) (cells, rects)
} }
// Compute the cursor position and expected block width, may return a zero width if x_for_index returns /// Computes the cursor position and expected block width, may return a zero width if x_for_index returns
// the same position for sequential indexes. Use em_width instead /// the same position for sequential indexes. Use em_width instead
fn shape_cursor( fn shape_cursor(
cursor_point: DisplayCursor, cursor_point: DisplayCursor,
size: TerminalSize, size: TerminalSize,
@ -306,7 +305,7 @@ impl TerminalElement {
} }
} }
/// Convert the Alacritty cell styles to GPUI text styles and background color /// Converts the Alacritty cell styles to GPUI text styles and background color.
fn cell_style( fn cell_style(
indexed: &IndexedCell, indexed: &IndexedCell,
fg: terminal::alacritty_terminal::ansi::Color, fg: terminal::alacritty_terminal::ansi::Color,
@ -506,8 +505,8 @@ impl TerminalElement {
cx, cx,
); );
//Layout cursor. Rectangle is used for IME, so we should lay it out even // Layout cursor. Rectangle is used for IME, so we should lay it out even
//if we don't end up showing it. // if we don't end up showing it.
let cursor = if let AlacCursorShape::Hidden = cursor.shape { let cursor = if let AlacCursorShape::Hidden = cursor.shape {
None None
} else { } else {
@ -556,7 +555,6 @@ impl TerminalElement {
) )
}; };
//Done!
LayoutState { LayoutState {
cells, cells,
cursor, cursor,
@ -991,11 +989,11 @@ fn to_highlighted_range_lines(
Some((start_y, highlighted_range_lines)) Some((start_y, highlighted_range_lines))
} }
///Converts a 2, 8, or 24 bit color ANSI color to the GPUI equivalent /// Converts a 2, 8, or 24 bit color ANSI color to the GPUI equivalent.
fn convert_color(fg: &terminal::alacritty_terminal::ansi::Color, theme: &Theme) -> Hsla { fn convert_color(fg: &terminal::alacritty_terminal::ansi::Color, theme: &Theme) -> Hsla {
let colors = theme.colors(); let colors = theme.colors();
match fg { match fg {
//Named and theme defined colors // Named and theme defined colors
terminal::alacritty_terminal::ansi::Color::Named(n) => match n { terminal::alacritty_terminal::ansi::Color::Named(n) => match n {
NamedColor::Black => colors.terminal_ansi_black, NamedColor::Black => colors.terminal_ansi_black,
NamedColor::Red => colors.terminal_ansi_red, NamedColor::Red => colors.terminal_ansi_red,
@ -1016,24 +1014,22 @@ fn convert_color(fg: &terminal::alacritty_terminal::ansi::Color, theme: &Theme)
NamedColor::Foreground => colors.text, NamedColor::Foreground => colors.text,
NamedColor::Background => colors.background, NamedColor::Background => colors.background,
NamedColor::Cursor => theme.players().local().cursor, NamedColor::Cursor => theme.players().local().cursor,
NamedColor::DimBlack => colors.terminal_ansi_dim_black,
// todo!(more colors) NamedColor::DimRed => colors.terminal_ansi_dim_red,
NamedColor::DimBlack => red(), NamedColor::DimGreen => colors.terminal_ansi_dim_green,
NamedColor::DimRed => red(), NamedColor::DimYellow => colors.terminal_ansi_dim_yellow,
NamedColor::DimGreen => red(), NamedColor::DimBlue => colors.terminal_ansi_dim_blue,
NamedColor::DimYellow => red(), NamedColor::DimMagenta => colors.terminal_ansi_dim_magenta,
NamedColor::DimBlue => red(), NamedColor::DimCyan => colors.terminal_ansi_dim_cyan,
NamedColor::DimMagenta => red(), NamedColor::DimWhite => colors.terminal_ansi_dim_white,
NamedColor::DimCyan => red(), NamedColor::BrightForeground => colors.terminal_bright_foreground,
NamedColor::DimWhite => red(), NamedColor::DimForeground => colors.terminal_dim_foreground,
NamedColor::BrightForeground => red(),
NamedColor::DimForeground => red(),
}, },
//'True' colors // 'True' colors
terminal::alacritty_terminal::ansi::Color::Spec(rgb) => { terminal::alacritty_terminal::ansi::Color::Spec(rgb) => {
terminal::rgba_color(rgb.r, rgb.g, rgb.b) terminal::rgba_color(rgb.r, rgb.g, rgb.b)
} }
//8 bit, indexed colors // 8 bit, indexed colors
terminal::alacritty_terminal::ansi::Color::Indexed(i) => { terminal::alacritty_terminal::ansi::Color::Indexed(i) => {
terminal::get_color_at_index(*i as usize, theme) terminal::get_color_at_index(*i as usize, theme)
} }

View file

@ -832,7 +832,7 @@ impl SearchableItem for TerminalView {
self.terminal().update(cx, |term, _| term.matches = matches) self.terminal().update(cx, |term, _| term.matches = matches)
} }
/// Return the selection content to pre-load into this search /// Returns the selection content to pre-load into this search
fn query_suggestion(&mut self, cx: &mut ViewContext<Self>) -> String { fn query_suggestion(&mut self, cx: &mut ViewContext<Self>) -> String {
self.terminal() self.terminal()
.read(cx) .read(cx)

View file

@ -77,6 +77,9 @@ impl ThemeColors {
editor_document_highlight_read_background: neutral().light_alpha().step_3(), editor_document_highlight_read_background: neutral().light_alpha().step_3(),
editor_document_highlight_write_background: neutral().light_alpha().step_4(), editor_document_highlight_write_background: neutral().light_alpha().step_4(),
terminal_background: neutral().light().step_1(), terminal_background: neutral().light().step_1(),
terminal_foreground: black().light().step_12(),
terminal_bright_foreground: black().light().step_11(),
terminal_dim_foreground: black().light().step_10(),
terminal_ansi_bright_black: black().light().step_11(), terminal_ansi_bright_black: black().light().step_11(),
terminal_ansi_bright_red: red().light().step_10(), terminal_ansi_bright_red: red().light().step_10(),
terminal_ansi_bright_green: green().light().step_10(), terminal_ansi_bright_green: green().light().step_10(),
@ -93,6 +96,14 @@ impl ThemeColors {
terminal_ansi_magenta: violet().light().step_11(), terminal_ansi_magenta: violet().light().step_11(),
terminal_ansi_cyan: cyan().light().step_11(), terminal_ansi_cyan: cyan().light().step_11(),
terminal_ansi_white: neutral().light().step_12(), terminal_ansi_white: neutral().light().step_12(),
terminal_ansi_dim_black: black().light().step_11(),
terminal_ansi_dim_red: red().light().step_10(),
terminal_ansi_dim_green: green().light().step_10(),
terminal_ansi_dim_yellow: yellow().light().step_10(),
terminal_ansi_dim_blue: blue().light().step_10(),
terminal_ansi_dim_magenta: violet().light().step_10(),
terminal_ansi_dim_cyan: cyan().light().step_10(),
terminal_ansi_dim_white: neutral().light().step_11(),
link_text_hover: orange().light().step_10(), link_text_hover: orange().light().step_10(),
} }
} }
@ -160,22 +171,33 @@ impl ThemeColors {
editor_document_highlight_read_background: neutral().dark_alpha().step_4(), editor_document_highlight_read_background: neutral().dark_alpha().step_4(),
editor_document_highlight_write_background: neutral().dark_alpha().step_4(), editor_document_highlight_write_background: neutral().dark_alpha().step_4(),
terminal_background: neutral().dark().step_1(), terminal_background: neutral().dark().step_1(),
terminal_ansi_bright_black: black().dark().step_11(), terminal_foreground: white().dark().step_12(),
terminal_ansi_bright_red: red().dark().step_10(), terminal_bright_foreground: white().dark().step_11(),
terminal_ansi_bright_green: green().dark().step_10(), terminal_dim_foreground: white().dark().step_10(),
terminal_ansi_bright_yellow: yellow().dark().step_10(),
terminal_ansi_bright_blue: blue().dark().step_10(),
terminal_ansi_bright_magenta: violet().dark().step_10(),
terminal_ansi_bright_cyan: cyan().dark().step_10(),
terminal_ansi_bright_white: neutral().dark().step_11(),
terminal_ansi_black: black().dark().step_12(), terminal_ansi_black: black().dark().step_12(),
terminal_ansi_bright_black: black().dark().step_11(),
terminal_ansi_dim_black: black().dark().step_10(),
terminal_ansi_red: red().dark().step_11(), terminal_ansi_red: red().dark().step_11(),
terminal_ansi_bright_red: red().dark().step_10(),
terminal_ansi_dim_red: red().dark().step_9(),
terminal_ansi_green: green().dark().step_11(), terminal_ansi_green: green().dark().step_11(),
terminal_ansi_bright_green: green().dark().step_10(),
terminal_ansi_dim_green: green().dark().step_9(),
terminal_ansi_yellow: yellow().dark().step_11(), terminal_ansi_yellow: yellow().dark().step_11(),
terminal_ansi_bright_yellow: yellow().dark().step_10(),
terminal_ansi_dim_yellow: yellow().dark().step_9(),
terminal_ansi_blue: blue().dark().step_11(), terminal_ansi_blue: blue().dark().step_11(),
terminal_ansi_bright_blue: blue().dark().step_10(),
terminal_ansi_dim_blue: blue().dark().step_9(),
terminal_ansi_magenta: violet().dark().step_11(), terminal_ansi_magenta: violet().dark().step_11(),
terminal_ansi_bright_magenta: violet().dark().step_10(),
terminal_ansi_dim_magenta: violet().dark().step_9(),
terminal_ansi_cyan: cyan().dark().step_11(), terminal_ansi_cyan: cyan().dark().step_11(),
terminal_ansi_bright_cyan: cyan().dark().step_10(),
terminal_ansi_dim_cyan: cyan().dark().step_9(),
terminal_ansi_white: neutral().dark().step_12(), terminal_ansi_white: neutral().dark().step_12(),
terminal_ansi_bright_white: neutral().dark().step_11(),
terminal_ansi_dim_white: neutral().dark().step_10(),
link_text_hover: orange().dark().step_10(), link_text_hover: orange().dark().step_10(),
} }
} }

View file

@ -101,6 +101,9 @@ pub(crate) fn one_dark() -> Theme {
terminal_background: bg, terminal_background: bg,
// todo!("Use one colors for terminal") // todo!("Use one colors for terminal")
terminal_foreground: crate::white().dark().step_12(),
terminal_bright_foreground: crate::white().dark().step_11(),
terminal_dim_foreground: crate::white().dark().step_10(),
terminal_ansi_black: crate::black().dark().step_12(), terminal_ansi_black: crate::black().dark().step_12(),
terminal_ansi_red: crate::red().dark().step_11(), terminal_ansi_red: crate::red().dark().step_11(),
terminal_ansi_green: crate::green().dark().step_11(), terminal_ansi_green: crate::green().dark().step_11(),
@ -117,6 +120,14 @@ pub(crate) fn one_dark() -> Theme {
terminal_ansi_bright_magenta: crate::violet().dark().step_10(), terminal_ansi_bright_magenta: crate::violet().dark().step_10(),
terminal_ansi_bright_cyan: crate::cyan().dark().step_10(), terminal_ansi_bright_cyan: crate::cyan().dark().step_10(),
terminal_ansi_bright_white: crate::neutral().dark().step_11(), terminal_ansi_bright_white: crate::neutral().dark().step_11(),
terminal_ansi_dim_black: crate::black().dark().step_10(),
terminal_ansi_dim_red: crate::red().dark().step_9(),
terminal_ansi_dim_green: crate::green().dark().step_9(),
terminal_ansi_dim_yellow: crate::yellow().dark().step_9(),
terminal_ansi_dim_blue: crate::blue().dark().step_9(),
terminal_ansi_dim_magenta: crate::violet().dark().step_9(),
terminal_ansi_dim_cyan: crate::cyan().dark().step_9(),
terminal_ansi_dim_white: crate::neutral().dark().step_10(),
panel_background: bg, panel_background: bg,
panel_focused_border: blue, panel_focused_border: blue,
pane_focused_border: blue, pane_focused_border: blue,

View file

@ -169,40 +169,63 @@ pub struct ThemeColors {
// === // ===
// Terminal // Terminal
// === // ===
/// Terminal Background Color /// Terminal background color.
pub terminal_background: Hsla, pub terminal_background: Hsla,
/// Bright Black Color for ANSI Terminal /// Terminal foreground color.
pub terminal_ansi_bright_black: Hsla, pub terminal_foreground: Hsla,
/// Bright Red Color for ANSI Terminal /// Bright terminal foreground color.
pub terminal_ansi_bright_red: Hsla, pub terminal_bright_foreground: Hsla,
/// Bright Green Color for ANSI Terminal /// Dim terminal foreground color.
pub terminal_ansi_bright_green: Hsla, pub terminal_dim_foreground: Hsla,
/// Bright Yellow Color for ANSI Terminal
pub terminal_ansi_bright_yellow: Hsla, /// Black ANSI terminal color.
/// Bright Blue Color for ANSI Terminal
pub terminal_ansi_bright_blue: Hsla,
/// Bright Magenta Color for ANSI Terminal
pub terminal_ansi_bright_magenta: Hsla,
/// Bright Cyan Color for ANSI Terminal
pub terminal_ansi_bright_cyan: Hsla,
/// Bright White Color for ANSI Terminal
pub terminal_ansi_bright_white: Hsla,
/// Black Color for ANSI Terminal
pub terminal_ansi_black: Hsla, pub terminal_ansi_black: Hsla,
/// Red Color for ANSI Terminal /// Bright black ANSI terminal color.
pub terminal_ansi_bright_black: Hsla,
/// Dim black ANSI terminal color.
pub terminal_ansi_dim_black: Hsla,
/// Red ANSI terminal color.
pub terminal_ansi_red: Hsla, pub terminal_ansi_red: Hsla,
/// Green Color for ANSI Terminal /// Bright red ANSI terminal color.
pub terminal_ansi_bright_red: Hsla,
/// Dim red ANSI terminal color.
pub terminal_ansi_dim_red: Hsla,
/// Green ANSI terminal color.
pub terminal_ansi_green: Hsla, pub terminal_ansi_green: Hsla,
/// Yellow Color for ANSI Terminal /// Bright green ANSI terminal color.
pub terminal_ansi_bright_green: Hsla,
/// Dim green ANSI terminal color.
pub terminal_ansi_dim_green: Hsla,
/// Yellow ANSI terminal color.
pub terminal_ansi_yellow: Hsla, pub terminal_ansi_yellow: Hsla,
/// Blue Color for ANSI Terminal /// Bright yellow ANSI terminal color.
pub terminal_ansi_bright_yellow: Hsla,
/// Dim yellow ANSI terminal color.
pub terminal_ansi_dim_yellow: Hsla,
/// Blue ANSI terminal color.
pub terminal_ansi_blue: Hsla, pub terminal_ansi_blue: Hsla,
/// Magenta Color for ANSI Terminal /// Bright blue ANSI terminal color.
pub terminal_ansi_bright_blue: Hsla,
/// Dim blue ANSI terminal color.
pub terminal_ansi_dim_blue: Hsla,
/// Magenta ANSI terminal color.
pub terminal_ansi_magenta: Hsla, pub terminal_ansi_magenta: Hsla,
/// Cyan Color for ANSI Terminal /// Bright magenta ANSI terminal color.
pub terminal_ansi_bright_magenta: Hsla,
/// Dim magenta ANSI terminal color.
pub terminal_ansi_dim_magenta: Hsla,
/// Cyan ANSI terminal color.
pub terminal_ansi_cyan: Hsla, pub terminal_ansi_cyan: Hsla,
/// White Color for ANSI Terminal /// Bright cyan ANSI terminal color.
pub terminal_ansi_bright_cyan: Hsla,
/// Dim cyan ANSI terminal color.
pub terminal_ansi_dim_cyan: Hsla,
/// White ANSI terminal color.
pub terminal_ansi_white: Hsla, pub terminal_ansi_white: Hsla,
/// Bright white ANSI terminal color.
pub terminal_ansi_bright_white: Hsla,
/// Dim white ANSI terminal color.
pub terminal_ansi_dim_white: Hsla,
// === // ===
// UI/Rich Text // UI/Rich Text

View file

@ -75,22 +75,33 @@ pub fn andromeda() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x11a7931a).into()), editor_document_highlight_read_background: Some(rgba(0x11a7931a).into()),
editor_document_highlight_write_background: Some(rgba(0x64646d66).into()), editor_document_highlight_write_background: Some(rgba(0x64646d66).into()),
terminal_background: Some(rgba(0x1e2025ff).into()), terminal_background: Some(rgba(0x1e2025ff).into()),
terminal_ansi_bright_black: Some(rgba(0x40434cff).into()), terminal_foreground: Some(rgba(0xf7f7f8ff).into()),
terminal_ansi_bright_red: Some(rgba(0x8e103aff).into()), terminal_bright_foreground: Some(rgba(0xf7f7f8ff).into()),
terminal_ansi_bright_green: Some(rgba(0x457c38ff).into()), terminal_dim_foreground: Some(rgba(0x1e2025ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x958435ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x1b5148ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x682781ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x018169ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf7f7f8ff).into()),
terminal_ansi_black: Some(rgba(0x1e2025ff).into()), terminal_ansi_black: Some(rgba(0x1e2025ff).into()),
terminal_ansi_bright_black: Some(rgba(0x40434cff).into()),
terminal_ansi_dim_black: Some(rgba(0xf7f7f8ff).into()),
terminal_ansi_red: Some(rgba(0xf82872ff).into()), terminal_ansi_red: Some(rgba(0xf82872ff).into()),
terminal_ansi_bright_red: Some(rgba(0x8e103aff).into()),
terminal_ansi_dim_red: Some(rgba(0xffa3b6ff).into()),
terminal_ansi_green: Some(rgba(0x96df72ff).into()), terminal_ansi_green: Some(rgba(0x96df72ff).into()),
terminal_ansi_bright_green: Some(rgba(0x457c38ff).into()),
terminal_ansi_dim_green: Some(rgba(0xcef0b9ff).into()),
terminal_ansi_yellow: Some(rgba(0xfee56dff).into()), terminal_ansi_yellow: Some(rgba(0xfee56dff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x958435ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xfff2b8ff).into()),
terminal_ansi_blue: Some(rgba(0x11a793ff).into()), terminal_ansi_blue: Some(rgba(0x11a793ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x1b5148ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x9cd4c8ff).into()),
terminal_ansi_magenta: Some(rgba(0xc74decff).into()), terminal_ansi_magenta: Some(rgba(0xc74decff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x682781ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xe8abf7ff).into()),
terminal_ansi_cyan: Some(rgba(0x09e7c6ff).into()), terminal_ansi_cyan: Some(rgba(0x09e7c6ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x018169ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xaaf5e2ff).into()),
terminal_ansi_white: Some(rgba(0xf7f7f8ff).into()), terminal_ansi_white: Some(rgba(0xf7f7f8ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf7f7f8ff).into()),
terminal_ansi_dim_white: Some(rgba(0x88868dff).into()),
link_text_hover: Some(rgba(0x11a793ff).into()), link_text_hover: Some(rgba(0x11a793ff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -76,22 +76,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x576dda1a).into()), editor_document_highlight_read_background: Some(rgba(0x576dda1a).into()),
editor_document_highlight_write_background: Some(rgba(0x726c7a66).into()), editor_document_highlight_write_background: Some(rgba(0x726c7a66).into()),
terminal_background: Some(rgba(0x19171cff).into()), terminal_background: Some(rgba(0x19171cff).into()),
terminal_ansi_bright_black: Some(rgba(0x635d6bff).into()), terminal_foreground: Some(rgba(0xefecf4ff).into()),
terminal_ansi_bright_red: Some(rgba(0x5c283cff).into()), terminal_bright_foreground: Some(rgba(0xefecf4ff).into()),
terminal_ansi_bright_green: Some(rgba(0x1f4747ff).into()), terminal_dim_foreground: Some(rgba(0x19171cff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3821ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x2d376fff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x60255bff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x26445eff).into()),
terminal_ansi_bright_white: Some(rgba(0xefecf4ff).into()),
terminal_ansi_black: Some(rgba(0x19171cff).into()), terminal_ansi_black: Some(rgba(0x19171cff).into()),
terminal_ansi_bright_black: Some(rgba(0x635d6bff).into()),
terminal_ansi_dim_black: Some(rgba(0xefecf4ff).into()),
terminal_ansi_red: Some(rgba(0xbe4678ff).into()), terminal_ansi_red: Some(rgba(0xbe4678ff).into()),
terminal_ansi_bright_red: Some(rgba(0x5c283cff).into()),
terminal_ansi_dim_red: Some(rgba(0xe3a4b9ff).into()),
terminal_ansi_green: Some(rgba(0x2c9292ff).into()), terminal_ansi_green: Some(rgba(0x2c9292ff).into()),
terminal_ansi_bright_green: Some(rgba(0x1f4747ff).into()),
terminal_ansi_dim_green: Some(rgba(0x9dc8c8ff).into()),
terminal_ansi_yellow: Some(rgba(0xa06e3bff).into()), terminal_ansi_yellow: Some(rgba(0xa06e3bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3821ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xd4b499ff).into()),
terminal_ansi_blue: Some(rgba(0x576ddaff).into()), terminal_ansi_blue: Some(rgba(0x576ddaff).into()),
terminal_ansi_bright_blue: Some(rgba(0x2d376fff).into()),
terminal_ansi_dim_blue: Some(rgba(0xb3b3eeff).into()),
terminal_ansi_magenta: Some(rgba(0xbf41bfff).into()), terminal_ansi_magenta: Some(rgba(0xbf41bfff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x60255bff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xe3a4dfff).into()),
terminal_ansi_cyan: Some(rgba(0x3a8bc6ff).into()), terminal_ansi_cyan: Some(rgba(0x3a8bc6ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x26445eff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xa6c4e3ff).into()),
terminal_ansi_white: Some(rgba(0xefecf4ff).into()), terminal_ansi_white: Some(rgba(0xefecf4ff).into()),
terminal_ansi_bright_white: Some(rgba(0xefecf4ff).into()),
terminal_ansi_dim_white: Some(rgba(0x807b89ff).into()),
link_text_hover: Some(rgba(0x576ddaff).into()), link_text_hover: Some(rgba(0x576ddaff).into()),
..Default::default() ..Default::default()
}, },
@ -541,22 +552,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x586dda1a).into()), editor_document_highlight_read_background: Some(rgba(0x586dda1a).into()),
editor_document_highlight_write_background: Some(rgba(0x726c7a66).into()), editor_document_highlight_write_background: Some(rgba(0x726c7a66).into()),
terminal_background: Some(rgba(0xefecf4ff).into()), terminal_background: Some(rgba(0xefecf4ff).into()),
terminal_ansi_bright_black: Some(rgba(0x807b89ff).into()), terminal_foreground: Some(rgba(0x19171cff).into()),
terminal_ansi_bright_red: Some(rgba(0xe3a4b9ff).into()), terminal_bright_foreground: Some(rgba(0x19171cff).into()),
terminal_ansi_bright_green: Some(rgba(0x9dc8c8ff).into()), terminal_dim_foreground: Some(rgba(0xefecf4ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd4b499ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb3b3eeff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe3a4dfff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa6c4e3ff).into()),
terminal_ansi_bright_white: Some(rgba(0x19171cff).into()),
terminal_ansi_black: Some(rgba(0xefecf4ff).into()), terminal_ansi_black: Some(rgba(0xefecf4ff).into()),
terminal_ansi_bright_black: Some(rgba(0x807b89ff).into()),
terminal_ansi_dim_black: Some(rgba(0x19171cff).into()),
terminal_ansi_red: Some(rgba(0xbe4778ff).into()), terminal_ansi_red: Some(rgba(0xbe4778ff).into()),
terminal_ansi_bright_red: Some(rgba(0xe3a4b9ff).into()),
terminal_ansi_dim_red: Some(rgba(0x5c283cff).into()),
terminal_ansi_green: Some(rgba(0x2c9292ff).into()), terminal_ansi_green: Some(rgba(0x2c9292ff).into()),
terminal_ansi_bright_green: Some(rgba(0x9dc8c8ff).into()),
terminal_ansi_dim_green: Some(rgba(0x1f4747ff).into()),
terminal_ansi_yellow: Some(rgba(0xa06e3cff).into()), terminal_ansi_yellow: Some(rgba(0xa06e3cff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd4b499ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x4e3821ff).into()),
terminal_ansi_blue: Some(rgba(0x586ddaff).into()), terminal_ansi_blue: Some(rgba(0x586ddaff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb3b3eeff).into()),
terminal_ansi_dim_blue: Some(rgba(0x2d376fff).into()),
terminal_ansi_magenta: Some(rgba(0xbf41bfff).into()), terminal_ansi_magenta: Some(rgba(0xbf41bfff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe3a4dfff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x60255bff).into()),
terminal_ansi_cyan: Some(rgba(0x3b8bc6ff).into()), terminal_ansi_cyan: Some(rgba(0x3b8bc6ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa6c4e3ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x26445eff).into()),
terminal_ansi_white: Some(rgba(0x19171cff).into()), terminal_ansi_white: Some(rgba(0x19171cff).into()),
terminal_ansi_bright_white: Some(rgba(0x19171cff).into()),
terminal_ansi_dim_white: Some(rgba(0x635d6bff).into()),
link_text_hover: Some(rgba(0x586ddaff).into()), link_text_hover: Some(rgba(0x586ddaff).into()),
..Default::default() ..Default::default()
}, },
@ -1006,22 +1028,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x6684e01a).into()), editor_document_highlight_read_background: Some(rgba(0x6684e01a).into()),
editor_document_highlight_write_background: Some(rgba(0x8b887466).into()), editor_document_highlight_write_background: Some(rgba(0x8b887466).into()),
terminal_background: Some(rgba(0x20201dff).into()), terminal_background: Some(rgba(0x20201dff).into()),
terminal_ansi_bright_black: Some(rgba(0x7a7766ff).into()), terminal_foreground: Some(rgba(0xfefbecff).into()),
terminal_ansi_bright_red: Some(rgba(0x781c1fff).into()), terminal_bright_foreground: Some(rgba(0xfefbecff).into()),
terminal_ansi_bright_green: Some(rgba(0x335322ff).into()), terminal_dim_foreground: Some(rgba(0x20201dff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x574815ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x334173ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x721d2bff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1e5341ff).into()),
terminal_ansi_bright_white: Some(rgba(0xfefbecff).into()),
terminal_ansi_black: Some(rgba(0x20201dff).into()), terminal_ansi_black: Some(rgba(0x20201dff).into()),
terminal_ansi_bright_black: Some(rgba(0x7a7766ff).into()),
terminal_ansi_dim_black: Some(rgba(0xfefbecff).into()),
terminal_ansi_red: Some(rgba(0xd73837ff).into()), terminal_ansi_red: Some(rgba(0xd73837ff).into()),
terminal_ansi_bright_red: Some(rgba(0x781c1fff).into()),
terminal_ansi_dim_red: Some(rgba(0xf7a195ff).into()),
terminal_ansi_green: Some(rgba(0x60ac3aff).into()), terminal_ansi_green: Some(rgba(0x60ac3aff).into()),
terminal_ansi_bright_green: Some(rgba(0x335322ff).into()),
terminal_ansi_dim_green: Some(rgba(0xb3d69cff).into()),
terminal_ansi_yellow: Some(rgba(0xae9515ff).into()), terminal_ansi_yellow: Some(rgba(0xae9515ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x574815ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xdcc98eff).into()),
terminal_ansi_blue: Some(rgba(0x6684e0ff).into()), terminal_ansi_blue: Some(rgba(0x6684e0ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x334173ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xb8c0f1ff).into()),
terminal_ansi_magenta: Some(rgba(0xd43652ff).into()), terminal_ansi_magenta: Some(rgba(0xd43652ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x721d2bff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xf3a0a4ff).into()),
terminal_ansi_cyan: Some(rgba(0x21ad83ff).into()), terminal_ansi_cyan: Some(rgba(0x21ad83ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1e5341ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x9ed7c0ff).into()),
terminal_ansi_white: Some(rgba(0xfefbecff).into()), terminal_ansi_white: Some(rgba(0xfefbecff).into()),
terminal_ansi_bright_white: Some(rgba(0xfefbecff).into()),
terminal_ansi_dim_white: Some(rgba(0x9b9782ff).into()),
link_text_hover: Some(rgba(0x6684e0ff).into()), link_text_hover: Some(rgba(0x6684e0ff).into()),
..Default::default() ..Default::default()
}, },
@ -1471,22 +1504,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x6784e01a).into()), editor_document_highlight_read_background: Some(rgba(0x6784e01a).into()),
editor_document_highlight_write_background: Some(rgba(0x8b887466).into()), editor_document_highlight_write_background: Some(rgba(0x8b887466).into()),
terminal_background: Some(rgba(0xfefbecff).into()), terminal_background: Some(rgba(0xfefbecff).into()),
terminal_ansi_bright_black: Some(rgba(0x9b9782ff).into()), terminal_foreground: Some(rgba(0x20201dff).into()),
terminal_ansi_bright_red: Some(rgba(0xf7a195ff).into()), terminal_bright_foreground: Some(rgba(0x20201dff).into()),
terminal_ansi_bright_green: Some(rgba(0xb3d69cff).into()), terminal_dim_foreground: Some(rgba(0xfefbecff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xdcc98eff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb8c0f1ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf3a0a4ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9ed7c0ff).into()),
terminal_ansi_bright_white: Some(rgba(0x20201dff).into()),
terminal_ansi_black: Some(rgba(0xfefbecff).into()), terminal_ansi_black: Some(rgba(0xfefbecff).into()),
terminal_ansi_bright_black: Some(rgba(0x9b9782ff).into()),
terminal_ansi_dim_black: Some(rgba(0x20201dff).into()),
terminal_ansi_red: Some(rgba(0xd73838ff).into()), terminal_ansi_red: Some(rgba(0xd73838ff).into()),
terminal_ansi_bright_red: Some(rgba(0xf7a195ff).into()),
terminal_ansi_dim_red: Some(rgba(0x781c1fff).into()),
terminal_ansi_green: Some(rgba(0x61ac3aff).into()), terminal_ansi_green: Some(rgba(0x61ac3aff).into()),
terminal_ansi_bright_green: Some(rgba(0xb3d69cff).into()),
terminal_ansi_dim_green: Some(rgba(0x335322ff).into()),
terminal_ansi_yellow: Some(rgba(0xae9515ff).into()), terminal_ansi_yellow: Some(rgba(0xae9515ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xdcc98eff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x574815ff).into()),
terminal_ansi_blue: Some(rgba(0x6784e0ff).into()), terminal_ansi_blue: Some(rgba(0x6784e0ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb8c0f1ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x334173ff).into()),
terminal_ansi_magenta: Some(rgba(0xd43753ff).into()), terminal_ansi_magenta: Some(rgba(0xd43753ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf3a0a4ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x721d2bff).into()),
terminal_ansi_cyan: Some(rgba(0x22ad83ff).into()), terminal_ansi_cyan: Some(rgba(0x22ad83ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9ed7c0ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x1e5341ff).into()),
terminal_ansi_white: Some(rgba(0x20201dff).into()), terminal_ansi_white: Some(rgba(0x20201dff).into()),
terminal_ansi_bright_white: Some(rgba(0x20201dff).into()),
terminal_ansi_dim_white: Some(rgba(0x7a7766ff).into()),
link_text_hover: Some(rgba(0x6784e0ff).into()), link_text_hover: Some(rgba(0x6784e0ff).into()),
..Default::default() ..Default::default()
}, },
@ -1936,22 +1980,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x37a1661a).into()), editor_document_highlight_read_background: Some(rgba(0x37a1661a).into()),
editor_document_highlight_write_background: Some(rgba(0x7a786766).into()), editor_document_highlight_write_background: Some(rgba(0x7a786766).into()),
terminal_background: Some(rgba(0x22221bff).into()), terminal_background: Some(rgba(0x22221bff).into()),
terminal_ansi_bright_black: Some(rgba(0x6a6958ff).into()), terminal_foreground: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_bright_red: Some(rgba(0x5c331fff).into()), terminal_bright_foreground: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_bright_green: Some(rgba(0x3f491aff).into()), terminal_dim_foreground: Some(rgba(0x22221bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x514a14ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x234e34ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c373eff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x314c27ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_black: Some(rgba(0x22221bff).into()), terminal_ansi_black: Some(rgba(0x22221bff).into()),
terminal_ansi_bright_black: Some(rgba(0x6a6958ff).into()),
terminal_ansi_dim_black: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_red: Some(rgba(0xba6237ff).into()), terminal_ansi_red: Some(rgba(0xba6237ff).into()),
terminal_ansi_bright_red: Some(rgba(0x5c331fff).into()),
terminal_ansi_dim_red: Some(rgba(0xe4af96ff).into()),
terminal_ansi_green: Some(rgba(0x7d9727ff).into()), terminal_ansi_green: Some(rgba(0x7d9727ff).into()),
terminal_ansi_bright_green: Some(rgba(0x3f491aff).into()),
terminal_ansi_dim_green: Some(rgba(0xc0ca93ff).into()),
terminal_ansi_yellow: Some(rgba(0xa59810ff).into()), terminal_ansi_yellow: Some(rgba(0xa59810ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x514a14ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xd7ca8dff).into()),
terminal_ansi_blue: Some(rgba(0x37a166ff).into()), terminal_ansi_blue: Some(rgba(0x37a166ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x234e34ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xa0d1b0ff).into()),
terminal_ansi_magenta: Some(rgba(0x9d6c7cff).into()), terminal_ansi_magenta: Some(rgba(0x9d6c7cff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c373eff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xcfb4bcff).into()),
terminal_ansi_cyan: Some(rgba(0x5b9d48ff).into()), terminal_ansi_cyan: Some(rgba(0x5b9d48ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x314c27ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xaecea1ff).into()),
terminal_ansi_white: Some(rgba(0xf4f3ecff).into()), terminal_ansi_white: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_bright_white: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_dim_white: Some(rgba(0x898775ff).into()),
link_text_hover: Some(rgba(0x37a166ff).into()), link_text_hover: Some(rgba(0x37a166ff).into()),
..Default::default() ..Default::default()
}, },
@ -2401,22 +2456,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x38a1661a).into()), editor_document_highlight_read_background: Some(rgba(0x38a1661a).into()),
editor_document_highlight_write_background: Some(rgba(0x7a786766).into()), editor_document_highlight_write_background: Some(rgba(0x7a786766).into()),
terminal_background: Some(rgba(0xf4f3ecff).into()), terminal_background: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_bright_black: Some(rgba(0x898775ff).into()), terminal_foreground: Some(rgba(0x22221bff).into()),
terminal_ansi_bright_red: Some(rgba(0xe4af96ff).into()), terminal_bright_foreground: Some(rgba(0x22221bff).into()),
terminal_ansi_bright_green: Some(rgba(0xc0ca93ff).into()), terminal_dim_foreground: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd7ca8dff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa0d1b0ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcfb4bcff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xaecea1ff).into()),
terminal_ansi_bright_white: Some(rgba(0x22221bff).into()),
terminal_ansi_black: Some(rgba(0xf4f3ecff).into()), terminal_ansi_black: Some(rgba(0xf4f3ecff).into()),
terminal_ansi_bright_black: Some(rgba(0x898775ff).into()),
terminal_ansi_dim_black: Some(rgba(0x22221bff).into()),
terminal_ansi_red: Some(rgba(0xba6337ff).into()), terminal_ansi_red: Some(rgba(0xba6337ff).into()),
terminal_ansi_bright_red: Some(rgba(0xe4af96ff).into()),
terminal_ansi_dim_red: Some(rgba(0x5c331fff).into()),
terminal_ansi_green: Some(rgba(0x7d9728ff).into()), terminal_ansi_green: Some(rgba(0x7d9728ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc0ca93ff).into()),
terminal_ansi_dim_green: Some(rgba(0x3f491aff).into()),
terminal_ansi_yellow: Some(rgba(0xa59810ff).into()), terminal_ansi_yellow: Some(rgba(0xa59810ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd7ca8dff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x514a14ff).into()),
terminal_ansi_blue: Some(rgba(0x38a166ff).into()), terminal_ansi_blue: Some(rgba(0x38a166ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa0d1b0ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x234e34ff).into()),
terminal_ansi_magenta: Some(rgba(0x9d6c7cff).into()), terminal_ansi_magenta: Some(rgba(0x9d6c7cff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcfb4bcff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x4c373eff).into()),
terminal_ansi_cyan: Some(rgba(0x5c9d49ff).into()), terminal_ansi_cyan: Some(rgba(0x5c9d49ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xaecea1ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x314c27ff).into()),
terminal_ansi_white: Some(rgba(0x22221bff).into()), terminal_ansi_white: Some(rgba(0x22221bff).into()),
terminal_ansi_bright_white: Some(rgba(0x22221bff).into()),
terminal_ansi_dim_white: Some(rgba(0x6a6958ff).into()),
link_text_hover: Some(rgba(0x38a166ff).into()), link_text_hover: Some(rgba(0x38a166ff).into()),
..Default::default() ..Default::default()
}, },
@ -2866,22 +2932,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x417ee61a).into()), editor_document_highlight_read_background: Some(rgba(0x417ee61a).into()),
editor_document_highlight_write_background: Some(rgba(0x89817e66).into()), editor_document_highlight_write_background: Some(rgba(0x89817e66).into()),
terminal_background: Some(rgba(0x1b1918ff).into()), terminal_background: Some(rgba(0x1b1918ff).into()),
terminal_ansi_bright_black: Some(rgba(0x746c69ff).into()), terminal_foreground: Some(rgba(0xf1efeeff).into()),
terminal_ansi_bright_red: Some(rgba(0x8c1223ff).into()), terminal_bright_foreground: Some(rgba(0xf1efeeff).into()),
terminal_ansi_bright_green: Some(rgba(0x3e491aff).into()), terminal_dim_foreground: Some(rgba(0x1b1918ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x674115ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x213f78ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x662186ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x264958ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf1efeeff).into()),
terminal_ansi_black: Some(rgba(0x1b1918ff).into()), terminal_ansi_black: Some(rgba(0x1b1918ff).into()),
terminal_ansi_bright_black: Some(rgba(0x746c69ff).into()),
terminal_ansi_dim_black: Some(rgba(0xf1efeeff).into()),
terminal_ansi_red: Some(rgba(0xf22d40ff).into()), terminal_ansi_red: Some(rgba(0xf22d40ff).into()),
terminal_ansi_bright_red: Some(rgba(0x8c1223ff).into()),
terminal_ansi_dim_red: Some(rgba(0xffa29aff).into()),
terminal_ansi_green: Some(rgba(0x7b9727ff).into()), terminal_ansi_green: Some(rgba(0x7b9727ff).into()),
terminal_ansi_bright_green: Some(rgba(0x3e491aff).into()),
terminal_ansi_dim_green: Some(rgba(0xbfca93ff).into()),
terminal_ansi_yellow: Some(rgba(0xc38419ff).into()), terminal_ansi_yellow: Some(rgba(0xc38419ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x674115ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xe9c08eff).into()),
terminal_ansi_blue: Some(rgba(0x417ee6ff).into()), terminal_ansi_blue: Some(rgba(0x417ee6ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x213f78ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xaebcf4ff).into()),
terminal_ansi_magenta: Some(rgba(0xc340f2ff).into()), terminal_ansi_magenta: Some(rgba(0xc340f2ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x662186ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xe7a6fbff).into()),
terminal_ansi_cyan: Some(rgba(0x3e97b8ff).into()), terminal_ansi_cyan: Some(rgba(0x3e97b8ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x264958ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xa6cadbff).into()),
terminal_ansi_white: Some(rgba(0xf1efeeff).into()), terminal_ansi_white: Some(rgba(0xf1efeeff).into()),
terminal_ansi_bright_white: Some(rgba(0xf1efeeff).into()),
terminal_ansi_dim_white: Some(rgba(0x9e9693ff).into()),
link_text_hover: Some(rgba(0x417ee6ff).into()), link_text_hover: Some(rgba(0x417ee6ff).into()),
..Default::default() ..Default::default()
}, },
@ -3331,22 +3408,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x417ee61a).into()), editor_document_highlight_read_background: Some(rgba(0x417ee61a).into()),
editor_document_highlight_write_background: Some(rgba(0x89817e66).into()), editor_document_highlight_write_background: Some(rgba(0x89817e66).into()),
terminal_background: Some(rgba(0xf1efeeff).into()), terminal_background: Some(rgba(0xf1efeeff).into()),
terminal_ansi_bright_black: Some(rgba(0x9e9693ff).into()), terminal_foreground: Some(rgba(0x1b1918ff).into()),
terminal_ansi_bright_red: Some(rgba(0xffa29aff).into()), terminal_bright_foreground: Some(rgba(0x1b1918ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfca93ff).into()), terminal_dim_foreground: Some(rgba(0xf1efeeff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe9c08eff).into()),
terminal_ansi_bright_blue: Some(rgba(0xaebcf4ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe7a6fbff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa6cadbff).into()),
terminal_ansi_bright_white: Some(rgba(0x1b1918ff).into()),
terminal_ansi_black: Some(rgba(0xf1efeeff).into()), terminal_ansi_black: Some(rgba(0xf1efeeff).into()),
terminal_ansi_bright_black: Some(rgba(0x9e9693ff).into()),
terminal_ansi_dim_black: Some(rgba(0x1b1918ff).into()),
terminal_ansi_red: Some(rgba(0xf22e41ff).into()), terminal_ansi_red: Some(rgba(0xf22e41ff).into()),
terminal_ansi_bright_red: Some(rgba(0xffa29aff).into()),
terminal_ansi_dim_red: Some(rgba(0x8c1223ff).into()),
terminal_ansi_green: Some(rgba(0x7b9728ff).into()), terminal_ansi_green: Some(rgba(0x7b9728ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfca93ff).into()),
terminal_ansi_dim_green: Some(rgba(0x3e491aff).into()),
terminal_ansi_yellow: Some(rgba(0xc3841aff).into()), terminal_ansi_yellow: Some(rgba(0xc3841aff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe9c08eff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x674115ff).into()),
terminal_ansi_blue: Some(rgba(0x417ee6ff).into()), terminal_ansi_blue: Some(rgba(0x417ee6ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xaebcf4ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x213f78ff).into()),
terminal_ansi_magenta: Some(rgba(0xc340f2ff).into()), terminal_ansi_magenta: Some(rgba(0xc340f2ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe7a6fbff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x662186ff).into()),
terminal_ansi_cyan: Some(rgba(0x3f97b8ff).into()), terminal_ansi_cyan: Some(rgba(0x3f97b8ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa6cadbff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x264958ff).into()),
terminal_ansi_white: Some(rgba(0x1b1918ff).into()), terminal_ansi_white: Some(rgba(0x1b1918ff).into()),
terminal_ansi_bright_white: Some(rgba(0x1b1918ff).into()),
terminal_ansi_dim_white: Some(rgba(0x746c69ff).into()),
link_text_hover: Some(rgba(0x417ee6ff).into()), link_text_hover: Some(rgba(0x417ee6ff).into()),
..Default::default() ..Default::default()
}, },
@ -3796,22 +3884,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x526aeb1a).into()), editor_document_highlight_read_background: Some(rgba(0x526aeb1a).into()),
editor_document_highlight_write_background: Some(rgba(0x8b7c8b66).into()), editor_document_highlight_write_background: Some(rgba(0x8b7c8b66).into()),
terminal_background: Some(rgba(0x1b181bff).into()), terminal_background: Some(rgba(0x1b181bff).into()),
terminal_ansi_bright_black: Some(rgba(0x756775ff).into()), terminal_foreground: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_bright_red: Some(rgba(0x6d221aff).into()), terminal_bright_foreground: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_bright_green: Some(rgba(0x474422ff).into()), terminal_dim_foreground: Some(rgba(0x1b181bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x5e441fff).into()),
terminal_ansi_bright_blue: Some(rgba(0x26367eff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x6c1e67ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1a4848ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_black: Some(rgba(0x1b181bff).into()), terminal_ansi_black: Some(rgba(0x1b181bff).into()),
terminal_ansi_bright_black: Some(rgba(0x756775ff).into()),
terminal_ansi_dim_black: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_red: Some(rgba(0xca402cff).into()), terminal_ansi_red: Some(rgba(0xca402cff).into()),
terminal_ansi_bright_red: Some(rgba(0x6d221aff).into()),
terminal_ansi_dim_red: Some(rgba(0xf0a28fff).into()),
terminal_ansi_green: Some(rgba(0x918b3bff).into()), terminal_ansi_green: Some(rgba(0x918b3bff).into()),
terminal_ansi_bright_green: Some(rgba(0x474422ff).into()),
terminal_ansi_dim_green: Some(rgba(0xcac49aff).into()),
terminal_ansi_yellow: Some(rgba(0xbb8a36ff).into()), terminal_ansi_yellow: Some(rgba(0xbb8a36ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x5e441fff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xe2c398ff).into()),
terminal_ansi_blue: Some(rgba(0x526aebff).into()), terminal_ansi_blue: Some(rgba(0x526aebff).into()),
terminal_ansi_bright_blue: Some(rgba(0x26367eff).into()),
terminal_ansi_dim_blue: Some(rgba(0xb4b2f7ff).into()),
terminal_ansi_magenta: Some(rgba(0xcc34ccff).into()), terminal_ansi_magenta: Some(rgba(0xcc34ccff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x6c1e67ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xeba2e6ff).into()),
terminal_ansi_cyan: Some(rgba(0x189393ff).into()), terminal_ansi_cyan: Some(rgba(0x189393ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1a4848ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x9ac9c8ff).into()),
terminal_ansi_white: Some(rgba(0xf7f3f7ff).into()), terminal_ansi_white: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_dim_white: Some(rgba(0xa091a0ff).into()),
link_text_hover: Some(rgba(0x526aebff).into()), link_text_hover: Some(rgba(0x526aebff).into()),
..Default::default() ..Default::default()
}, },
@ -4261,22 +4360,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x526aeb1a).into()), editor_document_highlight_read_background: Some(rgba(0x526aeb1a).into()),
editor_document_highlight_write_background: Some(rgba(0x8b7c8b66).into()), editor_document_highlight_write_background: Some(rgba(0x8b7c8b66).into()),
terminal_background: Some(rgba(0xf7f3f7ff).into()), terminal_background: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_bright_black: Some(rgba(0xa091a0ff).into()), terminal_foreground: Some(rgba(0x1b181bff).into()),
terminal_ansi_bright_red: Some(rgba(0xf0a28fff).into()), terminal_bright_foreground: Some(rgba(0x1b181bff).into()),
terminal_ansi_bright_green: Some(rgba(0xcac49aff).into()), terminal_dim_foreground: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2c398ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb4b2f7ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xeba2e6ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9ac9c8ff).into()),
terminal_ansi_bright_white: Some(rgba(0x1b181bff).into()),
terminal_ansi_black: Some(rgba(0xf7f3f7ff).into()), terminal_ansi_black: Some(rgba(0xf7f3f7ff).into()),
terminal_ansi_bright_black: Some(rgba(0xa091a0ff).into()),
terminal_ansi_dim_black: Some(rgba(0x1b181bff).into()),
terminal_ansi_red: Some(rgba(0xca412cff).into()), terminal_ansi_red: Some(rgba(0xca412cff).into()),
terminal_ansi_bright_red: Some(rgba(0xf0a28fff).into()),
terminal_ansi_dim_red: Some(rgba(0x6d221aff).into()),
terminal_ansi_green: Some(rgba(0x918b3cff).into()), terminal_ansi_green: Some(rgba(0x918b3cff).into()),
terminal_ansi_bright_green: Some(rgba(0xcac49aff).into()),
terminal_ansi_dim_green: Some(rgba(0x474422ff).into()),
terminal_ansi_yellow: Some(rgba(0xbb8a36ff).into()), terminal_ansi_yellow: Some(rgba(0xbb8a36ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2c398ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x5e441fff).into()),
terminal_ansi_blue: Some(rgba(0x526aebff).into()), terminal_ansi_blue: Some(rgba(0x526aebff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb4b2f7ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x26367eff).into()),
terminal_ansi_magenta: Some(rgba(0xcc35ccff).into()), terminal_ansi_magenta: Some(rgba(0xcc35ccff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xeba2e6ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x6c1e67ff).into()),
terminal_ansi_cyan: Some(rgba(0x199393ff).into()), terminal_ansi_cyan: Some(rgba(0x199393ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9ac9c8ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x1a4848ff).into()),
terminal_ansi_white: Some(rgba(0x1b181bff).into()), terminal_ansi_white: Some(rgba(0x1b181bff).into()),
terminal_ansi_bright_white: Some(rgba(0x1b181bff).into()),
terminal_ansi_dim_white: Some(rgba(0x756775ff).into()),
link_text_hover: Some(rgba(0x526aebff).into()), link_text_hover: Some(rgba(0x526aebff).into()),
..Default::default() ..Default::default()
}, },
@ -4726,22 +4836,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x277fad1a).into()), editor_document_highlight_read_background: Some(rgba(0x277fad1a).into()),
editor_document_highlight_write_background: Some(rgba(0x66889a66).into()), editor_document_highlight_write_background: Some(rgba(0x66889a66).into()),
terminal_background: Some(rgba(0x161b1dff).into()), terminal_background: Some(rgba(0x161b1dff).into()),
terminal_ansi_bright_black: Some(rgba(0x587989ff).into()), terminal_foreground: Some(rgba(0xebf8ffff).into()),
terminal_ansi_bright_red: Some(rgba(0x6f1c3aff).into()), terminal_bright_foreground: Some(rgba(0xebf8ffff).into()),
terminal_ansi_bright_green: Some(rgba(0x2e4522ff).into()), terminal_dim_foreground: Some(rgba(0x161b1dff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x454413ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x1e3f53ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x5c1e6bff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1f4638ff).into()),
terminal_ansi_bright_white: Some(rgba(0xebf8ffff).into()),
terminal_ansi_black: Some(rgba(0x161b1dff).into()), terminal_ansi_black: Some(rgba(0x161b1dff).into()),
terminal_ansi_bright_black: Some(rgba(0x587989ff).into()),
terminal_ansi_dim_black: Some(rgba(0xebf8ffff).into()),
terminal_ansi_red: Some(rgba(0xd22e72ff).into()), terminal_ansi_red: Some(rgba(0xd22e72ff).into()),
terminal_ansi_bright_red: Some(rgba(0x6f1c3aff).into()),
terminal_ansi_dim_red: Some(rgba(0xf09fb6ff).into()),
terminal_ansi_green: Some(rgba(0x568c3bff).into()), terminal_ansi_green: Some(rgba(0x568c3bff).into()),
terminal_ansi_bright_green: Some(rgba(0x2e4522ff).into()),
terminal_ansi_dim_green: Some(rgba(0xabc59aff).into()),
terminal_ansi_yellow: Some(rgba(0x8a8a11ff).into()), terminal_ansi_yellow: Some(rgba(0x8a8a11ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x454413ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xc8c38bff).into()),
terminal_ansi_blue: Some(rgba(0x277fadff).into()), terminal_ansi_blue: Some(rgba(0x277fadff).into()),
terminal_ansi_bright_blue: Some(rgba(0x1e3f53ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x9ebdd6ff).into()),
terminal_ansi_magenta: Some(rgba(0xb72ed2ff).into()), terminal_ansi_magenta: Some(rgba(0xb72ed2ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x5c1e6bff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xe09fe9ff).into()),
terminal_ansi_cyan: Some(rgba(0x2e8f6fff).into()), terminal_ansi_cyan: Some(rgba(0x2e8f6fff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1f4638ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x9bc7b5ff).into()),
terminal_ansi_white: Some(rgba(0xebf8ffff).into()), terminal_ansi_white: Some(rgba(0xebf8ffff).into()),
terminal_ansi_bright_white: Some(rgba(0xebf8ffff).into()),
terminal_ansi_dim_white: Some(rgba(0x7397aaff).into()),
link_text_hover: Some(rgba(0x277fadff).into()), link_text_hover: Some(rgba(0x277fadff).into()),
..Default::default() ..Default::default()
}, },
@ -5191,22 +5312,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x277fad1a).into()), editor_document_highlight_read_background: Some(rgba(0x277fad1a).into()),
editor_document_highlight_write_background: Some(rgba(0x66889a66).into()), editor_document_highlight_write_background: Some(rgba(0x66889a66).into()),
terminal_background: Some(rgba(0xebf8ffff).into()), terminal_background: Some(rgba(0xebf8ffff).into()),
terminal_ansi_bright_black: Some(rgba(0x7397aaff).into()), terminal_foreground: Some(rgba(0x161b1dff).into()),
terminal_ansi_bright_red: Some(rgba(0xf09fb6ff).into()), terminal_bright_foreground: Some(rgba(0x161b1dff).into()),
terminal_ansi_bright_green: Some(rgba(0xabc59aff).into()), terminal_dim_foreground: Some(rgba(0xebf8ffff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xc8c38bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x9ebdd6ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe09fe9ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9bc7b5ff).into()),
terminal_ansi_bright_white: Some(rgba(0x161b1dff).into()),
terminal_ansi_black: Some(rgba(0xebf8ffff).into()), terminal_ansi_black: Some(rgba(0xebf8ffff).into()),
terminal_ansi_bright_black: Some(rgba(0x7397aaff).into()),
terminal_ansi_dim_black: Some(rgba(0x161b1dff).into()),
terminal_ansi_red: Some(rgba(0xd22f72ff).into()), terminal_ansi_red: Some(rgba(0xd22f72ff).into()),
terminal_ansi_bright_red: Some(rgba(0xf09fb6ff).into()),
terminal_ansi_dim_red: Some(rgba(0x6f1c3aff).into()),
terminal_ansi_green: Some(rgba(0x578c3cff).into()), terminal_ansi_green: Some(rgba(0x578c3cff).into()),
terminal_ansi_bright_green: Some(rgba(0xabc59aff).into()),
terminal_ansi_dim_green: Some(rgba(0x2e4522ff).into()),
terminal_ansi_yellow: Some(rgba(0x8a8a11ff).into()), terminal_ansi_yellow: Some(rgba(0x8a8a11ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xc8c38bff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x454413ff).into()),
terminal_ansi_blue: Some(rgba(0x277fadff).into()), terminal_ansi_blue: Some(rgba(0x277fadff).into()),
terminal_ansi_bright_blue: Some(rgba(0x9ebdd6ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x1e3f53ff).into()),
terminal_ansi_magenta: Some(rgba(0xb72fd2ff).into()), terminal_ansi_magenta: Some(rgba(0xb72fd2ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe09fe9ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x5c1e6bff).into()),
terminal_ansi_cyan: Some(rgba(0x2f8f6fff).into()), terminal_ansi_cyan: Some(rgba(0x2f8f6fff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9bc7b5ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x1f4638ff).into()),
terminal_ansi_white: Some(rgba(0x161b1dff).into()), terminal_ansi_white: Some(rgba(0x161b1dff).into()),
terminal_ansi_bright_white: Some(rgba(0x161b1dff).into()),
terminal_ansi_dim_white: Some(rgba(0x587989ff).into()),
link_text_hover: Some(rgba(0x277fadff).into()), link_text_hover: Some(rgba(0x277fadff).into()),
..Default::default() ..Default::default()
}, },
@ -5656,22 +5788,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x7272ca1a).into()), editor_document_highlight_read_background: Some(rgba(0x7272ca1a).into()),
editor_document_highlight_write_background: Some(rgba(0x726a6a66).into()), editor_document_highlight_write_background: Some(rgba(0x726a6a66).into()),
terminal_background: Some(rgba(0x1b1818ff).into()), terminal_background: Some(rgba(0x1b1818ff).into()),
terminal_ansi_bright_black: Some(rgba(0x635b5bff).into()), terminal_foreground: Some(rgba(0xf4ececff).into()),
terminal_ansi_bright_red: Some(rgba(0x692727ff).into()), terminal_bright_foreground: Some(rgba(0xf4ececff).into()),
terminal_ansi_bright_green: Some(rgba(0x2a4444ff).into()), terminal_dim_foreground: Some(rgba(0x1b1818ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3821ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x3b3960ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x5b2c42ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x2e4257ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf4ececff).into()),
terminal_ansi_black: Some(rgba(0x1b1818ff).into()), terminal_ansi_black: Some(rgba(0x1b1818ff).into()),
terminal_ansi_bright_black: Some(rgba(0x635b5bff).into()),
terminal_ansi_dim_black: Some(rgba(0xf4ececff).into()),
terminal_ansi_red: Some(rgba(0xca4949ff).into()), terminal_ansi_red: Some(rgba(0xca4949ff).into()),
terminal_ansi_bright_red: Some(rgba(0x692727ff).into()),
terminal_ansi_dim_red: Some(rgba(0xeda69fff).into()),
terminal_ansi_green: Some(rgba(0x4b8b8bff).into()), terminal_ansi_green: Some(rgba(0x4b8b8bff).into()),
terminal_ansi_bright_green: Some(rgba(0x2a4444ff).into()),
terminal_ansi_dim_green: Some(rgba(0xa6c4c4ff).into()),
terminal_ansi_yellow: Some(rgba(0xa06e3bff).into()), terminal_ansi_yellow: Some(rgba(0xa06e3bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3821ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xd4b499ff).into()),
terminal_ansi_blue: Some(rgba(0x7272caff).into()), terminal_ansi_blue: Some(rgba(0x7272caff).into()),
terminal_ansi_bright_blue: Some(rgba(0x3b3960ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xbbb6e5ff).into()),
terminal_ansi_magenta: Some(rgba(0xbd5187ff).into()), terminal_ansi_magenta: Some(rgba(0xbd5187ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x5b2c42ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xe2a9c2ff).into()),
terminal_ansi_cyan: Some(rgba(0x5485b6ff).into()), terminal_ansi_cyan: Some(rgba(0x5485b6ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x2e4257ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xacc0daff).into()),
terminal_ansi_white: Some(rgba(0xf4ececff).into()), terminal_ansi_white: Some(rgba(0xf4ececff).into()),
terminal_ansi_bright_white: Some(rgba(0xf4ececff).into()),
terminal_ansi_dim_white: Some(rgba(0x807979ff).into()),
link_text_hover: Some(rgba(0x7272caff).into()), link_text_hover: Some(rgba(0x7272caff).into()),
..Default::default() ..Default::default()
}, },
@ -6121,22 +6264,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x7372ca1a).into()), editor_document_highlight_read_background: Some(rgba(0x7372ca1a).into()),
editor_document_highlight_write_background: Some(rgba(0x726a6a66).into()), editor_document_highlight_write_background: Some(rgba(0x726a6a66).into()),
terminal_background: Some(rgba(0xf4ececff).into()), terminal_background: Some(rgba(0xf4ececff).into()),
terminal_ansi_bright_black: Some(rgba(0x807979ff).into()), terminal_foreground: Some(rgba(0x1b1818ff).into()),
terminal_ansi_bright_red: Some(rgba(0xeda69fff).into()), terminal_bright_foreground: Some(rgba(0x1b1818ff).into()),
terminal_ansi_bright_green: Some(rgba(0xa6c4c4ff).into()), terminal_dim_foreground: Some(rgba(0xf4ececff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd4b499ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xbbb6e5ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe2a9c2ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xacc0daff).into()),
terminal_ansi_bright_white: Some(rgba(0x1b1818ff).into()),
terminal_ansi_black: Some(rgba(0xf4ececff).into()), terminal_ansi_black: Some(rgba(0xf4ececff).into()),
terminal_ansi_bright_black: Some(rgba(0x807979ff).into()),
terminal_ansi_dim_black: Some(rgba(0x1b1818ff).into()),
terminal_ansi_red: Some(rgba(0xca4a4aff).into()), terminal_ansi_red: Some(rgba(0xca4a4aff).into()),
terminal_ansi_bright_red: Some(rgba(0xeda69fff).into()),
terminal_ansi_dim_red: Some(rgba(0x692727ff).into()),
terminal_ansi_green: Some(rgba(0x4c8b8bff).into()), terminal_ansi_green: Some(rgba(0x4c8b8bff).into()),
terminal_ansi_bright_green: Some(rgba(0xa6c4c4ff).into()),
terminal_ansi_dim_green: Some(rgba(0x2a4444ff).into()),
terminal_ansi_yellow: Some(rgba(0xa06e3cff).into()), terminal_ansi_yellow: Some(rgba(0xa06e3cff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd4b499ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x4e3821ff).into()),
terminal_ansi_blue: Some(rgba(0x7372caff).into()), terminal_ansi_blue: Some(rgba(0x7372caff).into()),
terminal_ansi_bright_blue: Some(rgba(0xbbb6e5ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x3b3960ff).into()),
terminal_ansi_magenta: Some(rgba(0xbd5287ff).into()), terminal_ansi_magenta: Some(rgba(0xbd5287ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xe2a9c2ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x5b2c42ff).into()),
terminal_ansi_cyan: Some(rgba(0x5585b6ff).into()), terminal_ansi_cyan: Some(rgba(0x5585b6ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xacc0daff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x2e4257ff).into()),
terminal_ansi_white: Some(rgba(0x1b1818ff).into()), terminal_ansi_white: Some(rgba(0x1b1818ff).into()),
terminal_ansi_bright_white: Some(rgba(0x1b1818ff).into()),
terminal_ansi_dim_white: Some(rgba(0x635b5bff).into()),
link_text_hover: Some(rgba(0x7372caff).into()), link_text_hover: Some(rgba(0x7372caff).into()),
..Default::default() ..Default::default()
}, },
@ -6586,22 +6740,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x478c901a).into()), editor_document_highlight_read_background: Some(rgba(0x478c901a).into()),
editor_document_highlight_write_background: Some(rgba(0x6c7a7166).into()), editor_document_highlight_write_background: Some(rgba(0x6c7a7166).into()),
terminal_background: Some(rgba(0x171c19ff).into()), terminal_background: Some(rgba(0x171c19ff).into()),
terminal_ansi_bright_black: Some(rgba(0x5d6b62ff).into()), terminal_foreground: Some(rgba(0xecf4eeff).into()),
terminal_ansi_bright_red: Some(rgba(0x563220ff).into()), terminal_bright_foreground: Some(rgba(0xecf4eeff).into()),
terminal_ansi_bright_green: Some(rgba(0x294a33ff).into()), terminal_dim_foreground: Some(rgba(0x171c19ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3f22ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x284546ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x423a36ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1d4b4dff).into()),
terminal_ansi_bright_white: Some(rgba(0xecf4eeff).into()),
terminal_ansi_black: Some(rgba(0x171c19ff).into()), terminal_ansi_black: Some(rgba(0x171c19ff).into()),
terminal_ansi_bright_black: Some(rgba(0x5d6b62ff).into()),
terminal_ansi_dim_black: Some(rgba(0xecf4eeff).into()),
terminal_ansi_red: Some(rgba(0xb16139ff).into()), terminal_ansi_red: Some(rgba(0xb16139ff).into()),
terminal_ansi_bright_red: Some(rgba(0x563220ff).into()),
terminal_ansi_dim_red: Some(rgba(0xdeae97ff).into()),
terminal_ansi_green: Some(rgba(0x489963ff).into()), terminal_ansi_green: Some(rgba(0x489963ff).into()),
terminal_ansi_bright_green: Some(rgba(0x294a33ff).into()),
terminal_ansi_dim_green: Some(rgba(0xa5ccafff).into()),
terminal_ansi_yellow: Some(rgba(0xa07e3bff).into()), terminal_ansi_yellow: Some(rgba(0xa07e3bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3f22ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xd3bd9aff).into()),
terminal_ansi_blue: Some(rgba(0x478c90ff).into()), terminal_ansi_blue: Some(rgba(0x478c90ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x284546ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xa5c5c6ff).into()),
terminal_ansi_magenta: Some(rgba(0x867469ff).into()), terminal_ansi_magenta: Some(rgba(0x867469ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x423a36ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xc2b7b1ff).into()),
terminal_ansi_cyan: Some(rgba(0x1e9aa0ff).into()), terminal_ansi_cyan: Some(rgba(0x1e9aa0ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1d4b4dff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x9dcdcfff).into()),
terminal_ansi_white: Some(rgba(0xecf4eeff).into()), terminal_ansi_white: Some(rgba(0xecf4eeff).into()),
terminal_ansi_bright_white: Some(rgba(0xecf4eeff).into()),
terminal_ansi_dim_white: Some(rgba(0x7b897fff).into()),
link_text_hover: Some(rgba(0x478c90ff).into()), link_text_hover: Some(rgba(0x478c90ff).into()),
..Default::default() ..Default::default()
}, },
@ -7051,22 +7216,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x488c901a).into()), editor_document_highlight_read_background: Some(rgba(0x488c901a).into()),
editor_document_highlight_write_background: Some(rgba(0x6c7a7166).into()), editor_document_highlight_write_background: Some(rgba(0x6c7a7166).into()),
terminal_background: Some(rgba(0xecf4eeff).into()), terminal_background: Some(rgba(0xecf4eeff).into()),
terminal_ansi_bright_black: Some(rgba(0x7b897fff).into()), terminal_foreground: Some(rgba(0x171c19ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdeae97ff).into()), terminal_bright_foreground: Some(rgba(0x171c19ff).into()),
terminal_ansi_bright_green: Some(rgba(0xa5ccafff).into()), terminal_dim_foreground: Some(rgba(0xecf4eeff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd3bd9aff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa5c5c6ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xc2b7b1ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9dcdcfff).into()),
terminal_ansi_bright_white: Some(rgba(0x171c19ff).into()),
terminal_ansi_black: Some(rgba(0xecf4eeff).into()), terminal_ansi_black: Some(rgba(0xecf4eeff).into()),
terminal_ansi_bright_black: Some(rgba(0x7b897fff).into()),
terminal_ansi_dim_black: Some(rgba(0x171c19ff).into()),
terminal_ansi_red: Some(rgba(0xb1623aff).into()), terminal_ansi_red: Some(rgba(0xb1623aff).into()),
terminal_ansi_bright_red: Some(rgba(0xdeae97ff).into()),
terminal_ansi_dim_red: Some(rgba(0x563220ff).into()),
terminal_ansi_green: Some(rgba(0x499963ff).into()), terminal_ansi_green: Some(rgba(0x499963ff).into()),
terminal_ansi_bright_green: Some(rgba(0xa5ccafff).into()),
terminal_ansi_dim_green: Some(rgba(0x294a33ff).into()),
terminal_ansi_yellow: Some(rgba(0xa07e3cff).into()), terminal_ansi_yellow: Some(rgba(0xa07e3cff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd3bd9aff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x4e3f22ff).into()),
terminal_ansi_blue: Some(rgba(0x488c90ff).into()), terminal_ansi_blue: Some(rgba(0x488c90ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa5c5c6ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x284546ff).into()),
terminal_ansi_magenta: Some(rgba(0x867469ff).into()), terminal_ansi_magenta: Some(rgba(0x867469ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xc2b7b1ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x423a36ff).into()),
terminal_ansi_cyan: Some(rgba(0x1f9aa0ff).into()), terminal_ansi_cyan: Some(rgba(0x1f9aa0ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9dcdcfff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x1d4b4dff).into()),
terminal_ansi_white: Some(rgba(0x171c19ff).into()), terminal_ansi_white: Some(rgba(0x171c19ff).into()),
terminal_ansi_bright_white: Some(rgba(0x171c19ff).into()),
terminal_ansi_dim_white: Some(rgba(0x5d6b62ff).into()),
link_text_hover: Some(rgba(0x488c90ff).into()), link_text_hover: Some(rgba(0x488c90ff).into()),
..Default::default() ..Default::default()
}, },
@ -7516,22 +7692,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x3e62f41a).into()), editor_document_highlight_read_background: Some(rgba(0x3e62f41a).into()),
editor_document_highlight_write_background: Some(rgba(0x748b7466).into()), editor_document_highlight_write_background: Some(rgba(0x748b7466).into()),
terminal_background: Some(rgba(0x131513ff).into()), terminal_background: Some(rgba(0x131513ff).into()),
terminal_ansi_bright_black: Some(rgba(0x667a66ff).into()), terminal_foreground: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_bright_red: Some(rgba(0x840b21ff).into()), terminal_bright_foreground: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_bright_green: Some(rgba(0x204f1bff).into()), terminal_dim_foreground: Some(rgba(0x131513ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4b4a17ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x193385ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x810e60ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1d4a56ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_black: Some(rgba(0x131513ff).into()), terminal_ansi_black: Some(rgba(0x131513ff).into()),
terminal_ansi_bright_black: Some(rgba(0x667a66ff).into()),
terminal_ansi_dim_black: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_red: Some(rgba(0xe61c3cff).into()), terminal_ansi_red: Some(rgba(0xe61c3cff).into()),
terminal_ansi_bright_red: Some(rgba(0x840b21ff).into()),
terminal_ansi_dim_red: Some(rgba(0xff9d98ff).into()),
terminal_ansi_green: Some(rgba(0x2ba32aff).into()), terminal_ansi_green: Some(rgba(0x2ba32aff).into()),
terminal_ansi_bright_green: Some(rgba(0x204f1bff).into()),
terminal_ansi_dim_green: Some(rgba(0xa0d294ff).into()),
terminal_ansi_yellow: Some(rgba(0x98981cff).into()), terminal_ansi_yellow: Some(rgba(0x98981cff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4b4a17ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xd0ca90ff).into()),
terminal_ansi_blue: Some(rgba(0x3e62f4ff).into()), terminal_ansi_blue: Some(rgba(0x3e62f4ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x193385ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xb1adfcff).into()),
terminal_ansi_magenta: Some(rgba(0xe61cc3ff).into()), terminal_ansi_magenta: Some(rgba(0xe61cc3ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x810e60ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xf9a1e1ff).into()),
terminal_ansi_cyan: Some(rgba(0x1c99b3ff).into()), terminal_ansi_cyan: Some(rgba(0x1c99b3ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x1d4a56ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x9fccd9ff).into()),
terminal_ansi_white: Some(rgba(0xf4fbf4ff).into()), terminal_ansi_white: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_dim_white: Some(rgba(0x829b82ff).into()),
link_text_hover: Some(rgba(0x3e62f4ff).into()), link_text_hover: Some(rgba(0x3e62f4ff).into()),
..Default::default() ..Default::default()
}, },
@ -7981,22 +8168,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x3f62f41a).into()), editor_document_highlight_read_background: Some(rgba(0x3f62f41a).into()),
editor_document_highlight_write_background: Some(rgba(0x748b7466).into()), editor_document_highlight_write_background: Some(rgba(0x748b7466).into()),
terminal_background: Some(rgba(0xf4fbf4ff).into()), terminal_background: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_bright_black: Some(rgba(0x829b82ff).into()), terminal_foreground: Some(rgba(0x131513ff).into()),
terminal_ansi_bright_red: Some(rgba(0xff9d98ff).into()), terminal_bright_foreground: Some(rgba(0x131513ff).into()),
terminal_ansi_bright_green: Some(rgba(0xa0d294ff).into()), terminal_dim_foreground: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd0ca90ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb1adfcff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf9a1e1ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fccd9ff).into()),
terminal_ansi_bright_white: Some(rgba(0x131513ff).into()),
terminal_ansi_black: Some(rgba(0xf4fbf4ff).into()), terminal_ansi_black: Some(rgba(0xf4fbf4ff).into()),
terminal_ansi_bright_black: Some(rgba(0x829b82ff).into()),
terminal_ansi_dim_black: Some(rgba(0x131513ff).into()),
terminal_ansi_red: Some(rgba(0xe61c3dff).into()), terminal_ansi_red: Some(rgba(0xe61c3dff).into()),
terminal_ansi_bright_red: Some(rgba(0xff9d98ff).into()),
terminal_ansi_dim_red: Some(rgba(0x840b21ff).into()),
terminal_ansi_green: Some(rgba(0x2ba32bff).into()), terminal_ansi_green: Some(rgba(0x2ba32bff).into()),
terminal_ansi_bright_green: Some(rgba(0xa0d294ff).into()),
terminal_ansi_dim_green: Some(rgba(0x204f1bff).into()),
terminal_ansi_yellow: Some(rgba(0x98981dff).into()), terminal_ansi_yellow: Some(rgba(0x98981dff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xd0ca90ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x4b4a17ff).into()),
terminal_ansi_blue: Some(rgba(0x3f62f4ff).into()), terminal_ansi_blue: Some(rgba(0x3f62f4ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb1adfcff).into()),
terminal_ansi_dim_blue: Some(rgba(0x193385ff).into()),
terminal_ansi_magenta: Some(rgba(0xe61dc3ff).into()), terminal_ansi_magenta: Some(rgba(0xe61dc3ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf9a1e1ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x810e60ff).into()),
terminal_ansi_cyan: Some(rgba(0x1d99b3ff).into()), terminal_ansi_cyan: Some(rgba(0x1d99b3ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fccd9ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x1d4a56ff).into()),
terminal_ansi_white: Some(rgba(0x131513ff).into()), terminal_ansi_white: Some(rgba(0x131513ff).into()),
terminal_ansi_bright_white: Some(rgba(0x131513ff).into()),
terminal_ansi_dim_white: Some(rgba(0x667a66ff).into()),
link_text_hover: Some(rgba(0x3f62f4ff).into()), link_text_hover: Some(rgba(0x3f62f4ff).into()),
..Default::default() ..Default::default()
}, },
@ -8446,22 +8644,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x3e8fd01a).into()), editor_document_highlight_read_background: Some(rgba(0x3e8fd01a).into()),
editor_document_highlight_write_background: Some(rgba(0x7a819c66).into()), editor_document_highlight_write_background: Some(rgba(0x7a819c66).into()),
terminal_background: Some(rgba(0x202746ff).into()), terminal_background: Some(rgba(0x202746ff).into()),
terminal_ansi_bright_black: Some(rgba(0x697192ff).into()), terminal_foreground: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_bright_red: Some(rgba(0x6d2616ff).into()), terminal_bright_foreground: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_bright_green: Some(rgba(0x534921ff).into()), terminal_dim_foreground: Some(rgba(0x202746ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x63441eff).into()),
terminal_ansi_bright_blue: Some(rgba(0x274664ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c333dff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x214e5fff).into()),
terminal_ansi_bright_white: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_black: Some(rgba(0x202746ff).into()), terminal_ansi_black: Some(rgba(0x202746ff).into()),
terminal_ansi_bright_black: Some(rgba(0x697192ff).into()),
terminal_ansi_dim_black: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_red: Some(rgba(0xc94923ff).into()), terminal_ansi_red: Some(rgba(0xc94923ff).into()),
terminal_ansi_bright_red: Some(rgba(0x6d2616ff).into()),
terminal_ansi_dim_red: Some(rgba(0xefa58cff).into()),
terminal_ansi_green: Some(rgba(0xac973aff).into()), terminal_ansi_green: Some(rgba(0xac973aff).into()),
terminal_ansi_bright_green: Some(rgba(0x534921ff).into()),
terminal_ansi_dim_green: Some(rgba(0xd9ca9bff).into()),
terminal_ansi_yellow: Some(rgba(0xc08b31ff).into()), terminal_ansi_yellow: Some(rgba(0xc08b31ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x63441eff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xe5c497ff).into()),
terminal_ansi_blue: Some(rgba(0x3e8fd0ff).into()), terminal_ansi_blue: Some(rgba(0x3e8fd0ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x274664ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xa9c6e8ff).into()),
terminal_ansi_magenta: Some(rgba(0x9c637aff).into()), terminal_ansi_magenta: Some(rgba(0x9c637aff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c333dff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xcfafbbff).into()),
terminal_ansi_cyan: Some(rgba(0x25a2c9ff).into()), terminal_ansi_cyan: Some(rgba(0x25a2c9ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x214e5fff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xa4d0e4ff).into()),
terminal_ansi_white: Some(rgba(0xf5f7ffff).into()), terminal_ansi_white: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_bright_white: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_dim_white: Some(rgba(0x8b91a7ff).into()),
link_text_hover: Some(rgba(0x3e8fd0ff).into()), link_text_hover: Some(rgba(0x3e8fd0ff).into()),
..Default::default() ..Default::default()
}, },
@ -8911,22 +9120,33 @@ pub fn atelier() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x3f8fd01a).into()), editor_document_highlight_read_background: Some(rgba(0x3f8fd01a).into()),
editor_document_highlight_write_background: Some(rgba(0x7a819c66).into()), editor_document_highlight_write_background: Some(rgba(0x7a819c66).into()),
terminal_background: Some(rgba(0xf5f7ffff).into()), terminal_background: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_bright_black: Some(rgba(0x8b91a7ff).into()), terminal_foreground: Some(rgba(0x202746ff).into()),
terminal_ansi_bright_red: Some(rgba(0xefa58cff).into()), terminal_bright_foreground: Some(rgba(0x202746ff).into()),
terminal_ansi_bright_green: Some(rgba(0xd9ca9bff).into()), terminal_dim_foreground: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe5c497ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa9c6e8ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcfafbbff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa4d0e4ff).into()),
terminal_ansi_bright_white: Some(rgba(0x202746ff).into()),
terminal_ansi_black: Some(rgba(0xf5f7ffff).into()), terminal_ansi_black: Some(rgba(0xf5f7ffff).into()),
terminal_ansi_bright_black: Some(rgba(0x8b91a7ff).into()),
terminal_ansi_dim_black: Some(rgba(0x202746ff).into()),
terminal_ansi_red: Some(rgba(0xc94a23ff).into()), terminal_ansi_red: Some(rgba(0xc94a23ff).into()),
terminal_ansi_bright_red: Some(rgba(0xefa58cff).into()),
terminal_ansi_dim_red: Some(rgba(0x6d2616ff).into()),
terminal_ansi_green: Some(rgba(0xac973aff).into()), terminal_ansi_green: Some(rgba(0xac973aff).into()),
terminal_ansi_bright_green: Some(rgba(0xd9ca9bff).into()),
terminal_ansi_dim_green: Some(rgba(0x534921ff).into()),
terminal_ansi_yellow: Some(rgba(0xc08b31ff).into()), terminal_ansi_yellow: Some(rgba(0xc08b31ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe5c497ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x63441eff).into()),
terminal_ansi_blue: Some(rgba(0x3f8fd0ff).into()), terminal_ansi_blue: Some(rgba(0x3f8fd0ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa9c6e8ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x274664ff).into()),
terminal_ansi_magenta: Some(rgba(0x9c637aff).into()), terminal_ansi_magenta: Some(rgba(0x9c637aff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcfafbbff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x4c333dff).into()),
terminal_ansi_cyan: Some(rgba(0x25a2c9ff).into()), terminal_ansi_cyan: Some(rgba(0x25a2c9ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa4d0e4ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x214e5fff).into()),
terminal_ansi_white: Some(rgba(0x202746ff).into()), terminal_ansi_white: Some(rgba(0x202746ff).into()),
terminal_ansi_bright_white: Some(rgba(0x202746ff).into()),
terminal_ansi_dim_white: Some(rgba(0x697192ff).into()),
link_text_hover: Some(rgba(0x3f8fd0ff).into()), link_text_hover: Some(rgba(0x3f8fd0ff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -76,22 +76,33 @@ pub fn ayu() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x5ac2fe1a).into()), editor_document_highlight_read_background: Some(rgba(0x5ac2fe1a).into()),
editor_document_highlight_write_background: Some(rgba(0x66676766).into()), editor_document_highlight_write_background: Some(rgba(0x66676766).into()),
terminal_background: Some(rgba(0x0d1017ff).into()), terminal_background: Some(rgba(0x0d1017ff).into()),
terminal_ansi_bright_black: Some(rgba(0x545557ff).into()), terminal_foreground: Some(rgba(0xbfbdb6ff).into()),
terminal_ansi_bright_red: Some(rgba(0x83363cff).into()), terminal_bright_foreground: Some(rgba(0xbfbdb6ff).into()),
terminal_ansi_bright_green: Some(rgba(0x567627ff).into()), terminal_dim_foreground: Some(rgba(0x0d1017ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x92592cff).into()),
terminal_ansi_bright_blue: Some(rgba(0x28628cff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x205b78ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x4c806fff).into()),
terminal_ansi_bright_white: Some(rgba(0xbfbdb6ff).into()),
terminal_ansi_black: Some(rgba(0x0d1017ff).into()), terminal_ansi_black: Some(rgba(0x0d1017ff).into()),
terminal_ansi_bright_black: Some(rgba(0x545557ff).into()),
terminal_ansi_dim_black: Some(rgba(0xbfbdb6ff).into()),
terminal_ansi_red: Some(rgba(0xef7178ff).into()), terminal_ansi_red: Some(rgba(0xef7178ff).into()),
terminal_ansi_bright_red: Some(rgba(0x83363cff).into()),
terminal_ansi_dim_red: Some(rgba(0xfebab9ff).into()),
terminal_ansi_green: Some(rgba(0xaad84cff).into()), terminal_ansi_green: Some(rgba(0xaad84cff).into()),
terminal_ansi_bright_green: Some(rgba(0x567627ff).into()),
terminal_ansi_dim_green: Some(rgba(0xd8eca8ff).into()),
terminal_ansi_yellow: Some(rgba(0xfeb454ff).into()), terminal_ansi_yellow: Some(rgba(0xfeb454ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x92592cff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xffd9aaff).into()),
terminal_ansi_blue: Some(rgba(0x5ac2feff).into()), terminal_ansi_blue: Some(rgba(0x5ac2feff).into()),
terminal_ansi_bright_blue: Some(rgba(0x28628cff).into()),
terminal_ansi_dim_blue: Some(rgba(0xb8e0ffff).into()),
terminal_ansi_magenta: Some(rgba(0x3abae5ff).into()), terminal_ansi_magenta: Some(rgba(0x3abae5ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x205b78ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xaddcf3ff).into()),
terminal_ansi_cyan: Some(rgba(0x95e5cbff).into()), terminal_ansi_cyan: Some(rgba(0x95e5cbff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x4c806fff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xccf3e5ff).into()),
terminal_ansi_white: Some(rgba(0xbfbdb6ff).into()), terminal_ansi_white: Some(rgba(0xbfbdb6ff).into()),
terminal_ansi_bright_white: Some(rgba(0xbfbdb6ff).into()),
terminal_ansi_dim_white: Some(rgba(0x787876ff).into()),
link_text_hover: Some(rgba(0x5ac2feff).into()), link_text_hover: Some(rgba(0x5ac2feff).into()),
..Default::default() ..Default::default()
}, },
@ -520,22 +531,33 @@ pub fn ayu() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x3b9ee51a).into()), editor_document_highlight_read_background: Some(rgba(0x3b9ee51a).into()),
editor_document_highlight_write_background: Some(rgba(0xacafb166).into()), editor_document_highlight_write_background: Some(rgba(0xacafb166).into()),
terminal_background: Some(rgba(0xfcfcfcff).into()), terminal_background: Some(rgba(0xfcfcfcff).into()),
terminal_ansi_bright_black: Some(rgba(0xbcbec0ff).into()), terminal_foreground: Some(rgba(0x5c6166ff).into()),
terminal_ansi_bright_red: Some(rgba(0xfebab6ff).into()), terminal_bright_foreground: Some(rgba(0x5c6166ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc7d98fff).into()), terminal_dim_foreground: Some(rgba(0xfcfcfcff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffd6a4ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xaccef3ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xb2d9e9ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xace0cbff).into()),
terminal_ansi_bright_white: Some(rgba(0x5c6166ff).into()),
terminal_ansi_black: Some(rgba(0xfcfcfcff).into()), terminal_ansi_black: Some(rgba(0xfcfcfcff).into()),
terminal_ansi_bright_black: Some(rgba(0xbcbec0ff).into()),
terminal_ansi_dim_black: Some(rgba(0x5c6166ff).into()),
terminal_ansi_red: Some(rgba(0xef7271ff).into()), terminal_ansi_red: Some(rgba(0xef7271ff).into()),
terminal_ansi_bright_red: Some(rgba(0xfebab6ff).into()),
terminal_ansi_dim_red: Some(rgba(0x833639ff).into()),
terminal_ansi_green: Some(rgba(0x86b305ff).into()), terminal_ansi_green: Some(rgba(0x86b305ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc7d98fff).into()),
terminal_ansi_dim_green: Some(rgba(0x445614ff).into()),
terminal_ansi_yellow: Some(rgba(0xf1ae4aff).into()), terminal_ansi_yellow: Some(rgba(0xf1ae4aff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffd6a4ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x8a5328ff).into()),
terminal_ansi_blue: Some(rgba(0x3b9ee5ff).into()), terminal_ansi_blue: Some(rgba(0x3b9ee5ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xaccef3ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x214d76ff).into()),
terminal_ansi_magenta: Some(rgba(0x56b4d3ff).into()), terminal_ansi_magenta: Some(rgba(0x56b4d3ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xb2d9e9ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x2f5669ff).into()),
terminal_ansi_cyan: Some(rgba(0x4dbf99ff).into()), terminal_ansi_cyan: Some(rgba(0x4dbf99ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xace0cbff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x2a5f4aff).into()),
terminal_ansi_white: Some(rgba(0x5c6166ff).into()), terminal_ansi_white: Some(rgba(0x5c6166ff).into()),
terminal_ansi_bright_white: Some(rgba(0x5c6166ff).into()),
terminal_ansi_dim_white: Some(rgba(0x9c9fa2ff).into()),
link_text_hover: Some(rgba(0x3b9ee5ff).into()), link_text_hover: Some(rgba(0x3b9ee5ff).into()),
..Default::default() ..Default::default()
}, },
@ -964,22 +986,33 @@ pub fn ayu() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x73cffe1a).into()), editor_document_highlight_read_background: Some(rgba(0x73cffe1a).into()),
editor_document_highlight_write_background: Some(rgba(0x787a7c66).into()), editor_document_highlight_write_background: Some(rgba(0x787a7c66).into()),
terminal_background: Some(rgba(0x242936ff).into()), terminal_background: Some(rgba(0x242936ff).into()),
terminal_ansi_bright_black: Some(rgba(0x67696eff).into()), terminal_foreground: Some(rgba(0xcccac2ff).into()),
terminal_ansi_bright_red: Some(rgba(0x83403dff).into()), terminal_bright_foreground: Some(rgba(0xcccac2ff).into()),
terminal_ansi_bright_green: Some(rgba(0x76993dff).into()), terminal_dim_foreground: Some(rgba(0x242936ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x937238ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x346e8dff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x2b6c7bff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x4c806fff).into()),
terminal_ansi_bright_white: Some(rgba(0xcccac2ff).into()),
terminal_ansi_black: Some(rgba(0x242936ff).into()), terminal_ansi_black: Some(rgba(0x242936ff).into()),
terminal_ansi_bright_black: Some(rgba(0x67696eff).into()),
terminal_ansi_dim_black: Some(rgba(0xcccac2ff).into()),
terminal_ansi_red: Some(rgba(0xf18779ff).into()), terminal_ansi_red: Some(rgba(0xf18779ff).into()),
terminal_ansi_bright_red: Some(rgba(0x83403dff).into()),
terminal_ansi_dim_red: Some(rgba(0xfec4baff).into()),
terminal_ansi_green: Some(rgba(0xd5fe80ff).into()), terminal_ansi_green: Some(rgba(0xd5fe80ff).into()),
terminal_ansi_bright_green: Some(rgba(0x76993dff).into()),
terminal_ansi_dim_green: Some(rgba(0xecffc1ff).into()),
terminal_ansi_yellow: Some(rgba(0xfed073ff).into()), terminal_ansi_yellow: Some(rgba(0xfed073ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x937238ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xffe7b9ff).into()),
terminal_ansi_blue: Some(rgba(0x73cffeff).into()), terminal_ansi_blue: Some(rgba(0x73cffeff).into()),
terminal_ansi_bright_blue: Some(rgba(0x346e8dff).into()),
terminal_ansi_dim_blue: Some(rgba(0xc1e7ffff).into()),
terminal_ansi_magenta: Some(rgba(0x5ccee5ff).into()), terminal_ansi_magenta: Some(rgba(0x5ccee5ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x2b6c7bff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xb7e7f2ff).into()),
terminal_ansi_cyan: Some(rgba(0x95e5cbff).into()), terminal_ansi_cyan: Some(rgba(0x95e5cbff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x4c806fff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xccf3e5ff).into()),
terminal_ansi_white: Some(rgba(0xcccac2ff).into()), terminal_ansi_white: Some(rgba(0xcccac2ff).into()),
terminal_ansi_bright_white: Some(rgba(0xcccac2ff).into()),
terminal_ansi_dim_white: Some(rgba(0x898a8aff).into()),
link_text_hover: Some(rgba(0x73cffeff).into()), link_text_hover: Some(rgba(0x73cffeff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -76,22 +76,33 @@ pub fn gruvbox() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x83a5981a).into()), editor_document_highlight_read_background: Some(rgba(0x83a5981a).into()),
editor_document_highlight_write_background: Some(rgba(0x92847466).into()), editor_document_highlight_write_background: Some(rgba(0x92847466).into()),
terminal_background: Some(rgba(0x282828ff).into()), terminal_background: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_black: Some(rgba(0x73675eff).into()), terminal_foreground: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_red: Some(rgba(0x93211eff).into()), terminal_bright_foreground: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_green: Some(rgba(0x615d1bff).into()), terminal_dim_foreground: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x91611cff).into()),
terminal_ansi_bright_blue: Some(rgba(0x414f4aff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x514a41ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x45603eff).into()),
terminal_ansi_bright_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_black: Some(rgba(0x282828ff).into()), terminal_ansi_black: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_black: Some(rgba(0x73675eff).into()),
terminal_ansi_dim_black: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_red: Some(rgba(0xfb4a35ff).into()), terminal_ansi_red: Some(rgba(0xfb4a35ff).into()),
terminal_ansi_bright_red: Some(rgba(0x93211eff).into()),
terminal_ansi_dim_red: Some(rgba(0xffaa95ff).into()),
terminal_ansi_green: Some(rgba(0xb8bb27ff).into()), terminal_ansi_green: Some(rgba(0xb8bb27ff).into()),
terminal_ansi_bright_green: Some(rgba(0x615d1bff).into()),
terminal_ansi_dim_green: Some(rgba(0xe0dc98ff).into()),
terminal_ansi_yellow: Some(rgba(0xf9bd30ff).into()), terminal_ansi_yellow: Some(rgba(0xf9bd30ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x91611cff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xffdd9cff).into()),
terminal_ansi_blue: Some(rgba(0x83a598ff).into()), terminal_ansi_blue: Some(rgba(0x83a598ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x414f4aff).into()),
terminal_ansi_dim_blue: Some(rgba(0xc0d2cbff).into()),
terminal_ansi_magenta: Some(rgba(0xa89984ff).into()), terminal_ansi_magenta: Some(rgba(0xa89984ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x514a41ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xd3cbc0ff).into()),
terminal_ansi_cyan: Some(rgba(0x8ec07cff).into()), terminal_ansi_cyan: Some(rgba(0x8ec07cff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x45603eff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xc7dfbdff).into()),
terminal_ansi_white: Some(rgba(0xfbf1c7ff).into()), terminal_ansi_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_dim_white: Some(rgba(0xb1a28aff).into()),
link_text_hover: Some(rgba(0x83a598ff).into()), link_text_hover: Some(rgba(0x83a598ff).into()),
..Default::default() ..Default::default()
}, },
@ -527,22 +538,33 @@ pub fn gruvbox() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x83a5981a).into()), editor_document_highlight_read_background: Some(rgba(0x83a5981a).into()),
editor_document_highlight_write_background: Some(rgba(0x92847466).into()), editor_document_highlight_write_background: Some(rgba(0x92847466).into()),
terminal_background: Some(rgba(0x1d2021ff).into()), terminal_background: Some(rgba(0x1d2021ff).into()),
terminal_ansi_bright_black: Some(rgba(0x73675eff).into()), terminal_foreground: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_red: Some(rgba(0x93211eff).into()), terminal_bright_foreground: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_green: Some(rgba(0x615d1bff).into()), terminal_dim_foreground: Some(rgba(0x1d2021ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x91611cff).into()),
terminal_ansi_bright_blue: Some(rgba(0x414f4aff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x514a41ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x45603eff).into()),
terminal_ansi_bright_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_black: Some(rgba(0x1d2021ff).into()), terminal_ansi_black: Some(rgba(0x1d2021ff).into()),
terminal_ansi_bright_black: Some(rgba(0x73675eff).into()),
terminal_ansi_dim_black: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_red: Some(rgba(0xfb4a35ff).into()), terminal_ansi_red: Some(rgba(0xfb4a35ff).into()),
terminal_ansi_bright_red: Some(rgba(0x93211eff).into()),
terminal_ansi_dim_red: Some(rgba(0xffaa95ff).into()),
terminal_ansi_green: Some(rgba(0xb8bb27ff).into()), terminal_ansi_green: Some(rgba(0xb8bb27ff).into()),
terminal_ansi_bright_green: Some(rgba(0x615d1bff).into()),
terminal_ansi_dim_green: Some(rgba(0xe0dc98ff).into()),
terminal_ansi_yellow: Some(rgba(0xf9bd30ff).into()), terminal_ansi_yellow: Some(rgba(0xf9bd30ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x91611cff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xffdd9cff).into()),
terminal_ansi_blue: Some(rgba(0x83a598ff).into()), terminal_ansi_blue: Some(rgba(0x83a598ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x414f4aff).into()),
terminal_ansi_dim_blue: Some(rgba(0xc0d2cbff).into()),
terminal_ansi_magenta: Some(rgba(0xa89984ff).into()), terminal_ansi_magenta: Some(rgba(0xa89984ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x514a41ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xd3cbc0ff).into()),
terminal_ansi_cyan: Some(rgba(0x8ec07cff).into()), terminal_ansi_cyan: Some(rgba(0x8ec07cff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x45603eff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xc7dfbdff).into()),
terminal_ansi_white: Some(rgba(0xfbf1c7ff).into()), terminal_ansi_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_dim_white: Some(rgba(0xb1a28aff).into()),
link_text_hover: Some(rgba(0x83a598ff).into()), link_text_hover: Some(rgba(0x83a598ff).into()),
..Default::default() ..Default::default()
}, },
@ -978,22 +1000,33 @@ pub fn gruvbox() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x83a5981a).into()), editor_document_highlight_read_background: Some(rgba(0x83a5981a).into()),
editor_document_highlight_write_background: Some(rgba(0x92847466).into()), editor_document_highlight_write_background: Some(rgba(0x92847466).into()),
terminal_background: Some(rgba(0x32302fff).into()), terminal_background: Some(rgba(0x32302fff).into()),
terminal_ansi_bright_black: Some(rgba(0x73675eff).into()), terminal_foreground: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_red: Some(rgba(0x93211eff).into()), terminal_bright_foreground: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_green: Some(rgba(0x615d1bff).into()), terminal_dim_foreground: Some(rgba(0x32302fff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x91611cff).into()),
terminal_ansi_bright_blue: Some(rgba(0x414f4aff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x514a41ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x45603eff).into()),
terminal_ansi_bright_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_black: Some(rgba(0x32302fff).into()), terminal_ansi_black: Some(rgba(0x32302fff).into()),
terminal_ansi_bright_black: Some(rgba(0x73675eff).into()),
terminal_ansi_dim_black: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_red: Some(rgba(0xfb4a35ff).into()), terminal_ansi_red: Some(rgba(0xfb4a35ff).into()),
terminal_ansi_bright_red: Some(rgba(0x93211eff).into()),
terminal_ansi_dim_red: Some(rgba(0xffaa95ff).into()),
terminal_ansi_green: Some(rgba(0xb8bb27ff).into()), terminal_ansi_green: Some(rgba(0xb8bb27ff).into()),
terminal_ansi_bright_green: Some(rgba(0x615d1bff).into()),
terminal_ansi_dim_green: Some(rgba(0xe0dc98ff).into()),
terminal_ansi_yellow: Some(rgba(0xf9bd30ff).into()), terminal_ansi_yellow: Some(rgba(0xf9bd30ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x91611cff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xffdd9cff).into()),
terminal_ansi_blue: Some(rgba(0x83a598ff).into()), terminal_ansi_blue: Some(rgba(0x83a598ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x414f4aff).into()),
terminal_ansi_dim_blue: Some(rgba(0xc0d2cbff).into()),
terminal_ansi_magenta: Some(rgba(0xa89984ff).into()), terminal_ansi_magenta: Some(rgba(0xa89984ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x514a41ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xd3cbc0ff).into()),
terminal_ansi_cyan: Some(rgba(0x8ec07cff).into()), terminal_ansi_cyan: Some(rgba(0x8ec07cff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x45603eff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xc7dfbdff).into()),
terminal_ansi_white: Some(rgba(0xfbf1c7ff).into()), terminal_ansi_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_white: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_dim_white: Some(rgba(0xb1a28aff).into()),
link_text_hover: Some(rgba(0x83a598ff).into()), link_text_hover: Some(rgba(0x83a598ff).into()),
..Default::default() ..Default::default()
}, },
@ -1429,22 +1462,33 @@ pub fn gruvbox() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x0b66781a).into()), editor_document_highlight_read_background: Some(rgba(0x0b66781a).into()),
editor_document_highlight_write_background: Some(rgba(0x92847466).into()), editor_document_highlight_write_background: Some(rgba(0x92847466).into()),
terminal_background: Some(rgba(0xfbf1c7ff).into()), terminal_background: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_black: Some(rgba(0xb1a28aff).into()), terminal_foreground: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdc8c7bff).into()), terminal_bright_foreground: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfb787ff).into()), terminal_dim_foreground: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2b88bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x8fb0baff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb5afff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fbca8ff).into()),
terminal_ansi_bright_white: Some(rgba(0x282828ff).into()),
terminal_ansi_black: Some(rgba(0xfbf1c7ff).into()), terminal_ansi_black: Some(rgba(0xfbf1c7ff).into()),
terminal_ansi_bright_black: Some(rgba(0xb1a28aff).into()),
terminal_ansi_dim_black: Some(rgba(0x282828ff).into()),
terminal_ansi_red: Some(rgba(0x9d0408ff).into()), terminal_ansi_red: Some(rgba(0x9d0408ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdc8c7bff).into()),
terminal_ansi_dim_red: Some(rgba(0x4f1207ff).into()),
terminal_ansi_green: Some(rgba(0x797410ff).into()), terminal_ansi_green: Some(rgba(0x797410ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfb787ff).into()),
terminal_ansi_dim_green: Some(rgba(0x3e3a11ff).into()),
terminal_ansi_yellow: Some(rgba(0xb57616ff).into()), terminal_ansi_yellow: Some(rgba(0xb57616ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2b88bff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x5c3b13ff).into()),
terminal_ansi_blue: Some(rgba(0x0b6678ff).into()), terminal_ansi_blue: Some(rgba(0x0b6678ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x8fb0baff).into()),
terminal_ansi_dim_blue: Some(rgba(0x14343cff).into()),
terminal_ansi_magenta: Some(rgba(0x7c6f64ff).into()), terminal_ansi_magenta: Some(rgba(0x7c6f64ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb5afff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x3e3833ff).into()),
terminal_ansi_cyan: Some(rgba(0x437b59ff).into()), terminal_ansi_cyan: Some(rgba(0x437b59ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fbca8ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x253e2eff).into()),
terminal_ansi_white: Some(rgba(0x282828ff).into()), terminal_ansi_white: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_white: Some(rgba(0x282828ff).into()),
terminal_ansi_dim_white: Some(rgba(0x73675eff).into()),
link_text_hover: Some(rgba(0x0b6678ff).into()), link_text_hover: Some(rgba(0x0b6678ff).into()),
..Default::default() ..Default::default()
}, },
@ -1880,22 +1924,33 @@ pub fn gruvbox() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x0b66781a).into()), editor_document_highlight_read_background: Some(rgba(0x0b66781a).into()),
editor_document_highlight_write_background: Some(rgba(0x92847466).into()), editor_document_highlight_write_background: Some(rgba(0x92847466).into()),
terminal_background: Some(rgba(0xf9f5d7ff).into()), terminal_background: Some(rgba(0xf9f5d7ff).into()),
terminal_ansi_bright_black: Some(rgba(0xb1a28aff).into()), terminal_foreground: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdc8c7bff).into()), terminal_bright_foreground: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfb787ff).into()), terminal_dim_foreground: Some(rgba(0xf9f5d7ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2b88bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x8fb0baff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb5afff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fbca8ff).into()),
terminal_ansi_bright_white: Some(rgba(0x282828ff).into()),
terminal_ansi_black: Some(rgba(0xf9f5d7ff).into()), terminal_ansi_black: Some(rgba(0xf9f5d7ff).into()),
terminal_ansi_bright_black: Some(rgba(0xb1a28aff).into()),
terminal_ansi_dim_black: Some(rgba(0x282828ff).into()),
terminal_ansi_red: Some(rgba(0x9d0408ff).into()), terminal_ansi_red: Some(rgba(0x9d0408ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdc8c7bff).into()),
terminal_ansi_dim_red: Some(rgba(0x4f1207ff).into()),
terminal_ansi_green: Some(rgba(0x797410ff).into()), terminal_ansi_green: Some(rgba(0x797410ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfb787ff).into()),
terminal_ansi_dim_green: Some(rgba(0x3e3a11ff).into()),
terminal_ansi_yellow: Some(rgba(0xb57616ff).into()), terminal_ansi_yellow: Some(rgba(0xb57616ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2b88bff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x5c3b13ff).into()),
terminal_ansi_blue: Some(rgba(0x0b6678ff).into()), terminal_ansi_blue: Some(rgba(0x0b6678ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x8fb0baff).into()),
terminal_ansi_dim_blue: Some(rgba(0x14343cff).into()),
terminal_ansi_magenta: Some(rgba(0x7c6f64ff).into()), terminal_ansi_magenta: Some(rgba(0x7c6f64ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb5afff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x3e3833ff).into()),
terminal_ansi_cyan: Some(rgba(0x437b59ff).into()), terminal_ansi_cyan: Some(rgba(0x437b59ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fbca8ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x253e2eff).into()),
terminal_ansi_white: Some(rgba(0x282828ff).into()), terminal_ansi_white: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_white: Some(rgba(0x282828ff).into()),
terminal_ansi_dim_white: Some(rgba(0x73675eff).into()),
link_text_hover: Some(rgba(0x0b6678ff).into()), link_text_hover: Some(rgba(0x0b6678ff).into()),
..Default::default() ..Default::default()
}, },
@ -2331,22 +2386,33 @@ pub fn gruvbox() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x0b66781a).into()), editor_document_highlight_read_background: Some(rgba(0x0b66781a).into()),
editor_document_highlight_write_background: Some(rgba(0x92847466).into()), editor_document_highlight_write_background: Some(rgba(0x92847466).into()),
terminal_background: Some(rgba(0xf2e5bcff).into()), terminal_background: Some(rgba(0xf2e5bcff).into()),
terminal_ansi_bright_black: Some(rgba(0xb1a28aff).into()), terminal_foreground: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdc8c7bff).into()), terminal_bright_foreground: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfb787ff).into()), terminal_dim_foreground: Some(rgba(0xf2e5bcff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2b88bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x8fb0baff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb5afff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fbca8ff).into()),
terminal_ansi_bright_white: Some(rgba(0x282828ff).into()),
terminal_ansi_black: Some(rgba(0xf2e5bcff).into()), terminal_ansi_black: Some(rgba(0xf2e5bcff).into()),
terminal_ansi_bright_black: Some(rgba(0xb1a28aff).into()),
terminal_ansi_dim_black: Some(rgba(0x282828ff).into()),
terminal_ansi_red: Some(rgba(0x9d0408ff).into()), terminal_ansi_red: Some(rgba(0x9d0408ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdc8c7bff).into()),
terminal_ansi_dim_red: Some(rgba(0x4f1207ff).into()),
terminal_ansi_green: Some(rgba(0x797410ff).into()), terminal_ansi_green: Some(rgba(0x797410ff).into()),
terminal_ansi_bright_green: Some(rgba(0xbfb787ff).into()),
terminal_ansi_dim_green: Some(rgba(0x3e3a11ff).into()),
terminal_ansi_yellow: Some(rgba(0xb57616ff).into()), terminal_ansi_yellow: Some(rgba(0xb57616ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe2b88bff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x5c3b13ff).into()),
terminal_ansi_blue: Some(rgba(0x0b6678ff).into()), terminal_ansi_blue: Some(rgba(0x0b6678ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x8fb0baff).into()),
terminal_ansi_dim_blue: Some(rgba(0x14343cff).into()),
terminal_ansi_magenta: Some(rgba(0x7c6f64ff).into()), terminal_ansi_magenta: Some(rgba(0x7c6f64ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb5afff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x3e3833ff).into()),
terminal_ansi_cyan: Some(rgba(0x437b59ff).into()), terminal_ansi_cyan: Some(rgba(0x437b59ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fbca8ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x253e2eff).into()),
terminal_ansi_white: Some(rgba(0x282828ff).into()), terminal_ansi_white: Some(rgba(0x282828ff).into()),
terminal_ansi_bright_white: Some(rgba(0x282828ff).into()),
terminal_ansi_dim_white: Some(rgba(0x73675eff).into()),
link_text_hover: Some(rgba(0x0b6678ff).into()), link_text_hover: Some(rgba(0x0b6678ff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -76,22 +76,33 @@ pub fn one() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x74ade81a).into()), editor_document_highlight_read_background: Some(rgba(0x74ade81a).into()),
editor_document_highlight_write_background: Some(rgba(0x555a6366).into()), editor_document_highlight_write_background: Some(rgba(0x555a6366).into()),
terminal_background: Some(rgba(0x282c34ff).into()), terminal_background: Some(rgba(0x282c34ff).into()),
terminal_ansi_bright_black: Some(rgba(0x525661ff).into()), terminal_foreground: Some(rgba(0xc8ccd4ff).into()),
terminal_ansi_bright_red: Some(rgba(0x673a3cff).into()), terminal_bright_foreground: Some(rgba(0xc8ccd4ff).into()),
terminal_ansi_bright_green: Some(rgba(0x4d6140ff).into()), terminal_dim_foreground: Some(rgba(0x282c34ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x786441ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x385378ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x5e2b26ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x3a565bff).into()),
terminal_ansi_bright_white: Some(rgba(0xc8ccd4ff).into()),
terminal_ansi_black: Some(rgba(0x282c34ff).into()), terminal_ansi_black: Some(rgba(0x282c34ff).into()),
terminal_ansi_bright_black: Some(rgba(0x525661ff).into()),
terminal_ansi_dim_black: Some(rgba(0xc8ccd4ff).into()),
terminal_ansi_red: Some(rgba(0xd07277ff).into()), terminal_ansi_red: Some(rgba(0xd07277ff).into()),
terminal_ansi_bright_red: Some(rgba(0x673a3cff).into()),
terminal_ansi_dim_red: Some(rgba(0xebb8b9ff).into()),
terminal_ansi_green: Some(rgba(0xa1c181ff).into()), terminal_ansi_green: Some(rgba(0xa1c181ff).into()),
terminal_ansi_bright_green: Some(rgba(0x4d6140ff).into()),
terminal_ansi_dim_green: Some(rgba(0xd1e0bfff).into()),
terminal_ansi_yellow: Some(rgba(0xdec184ff).into()), terminal_ansi_yellow: Some(rgba(0xdec184ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x786441ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xf1dfc1ff).into()),
terminal_ansi_blue: Some(rgba(0x74ade8ff).into()), terminal_ansi_blue: Some(rgba(0x74ade8ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x385378ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xbed5f4ff).into()),
terminal_ansi_magenta: Some(rgba(0xbe5046ff).into()), terminal_ansi_magenta: Some(rgba(0xbe5046ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x5e2b26ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xe6a79eff).into()),
terminal_ansi_cyan: Some(rgba(0x6fb4c0ff).into()), terminal_ansi_cyan: Some(rgba(0x6fb4c0ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x3a565bff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xb9d9dfff).into()),
terminal_ansi_white: Some(rgba(0xc8ccd4ff).into()), terminal_ansi_white: Some(rgba(0xc8ccd4ff).into()),
terminal_ansi_bright_white: Some(rgba(0xc8ccd4ff).into()),
terminal_ansi_dim_white: Some(rgba(0x575d65ff).into()),
link_text_hover: Some(rgba(0x74ade8ff).into()), link_text_hover: Some(rgba(0x74ade8ff).into()),
..Default::default() ..Default::default()
}, },
@ -527,22 +538,33 @@ pub fn one() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x5c79e21a).into()), editor_document_highlight_read_background: Some(rgba(0x5c79e21a).into()),
editor_document_highlight_write_background: Some(rgba(0xa3a3a466).into()), editor_document_highlight_write_background: Some(rgba(0xa3a3a466).into()),
terminal_background: Some(rgba(0xfafafaff).into()), terminal_background: Some(rgba(0xfafafaff).into()),
terminal_ansi_bright_black: Some(rgba(0xaaaaaaff).into()), terminal_foreground: Some(rgba(0x383a41ff).into()),
terminal_ansi_bright_red: Some(rgba(0xf0b0a4ff).into()), terminal_bright_foreground: Some(rgba(0x383a41ff).into()),
terminal_ansi_bright_green: Some(rgba(0xb2cfa9ff).into()), terminal_dim_foreground: Some(rgba(0xfafafaff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xf1dfc1ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb5baf2ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcea6d3ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa4bfdbff).into()),
terminal_ansi_bright_white: Some(rgba(0x383a41ff).into()),
terminal_ansi_black: Some(rgba(0xfafafaff).into()), terminal_ansi_black: Some(rgba(0xfafafaff).into()),
terminal_ansi_bright_black: Some(rgba(0xaaaaaaff).into()),
terminal_ansi_dim_black: Some(rgba(0x383a41ff).into()),
terminal_ansi_red: Some(rgba(0xd36151ff).into()), terminal_ansi_red: Some(rgba(0xd36151ff).into()),
terminal_ansi_bright_red: Some(rgba(0xf0b0a4ff).into()),
terminal_ansi_dim_red: Some(rgba(0x6f312aff).into()),
terminal_ansi_green: Some(rgba(0x669f59ff).into()), terminal_ansi_green: Some(rgba(0x669f59ff).into()),
terminal_ansi_bright_green: Some(rgba(0xb2cfa9ff).into()),
terminal_ansi_dim_green: Some(rgba(0x354d2eff).into()),
terminal_ansi_yellow: Some(rgba(0xdec184ff).into()), terminal_ansi_yellow: Some(rgba(0xdec184ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xf1dfc1ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x786441ff).into()),
terminal_ansi_blue: Some(rgba(0x5c79e2ff).into()), terminal_ansi_blue: Some(rgba(0x5c79e2ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb5baf2ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x2d3d75ff).into()),
terminal_ansi_magenta: Some(rgba(0x994fa6ff).into()), terminal_ansi_magenta: Some(rgba(0x994fa6ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcea6d3ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x4b2a50ff).into()),
terminal_ansi_cyan: Some(rgba(0x3b82b7ff).into()), terminal_ansi_cyan: Some(rgba(0x3b82b7ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa4bfdbff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x254058ff).into()),
terminal_ansi_white: Some(rgba(0x383a41ff).into()), terminal_ansi_white: Some(rgba(0x383a41ff).into()),
terminal_ansi_bright_white: Some(rgba(0x383a41ff).into()),
terminal_ansi_dim_white: Some(rgba(0x98989bff).into()),
link_text_hover: Some(rgba(0x5c79e2ff).into()), link_text_hover: Some(rgba(0x5c79e2ff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -76,22 +76,33 @@ pub fn rose_pine() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x9cced71a).into()), editor_document_highlight_read_background: Some(rgba(0x9cced71a).into()),
editor_document_highlight_write_background: Some(rgba(0x28253c66).into()), editor_document_highlight_write_background: Some(rgba(0x28253c66).into()),
terminal_background: Some(rgba(0x191724ff).into()), terminal_background: Some(rgba(0x191724ff).into()),
terminal_ansi_bright_black: Some(rgba(0x403d55ff).into()), terminal_foreground: Some(rgba(0xe0def4ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7e3647ff).into()), terminal_bright_foreground: Some(rgba(0xe0def4ff).into()),
terminal_ansi_bright_green: Some(rgba(0x31614fff).into()), terminal_dim_foreground: Some(rgba(0x191724ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8a653bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x566c70ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c3b47ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x203a46ff).into()),
terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_black: Some(rgba(0x191724ff).into()), terminal_ansi_black: Some(rgba(0x191724ff).into()),
terminal_ansi_bright_black: Some(rgba(0x403d55ff).into()),
terminal_ansi_dim_black: Some(rgba(0xe0def4ff).into()),
terminal_ansi_red: Some(rgba(0xea6f92ff).into()), terminal_ansi_red: Some(rgba(0xea6f92ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7e3647ff).into()),
terminal_ansi_dim_red: Some(rgba(0xfab9c7ff).into()),
terminal_ansi_green: Some(rgba(0x5dc2a3ff).into()), terminal_ansi_green: Some(rgba(0x5dc2a3ff).into()),
terminal_ansi_bright_green: Some(rgba(0x31614fff).into()),
terminal_ansi_dim_green: Some(rgba(0xb3e1d1ff).into()),
terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()), terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8a653bff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xfedfbbff).into()),
terminal_ansi_blue: Some(rgba(0x9cced7ff).into()), terminal_ansi_blue: Some(rgba(0x9cced7ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x566c70ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xcfe7ebff).into()),
terminal_ansi_magenta: Some(rgba(0x9d7691ff).into()), terminal_ansi_magenta: Some(rgba(0x9d7691ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c3b47ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xceb9c7ff).into()),
terminal_ansi_cyan: Some(rgba(0x32748fff).into()), terminal_ansi_cyan: Some(rgba(0x32748fff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x203a46ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x9cb7c6ff).into()),
terminal_ansi_white: Some(rgba(0xe0def4ff).into()), terminal_ansi_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_dim_white: Some(rgba(0x514e68ff).into()),
link_text_hover: Some(rgba(0x9cced7ff).into()), link_text_hover: Some(rgba(0x9cced7ff).into()),
..Default::default() ..Default::default()
}, },
@ -534,22 +545,33 @@ pub fn rose_pine() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x57949f1a).into()), editor_document_highlight_read_background: Some(rgba(0x57949f1a).into()),
editor_document_highlight_write_background: Some(rgba(0x9691a466).into()), editor_document_highlight_write_background: Some(rgba(0x9691a466).into()),
terminal_background: Some(rgba(0xfaf4edff).into()), terminal_background: Some(rgba(0xfaf4edff).into()),
terminal_ansi_bright_black: Some(rgba(0xb8b2baff).into()), terminal_foreground: Some(rgba(0x575279ff).into()),
terminal_ansi_bright_red: Some(rgba(0xdcb0bbff).into()), terminal_bright_foreground: Some(rgba(0x575279ff).into()),
terminal_ansi_bright_green: Some(rgba(0xa5d5c5ff).into()), terminal_dim_foreground: Some(rgba(0xfaf4edff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xfccd9bff).into()),
terminal_ansi_bright_blue: Some(rgba(0xacc9ceff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb1bdff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x97b1c0ff).into()),
terminal_ansi_bright_white: Some(rgba(0x575279ff).into()),
terminal_ansi_black: Some(rgba(0xfaf4edff).into()), terminal_ansi_black: Some(rgba(0xfaf4edff).into()),
terminal_ansi_bright_black: Some(rgba(0xb8b2baff).into()),
terminal_ansi_dim_black: Some(rgba(0x575279ff).into()),
terminal_ansi_red: Some(rgba(0xb4647aff).into()), terminal_ansi_red: Some(rgba(0xb4647aff).into()),
terminal_ansi_bright_red: Some(rgba(0xdcb0bbff).into()),
terminal_ansi_dim_red: Some(rgba(0x57333dff).into()),
terminal_ansi_green: Some(rgba(0x3eaa8eff).into()), terminal_ansi_green: Some(rgba(0x3eaa8eff).into()),
terminal_ansi_bright_green: Some(rgba(0xa5d5c5ff).into()),
terminal_ansi_dim_green: Some(rgba(0x265245ff).into()),
terminal_ansi_yellow: Some(rgba(0xe99d35ff).into()), terminal_ansi_yellow: Some(rgba(0xe99d35ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xfccd9bff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x854a1fff).into()),
terminal_ansi_blue: Some(rgba(0x57949fff).into()), terminal_ansi_blue: Some(rgba(0x57949fff).into()),
terminal_ansi_bright_blue: Some(rgba(0xacc9ceff).into()),
terminal_ansi_dim_blue: Some(rgba(0x2f484dff).into()),
terminal_ansi_magenta: Some(rgba(0x7c697fff).into()), terminal_ansi_magenta: Some(rgba(0x7c697fff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xbcb1bdff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x3e353fff).into()),
terminal_ansi_cyan: Some(rgba(0x2a6983ff).into()), terminal_ansi_cyan: Some(rgba(0x2a6983ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x97b1c0ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x1c3641ff).into()),
terminal_ansi_white: Some(rgba(0x575279ff).into()), terminal_ansi_white: Some(rgba(0x575279ff).into()),
terminal_ansi_bright_white: Some(rgba(0x575279ff).into()),
terminal_ansi_dim_white: Some(rgba(0x827e98ff).into()),
link_text_hover: Some(rgba(0x57949fff).into()), link_text_hover: Some(rgba(0x57949fff).into()),
..Default::default() ..Default::default()
}, },
@ -992,22 +1014,33 @@ pub fn rose_pine() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x9cced71a).into()), editor_document_highlight_read_background: Some(rgba(0x9cced71a).into()),
editor_document_highlight_write_background: Some(rgba(0x59557166).into()), editor_document_highlight_write_background: Some(rgba(0x59557166).into()),
terminal_background: Some(rgba(0x232136ff).into()), terminal_background: Some(rgba(0x232136ff).into()),
terminal_ansi_bright_black: Some(rgba(0x3f3b58ff).into()), terminal_foreground: Some(rgba(0xe0def4ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7e3647ff).into()), terminal_bright_foreground: Some(rgba(0xe0def4ff).into()),
terminal_ansi_bright_green: Some(rgba(0x31614fff).into()), terminal_dim_foreground: Some(rgba(0x232136ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8a653bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x566c70ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x51414eff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x264654ff).into()),
terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_black: Some(rgba(0x232136ff).into()), terminal_ansi_black: Some(rgba(0x232136ff).into()),
terminal_ansi_bright_black: Some(rgba(0x3f3b58ff).into()),
terminal_ansi_dim_black: Some(rgba(0xe0def4ff).into()),
terminal_ansi_red: Some(rgba(0xea6f92ff).into()), terminal_ansi_red: Some(rgba(0xea6f92ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7e3647ff).into()),
terminal_ansi_dim_red: Some(rgba(0xfab9c7ff).into()),
terminal_ansi_green: Some(rgba(0x5dc2a3ff).into()), terminal_ansi_green: Some(rgba(0x5dc2a3ff).into()),
terminal_ansi_bright_green: Some(rgba(0x31614fff).into()),
terminal_ansi_dim_green: Some(rgba(0xb3e1d1ff).into()),
terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()), terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8a653bff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xfedfbbff).into()),
terminal_ansi_blue: Some(rgba(0x9cced7ff).into()), terminal_ansi_blue: Some(rgba(0x9cced7ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x566c70ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xcfe7ebff).into()),
terminal_ansi_magenta: Some(rgba(0xa784a1ff).into()), terminal_ansi_magenta: Some(rgba(0xa784a1ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x51414eff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xd3c0cfff).into()),
terminal_ansi_cyan: Some(rgba(0x3f8fb0ff).into()), terminal_ansi_cyan: Some(rgba(0x3f8fb0ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x264654ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xa5c6d7ff).into()),
terminal_ansi_white: Some(rgba(0xe0def4ff).into()), terminal_ansi_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_dim_white: Some(rgba(0x75718eff).into()),
link_text_hover: Some(rgba(0x9cced7ff).into()), link_text_hover: Some(rgba(0x9cced7ff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -75,22 +75,33 @@ pub fn sandcastle() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x528b8b1a).into()), editor_document_highlight_read_background: Some(rgba(0x528b8b1a).into()),
editor_document_highlight_write_background: Some(rgba(0x7c6f6466).into()), editor_document_highlight_write_background: Some(rgba(0x7c6f6466).into()),
terminal_background: Some(rgba(0x282c34ff).into()), terminal_background: Some(rgba(0x282c34ff).into()),
terminal_ansi_bright_black: Some(rgba(0x5e5753ff).into()), terminal_foreground: Some(rgba(0xfdf4c1ff).into()),
terminal_ansi_bright_red: Some(rgba(0x57333dff).into()), terminal_bright_foreground: Some(rgba(0xfdf4c1ff).into()),
terminal_ansi_bright_green: Some(rgba(0x414f4aff).into()), terminal_dim_foreground: Some(rgba(0x282c34ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3f22ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x2c4444ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x523a18ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x414f4aff).into()),
terminal_ansi_bright_white: Some(rgba(0xfdf4c1ff).into()),
terminal_ansi_black: Some(rgba(0x282c34ff).into()), terminal_ansi_black: Some(rgba(0x282c34ff).into()),
terminal_ansi_bright_black: Some(rgba(0x5e5753ff).into()),
terminal_ansi_dim_black: Some(rgba(0xfdf4c1ff).into()),
terminal_ansi_red: Some(rgba(0xb4637aff).into()), terminal_ansi_red: Some(rgba(0xb4637aff).into()),
terminal_ansi_bright_red: Some(rgba(0x57333dff).into()),
terminal_ansi_dim_red: Some(rgba(0xdcb0bbff).into()),
terminal_ansi_green: Some(rgba(0x83a598ff).into()), terminal_ansi_green: Some(rgba(0x83a598ff).into()),
terminal_ansi_bright_green: Some(rgba(0x414f4aff).into()),
terminal_ansi_dim_green: Some(rgba(0xc0d2cbff).into()),
terminal_ansi_yellow: Some(rgba(0xa07e3bff).into()), terminal_ansi_yellow: Some(rgba(0xa07e3bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x4e3f22ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xd3bd9aff).into()),
terminal_ansi_blue: Some(rgba(0x528b8bff).into()), terminal_ansi_blue: Some(rgba(0x528b8bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x2c4444ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xa8c4c4ff).into()),
terminal_ansi_magenta: Some(rgba(0xa87323ff).into()), terminal_ansi_magenta: Some(rgba(0xa87323ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x523a18ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xdab78eff).into()),
terminal_ansi_cyan: Some(rgba(0x83a598ff).into()), terminal_ansi_cyan: Some(rgba(0x83a598ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x414f4aff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xc0d2cbff).into()),
terminal_ansi_white: Some(rgba(0xfdf4c1ff).into()), terminal_ansi_white: Some(rgba(0xfdf4c1ff).into()),
terminal_ansi_bright_white: Some(rgba(0xfdf4c1ff).into()),
terminal_ansi_dim_white: Some(rgba(0x968777ff).into()),
link_text_hover: Some(rgba(0x528b8bff).into()), link_text_hover: Some(rgba(0x528b8bff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -76,22 +76,33 @@ pub fn solarized() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x288bd11a).into()), editor_document_highlight_read_background: Some(rgba(0x288bd11a).into()),
editor_document_highlight_write_background: Some(rgba(0x6d828866).into()), editor_document_highlight_write_background: Some(rgba(0x6d828866).into()),
terminal_background: Some(rgba(0x002b36ff).into()), terminal_background: Some(rgba(0x002b36ff).into()),
terminal_ansi_bright_black: Some(rgba(0x5c7279ff).into()), terminal_foreground: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7d181cff).into()), terminal_bright_foreground: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_green: Some(rgba(0x434a11ff).into()), terminal_dim_foreground: Some(rgba(0x002b36ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x5d4310ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x214465ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x6f1f40ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x204e4aff).into()),
terminal_ansi_bright_white: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_black: Some(rgba(0x002b36ff).into()), terminal_ansi_black: Some(rgba(0x002b36ff).into()),
terminal_ansi_bright_black: Some(rgba(0x5c7279ff).into()),
terminal_ansi_dim_black: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_red: Some(rgba(0xdc3330ff).into()), terminal_ansi_red: Some(rgba(0xdc3330ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7d181cff).into()),
terminal_ansi_dim_red: Some(rgba(0xfaa091ff).into()),
terminal_ansi_green: Some(rgba(0x859904ff).into()), terminal_ansi_green: Some(rgba(0x859904ff).into()),
terminal_ansi_bright_green: Some(rgba(0x434a11ff).into()),
terminal_ansi_dim_green: Some(rgba(0xc6cb8bff).into()),
terminal_ansi_yellow: Some(rgba(0xb58903ff).into()), terminal_ansi_yellow: Some(rgba(0xb58903ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x5d4310ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xe1c28aff).into()),
terminal_ansi_blue: Some(rgba(0x288bd1ff).into()), terminal_ansi_blue: Some(rgba(0x288bd1ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x214465ff).into()),
terminal_ansi_dim_blue: Some(rgba(0xa5c3e9ff).into()),
terminal_ansi_magenta: Some(rgba(0xd33782ff).into()), terminal_ansi_magenta: Some(rgba(0xd33782ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x6f1f40ff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xf0a2bfff).into()),
terminal_ansi_cyan: Some(rgba(0x2ca198ff).into()), terminal_ansi_cyan: Some(rgba(0x2ca198ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x204e4aff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x9fd0cbff).into()),
terminal_ansi_white: Some(rgba(0xfdf6e3ff).into()), terminal_ansi_white: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_white: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_dim_white: Some(rgba(0x7b8e91ff).into()),
link_text_hover: Some(rgba(0x288bd1ff).into()), link_text_hover: Some(rgba(0x288bd1ff).into()),
..Default::default() ..Default::default()
}, },
@ -520,22 +531,33 @@ pub fn solarized() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x298bd11a).into()), editor_document_highlight_read_background: Some(rgba(0x298bd11a).into()),
editor_document_highlight_write_background: Some(rgba(0x6d828866).into()), editor_document_highlight_write_background: Some(rgba(0x6d828866).into()),
terminal_background: Some(rgba(0xfdf6e3ff).into()), terminal_background: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_black: Some(rgba(0x7b8e91ff).into()), terminal_foreground: Some(rgba(0x002b36ff).into()),
terminal_ansi_bright_red: Some(rgba(0xfaa091ff).into()), terminal_bright_foreground: Some(rgba(0x002b36ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc6cb8bff).into()), terminal_dim_foreground: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe1c28aff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa5c3e9ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf0a2bfff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fd0cbff).into()),
terminal_ansi_bright_white: Some(rgba(0x002b36ff).into()),
terminal_ansi_black: Some(rgba(0xfdf6e3ff).into()), terminal_ansi_black: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_black: Some(rgba(0x7b8e91ff).into()),
terminal_ansi_dim_black: Some(rgba(0x002b36ff).into()),
terminal_ansi_red: Some(rgba(0xdc3330ff).into()), terminal_ansi_red: Some(rgba(0xdc3330ff).into()),
terminal_ansi_bright_red: Some(rgba(0xfaa091ff).into()),
terminal_ansi_dim_red: Some(rgba(0x7d181cff).into()),
terminal_ansi_green: Some(rgba(0x859904ff).into()), terminal_ansi_green: Some(rgba(0x859904ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc6cb8bff).into()),
terminal_ansi_dim_green: Some(rgba(0x434a11ff).into()),
terminal_ansi_yellow: Some(rgba(0xb58904ff).into()), terminal_ansi_yellow: Some(rgba(0xb58904ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe1c28aff).into()),
terminal_ansi_dim_yellow: Some(rgba(0x5d4310ff).into()),
terminal_ansi_blue: Some(rgba(0x298bd1ff).into()), terminal_ansi_blue: Some(rgba(0x298bd1ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa5c3e9ff).into()),
terminal_ansi_dim_blue: Some(rgba(0x214465ff).into()),
terminal_ansi_magenta: Some(rgba(0xd33882ff).into()), terminal_ansi_magenta: Some(rgba(0xd33882ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf0a2bfff).into()),
terminal_ansi_dim_magenta: Some(rgba(0x6f1f40ff).into()),
terminal_ansi_cyan: Some(rgba(0x2ca198ff).into()), terminal_ansi_cyan: Some(rgba(0x2ca198ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fd0cbff).into()),
terminal_ansi_dim_cyan: Some(rgba(0x204e4aff).into()),
terminal_ansi_white: Some(rgba(0x002b36ff).into()), terminal_ansi_white: Some(rgba(0x002b36ff).into()),
terminal_ansi_bright_white: Some(rgba(0x002b36ff).into()),
terminal_ansi_dim_white: Some(rgba(0x5c7279ff).into()),
link_text_hover: Some(rgba(0x298bd1ff).into()), link_text_hover: Some(rgba(0x298bd1ff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -75,22 +75,33 @@ pub fn summercamp() -> UserThemeFamily {
editor_document_highlight_read_background: Some(rgba(0x499bef1a).into()), editor_document_highlight_read_background: Some(rgba(0x499bef1a).into()),
editor_document_highlight_write_background: Some(rgba(0x49443366).into()), editor_document_highlight_write_background: Some(rgba(0x49443366).into()),
terminal_background: Some(rgba(0x1c1810ff).into()), terminal_background: Some(rgba(0x1c1810ff).into()),
terminal_ansi_bright_black: Some(rgba(0x3b3627ff).into()), terminal_foreground: Some(rgba(0xf8f5deff).into()),
terminal_ansi_bright_red: Some(rgba(0x7f2724ff).into()), terminal_bright_foreground: Some(rgba(0xf8f5deff).into()),
terminal_ansi_bright_green: Some(rgba(0x28842cff).into()), terminal_dim_foreground: Some(rgba(0x1c1810ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8c9a10ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x234b7fff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x88487eff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x298462ff).into()),
terminal_ansi_bright_white: Some(rgba(0xf8f5deff).into()),
terminal_ansi_black: Some(rgba(0x1c1810ff).into()), terminal_ansi_black: Some(rgba(0x1c1810ff).into()),
terminal_ansi_bright_black: Some(rgba(0x3b3627ff).into()),
terminal_ansi_dim_black: Some(rgba(0xf8f5deff).into()),
terminal_ansi_red: Some(rgba(0xe35142ff).into()), terminal_ansi_red: Some(rgba(0xe35142ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7f2724ff).into()),
terminal_ansi_dim_red: Some(rgba(0xfbab9cff).into()),
terminal_ansi_green: Some(rgba(0x5dea5aff).into()), terminal_ansi_green: Some(rgba(0x5dea5aff).into()),
terminal_ansi_bright_green: Some(rgba(0x28842cff).into()),
terminal_ansi_dim_green: Some(rgba(0xb9f7aeff).into()),
terminal_ansi_yellow: Some(rgba(0xf1fe29ff).into()), terminal_ansi_yellow: Some(rgba(0xf1fe29ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8c9a10ff).into()),
terminal_ansi_dim_yellow: Some(rgba(0xffffa2ff).into()),
terminal_ansi_blue: Some(rgba(0x499befff).into()), terminal_ansi_blue: Some(rgba(0x499befff).into()),
terminal_ansi_bright_blue: Some(rgba(0x234b7fff).into()),
terminal_ansi_dim_blue: Some(rgba(0xb1ccf8ff).into()),
terminal_ansi_magenta: Some(rgba(0xf59be6ff).into()), terminal_ansi_magenta: Some(rgba(0xf59be6ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x88487eff).into()),
terminal_ansi_dim_magenta: Some(rgba(0xfccef3ff).into()),
terminal_ansi_cyan: Some(rgba(0x5beabcff).into()), terminal_ansi_cyan: Some(rgba(0x5beabcff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x298462ff).into()),
terminal_ansi_dim_cyan: Some(rgba(0xb7f6ddff).into()),
terminal_ansi_white: Some(rgba(0xf8f5deff).into()), terminal_ansi_white: Some(rgba(0xf8f5deff).into()),
terminal_ansi_bright_white: Some(rgba(0xf8f5deff).into()),
terminal_ansi_dim_white: Some(rgba(0x57533fff).into()),
link_text_hover: Some(rgba(0x499befff).into()), link_text_hover: Some(rgba(0x499befff).into()),
..Default::default() ..Default::default()
}, },

View file

@ -244,43 +244,60 @@ impl<'a> Debug for ThemeColorsRefinementPrinter<'a> {
self.0.editor_document_highlight_write_background, self.0.editor_document_highlight_write_background,
), ),
("terminal_background", self.0.terminal_background), ("terminal_background", self.0.terminal_background),
("terminal_foreground", self.0.terminal_foreground),
(
"terminal_bright_foreground",
self.0.terminal_bright_foreground,
),
("terminal_dim_foreground", self.0.terminal_dim_foreground),
("terminal_ansi_black", self.0.terminal_ansi_black),
( (
"terminal_ansi_bright_black", "terminal_ansi_bright_black",
self.0.terminal_ansi_bright_black, self.0.terminal_ansi_bright_black,
), ),
("terminal_ansi_dim_black", self.0.terminal_ansi_dim_black),
("terminal_ansi_red", self.0.terminal_ansi_red),
("terminal_ansi_bright_red", self.0.terminal_ansi_bright_red), ("terminal_ansi_bright_red", self.0.terminal_ansi_bright_red),
("terminal_ansi_dim_red", self.0.terminal_ansi_dim_red),
("terminal_ansi_green", self.0.terminal_ansi_green),
( (
"terminal_ansi_bright_green", "terminal_ansi_bright_green",
self.0.terminal_ansi_bright_green, self.0.terminal_ansi_bright_green,
), ),
("terminal_ansi_dim_green", self.0.terminal_ansi_dim_green),
("terminal_ansi_yellow", self.0.terminal_ansi_yellow),
( (
"terminal_ansi_bright_yellow", "terminal_ansi_bright_yellow",
self.0.terminal_ansi_bright_yellow, self.0.terminal_ansi_bright_yellow,
), ),
("terminal_ansi_dim_yellow", self.0.terminal_ansi_dim_yellow),
("terminal_ansi_blue", self.0.terminal_ansi_blue),
( (
"terminal_ansi_bright_blue", "terminal_ansi_bright_blue",
self.0.terminal_ansi_bright_blue, self.0.terminal_ansi_bright_blue,
), ),
("terminal_ansi_dim_blue", self.0.terminal_ansi_dim_blue),
("terminal_ansi_magenta", self.0.terminal_ansi_magenta),
( (
"terminal_ansi_bright_magenta", "terminal_ansi_bright_magenta",
self.0.terminal_ansi_bright_magenta, self.0.terminal_ansi_bright_magenta,
), ),
(
"terminal_ansi_dim_magenta",
self.0.terminal_ansi_dim_magenta,
),
("terminal_ansi_cyan", self.0.terminal_ansi_cyan),
( (
"terminal_ansi_bright_cyan", "terminal_ansi_bright_cyan",
self.0.terminal_ansi_bright_cyan, self.0.terminal_ansi_bright_cyan,
), ),
("terminal_ansi_dim_cyan", self.0.terminal_ansi_dim_cyan),
("terminal_ansi_white", self.0.terminal_ansi_white),
( (
"terminal_ansi_bright_white", "terminal_ansi_bright_white",
self.0.terminal_ansi_bright_white, self.0.terminal_ansi_bright_white,
), ),
("terminal_ansi_black", self.0.terminal_ansi_black), ("terminal_ansi_dim_white", self.0.terminal_ansi_dim_white),
("terminal_ansi_red", self.0.terminal_ansi_red),
("terminal_ansi_green", self.0.terminal_ansi_green),
("terminal_ansi_yellow", self.0.terminal_ansi_yellow),
("terminal_ansi_blue", self.0.terminal_ansi_blue),
("terminal_ansi_magenta", self.0.terminal_ansi_magenta),
("terminal_ansi_cyan", self.0.terminal_ansi_cyan),
("terminal_ansi_white", self.0.terminal_ansi_white),
("link_text_hover", self.0.link_text_hover), ("link_text_hover", self.0.link_text_hover),
]; ];

View file

@ -250,22 +250,33 @@ impl Zed1ThemeConverter {
editor.document_highlight_write_background, editor.document_highlight_write_background,
), ),
terminal_background: convert(terminal.background), terminal_background: convert(terminal.background),
terminal_ansi_bright_black: convert(terminal.bright_black), terminal_foreground: convert(terminal.foreground),
terminal_ansi_bright_red: convert(terminal.bright_red), terminal_bright_foreground: convert(terminal.bright_foreground),
terminal_ansi_bright_green: convert(terminal.bright_green), terminal_dim_foreground: convert(terminal.dim_foreground),
terminal_ansi_bright_yellow: convert(terminal.bright_yellow),
terminal_ansi_bright_blue: convert(terminal.bright_blue),
terminal_ansi_bright_magenta: convert(terminal.bright_magenta),
terminal_ansi_bright_cyan: convert(terminal.bright_cyan),
terminal_ansi_bright_white: convert(terminal.bright_white),
terminal_ansi_black: convert(terminal.black), terminal_ansi_black: convert(terminal.black),
terminal_ansi_bright_black: convert(terminal.bright_black),
terminal_ansi_dim_black: convert(terminal.dim_black),
terminal_ansi_red: convert(terminal.red), terminal_ansi_red: convert(terminal.red),
terminal_ansi_bright_red: convert(terminal.bright_red),
terminal_ansi_dim_red: convert(terminal.dim_red),
terminal_ansi_green: convert(terminal.green), terminal_ansi_green: convert(terminal.green),
terminal_ansi_bright_green: convert(terminal.bright_green),
terminal_ansi_dim_green: convert(terminal.dim_green),
terminal_ansi_yellow: convert(terminal.yellow), terminal_ansi_yellow: convert(terminal.yellow),
terminal_ansi_bright_yellow: convert(terminal.bright_yellow),
terminal_ansi_dim_yellow: convert(terminal.dim_yellow),
terminal_ansi_blue: convert(terminal.blue), terminal_ansi_blue: convert(terminal.blue),
terminal_ansi_bright_blue: convert(terminal.bright_blue),
terminal_ansi_dim_blue: convert(terminal.dim_blue),
terminal_ansi_magenta: convert(terminal.magenta), terminal_ansi_magenta: convert(terminal.magenta),
terminal_ansi_bright_magenta: convert(terminal.bright_magenta),
terminal_ansi_dim_magenta: convert(terminal.dim_magenta),
terminal_ansi_cyan: convert(terminal.cyan), terminal_ansi_cyan: convert(terminal.cyan),
terminal_ansi_bright_cyan: convert(terminal.bright_cyan),
terminal_ansi_dim_cyan: convert(terminal.dim_cyan),
terminal_ansi_white: convert(terminal.white), terminal_ansi_white: convert(terminal.white),
terminal_ansi_bright_white: convert(terminal.bright_white),
terminal_ansi_dim_white: convert(terminal.dim_white),
link_text_hover: convert(highest.accent.default.foreground), link_text_hover: convert(highest.accent.default.foreground),
}) })
} }

View file

@ -37,7 +37,7 @@ pub struct Label {
} }
impl Label { impl Label {
/// Create a new [`Label`] with the given text. /// Creates a new [`Label`] with the given text.
/// ///
/// # Examples /// # Examples
/// ///

View file

@ -222,17 +222,19 @@ impl RenderOnce for ListItem {
})) }))
.child( .child(
h_flex() h_flex()
// HACK: We need to set *any* width value here in order for this container to size correctly. .flex_grow()
// Without this the `h_flex` will overflow the parent `inner_list_item`. .flex_shrink_0()
.w_px() .flex_basis(relative(0.25))
.flex_1()
.gap_1() .gap_1()
.overflow_hidden()
.children(self.start_slot) .children(self.start_slot)
.children(self.children), .children(self.children),
) )
.when_some(self.end_slot, |this, end_slot| { .when_some(self.end_slot, |this, end_slot| {
this.justify_between().child( this.justify_between().child(
h_flex() h_flex()
.flex_shrink()
.overflow_hidden()
.when(self.end_hover_slot.is_some(), |this| { .when(self.end_hover_slot.is_some(), |this| {
this.visible() this.visible()
.group_hover("list_item", |this| this.invisible()) .group_hover("list_item", |this| this.invisible())

View file

@ -4,6 +4,8 @@ use story::Story;
use crate::{prelude::*, Avatar}; use crate::{prelude::*, Avatar};
use crate::{IconName, ListItem}; use crate::{IconName, ListItem};
const OVERFLOWING_TEXT: &'static str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mauris ligula, luctus vel dignissim eu, vestibulum sed libero. Sed at convallis velit.";
pub struct ListItemStory; pub struct ListItemStory;
impl Render for ListItemStory { impl Render for ListItemStory {
@ -98,5 +100,29 @@ impl Render for ListItemStory {
println!("Right mouse down!"); println!("Right mouse down!");
}), }),
) )
.child(Story::label("With overflowing content in the `end_slot`"))
.child(
ListItem::new("with_overflowing_content_in_end_slot")
.child("An excerpt")
.end_slot(Label::new(OVERFLOWING_TEXT).color(Color::Muted)),
)
.child(Story::label(
"`inset` with overflowing content in the `end_slot`",
))
.child(
ListItem::new("inset_with_overflowing_content_in_end_slot")
.inset(true)
.child("An excerpt")
.end_slot(Label::new(OVERFLOWING_TEXT).color(Color::Muted)),
)
.child(Story::label(
"`inset` with overflowing content in `children` and `end_slot`",
))
.child(
ListItem::new("inset_with_overflowing_content_in_children_and_end_slot")
.inset(true)
.child(Label::new(OVERFLOWING_TEXT))
.end_slot(Label::new(OVERFLOWING_TEXT).color(Color::Muted)),
)
} }
} }

View file

@ -11,6 +11,7 @@ use workspace::Workspace;
use crate::{ use crate::{
normal::normal_motion, normal::normal_motion,
state::{Mode, Operator}, state::{Mode, Operator},
utils::coerce_punctuation,
visual::visual_motion, visual::visual_motion,
Vim, Vim,
}; };
@ -680,8 +681,8 @@ pub(crate) fn next_word_start(
for _ in 0..times { for _ in 0..times {
let mut crossed_newline = false; let mut crossed_newline = false;
point = movement::find_boundary(map, point, FindRange::MultiLine, |left, right| { point = movement::find_boundary(map, point, FindRange::MultiLine, |left, right| {
let left_kind = char_kind(&scope, left).coerce_punctuation(ignore_punctuation); let left_kind = coerce_punctuation(char_kind(&scope, left), ignore_punctuation);
let right_kind = char_kind(&scope, right).coerce_punctuation(ignore_punctuation); let right_kind = coerce_punctuation(char_kind(&scope, right), ignore_punctuation);
let at_newline = right == '\n'; let at_newline = right == '\n';
let found = (left_kind != right_kind && right_kind != CharKind::Whitespace) let found = (left_kind != right_kind && right_kind != CharKind::Whitespace)
@ -710,8 +711,8 @@ fn next_word_end(
*point.column_mut() = 0; *point.column_mut() = 0;
} }
point = movement::find_boundary(map, point, FindRange::MultiLine, |left, right| { point = movement::find_boundary(map, point, FindRange::MultiLine, |left, right| {
let left_kind = char_kind(&scope, left).coerce_punctuation(ignore_punctuation); let left_kind = coerce_punctuation(char_kind(&scope, left), ignore_punctuation);
let right_kind = char_kind(&scope, right).coerce_punctuation(ignore_punctuation); let right_kind = coerce_punctuation(char_kind(&scope, right), ignore_punctuation);
left_kind != right_kind && left_kind != CharKind::Whitespace left_kind != right_kind && left_kind != CharKind::Whitespace
}); });
@ -743,8 +744,8 @@ fn previous_word_start(
// cursor because the newline is checked only once. // cursor because the newline is checked only once.
point = point =
movement::find_preceding_boundary(map, point, FindRange::MultiLine, |left, right| { movement::find_preceding_boundary(map, point, FindRange::MultiLine, |left, right| {
let left_kind = char_kind(&scope, left).coerce_punctuation(ignore_punctuation); let left_kind = coerce_punctuation(char_kind(&scope, left), ignore_punctuation);
let right_kind = char_kind(&scope, right).coerce_punctuation(ignore_punctuation); let right_kind = coerce_punctuation(char_kind(&scope, right), ignore_punctuation);
(left_kind != right_kind && !right.is_whitespace()) || left == '\n' (left_kind != right_kind && !right.is_whitespace()) || left == '\n'
}); });

View file

@ -1,4 +1,10 @@
use crate::{motion::Motion, object::Object, state::Mode, utils::copy_selections_content, Vim}; use crate::{
motion::Motion,
object::Object,
state::Mode,
utils::{coerce_punctuation, copy_selections_content},
Vim,
};
use editor::{ use editor::{
display_map::DisplaySnapshot, display_map::DisplaySnapshot,
movement::{self, FindRange, TextLayoutDetails}, movement::{self, FindRange, TextLayoutDetails},
@ -102,9 +108,9 @@ fn expand_changed_word_selection(
if in_word { if in_word {
selection.end = selection.end =
movement::find_boundary(map, selection.end, FindRange::MultiLine, |left, right| { movement::find_boundary(map, selection.end, FindRange::MultiLine, |left, right| {
let left_kind = char_kind(&scope, left).coerce_punctuation(ignore_punctuation); let left_kind = coerce_punctuation(char_kind(&scope, left), ignore_punctuation);
let right_kind = let right_kind =
char_kind(&scope, right).coerce_punctuation(ignore_punctuation); coerce_punctuation(char_kind(&scope, right), ignore_punctuation);
left_kind != right_kind && left_kind != CharKind::Whitespace left_kind != right_kind && left_kind != CharKind::Whitespace
}); });

View file

@ -10,7 +10,10 @@ use language::{char_kind, CharKind, Selection};
use serde::Deserialize; use serde::Deserialize;
use workspace::Workspace; use workspace::Workspace;
use crate::{motion::right, normal::normal_object, state::Mode, visual::visual_object, Vim}; use crate::{
motion::right, normal::normal_object, state::Mode, utils::coerce_punctuation,
visual::visual_object, Vim,
};
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq)]
pub enum Object { pub enum Object {
@ -195,9 +198,10 @@ impl Object {
} }
} }
/// Return a range that surrounds the word relative_to is in /// Returns a range that surrounds the word `relative_to` is in.
/// If relative_to is at the start of a word, return the word. ///
/// If relative_to is between words, return the space between /// If `relative_to` is at the start of a word, return the word.
/// If `relative_to` is between words, return the space between.
fn in_word( fn in_word(
map: &DisplaySnapshot, map: &DisplaySnapshot,
relative_to: DisplayPoint, relative_to: DisplayPoint,
@ -212,24 +216,25 @@ fn in_word(
right(map, relative_to, 1), right(map, relative_to, 1),
movement::FindRange::SingleLine, movement::FindRange::SingleLine,
|left, right| { |left, right| {
char_kind(&scope, left).coerce_punctuation(ignore_punctuation) coerce_punctuation(char_kind(&scope, left), ignore_punctuation)
!= char_kind(&scope, right).coerce_punctuation(ignore_punctuation) != coerce_punctuation(char_kind(&scope, right), ignore_punctuation)
}, },
); );
let end = movement::find_boundary(map, relative_to, FindRange::SingleLine, |left, right| { let end = movement::find_boundary(map, relative_to, FindRange::SingleLine, |left, right| {
char_kind(&scope, left).coerce_punctuation(ignore_punctuation) coerce_punctuation(char_kind(&scope, left), ignore_punctuation)
!= char_kind(&scope, right).coerce_punctuation(ignore_punctuation) != coerce_punctuation(char_kind(&scope, right), ignore_punctuation)
}); });
Some(start..end) Some(start..end)
} }
/// Return a range that surrounds the word and following whitespace /// Returns a range that surrounds the word and following whitespace
/// relative_to is in. /// relative_to is in.
/// If relative_to is at the start of a word, return the word and following whitespace. ///
/// If relative_to is between words, return the whitespace back and the following word /// If `relative_to` is at the start of a word, return the word and following whitespace.
/// If `relative_to` is between words, return the whitespace back and the following word.
///
/// if in word /// if in word
/// delete that word /// delete that word
/// if there is whitespace following the word, delete that as well /// if there is whitespace following the word, delete that as well
@ -281,15 +286,15 @@ fn around_next_word(
right(map, relative_to, 1), right(map, relative_to, 1),
FindRange::SingleLine, FindRange::SingleLine,
|left, right| { |left, right| {
char_kind(&scope, left).coerce_punctuation(ignore_punctuation) coerce_punctuation(char_kind(&scope, left), ignore_punctuation)
!= char_kind(&scope, right).coerce_punctuation(ignore_punctuation) != coerce_punctuation(char_kind(&scope, right), ignore_punctuation)
}, },
); );
let mut word_found = false; let mut word_found = false;
let end = movement::find_boundary(map, relative_to, FindRange::MultiLine, |left, right| { let end = movement::find_boundary(map, relative_to, FindRange::MultiLine, |left, right| {
let left_kind = char_kind(&scope, left).coerce_punctuation(ignore_punctuation); let left_kind = coerce_punctuation(char_kind(&scope, left), ignore_punctuation);
let right_kind = char_kind(&scope, right).coerce_punctuation(ignore_punctuation); let right_kind = coerce_punctuation(char_kind(&scope, right), ignore_punctuation);
let found = (word_found && left_kind != right_kind) || right == '\n' && left == '\n'; let found = (word_found && left_kind != right_kind) || right == '\n' && left == '\n';

View file

@ -1,6 +1,6 @@
use editor::{ClipboardSelection, Editor}; use editor::{ClipboardSelection, Editor};
use gpui::{AppContext, ClipboardItem}; use gpui::{AppContext, ClipboardItem};
use language::Point; use language::{CharKind, Point};
pub fn copy_selections_content(editor: &mut Editor, linewise: bool, cx: &mut AppContext) { pub fn copy_selections_content(editor: &mut Editor, linewise: bool, cx: &mut AppContext) {
let selections = editor.selections.all_adjusted(cx); let selections = editor.selections.all_adjusted(cx);
@ -48,3 +48,11 @@ pub fn copy_selections_content(editor: &mut Editor, linewise: bool, cx: &mut App
cx.write_to_clipboard(ClipboardItem::new(text).with_metadata(clipboard_selections)); cx.write_to_clipboard(ClipboardItem::new(text).with_metadata(clipboard_selections));
} }
pub fn coerce_punctuation(kind: CharKind, treat_punctuation_as_word: bool) -> CharKind {
if treat_punctuation_as_word && kind == CharKind::Punctuation {
CharKind::Word
} else {
kind
}
}

View file

@ -19,5 +19,6 @@ export ZED_IMAGE_ID=${image_id}
target_zed_kube_cluster target_zed_kube_cluster
envsubst < crates/collab/k8s/collab.template.yml | kubectl apply -f - envsubst < crates/collab/k8s/collab.template.yml | kubectl apply -f -
kubectl -n "$environment" rollout status deployment/collab --watch
echo "deployed collab v${version} to ${environment}" echo "deployed collab v${version} to ${environment}"