Incomplete refactor to allow for multiple adapters per language
This commit is contained in:
parent
21e39e7523
commit
ba7233f265
10 changed files with 818 additions and 577 deletions
|
@ -2764,6 +2764,15 @@ impl MultiBufferSnapshot {
|
|||
.and_then(|(buffer, offset)| buffer.language_scope_at(offset))
|
||||
}
|
||||
|
||||
pub fn language_indent_size_at<T: ToOffset>(
|
||||
&self,
|
||||
position: T,
|
||||
cx: &AppContext,
|
||||
) -> Option<IndentSize> {
|
||||
let (buffer_snapshot, offset) = self.point_to_buffer_offset(position)?;
|
||||
Some(buffer_snapshot.language_indent_size_at(offset, cx))
|
||||
}
|
||||
|
||||
pub fn is_dirty(&self) -> bool {
|
||||
self.is_dirty
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue