ssh lsp completions (#17665)

Release Notes:

* ssh-remoting: Fixed shell environment loading for remote shells.
This commit is contained in:
Conrad Irwin 2024-09-16 12:22:39 -06:00 committed by GitHub
parent dea85099a2
commit ca2cce79ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 74 additions and 78 deletions

View file

@ -1,6 +1,6 @@
use anyhow::{anyhow, Result};
use fs::Fs;
use gpui::{AppContext, AsyncAppContext, Context, Model, ModelContext, Task};
use gpui::{AppContext, AsyncAppContext, Context, Model, ModelContext};
use language::LanguageRegistry;
use project::{
buffer_store::BufferStore, project_settings::SettingsObserver, search::SearchQuery,
@ -36,9 +36,7 @@ impl HeadlessProject {
}
pub fn new(session: Arc<SshSession>, fs: Arc<dyn Fs>, cx: &mut ModelContext<Self>) -> Self {
// TODO: we should load the env correctly (as we do in login_shell_env_loaded when stdout is not a pty). Can we re-use the ProjectEnvironment for that?
let mut languages =
LanguageRegistry::new(Task::ready(()), cx.background_executor().clone());
let mut languages = LanguageRegistry::new(cx.background_executor().clone());
languages
.set_language_server_download_dir(PathBuf::from("/Users/conrad/what-could-go-wrong"));