Re-export basic text types from text and language crates
Also avoid production dependencies on fs and rope in collab
This commit is contained in:
parent
fedec68d39
commit
6cdf4e98fc
43 changed files with 51 additions and 102 deletions
|
@ -17,7 +17,6 @@ use fs::LineEnding;
|
|||
use futures::FutureExt as _;
|
||||
use gpui::{fonts::HighlightStyle, AppContext, Entity, ModelContext, MutableAppContext, Task};
|
||||
use parking_lot::Mutex;
|
||||
use rope::point::Point;
|
||||
use settings::Settings;
|
||||
use similar::{ChangeTag, TextDiff};
|
||||
use smol::future::yield_now;
|
||||
|
@ -283,7 +282,7 @@ struct BufferChunkHighlights<'a> {
|
|||
|
||||
pub struct BufferChunks<'a> {
|
||||
range: Range<usize>,
|
||||
chunks: rope::Chunks<'a>,
|
||||
chunks: text::Chunks<'a>,
|
||||
diagnostic_endpoints: Peekable<vec::IntoIter<DiagnosticEndpoint>>,
|
||||
error_depth: usize,
|
||||
warning_depth: usize,
|
||||
|
|
|
@ -5,7 +5,6 @@ use fs::LineEnding;
|
|||
use gpui::{ModelHandle, MutableAppContext};
|
||||
use proto::deserialize_operation;
|
||||
use rand::prelude::*;
|
||||
use rope::point::Point;
|
||||
use settings::Settings;
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
use crate::Diagnostic;
|
||||
use collections::HashMap;
|
||||
use rope::point_utf16::PointUtf16;
|
||||
use std::{
|
||||
cmp::{Ordering, Reverse},
|
||||
iter,
|
||||
ops::Range,
|
||||
};
|
||||
use sum_tree::{self, Bias, SumTree};
|
||||
use text::{Anchor, FromAnchor, ToOffset};
|
||||
use text::{Anchor, FromAnchor, PointUtf16, ToOffset};
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct DiagnosticSet {
|
||||
|
|
|
@ -22,7 +22,6 @@ use lazy_static::lazy_static;
|
|||
use parking_lot::{Mutex, RwLock};
|
||||
use postage::watch;
|
||||
use regex::Regex;
|
||||
use rope::point_utf16::PointUtf16;
|
||||
use serde::{de, Deserialize, Deserializer};
|
||||
use serde_json::Value;
|
||||
use std::{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use crate::{Grammar, InjectionConfig, Language, LanguageRegistry};
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::Mutex;
|
||||
use rope::point::Point;
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
cell::RefCell,
|
||||
|
@ -11,7 +10,7 @@ use std::{
|
|||
sync::Arc,
|
||||
};
|
||||
use sum_tree::{Bias, SeekTarget, SumTree};
|
||||
use text::{Anchor, BufferSnapshot, OffsetRangeExt, Rope, ToOffset, ToPoint};
|
||||
use text::{Anchor, BufferSnapshot, OffsetRangeExt, Point, Rope, ToOffset, ToPoint};
|
||||
use tree_sitter::{
|
||||
Node, Parser, Query, QueryCapture, QueryCaptures, QueryCursor, QueryMatches, Tree,
|
||||
};
|
||||
|
@ -135,7 +134,7 @@ struct ChangeRegionSet(Vec<ChangedRegion>);
|
|||
|
||||
struct TextProvider<'a>(&'a Rope);
|
||||
|
||||
struct ByteChunks<'a>(rope::Chunks<'a>);
|
||||
struct ByteChunks<'a>(text::Chunks<'a>);
|
||||
|
||||
struct QueryCursorHandle(Option<QueryCursor>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue