mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Avoid loading Rust grammar in zed
tests
This commit is contained in:
parent
2280c75103
commit
7a05461c50
2 changed files with 3 additions and 5 deletions
|
@ -14,7 +14,7 @@ pub fn build_language_registry() -> LanguageRegistry {
|
|||
languages
|
||||
}
|
||||
|
||||
pub fn rust() -> Language {
|
||||
fn rust() -> Language {
|
||||
let grammar = tree_sitter_rust::language();
|
||||
let rust_config =
|
||||
toml::from_slice(&LanguageDir::get("rust/config.toml").unwrap().data).unwrap();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{assets::Assets, language, AppState};
|
||||
use crate::{assets::Assets, AppState};
|
||||
use buffer::LanguageRegistry;
|
||||
use client::{http::ServerResponse, test::FakeHttpClient, ChannelList, Client, UserStore};
|
||||
use gpui::{AssetSource, MutableAppContext};
|
||||
|
@ -17,8 +17,6 @@ fn init_logger() {
|
|||
|
||||
pub fn test_app_state(cx: &mut MutableAppContext) -> Arc<AppState> {
|
||||
let (settings_tx, settings) = watch::channel_with(build_settings(cx));
|
||||
let mut languages = LanguageRegistry::new();
|
||||
languages.add(Arc::new(language::rust()));
|
||||
let themes = ThemeRegistry::new(Assets, cx.font_cache().clone());
|
||||
let client = Client::new();
|
||||
let http = FakeHttpClient::new(|_| async move { Ok(ServerResponse::new(404)) });
|
||||
|
@ -27,7 +25,7 @@ pub fn test_app_state(cx: &mut MutableAppContext) -> Arc<AppState> {
|
|||
settings_tx: Arc::new(Mutex::new(settings_tx)),
|
||||
settings,
|
||||
themes,
|
||||
languages: Arc::new(languages),
|
||||
languages: Arc::new(LanguageRegistry::new()),
|
||||
channel_list: cx.add_model(|cx| ChannelList::new(user_store.clone(), client.clone(), cx)),
|
||||
client,
|
||||
user_store,
|
||||
|
|
Loading…
Reference in a new issue