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>
@@ -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