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:
Max Brunsfeld 2022-10-12 15:48:19 -07:00
parent fedec68d39
commit 6cdf4e98fc
43 changed files with 51 additions and 102 deletions

View file

@ -27,7 +27,6 @@ command_palette = { path = "../command_palette" }
editor = { path = "../editor" }
gpui = { path = "../gpui" }
language = { path = "../language" }
rope = { path = "../rope" }
search = { path = "../search" }
settings = { path = "../settings" }
workspace = { path = "../workspace" }

View file

@ -15,8 +15,7 @@ use editor::{
display_map::ToDisplayPoint, Anchor, Autoscroll, Bias, ClipboardSelection, DisplayPoint,
};
use gpui::{actions, MutableAppContext, ViewContext};
use language::{AutoindentMode, SelectionGoal};
use rope::point::Point;
use language::{AutoindentMode, Point, SelectionGoal};
use workspace::Workspace;
use self::{

View file

@ -2,7 +2,7 @@ use std::ops::{Deref, DerefMut};
use collections::{HashMap, HashSet};
use gpui::ContextHandle;
use language::OffsetRangeExt;
use language::{OffsetRangeExt, Point};
use util::test::marked_text_offsets;
use super::{neovim_connection::NeovimConnection, NeovimBackedBindingTestContext, VimTestContext};
@ -51,7 +51,7 @@ impl<'a> NeovimBackedTestContext<'a> {
pub async fn set_shared_state(&mut self, marked_text: &str) -> ContextHandle {
let context_handle = self.set_state(marked_text, Mode::Normal);
let selection = self.editor(|editor, cx| editor.selections.newest::<rope::point::Point>(cx));
let selection = self.editor(|editor, cx| editor.selections.newest::<Point>(cx));
let text = self.buffer_text();
self.neovim.set_state(selection, &text).await;

View file

@ -9,8 +9,7 @@ use async_trait::async_trait;
#[cfg(feature = "neovim")]
use gpui::keymap::Keystroke;
use language::Selection;
use rope::point::Point;
use language::{Point, Selection};
#[cfg(feature = "neovim")]
use lazy_static::lazy_static;