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

@ -65,7 +65,7 @@ use release_channel::ReleaseChannel;
use remote::{SshClientDelegate, SshConnectionOptions};
use serde::Deserialize;
use session::AppSession;
use settings::{InvalidSettingsError, Settings};
use settings::Settings;
use shared_screen::SharedScreen;
use sqlez::{
bindable::{Bind, Column, StaticColumnCount},
@ -839,31 +839,17 @@ impl Workspace {
}
}
project::Event::LocalSettingsUpdated(result) => {
struct LocalSettingsUpdated;
let id = NotificationId::unique::<LocalSettingsUpdated>();
project::Event::Toast {
notification_id,
message,
} => this.show_notification(
NotificationId::named(notification_id.clone()),
cx,
|cx| cx.new_view(|_| MessageNotification::new(message.clone())),
),
match result {
Err(InvalidSettingsError::LocalSettings { message, path }) => {
let full_message =
format!("Failed to set local settings in {:?}:\n{}", path, message);
this.show_notification(id, cx, |cx| {
cx.new_view(|_| MessageNotification::new(full_message.clone()))
})
}
Err(_) => {}
Ok(_) => this.dismiss_notification(&id, cx),
}
}
project::Event::Notification(message) => {
struct ProjectNotification;
this.show_notification(
NotificationId::unique::<ProjectNotification>(),
cx,
|cx| cx.new_view(|_| MessageNotification::new(message.clone())),
)
project::Event::HideToast { notification_id } => {
this.dismiss_notification(&NotificationId::named(notification_id.clone()), cx)
}
project::Event::LanguageServerPrompt(request) => {
@ -874,7 +860,7 @@ impl Workspace {
let id = hasher.finish();
this.show_notification(
NotificationId::identified::<LanguageServerPrompt>(id as usize),
NotificationId::composite::<LanguageServerPrompt>(id as usize),
cx,
|cx| {
cx.new_view(|_| {
@ -1808,6 +1794,7 @@ impl Workspace {
.flat_map(|pane| {
pane.read(cx).items().filter_map(|item| {
if item.is_dirty(cx) {
item.tab_description(0, cx);
Some((pane.downgrade(), item.boxed_clone()))
} else {
None