From e42a9ac2f103bf224ed74e5844b20845b47108cf Mon Sep 17 00:00:00 2001 From: Mikayla Date: Wed, 17 Jan 2024 15:22:37 -0800 Subject: [PATCH] Add typos configuration for zed and add a few more typo fixes --- crates/collab/src/tests/following_tests.rs | 7 ++++++- crates/search/src/history.rs | 2 +- typos.toml | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 typos.toml diff --git a/crates/collab/src/tests/following_tests.rs b/crates/collab/src/tests/following_tests.rs index af184d7d02..b3af077e9d 100644 --- a/crates/collab/src/tests/following_tests.rs +++ b/crates/collab/src/tests/following_tests.rs @@ -1735,6 +1735,11 @@ async fn test_following_into_excluded_file( vec![18..17] ); + editor_for_excluded_a.update(cx_a, |editor, cx| { + editor.select_right(&Default::default(), cx); + }); + executor.run_until_parked(); + // Changes from B to the excluded file are replicated in A's editor editor_for_excluded_b.update(cx_b, |editor, cx| { editor.handle_input("\nCo-Authored-By: B ", cx); @@ -1743,7 +1748,7 @@ async fn test_following_into_excluded_file( editor_for_excluded_a.update(cx_a, |editor, cx| { assert_eq!( editor.text(cx), - "new commit messag\nCo-Authored-By: B " + "new commit message\nCo-Authored-By: B " ); }); } diff --git a/crates/search/src/history.rs b/crates/search/src/history.rs index 6b06c60293..5571313acb 100644 --- a/crates/search/src/history.rs +++ b/crates/search/src/history.rs @@ -85,7 +85,7 @@ mod tests { assert_eq!( search_history.current(), None, - "No current selection should be set fo the default search history" + "No current selection should be set for the default search history" ); search_history.add("rust".to_string()); diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000..47eb2a0d9c --- /dev/null +++ b/typos.toml @@ -0,0 +1,19 @@ +[files] +ignore-files = true +extend-exclude = [ + # Vim makes heavy use of partial typing tables + "crates/vim/*", + # glsl isn't recognized by this tool + "crates/zed/src/languages/glsl/*", + # File suffixes aren't typos + "assets/icons/file_icons/file_types.json", + # :/ + "crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql", + # Editor and file finder rely on partial typing and custom in-string syntax + "crates/file_finder/src/file_finder.rs", + "crates/editor/src/editor_tests.rs", +] + +[default] +extend-ignore-re = ["ba"] +check-filename = true \ No newline at end of file