1use crate::language::TwigLanguage;
2use oak_lsp::LanguageService;
3use oak_vfs::MemoryVfs;
4
5pub struct TwigLanguageService {
7 vfs: MemoryVfs,
8 workspace: oak_lsp::workspace::WorkspaceManager,
9}
10
11impl TwigLanguageService {
12 pub fn new(vfs: MemoryVfs) -> Self {
14 Self { vfs, workspace: oak_lsp::workspace::WorkspaceManager::default() }
15 }
16}
17
18impl LanguageService for TwigLanguageService {
19 type Lang = TwigLanguage;
20 type Vfs = MemoryVfs;
21
22 fn vfs(&self) -> &Self::Vfs {
23 &self.vfs
24 }
25
26 fn workspace(&self) -> &oak_lsp::workspace::WorkspaceManager {
27 &self.workspace
28 }
29
30 fn get_root(&self, _uri: &str) -> impl std::future::Future<Output = Option<oak_core::tree::RedNode<'_, TwigLanguage>>> + Send + '_ {
31 async move { None }
32 }
33}