Avoid accidental gpui transitive dependency in collab
* Make Fs depend on Text, not vise versa Co-authored-by: Joseph <joseph@zed.dev> Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
feb7a8a0f4
commit
46429426ef
15 changed files with 85 additions and 87 deletions
|
@ -15,7 +15,6 @@ use crate::{
|
|||
};
|
||||
use anyhow::{anyhow, Result};
|
||||
pub use clock::ReplicaId;
|
||||
use fs::LineEnding;
|
||||
use futures::FutureExt as _;
|
||||
use gpui::{fonts::HighlightStyle, AppContext, Entity, ModelContext, Task};
|
||||
use lsp::LanguageServerId;
|
||||
|
|
|
@ -5,7 +5,6 @@ use crate::language_settings::{
|
|||
use super::*;
|
||||
use clock::ReplicaId;
|
||||
use collections::BTreeMap;
|
||||
use fs::LineEnding;
|
||||
use gpui::{AppContext, ModelHandle};
|
||||
use indoc::indoc;
|
||||
use proto::deserialize_operation;
|
||||
|
@ -20,6 +19,7 @@ use std::{
|
|||
time::{Duration, Instant},
|
||||
};
|
||||
use text::network::Network;
|
||||
use text::LineEnding;
|
||||
use unindent::Unindent as _;
|
||||
use util::{assert_set_eq, post_inc, test::marked_text_ranges, RandomCharIter};
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ pub use diagnostic_set::DiagnosticEntry;
|
|||
pub use lsp::LanguageServerId;
|
||||
pub use outline::{Outline, OutlineItem};
|
||||
pub use syntax_map::{OwnedSyntaxLayerInfo, SyntaxLayerInfo};
|
||||
pub use text::LineEnding;
|
||||
pub use tree_sitter::{Parser, Tree};
|
||||
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
|
|
|
@ -20,17 +20,17 @@ pub fn deserialize_fingerprint(fingerprint: &str) -> Result<RopeFingerprint> {
|
|||
.map_err(|error| anyhow!("invalid fingerprint: {}", error))
|
||||
}
|
||||
|
||||
pub fn deserialize_line_ending(message: proto::LineEnding) -> fs::LineEnding {
|
||||
pub fn deserialize_line_ending(message: proto::LineEnding) -> text::LineEnding {
|
||||
match message {
|
||||
proto::LineEnding::Unix => fs::LineEnding::Unix,
|
||||
proto::LineEnding::Windows => fs::LineEnding::Windows,
|
||||
proto::LineEnding::Unix => text::LineEnding::Unix,
|
||||
proto::LineEnding::Windows => text::LineEnding::Windows,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn serialize_line_ending(message: fs::LineEnding) -> proto::LineEnding {
|
||||
pub fn serialize_line_ending(message: text::LineEnding) -> proto::LineEnding {
|
||||
match message {
|
||||
fs::LineEnding::Unix => proto::LineEnding::Unix,
|
||||
fs::LineEnding::Windows => proto::LineEnding::Windows,
|
||||
text::LineEnding::Unix => proto::LineEnding::Unix,
|
||||
text::LineEnding::Windows => proto::LineEnding::Windows,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue