diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 476f263997d5caa7fb0f3cb576397b618347e82f..2c660b7a0d3883b0bac1e45bdce56a85fd0e6108 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ env: jobs: style: - name: Check formatting and Clippy lints + name: Check formatting, Clippy lints, and spelling runs-on: - self-hosted - test @@ -38,6 +38,13 @@ jobs: - name: Set up default .cargo/config.toml run: cp ./.cargo/ci-config.toml ~/.cargo/config.toml + - name: Check spelling + run: | + if ! which typos > /dev/null; then + cargo install typos-cli + fi + typos + - name: Run style checks uses: ./.github/actions/check_style diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c45475e4ca8ccbfbd1b22b9bc6270ca34c28cd3..a85be833214d83d9cd6dcb24d6a41d3974a56595 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,4 +54,4 @@ We're happy to pair with you to help you learn the codebase and get your contrib Reviewing code in a pull request, after the fact, is hard and tedious - the team generally likes to build trust and review code through pair programming. We'd prefer have conversations about the code, through Zed, while it is being written, so decisions can be made in real-time and less time is spent on fixing things after the fact. Ideally, GitHub is only used to merge code that has already been discussed and reviewed in Zed. -Remeber that smaller, incremental PRs are easier to review and merge than large PRs. +Remember that smaller, incremental PRs are easier to review and merge than large PRs. diff --git a/crates/ai/src/prompts/base.rs b/crates/ai/src/prompts/base.rs index 75bad00154b001a356f35cb5d80e4ac4962fe0f9..5e624f23acb8e416676251ed728711756ea1ae6d 100644 --- a/crates/ai/src/prompts/base.rs +++ b/crates/ai/src/prompts/base.rs @@ -81,8 +81,8 @@ impl PromptChain { pub fn generate(&self, truncate: bool) -> anyhow::Result<(String, usize)> { // Argsort based on Prompt Priority - let seperator = "\n"; - let seperator_tokens = self.args.model.count_tokens(seperator)?; + let separator = "\n"; + let separator_tokens = self.args.model.count_tokens(separator)?; let mut sorted_indices = (0..self.templates.len()).collect::>(); sorted_indices.sort_by_key(|&i| Reverse(&self.templates[i].0)); @@ -104,7 +104,7 @@ impl PromptChain { prompts[idx] = template_prompt; if let Some(remaining_tokens) = tokens_outstanding { - let new_tokens = prompt_token_count + seperator_tokens; + let new_tokens = prompt_token_count + separator_tokens; tokens_outstanding = if remaining_tokens > new_tokens { Some(remaining_tokens - new_tokens) } else { @@ -117,9 +117,9 @@ impl PromptChain { prompts.retain(|x| x != ""); - let full_prompt = prompts.join(seperator); + let full_prompt = prompts.join(separator); let total_token_count = self.args.model.count_tokens(&full_prompt)?; - anyhow::Ok((prompts.join(seperator), total_token_count)) + anyhow::Ok((prompts.join(separator), total_token_count)) } } diff --git a/crates/ai/src/prompts/repository_context.rs b/crates/ai/src/prompts/repository_context.rs index 0d831c2cb2ee67dc1144d6f4c74493b8f27d84e7..89869c53a002c7451da892035b008d936a7c7f6d 100644 --- a/crates/ai/src/prompts/repository_context.rs +++ b/crates/ai/src/prompts/repository_context.rs @@ -68,7 +68,7 @@ impl PromptTemplate for RepositoryContext { let mut prompt = String::new(); let mut remaining_tokens = max_token_length.clone(); - let seperator_token_length = args.model.count_tokens("\n")?; + let separator_token_length = args.model.count_tokens("\n")?; for snippet in &args.snippets { let mut snippet_prompt = template.to_string(); let content = snippet.to_string(); @@ -79,9 +79,9 @@ impl PromptTemplate for RepositoryContext { if let Some(tokens_left) = remaining_tokens { if tokens_left >= token_count { writeln!(prompt, "{snippet_prompt}").unwrap(); - remaining_tokens = if tokens_left >= (token_count + seperator_token_length) + remaining_tokens = if tokens_left >= (token_count + separator_token_length) { - Some(tokens_left - token_count - seperator_token_length) + Some(tokens_left - token_count - separator_token_length) } else { Some(0) }; diff --git a/crates/ai/src/providers/open_ai/completion.rs b/crates/ai/src/providers/open_ai/completion.rs index c9a2abd0c8c3bc170ff39f16294f2fb976f00465..f99b7f95e346d275fade7628c0ea27375f84e7c9 100644 --- a/crates/ai/src/providers/open_ai/completion.rs +++ b/crates/ai/src/providers/open_ai/completion.rs @@ -273,7 +273,7 @@ impl CompletionProvider for OpenAICompletionProvider { ) -> BoxFuture<'static, Result>>> { // Currently the CompletionRequest for OpenAI, includes a 'model' parameter // This means that the model is determined by the CompletionRequest and not the CompletionProvider, - // which is currently model based, due to the langauge model. + // which is currently model based, due to the language model. // At some point in the future we should rectify this. let credential = self.credential.read().clone(); let request = stream_completion(credential, self.executor.clone(), prompt); diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs index 20d5efaaa868b07929916bf8c6dddc12f5a22520..93c0954b1710312b1f3f27b0c43fb25564c6046e 100644 --- a/crates/assistant/src/assistant_panel.rs +++ b/crates/assistant/src/assistant_panel.rs @@ -2918,7 +2918,7 @@ impl InlineAssistant { let semantic_permissioned = self.semantic_permissioned(cx); if let Some(semantic_index) = SemanticIndex::global(cx) { cx.spawn(|_, mut cx| async move { - // This has to be updated to accomodate for semantic_permissions + // This has to be updated to accommodate for semantic_permissions if semantic_permissioned.await.unwrap_or(false) { semantic_index .update(&mut cx, |index, cx| index.index_project(project, cx))? diff --git a/crates/collab/src/db/queries/buffers.rs b/crates/collab/src/db/queries/buffers.rs index 85e71d753b972db0515954406819f8c2fc48f9a9..bdcaaab6ef62d8718d3b8903d9f16b4ce9d4b3f5 100644 --- a/crates/collab/src/db/queries/buffers.rs +++ b/crates/collab/src/db/queries/buffers.rs @@ -152,7 +152,7 @@ impl Database { .await?; // If the buffer epoch hasn't changed since the client lost - // connection, then the client's buffer can be syncronized with + // connection, then the client's buffer can be synchronized with // the server's buffer. if buffer.epoch as u64 != client_buffer.epoch { log::info!("can't rejoin buffer, epoch has changed"); @@ -970,7 +970,7 @@ fn version_from_storage(version: &Vec) -> Vec Option { match operation.variant? { proto::operation::Variant::Edit(edit) => Some(text::Operation::Edit(EditOperation { diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs index 9406b4938a8f2795a89cd8f10238964710eb61f3..f9218e5634cdd0d3c104d890fc4d7f3396bb1b06 100644 --- a/crates/collab/src/rpc.rs +++ b/crates/collab/src/rpc.rs @@ -3116,7 +3116,7 @@ async fn leave_channel_chat(request: proto::LeaveChannelChat, session: Session) Ok(()) } -/// Retrive the chat history for a channel +/// Retrieve the chat history for a channel async fn get_channel_messages( request: proto::GetChannelMessages, response: Response, diff --git a/crates/collab/src/tests/channel_tests.rs b/crates/collab/src/tests/channel_tests.rs index e80fe0fdca312bed54d98fce0a1ea69a8a4a6e86..7fbdf8ba7fc09a404f9824205c1d06d94c58f190 100644 --- a/crates/collab/src/tests/channel_tests.rs +++ b/crates/collab/src/tests/channel_tests.rs @@ -203,7 +203,7 @@ async fn test_core_channels( executor.run_until_parked(); // Observe that client B is now an admin of channel A, and that - // their admin priveleges extend to subchannels of channel A. + // their admin privileges extend to subchannels of channel A. assert_channel_invitations(client_b.channel_store(), cx_b, &[]); assert_channels( client_b.channel_store(), diff --git a/crates/collab/src/tests/editor_tests.rs b/crates/collab/src/tests/editor_tests.rs index 6f1ad6e4a335e65c58aa20ac19a859f0e849b068..0e11ec1684ff2b2c100dbcec6182200a4865987e 100644 --- a/crates/collab/src/tests/editor_tests.rs +++ b/crates/collab/src/tests/editor_tests.rs @@ -1192,7 +1192,7 @@ async fn test_on_input_format_from_host_to_guest( executor.run_until_parked(); // Receive an OnTypeFormatting request as the host's language server. - // Return some formattings from the host's language server. + // Return some formatting from the host's language server. fake_language_server.handle_request::( |params, _| async move { assert_eq!( @@ -1211,7 +1211,7 @@ async fn test_on_input_format_from_host_to_guest( }, ); - // Open the buffer on the guest and see that the formattings worked + // Open the buffer on the guest and see that the formatting worked let buffer_b = project_b .update(cx_b, |p, cx| p.open_buffer((worktree_id, "main.rs"), cx)) .await @@ -1327,7 +1327,7 @@ async fn test_on_input_format_from_guest_to_host( }); // Receive an OnTypeFormatting request as the host's language server. - // Return some formattings from the host's language server. + // Return some formatting from the host's language server. executor.start_waiting(); fake_language_server .handle_request::(|params, _| async move { @@ -1350,7 +1350,7 @@ async fn test_on_input_format_from_guest_to_host( .unwrap(); executor.finish_waiting(); - // Open the buffer on the host and see that the formattings worked + // Open the buffer on the host and see that the formatting worked let buffer_a = project_a .update(cx_a, |p, cx| p.open_buffer((worktree_id, "main.rs"), cx)) .await @@ -1824,7 +1824,7 @@ async fn test_inlay_hint_refresh_is_forwarded( assert_eq!( inlay_cache.version(), 1, - "Should update cache verison after first hints" + "Should update cache version after first hints" ); }); diff --git a/crates/collab/src/tests/following_tests.rs b/crates/collab/src/tests/following_tests.rs index d3565eb7ca32797a65db84a3bf3878db5caa771a..584de35e2943d2f6fd6837dde4a8f5798531337c 100644 --- a/crates/collab/src/tests/following_tests.rs +++ b/crates/collab/src/tests/following_tests.rs @@ -1737,6 +1737,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); @@ -1745,7 +1750,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/collab_ui/src/collab_panel/channel_modal.rs b/crates/collab_ui/src/collab_panel/channel_modal.rs index 11890bcbe6d3dace458827583c13d331c6670e7b..e92422d76d79e7b2706aed83b892031f9b4b3a96 100644 --- a/crates/collab_ui/src/collab_panel/channel_modal.rs +++ b/crates/collab_ui/src/collab_panel/channel_modal.rs @@ -111,7 +111,7 @@ impl ChannelModal { .detach(); } - fn set_channel_visiblity(&mut self, selection: &Selection, cx: &mut ViewContext) { + fn set_channel_visibility(&mut self, selection: &Selection, cx: &mut ViewContext) { self.channel_store.update(cx, |channel_store, cx| { channel_store .set_channel_visibility( @@ -189,7 +189,7 @@ impl Render for ChannelModal { ui::Selection::Unselected }, ) - .on_click(cx.listener(Self::set_channel_visiblity)), + .on_click(cx.listener(Self::set_channel_visibility)), ) .child(Label::new("Public").size(LabelSize::Small)), ) diff --git a/crates/copilot_ui/src/sign_in.rs b/crates/copilot_ui/src/sign_in.rs index f78a82699dc3c70925accc3e70a3242e9aad5061..2bea2e016ce9eda8215fec825e3d10312af011a3 100644 --- a/crates/copilot_ui/src/sign_in.rs +++ b/crates/copilot_ui/src/sign_in.rs @@ -96,7 +96,7 @@ impl CopilotCodeVerification { .items_center() .child(Headline::new("Use Github Copilot in Zed.").size(HeadlineSize::Large)) .child( - Label::new("Using Copilot requres an active subscription on Github.") + Label::new("Using Copilot requires an active subscription on Github.") .color(Color::Muted), ) .child(Self::render_device_code(data, cx)) @@ -139,7 +139,7 @@ impl CopilotCodeVerification { "You can enable Copilot by connecting your existing license once you have subscribed or renewed your subscription.", ).color(Color::Warning)) .child( - Button::new("copilot-subscribe-button", "Subscibe on Github") + Button::new("copilot-subscribe-button", "Subscribe on Github") .full_width() .on_click(|_, cx| cx.open_url(COPILOT_SIGN_UP_URL)), ) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 378607a4fb0633695aaaaa3c7df630eb1ed41073..0e894c5f3f1293d6c8aa5b66b595ff200c0dc59b 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -8533,7 +8533,7 @@ impl Editor { ) { match event { multi_buffer::Event::Edited { - sigleton_buffer_edited, + singleton_buffer_edited, } => { self.refresh_active_diagnostics(cx); self.refresh_code_actions(cx); @@ -8543,7 +8543,7 @@ impl Editor { cx.emit(EditorEvent::BufferEdited); cx.emit(SearchEvent::MatchesInvalidated); - if *sigleton_buffer_edited { + if *singleton_buffer_edited { if let Some(project) = &self.project { let project = project.read(cx); let languages_affected = multibuffer diff --git a/crates/editor/src/inlay_hint_cache.rs b/crates/editor/src/inlay_hint_cache.rs index 73c9b5dcd754f208318db809fcec4c8ba430ba87..3fba722492674e84baf5ca114456876ced063071 100644 --- a/crates/editor/src/inlay_hint_cache.rs +++ b/crates/editor/src/inlay_hint_cache.rs @@ -960,14 +960,14 @@ async fn fetch_and_update_hints( log::trace!("Fetched hints: {new_hints:?}"); let background_task_buffer_snapshot = buffer_snapshot.clone(); - let backround_fetch_range = fetch_range.clone(); + let background_fetch_range = fetch_range.clone(); let new_update = cx .background_executor() .spawn(async move { calculate_hint_updates( query.excerpt_id, invalidate, - backround_fetch_range, + background_fetch_range, new_hints, &background_task_buffer_snapshot, cached_excerpt_hints, @@ -1484,7 +1484,7 @@ pub mod tests { assert_eq!( editor.inlay_hint_cache().version, edits_made, - "Cache version should udpate once after the work task is done" + "Cache version should update once after the work task is done" ); }); } @@ -1634,7 +1634,7 @@ pub mod tests { assert_eq!( expected_hints, cached_hint_labels(editor), - "Markdown editor should have a separate verison, repeating Rust editor rules" + "Markdown editor should have a separate version, repeating Rust editor rules" ); assert_eq!(expected_hints, visible_hint_labels(editor, cx)); assert_eq!(editor.inlay_hint_cache().version, 1); @@ -2647,7 +2647,7 @@ pub mod tests { "When scroll is at the edge of a multibuffer, its visible excerpts only should be queried for inlay hints" ); assert_eq!(expected_hints, visible_hint_labels(editor, cx)); - assert_eq!(editor.inlay_hint_cache().version, expected_hints.len(), "Every visible excerpt hints should bump the verison"); + assert_eq!(editor.inlay_hint_cache().version, expected_hints.len(), "Every visible excerpt hints should bump the version"); }); _ = editor.update(cx, |editor, cx| { @@ -2763,7 +2763,7 @@ pub mod tests { expected_hints, cached_hint_labels(editor), "After multibuffer edit, editor gets scolled back to the last selection; \ - all hints should be invalidated and requeried for all of its visible excerpts" + all hints should be invalidated and required for all of its visible excerpts" ); assert_eq!(expected_hints, visible_hint_labels(editor, cx)); diff --git a/crates/fs/src/repository.rs b/crates/fs/src/repository.rs index cf5c65105c9e9c473967f8adb9f7de04b6d8f567..ecb2a93577f20de437ea3762aa1d4a740848e294 100644 --- a/crates/fs/src/repository.rs +++ b/crates/fs/src/repository.rs @@ -29,7 +29,7 @@ pub trait GitRepository: Send { fn branch_name(&self) -> Option; /// Get the statuses of all of the files in the index that start with the given - /// path and have changes with resepect to the HEAD commit. This is fast because + /// path and have changes with respect to the HEAD commit. This is fast because /// the index stores hashes of trees, so that unchanged directories can be skipped. fn staged_statuses(&self, path_prefix: &Path) -> TreeMap; diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index ab9b4d9f86417c13127de5a8758297c8d4ce0028..8f7345ae16ced7e84cb145de81635b8c805e3fe6 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -967,8 +967,8 @@ impl AppContext { } /// Register a callback to be invoked when a keystroke is received by the application - /// in any window. Note that this fires after all other action and event mechansims have resolved - /// and that this API will not be invoked if the event's propogation is stopped. + /// in any window. Note that this fires after all other action and event mechanisms have resolved + /// and that this API will not be invoked if the event's propagation is stopped. pub fn observe_keystrokes( &mut self, f: impl FnMut(&KeystrokeEvent, &mut WindowContext) + 'static, diff --git a/crates/gpui/src/elements/list.rs b/crates/gpui/src/elements/list.rs index c0874a8dd4116275846edc24c1ebcfcfd9d752b6..2921d90a10088d8a4f03018b6f29f8d2416e110a 100644 --- a/crates/gpui/src/elements/list.rs +++ b/crates/gpui/src/elements/list.rs @@ -615,7 +615,7 @@ mod test { // Reset state.reset(5); - // And then recieve a scroll event _before_ the next paint + // And then receive a scroll event _before_ the next paint cx.simulate_event(ScrollWheelEvent { position: point(px(1.), px(1.)), delta: ScrollDelta::Pixels(point(px(0.), px(-500.))), diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs index 8571c1ee57adf49d0b91166a31687b8612d10da3..9ed643a5ab29e899329739b7ebd336e6c83884f6 100644 --- a/crates/gpui/src/executor.rs +++ b/crates/gpui/src/executor.rs @@ -150,7 +150,7 @@ impl BackgroundExecutor { Task::Spawned(task) } - /// Used by the test harness to run an async test in a syncronous fashion. + /// Used by the test harness to run an async test in a synchronous fashion. #[cfg(any(test, feature = "test-support"))] #[track_caller] pub fn block_test(&self, future: impl Future) -> R { @@ -277,7 +277,7 @@ impl BackgroundExecutor { /// Returns a task that will complete after the given duration. /// Depending on other concurrent tasks the elapsed duration may be longer - /// than reqested. + /// than requested. pub fn timer(&self, duration: Duration) -> Task<()> { let (runnable, task) = async_task::spawn(async move {}, { let dispatcher = self.dispatcher.clone(); diff --git a/crates/gpui/src/keymap/matcher.rs b/crates/gpui/src/keymap/matcher.rs index 491dee6895fe391a4b93233cf6b861875deac803..934becb0d1520ae747845f94d22d066cac6fc59f 100644 --- a/crates/gpui/src/keymap/matcher.rs +++ b/crates/gpui/src/keymap/matcher.rs @@ -444,7 +444,7 @@ mod tests { KeyMatch::Some(vec![Box::new(Dollar)]) ); - // handle Brazillian quote (quote key then space key) + // handle Brazilian quote (quote key then space key) assert_eq!( matcher.match_keystroke( &Keystroke::parse("space->\"").unwrap(), @@ -453,7 +453,7 @@ mod tests { KeyMatch::Some(vec![Box::new(Quote)]) ); - // handle ctrl+` on a brazillian keyboard + // handle ctrl+` on a brazilian keyboard assert_eq!( matcher.match_keystroke(&Keystroke::parse("ctrl-->`").unwrap(), &[context_a.clone()]), KeyMatch::Some(vec![Box::new(Backtick)]) diff --git a/crates/gpui/src/platform/keystroke.rs b/crates/gpui/src/platform/keystroke.rs index cadb9c92e3f4dc53d23671dfb630a8560bf55c7e..64a901789abb688c36c8dd2f2eef9c5fb16a34e8 100644 --- a/crates/gpui/src/platform/keystroke.rs +++ b/crates/gpui/src/platform/keystroke.rs @@ -19,7 +19,7 @@ impl Keystroke { // the ime_key or the key. On some non-US keyboards keys we use in our // bindings are behind option (for example `$` is typed `alt-รง` on a Czech keyboard), // and on some keyboards the IME handler converts a sequence of keys into a - // specific character (for example `"` is typed as `" space` on a brazillian keyboard). + // specific character (for example `"` is typed as `" space` on a brazilian keyboard). pub fn match_candidates(&self) -> SmallVec<[Keystroke; 2]> { let mut possibilities = SmallVec::new(); match self.ime_key.as_ref() { diff --git a/crates/gpui/src/platform/mac.rs b/crates/gpui/src/platform/mac.rs index 8f48b8ea94d8aa2193545267dd3d85a021a9f96c..3cc74a968399dcc0fffcf8c795137262e66df8de 100644 --- a/crates/gpui/src/platform/mac.rs +++ b/crates/gpui/src/platform/mac.rs @@ -10,7 +10,7 @@ mod open_type; mod platform; mod text_system; mod window; -mod window_appearence; +mod window_appearance; use crate::{px, size, GlobalPixels, Pixels, Size}; use cocoa::{ diff --git a/crates/gpui/src/platform/mac/window_appearence.rs b/crates/gpui/src/platform/mac/window_appearance.rs similarity index 100% rename from crates/gpui/src/platform/mac/window_appearence.rs rename to crates/gpui/src/platform/mac/window_appearance.rs diff --git a/crates/gpui/src/style.rs b/crates/gpui/src/style.rs index 8fdb926b27ebc8e1ab6b4531a5902e0395f53f8b..095233280edefc0b11d85e3a4ee255f54c8da13d 100644 --- a/crates/gpui/src/style.rs +++ b/crates/gpui/src/style.rs @@ -42,7 +42,7 @@ pub struct Style { #[refineable] pub inset: Edges, - // Size properies + // Size properties /// Sets the initial size of the item #[refineable] pub size: Size, @@ -79,7 +79,7 @@ pub struct Style { #[refineable] pub gap: Size, - // Flexbox properies + // Flexbox properties /// Which direction does the main axis flow in? pub flex_direction: FlexDirection, /// Should elements wrap, or stay in a single line? @@ -502,7 +502,7 @@ impl Default for Style { max_size: Size::auto(), aspect_ratio: None, gap: Size::default(), - // Aligment + // Alignment align_items: None, align_self: None, align_content: None, diff --git a/crates/gpui/src/view.rs b/crates/gpui/src/view.rs index 3701bbbd69419daff04e83fdc85413099d34f42f..6426ac4c32f05e0765f2b5ca3cdb81ee603edc6e 100644 --- a/crates/gpui/src/view.rs +++ b/crates/gpui/src/view.rs @@ -200,7 +200,7 @@ impl PartialEq for WeakView { impl Eq for WeakView {} -/// A dynically-typed handle to a view, which can be downcast to a [View] for a specific type. +/// A dynamically-typed handle to a view, which can be downcast to a [View] for a specific type. #[derive(Clone, Debug)] pub struct AnyView { model: AnyModel, diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs index 86a4920c12b9db6343bfb10c8eb4ce7253dc861e..7453391ee721c1829e2140c4590f4bf67ce86187 100644 --- a/crates/gpui/src/window.rs +++ b/crates/gpui/src/window.rs @@ -2131,7 +2131,7 @@ impl<'a> WindowContext<'a> { .unwrap(); // Actual: Option <- View - // Requested: () <- AnyElemet + // Requested: () <- AnyElement let state = state_box .take() .expect("element state is already on the stack"); diff --git a/crates/gpui_macros/src/gpui_macros.rs b/crates/gpui_macros/src/gpui_macros.rs index 1187d96ca320abbc51b66b24b0639b1211b451dc..aef1785bb5a56c6acbc9d42d76286a0ed8a13133 100644 --- a/crates/gpui_macros/src/gpui_macros.rs +++ b/crates/gpui_macros/src/gpui_macros.rs @@ -53,7 +53,7 @@ pub fn style_helpers(input: TokenStream) -> TokenStream { /// variety of scenarios and interleavings just by changing the seed. /// /// #[gpui::test] also takes three different arguments: -/// - `#[gpui::test(interations=10)]` will run the test ten times with a different initial SEED. +/// - `#[gpui::test(iterations=10)]` will run the test ten times with a different initial SEED. /// - `#[gpui::test(retries=3)]` will run the test up to four times if it fails to try and make it pass. /// - `#[gpui::test(on_failure="crate::test::report_failure")]` will call the specified function after the /// tests fail so that you can write out more detail about the failure. diff --git a/crates/language/src/buffer_tests.rs b/crates/language/src/buffer_tests.rs index 780483c5ca24fbb5ec43f9652b54f6c9ba5b0c30..6ad345d4e324d96dbe13333d0729db3cc6406671 100644 --- a/crates/language/src/buffer_tests.rs +++ b/crates/language/src/buffer_tests.rs @@ -275,7 +275,7 @@ async fn test_normalize_whitespace(cx: &mut gpui::TestAppContext) { let version_before_format = format_diff.base_version.clone(); buffer.apply_diff(format_diff, cx); - // The outcome depends on the order of concurrent taks. + // The outcome depends on the order of concurrent tasks. // // If the edit occurred while searching for trailing whitespace ranges, // then the trailing whitespace region touched by the edit is left intact. diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index 9b9aa55ed2d5ef572afb0d912481ecad23474e3b..80ab6b07d1d5869b343566b64a022115fe84f8ad 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -873,7 +873,7 @@ impl LanguageServer { futures::select! { response = rx.fuse() => { let elapsed = started.elapsed(); - log::trace!("Took {elapsed:?} to recieve response to {method:?} id {id}"); + log::trace!("Took {elapsed:?} to receive response to {method:?} id {id}"); response? } diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rs index f3ecd2d25f2b3866b1f6c3f0ce68415fa7cd53ae..9f78480136e2e6eff71fb3016a2c9c99d4297b6f 100644 --- a/crates/multi_buffer/src/multi_buffer.rs +++ b/crates/multi_buffer/src/multi_buffer.rs @@ -72,7 +72,7 @@ pub enum Event { ids: Vec, }, Edited { - sigleton_buffer_edited: bool, + singleton_buffer_edited: bool, }, TransactionUndone { transaction_id: TransactionId, @@ -1112,7 +1112,7 @@ impl MultiBuffer { new: edit_start..edit_end, }]); cx.emit(Event::Edited { - sigleton_buffer_edited: false, + singleton_buffer_edited: false, }); cx.emit(Event::ExcerptsAdded { buffer, @@ -1138,7 +1138,7 @@ impl MultiBuffer { new: 0..0, }]); cx.emit(Event::Edited { - sigleton_buffer_edited: false, + singleton_buffer_edited: false, }); cx.emit(Event::ExcerptsRemoved { ids }); cx.notify(); @@ -1348,7 +1348,7 @@ impl MultiBuffer { self.subscriptions.publish_mut(edits); cx.emit(Event::Edited { - sigleton_buffer_edited: false, + singleton_buffer_edited: false, }); cx.emit(Event::ExcerptsRemoved { ids }); cx.notify(); @@ -1411,7 +1411,7 @@ impl MultiBuffer { ) { cx.emit(match event { language::Event::Edited => Event::Edited { - sigleton_buffer_edited: true, + singleton_buffer_edited: true, }, language::Event::DirtyChanged => Event::DirtyChanged, language::Event::Saved => Event::Saved, @@ -4280,13 +4280,13 @@ mod tests { events.read().as_slice(), &[ Event::Edited { - sigleton_buffer_edited: false + singleton_buffer_edited: false }, Event::Edited { - sigleton_buffer_edited: false + singleton_buffer_edited: false }, Event::Edited { - sigleton_buffer_edited: false + singleton_buffer_edited: false } ] ); diff --git a/crates/project/src/lsp_command.rs b/crates/project/src/lsp_command.rs index 52836f4c0030e005eb19d396c77bfb49fc0ea604..2c2bed87173e2d3e7fff124815e4f89f852a103b 100644 --- a/crates/project/src/lsp_command.rs +++ b/crates/project/src/lsp_command.rs @@ -2253,7 +2253,7 @@ impl LspCommand for InlayHints { language_server_for_buffer(&project, &buffer, server_id, &mut cx)?; // `typescript-language-server` adds padding to the left for type hints, turning // `const foo: boolean` into `const foo : boolean` which looks odd. - // `rust-analyzer` does not have the padding for this case, and we have to accomodate both. + // `rust-analyzer` does not have the padding for this case, and we have to accommodate both. // // We could trim the whole string, but being pessimistic on par with the situation above, // there might be a hint with multiple whitespaces at the end(s) which we need to display properly. diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index 5f37bbfce6483e359866a0dadb1d63b2e32b4651..c5dc88d4479ef1627a7da56344c16695077756b3 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -5578,7 +5578,7 @@ impl Project { // 3. We run a scan over all the candidate buffers on multiple background threads. // We cannot assume that there will even be a match - while at least one match // is guaranteed for files obtained from FS, the buffers we got from memory (unsaved files/unnamed buffers) might not have a match at all. - // There is also an auxilliary background thread responsible for result gathering. + // There is also an auxiliary background thread responsible for result gathering. // This is where the sorted list of buffers comes into play to maintain sorted order; Whenever this background thread receives a notification (buffer has/doesn't have matches), // it keeps it around. It reports matches in sorted order, though it accepts them in unsorted order as well. // As soon as the match info on next position in sorted order becomes available, it reports it (if it's a match) or skips to the next @@ -8550,7 +8550,7 @@ fn glob_literal_prefix<'a>(glob: &'a str) -> &'a str { break; } else { if i > 0 { - // Acount for separator prior to this part + // Account for separator prior to this part literal_end += path::MAIN_SEPARATOR.len_utf8(); } literal_end += part.len(); diff --git a/crates/project/src/project_settings.rs b/crates/project/src/project_settings.rs index 925109ac964044a2e93a4a1a7ba23b493a2434ed..9ec07bc088c49ef541b2af1b0c7ee1164f9a9eec 100644 --- a/crates/project/src/project_settings.rs +++ b/crates/project/src/project_settings.rs @@ -9,7 +9,7 @@ use std::sync::Arc; pub struct ProjectSettings { /// Configuration for language servers. /// - /// The following settings can be overriden for specific language servers: + /// The following settings can be overridden for specific language servers: /// - initialization_options /// To override settings for a language, add an entry for that language server's /// name to the lsp value. diff --git a/crates/project_panel/src/file_associations.rs b/crates/project_panel/src/file_associations.rs index 82aebe7913133d2aa7f673f21387f2c7a8ad3ca3..0ddcfc9285eb31b7f5be50d57d6ef8dd14cebb42 100644 --- a/crates/project_panel/src/file_associations.rs +++ b/crates/project_panel/src/file_associations.rs @@ -44,7 +44,7 @@ impl FileAssociations { pub fn get_icon(path: &Path, cx: &AppContext) -> Option> { let this = cx.has_global::().then(|| cx.global::())?; - // FIXME: Associate a type with the languages and have the file's langauge + // FIXME: Associate a type with the languages and have the file's language // override these associations maybe!({ let suffix = path.icon_suffix()?; diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs index 6208635e22d969bfa9219d7eb4d1466a35a0999d..1d8ddefcbcc674ff22f85aeda5c9f3fc67dc4a85 100644 --- a/crates/recent_projects/src/recent_projects.rs +++ b/crates/recent_projects/src/recent_projects.rs @@ -32,7 +32,7 @@ impl RecentProjects { fn new(delegate: RecentProjectsDelegate, rem_width: f32, cx: &mut ViewContext) -> Self { let picker = cx.new_view(|cx| Picker::new(delegate, cx)); let _subscription = cx.subscribe(&picker, |_, _, _, cx| cx.emit(DismissEvent)); - // We do not want to block the UI on a potentially lenghty call to DB, so we're gonna swap + // We do not want to block the UI on a potentially lengthy call to DB, so we're gonna swap // out workspace locations once the future runs to completion. cx.spawn(|this, mut cx| async move { let workspaces = WORKSPACE_DB diff --git a/crates/refineable/derive_refineable/src/derive_refineable.rs b/crates/refineable/derive_refineable/src/derive_refineable.rs index 99418206462a0dc7bc3babd2f9bda534a69a0f39..bc906daece556106978f9788ff1502f004812180 100644 --- a/crates/refineable/derive_refineable/src/derive_refineable.rs +++ b/crates/refineable/derive_refineable/src/derive_refineable.rs @@ -141,7 +141,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream { }) .collect(); - let refinement_refine_assigments: Vec = fields + let refinement_refine_assignments: Vec = fields .iter() .map(|field| { let name = &field.ident; @@ -161,7 +161,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream { }) .collect(); - let refinement_refined_assigments: Vec = fields + let refinement_refined_assignments: Vec = fields .iter() .map(|field| { let name = &field.ident; @@ -181,7 +181,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream { }) .collect(); - let from_refinement_assigments: Vec = fields + let from_refinement_assignments: Vec = fields .iter() .map(|field| { let name = &field.ident; @@ -272,11 +272,11 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream { type Refinement = #refinement_ident #ty_generics; fn refine(&mut self, refinement: &Self::Refinement) { - #( #refinement_refine_assigments )* + #( #refinement_refine_assignments )* } fn refined(mut self, refinement: Self::Refinement) -> Self { - #( #refinement_refined_assigments )* + #( #refinement_refined_assignments )* self } } @@ -286,7 +286,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream { { fn from(value: #refinement_ident #ty_generics) -> Self { Self { - #( #from_refinement_assigments )* + #( #from_refinement_assignments )* } } } diff --git a/crates/search/src/history.rs b/crates/search/src/history.rs index 6b06c60293d4389693b9d3692a2649856076081f..5571313acb280c143b70e05fb9c5f8aa066bf56e 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/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 919129ef76be9ffb21f77b809b42304f7a910beb..efb7af3879dcdff0141897b65fb0e3b952753609 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -2700,7 +2700,7 @@ pub mod tests { ); assert!( search_view_2.query_editor.focus_handle(cx).is_focused(cx), - "Focus should be moved into query editor fo the new window" + "Focus should be moved into query editor of the new window" ); }); }).unwrap(); diff --git a/crates/semantic_index/README.md b/crates/semantic_index/README.md index 85f83af121ed96a51ac84165c19cda3cd8aff7d4..75ccb41b84468bef319b6bc1957fd236c125ba95 100644 --- a/crates/semantic_index/README.md +++ b/crates/semantic_index/README.md @@ -10,7 +10,7 @@ nDCG@k: - "The relevance of result is represented by a score (also known as a 'grade') that is assigned to the search query. The scores of these results are then discounted based on their position in the search results -- did they get recommended first or last?" MRR@k: -- "Mean reciprocal rank quantifies the rank of the first relevant item found in teh recommendation list." +- "Mean reciprocal rank quantifies the rank of the first relevant item found in the recommendation list." MAP@k: - "Mean average precision averages the precision@k metric at each relevant item position in the recommendation list. diff --git a/crates/semantic_index/src/parsing.rs b/crates/semantic_index/src/parsing.rs index 427ac158c1b9e84ed4c64ca6700e08cc31269b7d..9f2db711ae0e97d5f7f21af7afd12f09de147a18 100644 --- a/crates/semantic_index/src/parsing.rs +++ b/crates/semantic_index/src/parsing.rs @@ -76,7 +76,7 @@ pub struct CodeContextRetriever { // Every match has an item, this represents the fundamental treesitter symbol and anchors the search // Every match has one or more 'name' captures. These indicate the display range of the item for deduplication. -// If there are preceeding comments, we track this with a context capture +// If there are preceding comments, we track this with a context capture // If there is a piece that should be collapsed in hierarchical queries, we capture it with a collapse capture // If there is a piece that should be kept inside a collapsed node, we capture it with a keep capture #[derive(Debug, Clone)] diff --git a/crates/semantic_index/src/semantic_index_tests.rs b/crates/semantic_index/src/semantic_index_tests.rs index e340b44a58377b8a9bda52786dea660637ce54c1..9da92a15a8acf6dd6ae8bf06d1846fc5073ffee1 100644 --- a/crates/semantic_index/src/semantic_index_tests.rs +++ b/crates/semantic_index/src/semantic_index_tests.rs @@ -110,7 +110,7 @@ async fn test_semantic_index(cx: &mut TestAppContext) { cx, ); - // Test Include Files Functonality + // Test Include Files Functionality let include_files = vec![PathMatcher::new("*.rs").unwrap()]; let exclude_files = vec![PathMatcher::new("*.rs").unwrap()]; let rust_only_search_results = semantic_index @@ -576,7 +576,7 @@ async fn test_code_context_retrieval_lua() { setmetatable(classdef, { __index = baseclass }) -- All class instances have a reference to the class object. classdef.class = classdef - --- Recursivly allocates the inheritance tree of the instance. + --- Recursively allocates the inheritance tree of the instance. -- @param mastertable The 'root' of the inheritance tree. -- @return Returns the instance with the allocated inheritance tree. function classdef.alloc(mastertable) @@ -607,7 +607,7 @@ async fn test_code_context_retrieval_lua() { setmetatable(classdef, { __index = baseclass }) -- All class instances have a reference to the class object. classdef.class = classdef - --- Recursivly allocates the inheritance tree of the instance. + --- Recursively allocates the inheritance tree of the instance. -- @param mastertable The 'root' of the inheritance tree. -- @return Returns the instance with the allocated inheritance tree. function classdef.alloc(mastertable) @@ -617,7 +617,7 @@ async fn test_code_context_retrieval_lua() { end"#.unindent(), 114), (r#" - --- Recursivly allocates the inheritance tree of the instance. + --- Recursively allocates the inheritance tree of the instance. -- @param mastertable The 'root' of the inheritance tree. -- @return Returns the instance with the allocated inheritance tree. function classdef.alloc(mastertable) @@ -626,7 +626,7 @@ async fn test_code_context_retrieval_lua() { -- Any functions this instance does not know of will 'look up' to the superclass definition. setmetatable(instance, { __index = classdef, __newindex = mastertable }) return instance - end"#.unindent(), 809), + end"#.unindent(), 810), ] ); } diff --git a/crates/sqlez/src/migrations.rs b/crates/sqlez/src/migrations.rs index c0d125d4df9f654364088f6af31c40c9f3192950..f59b9dd40eddbce68412484fded2a729af0fefee 100644 --- a/crates/sqlez/src/migrations.rs +++ b/crates/sqlez/src/migrations.rs @@ -191,7 +191,7 @@ mod test { fn migrations_dont_rerun() { let connection = Connection::open_memory(Some("migrations_dont_rerun")); - // Create migration which clears a tabl + // Create migration which clears a table // Manually create the table for that migration with a row connection diff --git a/crates/storybook/src/stories/text.rs b/crates/storybook/src/stories/text.rs index 065b5bf795ba89fa1747c40fc1387ff00d4cb9c0..b7445ef95aac857a258c903a64ccde0c25497461 100644 --- a/crates/storybook/src/stories/text.rs +++ b/crates/storybook/src/stories/text.rs @@ -65,7 +65,7 @@ impl Render for TextStory { )) ) .usage(indoc! {r##" - // NOTE: When rendering text in a horizonal flex container, + // NOTE: When rendering text in a horizontal flex container, // Taffy will not pass width constraints down from the parent. // To fix this, render text in a parent with overflow: hidden @@ -149,7 +149,7 @@ impl Render for TextStory { // "Meanwhile, the lazy dog decided it was time for a change. ", // "He started daily workout routines, ate healthier and became the fastest dog in town.", // )))) -// // NOTE: When rendering text in a horizonal flex container, +// // NOTE: When rendering text in a horizontal flex container, // // Taffy will not pass width constraints down from the parent. // // To fix this, render text in a parent with overflow: hidden // .child(div().h_5()) diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs index 16e1ca4a73a45e0d9eb76082894313cdecc8261b..fc5829ba00058d686bd67676e85755fbbb955197 100644 --- a/crates/terminal_view/src/terminal_view.rs +++ b/crates/terminal_view/src/terminal_view.rs @@ -674,9 +674,9 @@ impl Render for TerminalView { self.can_navigate_to_selected_word, )), ) - .children(self.context_menu.as_ref().map(|(menu, positon, _)| { + .children(self.context_menu.as_ref().map(|(menu, position, _)| { overlay() - .position(*positon) + .position(*position) .anchor(gpui::AnchorCorner::TopLeft) .child(menu.clone()) })) diff --git a/crates/theme/src/styles/syntax.rs b/crates/theme/src/styles/syntax.rs index 0f35bf60a73aa634bf0953e19f4beea1354131c3..d6189f73e3e10da39918932559503787a129af64 100644 --- a/crates/theme/src/styles/syntax.rs +++ b/crates/theme/src/styles/syntax.rs @@ -127,7 +127,7 @@ impl SyntaxTheme { } } - // TOOD: Get this working with `#[cfg(test)]`. Why isn't it? + // TODO: Get this working with `#[cfg(test)]`. Why isn't it? pub fn new_test(colors: impl IntoIterator) -> Self { SyntaxTheme { highlights: colors diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rs index ff20d36a5df6ad3ffebbe0dc4f58a85ec1383707..0861b7efd8433729707a3c7d4d6fe8541366226a 100644 --- a/crates/theme_importer/src/main.rs +++ b/crates/theme_importer/src/main.rs @@ -188,7 +188,7 @@ fn main() -> Result<()> { let zed1_themes_path = PathBuf::from_str("assets/themes")?; - let zed1_theme_familes = [ + let zed1_theme_families = [ "Andromeda", "Atelier", "Ayu", @@ -207,7 +207,7 @@ fn main() -> Result<()> { ); let mut zed1_themes_by_family: IndexMap> = IndexMap::from_iter( - zed1_theme_familes + zed1_theme_families .into_iter() .map(|family| (family.to_string(), Vec::new())), ); diff --git a/crates/ui/src/components/button/button_like.rs b/crates/ui/src/components/button/button_like.rs index 018d31dafdb4491bc88733117c8e42f66e789aa3..c2910acfc04bee67630c3d55b2ce2394559379f6 100644 --- a/crates/ui/src/components/button/button_like.rs +++ b/crates/ui/src/components/button/button_like.rs @@ -111,7 +111,7 @@ pub enum ButtonStyle { #[default] Subtle, - /// Used for buttons that only change forground color on hover and active states. + /// Used for buttons that only change foreground color on hover and active states. /// /// TODO: Better docs for this. Transparent, diff --git a/crates/ui/src/components/popover.rs b/crates/ui/src/components/popover.rs index 2e0c5bfec87b84f820bf3bdb512053460e90360f..ad72a1d9b6efd45cf16270ac0cb552b46732957a 100644 --- a/crates/ui/src/components/popover.rs +++ b/crates/ui/src/components/popover.rs @@ -12,7 +12,7 @@ use smallvec::SmallVec; /// user's mouse.) /// /// Example: A "new" menu with options like "new file", "new folder", etc, -/// Linear's "Display" menu, a profile menu that appers when you click your avatar. +/// Linear's "Display" menu, a profile menu that appears when you click your avatar. /// /// Related elements: /// diff --git a/crates/ui/src/styles/elevation.rs b/crates/ui/src/styles/elevation.rs index ec1848ca6093606aea9abcc926f242b20e0e727c..0aa3786a279242c8a3a301b497a60ab0c2c537ec 100644 --- a/crates/ui/src/styles/elevation.rs +++ b/crates/ui/src/styles/elevation.rs @@ -85,7 +85,7 @@ impl LayerIndex { } } -/// An appropriate z-index for the given layer based on its intended useage. +/// An appropriate z-index for the given layer based on its intended usage. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum ElementIndex { Effect, diff --git a/crates/vcs_menu/src/lib.rs b/crates/vcs_menu/src/lib.rs index 67a12a852bdaeeae08f5fbcdc41ab11a91572605..44564ce878eae530cf23f48ea02ad44d93cd4892 100644 --- a/crates/vcs_menu/src/lib.rs +++ b/crates/vcs_menu/src/lib.rs @@ -342,7 +342,7 @@ impl PickerDelegate for BranchListDelegate { } let status = repo.change_branch(¤t_pick); if status.is_err() { - this.delegate.display_error_toast(format!("Failed to chec branch '{current_pick}', check for conflicts or unstashed files"), cx); + this.delegate.display_error_toast(format!("Failed to check branch '{current_pick}', check for conflicts or unstashed files"), cx); status?; } this.cancel(&Default::default(), cx); diff --git a/crates/vim/src/normal/repeat.rs b/crates/vim/src/normal/repeat.rs index c6d1f0e6c352ceef55926363553d4314ce22f42d..a2587c6f003a57f0199dfd3b62bb6d6a1d1c2139 100644 --- a/crates/vim/src/normal/repeat.rs +++ b/crates/vim/src/normal/repeat.rs @@ -152,7 +152,7 @@ pub(crate) fn repeat(cx: &mut WindowContext, from_insert_mode: bool) { let mut count = Vim::read(cx).workspace_state.recorded_count.unwrap_or(1); - // if we came from insert mode we're just doing repititions 2 onwards. + // if we came from insert mode we're just doing repetitions 2 onwards. if from_insert_mode { count -= 1; new_actions[0] = actions[0].clone(); diff --git a/crates/vim/src/normal/search.rs b/crates/vim/src/normal/search.rs index 7b5f4d3e59a3362c807922ae12ffaba98fdfd8eb..f85e3d9ba92415040114fbcfd61c55c5066dbf79 100644 --- a/crates/vim/src/normal/search.rs +++ b/crates/vim/src/normal/search.rs @@ -278,7 +278,7 @@ fn parse_replace_all(query: &str) -> Replacement { return Replacement::default(); } - let Some(delimeter) = chars.next() else { + let Some(delimiter) = chars.next() else { return Replacement::default(); }; @@ -301,13 +301,13 @@ fn parse_replace_all(query: &str) -> Replacement { buffer.push('$') // unescape escaped parens } else if phase == 0 && c == '(' || c == ')' { - } else if c != delimeter { + } else if c != delimiter { buffer.push('\\') } buffer.push(c) } else if c == '\\' { escaped = true; - } else if c == delimeter { + } else if c == delimiter { if phase == 0 { buffer = &mut replacement; phase = 1; diff --git a/crates/vim/src/test/neovim_connection.rs b/crates/vim/src/test/neovim_connection.rs index 363f6d43e38ab2a99cab89173e62ddc81bfe02f2..a2daf7499d887eee0d7cd6de363f305f7740387c 100644 --- a/crates/vim/src/test/neovim_connection.rs +++ b/crates/vim/src/test/neovim_connection.rs @@ -359,7 +359,7 @@ impl NeovimConnection { // to add one to the end in visual mode. match mode { Some(Mode::VisualBlock) if selection_row != cursor_row => { - // in zed we fake a block selecrtion by using multiple cursors (one per line) + // in zed we fake a block selection by using multiple cursors (one per line) // this code emulates that. // to deal with casees where the selection is not perfectly rectangular we extract // the content of the selection via the "a register to get the shape correctly. diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs index e03efb0a64b4b55e92ed8d92d8837351ac573e0d..0cb038807bf44be70dbd296276f669a0c69bff63 100644 --- a/crates/vim/src/vim.rs +++ b/crates/vim/src/vim.rs @@ -332,7 +332,7 @@ impl Vim { } } - /// Explicitly record one action (equiavlent to start_recording and stop_recording) + /// Explicitly record one action (equivalents to start_recording and stop_recording) pub fn record_current_action(&mut self, cx: &mut WindowContext) { self.start_recording(cx); self.stop_recording(); diff --git a/crates/vim/src/visual.rs b/crates/vim/src/visual.rs index 797a271574800b72847bd733c32a4764e3ec023c..d082ccc13878a98a24f75922abfd4ad21292c2d1 100644 --- a/crates/vim/src/visual.rs +++ b/crates/vim/src/visual.rs @@ -201,15 +201,13 @@ pub fn visual_block_motion( let mut row = tail.row(); loop { - let layed_out_line = map.layout_row(row, &text_layout_details); + let laid_out_line = map.layout_row(row, &text_layout_details); let start = DisplayPoint::new( row, - layed_out_line.closest_index_for_x(positions.start) as u32, - ); - let mut end = DisplayPoint::new( - row, - layed_out_line.closest_index_for_x(positions.end) as u32, + laid_out_line.closest_index_for_x(positions.start) as u32, ); + let mut end = + DisplayPoint::new(row, laid_out_line.closest_index_for_x(positions.end) as u32); if end <= start { if start.column() == map.line_len(start.row()) { end = start; @@ -218,7 +216,7 @@ pub fn visual_block_motion( } } - if positions.start <= layed_out_line.width { + if positions.start <= laid_out_line.width { let selection = Selection { id: s.new_selection_id(), start: start.to_point(map), diff --git a/crates/welcome/src/base_keymap_setting.rs b/crates/welcome/src/base_keymap_setting.rs index e05a16c350d4de2a7f1c0ddf56b7b581ef7d6b17..54af63007af38b7796b92a9280aa951056fc6f52 100644 --- a/crates/welcome/src/base_keymap_setting.rs +++ b/crates/welcome/src/base_keymap_setting.rs @@ -4,7 +4,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use settings::Settings; -/// Base key bindings scheme. Base keymaps can be overriden with user keymaps. +/// Base key bindings scheme. Base keymaps can be overridden with user keymaps. /// /// Default: VSCode #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Default)] diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index a1f3e6992aef51291fc66b9f4092e3dbd24c7be6..3e88469aa8593967e3ffea1cfd3ba0392f7e11f7 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1485,7 +1485,7 @@ impl Pane { .child( div() .min_w_6() - // HACK: This empty child is currently necessary to force the drop traget to appear + // HACK: This empty child is currently necessary to force the drop target to appear // despite us setting a min width above. .child("") .h_full() diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 1d06db5de3b459b289d3b0392c3fb91ac594a760..e8589849f14dbe9148ff467480f5d4a5583d1ed7 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -2617,7 +2617,7 @@ impl Workspace { // If the item belongs to a particular project, then it should // only be included if this project is shared, and the follower - // is in thie project. + // is in the project. // // Some items, like channel notes, do not belong to a particular // project, so they should be included regardless of whether the diff --git a/docs/old/building-zed.md b/docs/old/building-zed.md index ec4538cf85f47d99ee11b24bb876b602eba8249e..79db4a36c9ec65fa54807fa2234ee8190729f067 100644 --- a/docs/old/building-zed.md +++ b/docs/old/building-zed.md @@ -36,7 +36,7 @@ Expect this to take 30min to an hour! Some of these steps will take quite a whil Unfortunately, unselecting `repo` scope and selecting every its inner scope instead does not allow the token users to read from private repositories - (not applicable) Fine-grained Tokens, at the moment of writing, did not allow any kind of access of non-owned private repos - Keep the token in the browser tab/editor for the next two steps -1. (Optional but reccomended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken` +1. (Optional but recommended) Add your GITHUB_TOKEN to your `.zshrc` or `.bashrc` like this: `export GITHUB_TOKEN=yourGithubAPIToken` 1. Ensure the Zed.dev website is checked out in a sibling directory and install it's dependencies: ``` cd .. diff --git a/docs/old/release-process.md b/docs/old/release-process.md index 6162304a7b0a74fe3bfad2cc110d9fbc6a820c51..fc237d959069188d26ea85c7417a3a079377997b 100644 --- a/docs/old/release-process.md +++ b/docs/old/release-process.md @@ -90,7 +90,7 @@ This means that when releasing a new version of Zed that has changes to the RPC 1. If needing a migration: - First check that the migration is valid. The database serves both preview and stable simultaneously, so new columns need to have defaults and old tables or columns can't be dropped. - Then use `script/deploy-migration` (production, staging, preview, nightly). ex: `script/deploy-migration preview 0.19.0` - - If there is an 'Error: container is waiting to start', you can review logs manually with: `kubectl --namespace logs ` to make sure the mgiration ran successfully. + - If there is an 'Error: container is waiting to start', you can review logs manually with: `kubectl --namespace logs ` to make sure the mgiration ran successfully. 1. Once that CI job completes, you will be able to run the following command to deploy that docker image. The script takes two arguments: an environment (`production`, `preview`, or `staging`), and a version number (e.g. `0.10.1`): ``` diff --git a/docs/old/zed/syntax-highlighting.md b/docs/old/zed/syntax-highlighting.md index d4331ee367934453b19c6cd30af57924409b34d7..846bf968764f7dcf16210c7f740ee8a499cc53c4 100644 --- a/docs/old/zed/syntax-highlighting.md +++ b/docs/old/zed/syntax-highlighting.md @@ -4,7 +4,7 @@ This doc is a work in progress! ## Defining syntax highlighting rules -We use tree-sitter queries to match certian properties to highlight. +We use tree-sitter queries to match certain properties to highlight. ### Simple Example: diff --git a/docs/src/configuring_zed.md b/docs/src/configuring_zed.md index 9b9205f70ca7cac1cb587a2800de6af3f7bed956..46f0d35becb63d6b86ace12cc37bea2b8aaee297 100644 --- a/docs/src/configuring_zed.md +++ b/docs/src/configuring_zed.md @@ -4,7 +4,7 @@ Folder-specific settings are used to override Zed's global settings for files within a specific directory in the project panel. To get started, create a `.zed` subdirectory and add a `settings.json` within it. It should be noted that folder-specific settings don't need to live only a project's root, but can be defined at multiple levels in the project hierarchy. In setups like this, Zed will find the configuration nearest to the file you are working in and apply those settings to it. In most cases, this level of flexibility won't be needed and a single configuration for all files in a project is all that is required; the `Zed > Settings > Open Local Settings` menu action is built for this case. Running this action will look for a `.zed/settings.json` file at the root of the first top-level directory in your project panel. If it does not exist, it will create it. -The following global settings can be overriden with a folder-specific configuration: +The following global settings can be overridden with a folder-specific configuration: - `copilot` - `enable_language_server` diff --git a/docs/src/developing_zed__adding_languages.md b/docs/src/developing_zed__adding_languages.md index 2917b08422c1e2153a38f5c857a9318a9228c031..7fce7e85446ec355835bf137f41669bfea1115db 100644 --- a/docs/src/developing_zed__adding_languages.md +++ b/docs/src/developing_zed__adding_languages.md @@ -8,7 +8,7 @@ Zed uses the [Language Server Protocol](https://microsoft.github.io/language-ser ### Defining syntax highlighting rules -We use tree-sitter queries to match certian properties to highlight. +We use tree-sitter queries to match certain properties to highlight. #### Simple Example: diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000000000000000000000000000000000..115cc14478cb94feb8320fff5b7b67b555864a6d --- /dev/null +++ b/typos.toml @@ -0,0 +1,22 @@ +[files] +ignore-files = true +extend-exclude = [ + # glsl isn't recognized by this tool + "crates/zed/src/languages/glsl/*", + # File suffixes aren't typos + "assets/icons/file_icons/file_types.json", + # Not our typos + "assets/themes/src/vscode/*", + "crates/live_kit_server/*", + # Vim makes heavy use of partial typing tables + "crates/vim/*", + # 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", + # :/ + "crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql", +] + +[default] +extend-ignore-re = ["ba"] +check-filename = true