Extract an LspStore object from Project, to prepare for language support over SSH (#17041)
For ssh remoting lsps we'll need to have language server support factored out of project. Thus that begins Release Notes: - N/A --------- Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
7c57ffafbd
commit
75d4c7981e
24 changed files with 7252 additions and 6466 deletions
|
@ -1,5 +1,4 @@
|
|||
use std::{path::Path, sync::Arc};
|
||||
|
||||
use crate::{lsp_command::LspCommand, lsp_store::LspStore};
|
||||
use anyhow::{Context, Result};
|
||||
use async_trait::async_trait;
|
||||
use gpui::{AppContext, AsyncAppContext, Model};
|
||||
|
@ -7,10 +6,9 @@ use language::{point_to_lsp, proto::deserialize_anchor, Buffer};
|
|||
use lsp::{LanguageServer, LanguageServerId};
|
||||
use rpc::proto::{self, PeerId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{path::Path, sync::Arc};
|
||||
use text::{BufferId, PointUtf16, ToPointUtf16};
|
||||
|
||||
use crate::{lsp_command::LspCommand, Project};
|
||||
|
||||
pub enum LspExpandMacro {}
|
||||
|
||||
impl lsp::request::Request for LspExpandMacro {
|
||||
|
@ -67,7 +65,7 @@ impl LspCommand for ExpandMacro {
|
|||
async fn response_from_lsp(
|
||||
self,
|
||||
message: Option<ExpandedMacro>,
|
||||
_: Model<Project>,
|
||||
_: Model<LspStore>,
|
||||
_: Model<Buffer>,
|
||||
_: LanguageServerId,
|
||||
_: AsyncAppContext,
|
||||
|
@ -92,7 +90,7 @@ impl LspCommand for ExpandMacro {
|
|||
|
||||
async fn from_proto(
|
||||
message: Self::ProtoRequest,
|
||||
_: Model<Project>,
|
||||
_: Model<LspStore>,
|
||||
buffer: Model<Buffer>,
|
||||
mut cx: AsyncAppContext,
|
||||
) -> anyhow::Result<Self> {
|
||||
|
@ -107,7 +105,7 @@ impl LspCommand for ExpandMacro {
|
|||
|
||||
fn response_to_proto(
|
||||
response: ExpandedMacro,
|
||||
_: &mut Project,
|
||||
_: &mut LspStore,
|
||||
_: PeerId,
|
||||
_: &clock::Global,
|
||||
_: &mut AppContext,
|
||||
|
@ -121,7 +119,7 @@ impl LspCommand for ExpandMacro {
|
|||
async fn response_from_proto(
|
||||
self,
|
||||
message: proto::LspExtExpandMacroResponse,
|
||||
_: Model<Project>,
|
||||
_: Model<LspStore>,
|
||||
_: Model<Buffer>,
|
||||
_: AsyncAppContext,
|
||||
) -> anyhow::Result<ExpandedMacro> {
|
||||
|
@ -177,7 +175,7 @@ impl LspCommand for SwitchSourceHeader {
|
|||
async fn response_from_lsp(
|
||||
self,
|
||||
message: Option<SwitchSourceHeaderResult>,
|
||||
_: Model<Project>,
|
||||
_: Model<LspStore>,
|
||||
_: Model<Buffer>,
|
||||
_: LanguageServerId,
|
||||
_: AsyncAppContext,
|
||||
|
@ -196,7 +194,7 @@ impl LspCommand for SwitchSourceHeader {
|
|||
|
||||
async fn from_proto(
|
||||
_: Self::ProtoRequest,
|
||||
_: Model<Project>,
|
||||
_: Model<LspStore>,
|
||||
_: Model<Buffer>,
|
||||
_: AsyncAppContext,
|
||||
) -> anyhow::Result<Self> {
|
||||
|
@ -205,7 +203,7 @@ impl LspCommand for SwitchSourceHeader {
|
|||
|
||||
fn response_to_proto(
|
||||
response: SwitchSourceHeaderResult,
|
||||
_: &mut Project,
|
||||
_: &mut LspStore,
|
||||
_: PeerId,
|
||||
_: &clock::Global,
|
||||
_: &mut AppContext,
|
||||
|
@ -218,7 +216,7 @@ impl LspCommand for SwitchSourceHeader {
|
|||
async fn response_from_proto(
|
||||
self,
|
||||
message: proto::LspExtSwitchSourceHeaderResponse,
|
||||
_: Model<Project>,
|
||||
_: Model<LspStore>,
|
||||
_: Model<Buffer>,
|
||||
_: AsyncAppContext,
|
||||
) -> anyhow::Result<SwitchSourceHeaderResult> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue