Fix matching braces in jsx/tsx tags (#32196)
Closes #27998 Also fixed an issue where jumping back from closing to opening tags didn't work in javascript due to missing brackets in our tree-sitter query. Release Notes: - N/A --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
6a8fdbfd62
commit
f62d76159b
4 changed files with 63 additions and 0 deletions
|
@ -183,6 +183,30 @@ impl NeovimBackedTestContext {
|
|||
}
|
||||
}
|
||||
|
||||
pub async fn new_typescript(cx: &mut gpui::TestAppContext) -> NeovimBackedTestContext {
|
||||
#[cfg(feature = "neovim")]
|
||||
cx.executor().allow_parking();
|
||||
// rust stores the name of the test on the current thread.
|
||||
// We use this to automatically name a file that will store
|
||||
// the neovim connection's requests/responses so that we can
|
||||
// run without neovim on CI.
|
||||
let thread = thread::current();
|
||||
let test_name = thread
|
||||
.name()
|
||||
.expect("thread is not named")
|
||||
.split(':')
|
||||
.next_back()
|
||||
.unwrap()
|
||||
.to_string();
|
||||
Self {
|
||||
cx: VimTestContext::new_typescript(cx).await,
|
||||
neovim: NeovimConnection::new(test_name).await,
|
||||
|
||||
last_set_state: None,
|
||||
recent_keystrokes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn set_shared_state(&mut self, marked_text: &str) {
|
||||
let mode = if marked_text.contains('»') {
|
||||
Mode::Visual
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue