Add support for auto-closing of JSX tags (#25681)
Closes #4271 Implemented by kicking of a task on the main thread at the end of `Editor::handle_input` which waits for the buffer to be re-parsed before checking if JSX tag completion possible based on the recent edits, and if it is then it spawns a task on the background thread to generate the edits to be auto-applied to the buffer Release Notes: - Added support for auto-closing of JSX tags --------- Co-authored-by: Cole Miller <cole@zed.dev> Co-authored-by: Max Brunsfeld <max@zed.dev> Co-authored-by: Marshall Bowers <git@maxdeviant.com> Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
co-authored by
Cole Miller
Max Brunsfeld
Marshall Bowers
Mikayla
Peter Tripp
parent
05df3d1bd6
commit
ff25fa24e7
@@ -121,9 +121,9 @@ impl SyntaxLayerContent {
|
||||
pub struct SyntaxLayer<'a> {
|
||||
/// The language for this layer.
|
||||
pub language: &'a Arc<Language>,
|
||||
depth: usize,
|
||||
pub(crate) depth: usize,
|
||||
tree: &'a Tree,
|
||||
offset: (usize, tree_sitter::Point),
|
||||
pub(crate) offset: (usize, tree_sitter::Point),
|
||||
}
|
||||
|
||||
/// A layer of syntax highlighting. Like [SyntaxLayer], but holding
|
||||
@@ -133,7 +133,7 @@ pub struct OwnedSyntaxLayer {
|
||||
/// The language for this layer.
|
||||
pub language: Arc<Language>,
|
||||
tree: tree_sitter::Tree,
|
||||
offset: (usize, tree_sitter::Point),
|
||||
pub offset: (usize, tree_sitter::Point),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user