chore: Extract languages from zed crate (#8270)
- Moves languages module from `zed` into a separate crate. That way we have less of a long pole at the end of compilation. - Removes moot dependencies on editor/picker. This is totally harmless and might help in the future if we decide to decouple picker from editor. Before: ``` Number of crates that depend on 'picker' but not on 'editor': 1 Total number of crates that depend on 'picker': 13 Total number of crates that depend on 'editor': 30 ``` After: ``` Number of crates that depend on 'picker' but not on 'editor': 5 Total number of crates that depend on 'picker': 12 Total number of crates that depend on 'editor': 26 ``` The more crates depend on just picker but not editor, the better in that case. Release Notes: - N/A
This commit is contained in:
@@ -2,10 +2,11 @@ use super::{
|
||||
wrap_map::{self, WrapEdit, WrapPoint, WrapSnapshot},
|
||||
Highlights,
|
||||
};
|
||||
use crate::{Anchor, Editor, EditorStyle, ExcerptId, ExcerptRange, GutterDimensions, ToPoint as _};
|
||||
use crate::{EditorStyle, GutterDimensions};
|
||||
use collections::{Bound, HashMap, HashSet};
|
||||
use gpui::{AnyElement, ElementContext, Pixels, View};
|
||||
use gpui::{AnyElement, ElementContext, Pixels};
|
||||
use language::{BufferSnapshot, Chunk, Patch, Point};
|
||||
use multi_buffer::{Anchor, ExcerptId, ExcerptRange, ToPoint as _};
|
||||
use parking_lot::Mutex;
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
@@ -85,7 +86,6 @@ pub enum BlockStyle {
|
||||
|
||||
pub struct BlockContext<'a, 'b> {
|
||||
pub context: &'b mut ElementContext<'a>,
|
||||
pub view: View<Editor>,
|
||||
pub anchor_x: Pixels,
|
||||
pub max_width: Pixels,
|
||||
pub gutter_dimensions: &'b GutterDimensions,
|
||||
|
||||
@@ -2,9 +2,9 @@ use super::{
|
||||
inlay_map::{InlayBufferRows, InlayChunks, InlayEdit, InlayOffset, InlayPoint, InlaySnapshot},
|
||||
Highlights,
|
||||
};
|
||||
use crate::{Anchor, AnchorRangeExt, MultiBufferSnapshot, ToOffset};
|
||||
use gpui::{ElementId, HighlightStyle, Hsla};
|
||||
use language::{Chunk, Edit, Point, TextSummary};
|
||||
use multi_buffer::{Anchor, AnchorRangeExt, MultiBufferSnapshot, ToOffset};
|
||||
use std::{
|
||||
any::TypeId,
|
||||
cmp::{self, Ordering},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{Anchor, InlayId, MultiBufferSnapshot, ToOffset};
|
||||
use crate::InlayId;
|
||||
use collections::{BTreeMap, BTreeSet};
|
||||
use gpui::HighlightStyle;
|
||||
use language::{Chunk, Edit, Point, TextSummary};
|
||||
use multi_buffer::{MultiBufferChunks, MultiBufferRows};
|
||||
use multi_buffer::{Anchor, MultiBufferChunks, MultiBufferRows, MultiBufferSnapshot, ToOffset};
|
||||
use std::{
|
||||
any::TypeId,
|
||||
cmp,
|
||||
|
||||
@@ -2,8 +2,8 @@ use super::{
|
||||
fold_map::{self, FoldChunks, FoldEdit, FoldPoint, FoldSnapshot},
|
||||
Highlights,
|
||||
};
|
||||
use crate::MultiBufferSnapshot;
|
||||
use language::{Chunk, Point};
|
||||
use multi_buffer::MultiBufferSnapshot;
|
||||
use std::{cmp, mem, num::NonZeroU32, ops::Range};
|
||||
use sum_tree::Bias;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ use super::{
|
||||
tab_map::{self, TabEdit, TabPoint, TabSnapshot},
|
||||
Highlights,
|
||||
};
|
||||
use crate::MultiBufferSnapshot;
|
||||
use gpui::{AppContext, Context, Font, LineWrapper, Model, ModelContext, Pixels, Task};
|
||||
use language::{Chunk, Point};
|
||||
use lazy_static::lazy_static;
|
||||
use multi_buffer::MultiBufferSnapshot;
|
||||
use smol::future::yield_now;
|
||||
use std::{cmp, collections::VecDeque, mem, ops::Range, time::Duration};
|
||||
use sum_tree::{Bias, Cursor, SumTree};
|
||||
|
||||
Reference in New Issue
Block a user