Remove language servers from buffers

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
This commit is contained in:
Antonio Scandurra
2022-03-08 15:16:07 -08:00
committed by Max Brunsfeld
co-authored by Nathan Sobo Antonio Scandurra Keith Simmons
parent 6662ba62a3
commit 317a1bb07b
14 changed files with 1584 additions and 1235 deletions
+2 -5
View File
@@ -32,8 +32,8 @@ use items::{BufferItemHandle, MultiBufferItemHandle};
use itertools::Itertools as _;
pub use language::{char_kind, CharKind};
use language::{
AnchorRangeExt as _, BracketPair, Buffer, CodeAction, CodeLabel, Completion, Diagnostic,
DiagnosticSeverity, Language, Point, Selection, SelectionGoal, TransactionId,
BracketPair, Buffer, CodeAction, CodeLabel, Completion, Diagnostic, DiagnosticSeverity,
Language, OffsetRangeExt, Point, Selection, SelectionGoal, TransactionId,
};
use multi_buffer::MultiBufferChunks;
pub use multi_buffer::{
@@ -8235,9 +8235,6 @@ mod tests {
.update(cx, |project, cx| project.open_buffer(project_path, cx))
.await
.unwrap();
buffer.update(cx, |buffer, cx| {
buffer.set_language_server(Some(language_server), cx);
});
let buffer = cx.add_model(|cx| MultiBuffer::singleton(buffer, cx));
buffer.next_notification(&cx).await;
+3 -3
View File
@@ -8,8 +8,8 @@ use gpui::{AppContext, Entity, ModelContext, ModelHandle, Task};
pub use language::Completion;
use language::{
char_kind, Buffer, BufferChunks, BufferSnapshot, CharKind, Chunk, DiagnosticEntry, Event, File,
Language, Outline, OutlineItem, Selection, ToOffset as _, ToPoint as _, ToPointUtf16 as _,
TransactionId,
Language, OffsetRangeExt, Outline, OutlineItem, Selection, ToOffset as _, ToPoint as _,
ToPointUtf16 as _, TransactionId,
};
use std::{
cell::{Ref, RefCell},
@@ -25,7 +25,7 @@ use text::{
locator::Locator,
rope::TextDimension,
subscription::{Subscription, Topic},
AnchorRangeExt as _, Edit, Point, PointUtf16, TextSummary,
Edit, Point, PointUtf16, TextSummary,
};
use theme::SyntaxTheme;