Start to connect the API in the editor

This commit is contained in:
Kirill Bulatov 2025-07-21 15:46:57 +03:00
parent c06534b079
commit 0afe7c3210
2 changed files with 354 additions and 5 deletions

View file

@ -33,6 +33,12 @@ pub struct InlayHints {
pub hints: Vec<InlayHint>,
}
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum HintFetchStrategy {
IgnoreCache,
UseCache { known_cache_version: Option<usize> },
}
impl InlayHintCache {
pub fn remove_server_data(&mut self, for_server: LanguageServerId) -> bool {
let removed = self.hints.remove(&for_server).is_some();
@ -45,8 +51,8 @@ impl InlayHintCache {
pub fn hints(
&self,
buffer: BufferId,
range: Range<usize>,
known_cache_version: Option<usize>,
strategy: HintFetchStrategy,
range: impl text::ToOffset,
cx: &mut Context<Self>,
) -> Option<(Range<BufferRow>, Shared<Task<InlayHints>>)> {
todo!("TODO kb")