Add settings to remote servers, use XDG paths on remote, and enable node LSPs (#19176)

Supersedes https://github.com/zed-industries/zed/pull/19166

TODO:
- [x] Update basic zed paths
- [x] update create_state_directory
- [x] Use this with `NodeRuntime`
- [x] Add server settings
- [x] Add an 'open server settings command'
- [x] Make sure it all works


Release Notes:

- Updated the actions `zed::OpenLocalSettings` and `zed::OpenLocalTasks`
to `zed::OpenProjectSettings` and `zed::OpenProjectTasks`.

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
Mikayla Maki 2024-10-15 23:32:44 -07:00 committed by GitHub
parent 1dda039f38
commit f944ebc4cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 804 additions and 218 deletions

View file

@ -27,7 +27,7 @@ use gpui::{
AppContext, AsyncAppContext, Context, Entity, EventEmitter, Model, ModelContext, PromptLevel,
Task, WeakModel,
};
use http_client::{BlockedHttpClient, HttpClient};
use http_client::HttpClient;
use language::{
language_settings::{
all_language_settings, language_settings, AllLanguageSettings, FormatOnSave, Formatter,
@ -116,7 +116,7 @@ impl FormatTrigger {
}
pub struct LocalLspStore {
http_client: Option<Arc<dyn HttpClient>>,
http_client: Arc<dyn HttpClient>,
environment: Model<ProjectEnvironment>,
fs: Arc<dyn Fs>,
yarn: Model<YarnPathStore>,
@ -839,7 +839,7 @@ impl LspStore {
prettier_store: Model<PrettierStore>,
environment: Model<ProjectEnvironment>,
languages: Arc<LanguageRegistry>,
http_client: Option<Arc<dyn HttpClient>>,
http_client: Arc<dyn HttpClient>,
fs: Arc<dyn Fs>,
cx: &mut ModelContext<Self>,
) -> Self {
@ -7579,10 +7579,7 @@ impl LocalLspAdapterDelegate {
.as_local()
.expect("LocalLspAdapterDelegate cannot be constructed on a remote");
let http_client = local
.http_client
.clone()
.unwrap_or_else(|| Arc::new(BlockedHttpClient));
let http_client = local.http_client.clone();
Self::new(lsp_store, worktree, http_client, local.fs.clone(), cx)
}