Use SyntaxMap in Buffer
This commit is contained in:
parent
9113c94371
commit
ced45cbb0a
6 changed files with 830 additions and 532 deletions
|
@ -1407,7 +1407,9 @@ fn json_lang() -> Language {
|
|||
|
||||
fn get_tree_sexp(buffer: &ModelHandle<Buffer>, cx: &gpui::TestAppContext) -> String {
|
||||
buffer.read_with(cx, |buffer, _| {
|
||||
buffer.syntax_tree().unwrap().root_node().to_sexp()
|
||||
let syntax_map = buffer.syntax_map();
|
||||
let layers = syntax_map.layers(buffer.as_text_snapshot());
|
||||
layers[0].2.to_sexp()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue