Extract a language crate
This commit is contained in:
@@ -8,7 +8,7 @@ test-support = [
|
||||
"client/test-support",
|
||||
"project/test-support",
|
||||
"tree-sitter",
|
||||
"tree-sitter-rust"
|
||||
"tree-sitter-rust",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
@@ -16,6 +16,7 @@ buffer = { path = "../buffer" }
|
||||
client = { path = "../client" }
|
||||
editor = { path = "../editor" }
|
||||
gpui = { path = "../gpui" }
|
||||
language = { path = "../language" }
|
||||
project = { path = "../project" }
|
||||
theme = { path = "../theme" }
|
||||
anyhow = "1.0.38"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use super::{Item, ItemView};
|
||||
use crate::Settings;
|
||||
use anyhow::Result;
|
||||
use buffer::{Buffer, File as _};
|
||||
use editor::{Editor, EditorSettings, Event};
|
||||
use gpui::{fonts::TextStyle, AppContext, ModelHandle, Task, ViewContext};
|
||||
use language::{Buffer, File as _};
|
||||
use postage::watch;
|
||||
use project::{ProjectPath, Worktree};
|
||||
use std::path::Path;
|
||||
|
||||
@@ -5,7 +5,7 @@ pub mod settings;
|
||||
pub mod sidebar;
|
||||
|
||||
use anyhow::Result;
|
||||
use buffer::{Buffer, LanguageRegistry};
|
||||
use language::{Buffer, LanguageRegistry};
|
||||
use client::{Authenticate, ChannelList, Client, UserStore};
|
||||
use gpui::{
|
||||
action, elements::*, json::to_string_pretty, keymap::Binding, platform::CursorStyle,
|
||||
@@ -271,8 +271,8 @@ impl WorkspaceParams {
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn test(cx: &mut MutableAppContext) -> Self {
|
||||
let mut languages = LanguageRegistry::new();
|
||||
languages.add(Arc::new(buffer::Language::new(
|
||||
buffer::LanguageConfig {
|
||||
languages.add(Arc::new(language::Language::new(
|
||||
language::LanguageConfig {
|
||||
name: "Rust".to_string(),
|
||||
path_suffixes: vec!["rs".to_string()],
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user