Fix typos (#2562)

Joseph T. Lyons created

Quite literally just ran `typos --write-changes` from
https://crates.io/crates/typos. Its pretty impressive - wonder if we
should run it on CI.

Release Notes:

- N/A

Change summary

assets/keymaps/default.json                   |  2 +-
assets/settings/default.json                  |  2 +-
crates/cli/src/main.rs                        |  5 +----
crates/collab_ui/src/collab_titlebar_item.rs  |  2 +-
crates/copilot/src/copilot.rs                 |  2 +-
crates/editor/src/display_map.rs              |  4 ++--
crates/editor/src/editor.rs                   |  6 +++---
crates/editor/src/editor_tests.rs             |  6 +++---
crates/editor/src/element.rs                  |  2 +-
crates/editor/src/multi_buffer.rs             |  2 +-
crates/editor/src/test.rs                     |  4 ++--
crates/fs/src/fs.rs                           |  6 +++---
crates/gpui/src/app.rs                        |  4 ++--
crates/gpui/src/keymap_matcher.rs             |  2 +-
crates/language/src/language_settings.rs      |  2 +-
crates/language/src/syntax_map.rs             |  4 ++--
crates/plugin_macros/src/lib.rs               |  4 ++--
crates/plugin_runtime/OPAQUE.md               |  4 ++--
crates/plugin_runtime/src/plugin.rs           | 10 +++++-----
crates/project/src/project.rs                 |  2 +-
crates/project/src/worktree.rs                |  4 ++--
crates/project_symbols/src/project_symbols.rs |  2 +-
crates/rpc/proto/zed.proto                    |  2 +-
crates/rpc/src/auth.rs                        |  2 +-
crates/sqlez/src/thread_safe_connection.rs    |  8 ++++----
crates/terminal/src/mappings/colors.rs        |  4 ++--
crates/terminal_view/README.md                |  2 +-
crates/terminal_view/scripts/print256color.sh |  2 +-
crates/terminal_view/src/terminal_element.rs  |  4 ++--
crates/terminal_view/src/terminal_view.rs     |  4 ++--
crates/text/src/tests.rs                      |  4 ++--
crates/vim/src/normal.rs                      |  2 +-
crates/vim/src/test/neovim_connection.rs      |  2 +-
crates/workspace/src/pane.rs                  |  2 +-
crates/workspace/src/workspace.rs             |  2 +-
crates/zed/src/languages/typescript.rs        |  2 +-
crates/zed/src/main.rs                        |  2 +-
styles/src/buildLicenses.ts                   |  2 +-
styles/src/styleTree/editor.ts                |  2 +-
styles/src/styleTree/search.ts                |  2 +-
styles/src/system/types.ts                    | 10 +++++-----
41 files changed, 69 insertions(+), 72 deletions(-)

Detailed changes

assets/keymaps/default.json πŸ”—

@@ -516,7 +516,7 @@
         "terminal::SendText",
         "\u0001"
       ],
-      // Terminal.app compatability
+      // Terminal.app compatibility
       "alt-left": [
         "terminal::SendText",
         "\u001bb"

assets/settings/default.json πŸ”—

@@ -245,7 +245,7 @@
     // copy to the system clipboard.
     "copy_on_select": false,
     // Any key-value pairs added to this list will be added to the terminal's
-    // enviroment. Use `:` to seperate multiple values.
+    // environment. Use `:` to separate multiple values.
     "env": {
       // "KEY": "value1:value2"
     },

crates/cli/src/main.rs πŸ”—

@@ -159,10 +159,7 @@ impl Bundle {
     fn path(&self) -> &Path {
         match self {
             Self::App { app_bundle, .. } => app_bundle,
-            Self::LocalPath {
-                executable: excutable,
-                ..
-            } => excutable,
+            Self::LocalPath { executable, .. } => executable,
         }
     }
 

crates/collab_ui/src/collab_titlebar_item.rs πŸ”—

@@ -472,7 +472,7 @@ impl CollabTitlebarItem {
             Stack::new()
                 .with_child(
                     MouseEventHandler::<ShareUnshare, Self>::new(0, cx, |state, _| {
-                        //TODO: Ensure this button has consistant width for both text variations
+                        //TODO: Ensure this button has consistent width for both text variations
                         let style = titlebar.share_button.style_for(state, false);
                         Label::new(label, style.text.clone())
                             .contained()

crates/copilot/src/copilot.rs πŸ”—

@@ -375,7 +375,7 @@ impl Copilot {
                 server
                     .on_notification::<LogMessage, _>(|params, _cx| {
                         match params.level {
-                            // Copilot is pretty agressive about logging
+                            // Copilot is pretty aggressive about logging
                             0 => debug!("copilot: {}", params.message),
                             1 => debug!("copilot: {}", params.message),
                             _ => error!("copilot: {}", params.message),

crates/editor/src/display_map.rs πŸ”—

@@ -475,7 +475,7 @@ impl DisplaySnapshot {
             })
     }
 
-    /// Returns an iterator of the start positions of the occurances of `target` in the `self` after `from`
+    /// Returns an iterator of the start positions of the occurrences of `target` in the `self` after `from`
     /// Stops if `condition` returns false for any of the character position pairs observed.
     pub fn find_while<'a>(
         &'a self,
@@ -486,7 +486,7 @@ impl DisplaySnapshot {
         Self::find_internal(self.chars_at(from), target.chars().collect(), condition)
     }
 
-    /// Returns an iterator of the end positions of the occurances of `target` in the `self` before `from`
+    /// Returns an iterator of the end positions of the occurrences of `target` in the `self` before `from`
     /// Stops if `condition` returns false for any of the character position pairs observed.
     pub fn reverse_find_while<'a>(
         &'a self,

crates/editor/src/editor.rs πŸ”—

@@ -2539,7 +2539,7 @@ impl Editor {
             .read(cx)
             .text_anchor_for_position(position.clone(), cx)?;
 
-        // OnTypeFormatting retuns a list of edits, no need to pass them between Zed instances,
+        // OnTypeFormatting returns a list of edits, no need to pass them between Zed instances,
         // hence we do LSP request & edit on host side only β€”Β add formats to host's history.
         let push_to_lsp_host_history = true;
         // If this is not the host, append its history with new edits.
@@ -7913,13 +7913,13 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend
 }
 
 pub fn highlight_diagnostic_message(
-    inital_highlights: Vec<usize>,
+    initial_highlights: Vec<usize>,
     message: &str,
 ) -> (String, Vec<usize>) {
     let mut message_without_backticks = String::new();
     let mut prev_offset = 0;
     let mut inside_block = false;
-    let mut highlights = inital_highlights;
+    let mut highlights = initial_highlights;
     for (match_ix, (offset, _)) in message
         .match_indices('`')
         .chain([(message.len(), "")])

crates/editor/src/editor_tests.rs πŸ”—

@@ -4321,7 +4321,7 @@ async fn test_document_format_during_save(cx: &mut gpui::TestAppContext) {
     );
     assert!(!cx.read(|cx| editor.is_dirty(cx)));
 
-    // Set rust language override and assert overriden tabsize is sent to language server
+    // Set rust language override and assert overridden tabsize is sent to language server
     update_test_settings(cx, |settings| {
         settings.languages.insert(
             "Rust".into(),
@@ -4435,7 +4435,7 @@ async fn test_range_format_during_save(cx: &mut gpui::TestAppContext) {
     );
     assert!(!cx.read(|cx| editor.is_dirty(cx)));
 
-    // Set rust language override and assert overriden tabsize is sent to language server
+    // Set rust language override and assert overridden tabsize is sent to language server
     update_test_settings(cx, |settings| {
         settings.languages.insert(
             "Rust".into(),
@@ -4776,7 +4776,7 @@ async fn test_completion(cx: &mut gpui::TestAppContext) {
                     two
                     threeˇ
                 "},
-                "overlapping aditional edit",
+                "overlapping additional edit",
             ),
             (
                 indoc! {"

crates/editor/src/element.rs πŸ”—

@@ -3080,7 +3080,7 @@ mod tests {
         editor_width: f32,
     ) -> Vec<Invisible> {
         info!(
-            "Creating editor with mode {editor_mode:?}, witdh {editor_width} and text '{input_text}'"
+            "Creating editor with mode {editor_mode:?}, width {editor_width} and text '{input_text}'"
         );
         let (_, editor) = cx.add_window(|cx| {
             let buffer = MultiBuffer::build_simple(&input_text, cx);

crates/editor/src/multi_buffer.rs πŸ”—

@@ -5332,7 +5332,7 @@ mod tests {
             assert_eq!(multibuffer.read(cx).text(), "ABCDE1234\nAB5678");
 
             // An undo in the multibuffer undoes the multibuffer transaction
-            // and also any individual buffer edits that have occured since
+            // and also any individual buffer edits that have occurred since
             // that transaction.
             multibuffer.undo(cx);
             assert_eq!(multibuffer.read(cx).text(), "AB1234\nAB5678");

crates/editor/src/test.rs πŸ”—

@@ -48,8 +48,8 @@ pub fn marked_display_snapshot(
 }
 
 pub fn select_ranges(editor: &mut Editor, marked_text: &str, cx: &mut ViewContext<Editor>) {
-    let (umarked_text, text_ranges) = marked_text_ranges(marked_text, true);
-    assert_eq!(editor.text(cx), umarked_text);
+    let (unmarked_text, text_ranges) = marked_text_ranges(marked_text, true);
+    assert_eq!(editor.text(cx), unmarked_text);
     editor.change_selections(None, cx, |s| s.select_ranges(text_ranges));
 }
 

crates/fs/src/fs.rs πŸ”—

@@ -32,7 +32,7 @@ use repository::{FakeGitRepositoryState, GitFileStatus};
 use std::sync::Weak;
 
 lazy_static! {
-    static ref LINE_SEPERATORS_REGEX: Regex = Regex::new("\r\n|\r|\u{2028}|\u{2029}").unwrap();
+    static ref LINE_SEPARATORS_REGEX: Regex = Regex::new("\r\n|\r|\u{2028}|\u{2029}").unwrap();
 }
 
 #[derive(Clone, Copy, Debug, PartialEq)]
@@ -77,13 +77,13 @@ impl LineEnding {
     }
 
     pub fn normalize(text: &mut String) {
-        if let Cow::Owned(replaced) = LINE_SEPERATORS_REGEX.replace_all(text, "\n") {
+        if let Cow::Owned(replaced) = LINE_SEPARATORS_REGEX.replace_all(text, "\n") {
             *text = replaced;
         }
     }
 
     pub fn normalize_arc(text: Arc<str>) -> Arc<str> {
-        if let Cow::Owned(replaced) = LINE_SEPERATORS_REGEX.replace_all(&text, "\n") {
+        if let Cow::Owned(replaced) = LINE_SEPARATORS_REGEX.replace_all(&text, "\n") {
             replaced.into()
         } else {
             text

crates/gpui/src/app.rs πŸ”—

@@ -6335,9 +6335,9 @@ mod tests {
     #[crate::test(self)]
     async fn test_labeled_tasks(cx: &mut TestAppContext) {
         assert_eq!(None, cx.update(|cx| cx.active_labeled_tasks().next()));
-        let (mut sender, mut reciever) = postage::oneshot::channel::<()>();
+        let (mut sender, mut receiver) = postage::oneshot::channel::<()>();
         let task = cx
-            .update(|cx| cx.spawn_labeled("Test Label", |_| async move { reciever.recv().await }));
+            .update(|cx| cx.spawn_labeled("Test Label", |_| async move { receiver.recv().await }));
 
         assert_eq!(
             Some("Test Label"),

crates/gpui/src/keymap_matcher.rs πŸ”—

@@ -67,7 +67,7 @@ impl KeymapMatcher {
     ///     MatchResult::Pending =>
     ///         There exist bindings which are still waiting for more keys.
     ///     MatchResult::Complete(matches) =>
-    ///         1 or more bindings have recieved the necessary key presses.
+    ///         1 or more bindings have received the necessary key presses.
     ///         The order of the matched actions is by position of the matching first,
     //          and order in the keymap second.
     pub fn push_keystroke(

crates/language/src/language_settings.rs πŸ”—

@@ -264,7 +264,7 @@ impl settings::Setting for AllLanguageSettings {
         let mut root_schema = generator.root_schema_for::<Self::FileContent>();
 
         // Create a schema for a 'languages overrides' object, associating editor
-        // settings with specific langauges.
+        // settings with specific languages.
         assert!(root_schema
             .definitions
             .contains_key("LanguageSettingsContent"));

crates/language/src/syntax_map.rs πŸ”—

@@ -773,7 +773,7 @@ impl<'a> SyntaxMapCaptures<'a> {
         } in layers
         {
             let grammar = match &language.grammar {
-                Some(grammer) => grammer,
+                Some(grammar) => grammar,
                 None => continue,
             };
             let query = match query(&grammar) {
@@ -896,7 +896,7 @@ impl<'a> SyntaxMapMatches<'a> {
         } in layers
         {
             let grammar = match &language.grammar {
-                Some(grammer) => grammer,
+                Some(grammar) => grammar,
                 None => continue,
             };
             let query = match query(&grammar) {

crates/plugin_macros/src/lib.rs πŸ”—

@@ -11,7 +11,7 @@ use syn::{parse_macro_input, Block, FnArg, ForeignItemFn, Ident, ItemFn, Pat, Ty
 ///     "Hello from Wasm".into()
 /// }
 /// ```
-/// This macro makes a function defined guest-side avaliable host-side.
+/// This macro makes a function defined guest-side available host-side.
 /// Note that all arguments and return types must be `serde`.
 #[proc_macro_attribute]
 pub fn export(args: TokenStream, function: TokenStream) -> TokenStream {
@@ -92,7 +92,7 @@ pub fn export(args: TokenStream, function: TokenStream) -> TokenStream {
 /// #[import]
 /// pub fn operating_system_name() -> String;
 /// ```
-/// This macro makes a function defined host-side avaliable guest-side.
+/// This macro makes a function defined host-side available guest-side.
 /// Note that all arguments and return types must be `serde`.
 /// All that's provided is a signature, as the function is implemented host-side.
 #[proc_macro_attribute]

crates/plugin_runtime/OPAQUE.md πŸ”—

@@ -127,7 +127,7 @@ use plugin_handles::RopeHandle;
 pub fn append(rope: RopeHandle, string: &str);
 ```
 
-This allows us to perform an operation on a `Rope`, but how do we get a `RopeHandle` into a plugin? Well, as plugins, we can only aquire resources to handles we're given, so we'd need to expose a fuction that takes a handle. 
+This allows us to perform an operation on a `Rope`, but how do we get a `RopeHandle` into a plugin? Well, as plugins, we can only acquire resources to handles we're given, so we'd need to expose a function that takes a handle. 
 
 To illustrate that point, here's an example. First, we'd define a plugin-side function as follows:
 
@@ -177,7 +177,7 @@ So here's what calling `append_newline` would do, from the top:
 
 6. And from here on out we return up the callstack, through Wasm, to Rust all the way back to where we started. Right before we return, we clear out the `ResourcePool`, so that we're no longer holding onto the underlying resource.
 
-Throughout this entire chain of calls, the resource remain host-side. By temporarilty checking it into a `ResourcePool`, we're able to keep a reference to the resource that we can use, while avoiding copying the uncopyable resource.
+Throughout this entire chain of calls, the resource remain host-side. By temporarily checking it into a `ResourcePool`, we're able to keep a reference to the resource that we can use, while avoiding copying the uncopyable resource.
 
 ## Final Notes
 

crates/plugin_runtime/src/plugin.rs πŸ”—

@@ -132,7 +132,7 @@ impl PluginBuilder {
             "env",
             &format!("__{}", name),
             move |mut caller: Caller<'_, WasiCtxAlloc>, packed_buffer: u64| {
-                // TODO: use try block once avaliable
+                // TODO: use try block once available
                 let result: Result<(WasiBuffer, Memory, _), Trap> = (|| {
                     // grab a handle to the memory
                     let plugin_memory = match caller.get_export("memory") {
@@ -211,7 +211,7 @@ impl PluginBuilder {
             "env",
             &format!("__{}", name),
             move |mut caller: Caller<'_, WasiCtxAlloc>, packed_buffer: u64| {
-                // TODO: use try block once avaliable
+                // TODO: use try block once available
                 let result: Result<(WasiBuffer, Memory, Vec<u8>), Trap> = (|| {
                     // grab a handle to the memory
                     let plugin_memory = match caller.get_export("memory") {
@@ -297,7 +297,7 @@ pub enum PluginBinary<'a> {
     Precompiled(&'a [u8]),
 }
 
-/// Represents a WebAssembly plugin, with access to the WebAssembly System Inferface.
+/// Represents a WebAssembly plugin, with access to the WebAssembly System Interface.
 /// Build a new plugin using [`PluginBuilder`].
 pub struct Plugin {
     store: Store<WasiCtxAlloc>,
@@ -559,7 +559,7 @@ impl Plugin {
             .ok_or_else(|| anyhow!("Could not grab slice of plugin memory"))?;
 
         // write the argument to linear memory
-        // this returns a (ptr, lentgh) pair
+        // this returns a (ptr, length) pair
         let arg_buffer = Self::bytes_to_buffer(
             self.store.data().alloc_buffer(),
             &mut plugin_memory,
@@ -569,7 +569,7 @@ impl Plugin {
         .await?;
 
         // call the function, passing in the buffer and its length
-        // this returns a ptr to a (ptr, lentgh) pair
+        // this returns a ptr to a (ptr, length) pair
         let result_buffer = handle
             .function
             .call_async(&mut self.store, arg_buffer.into_u64())

crates/project/src/project.rs πŸ”—

@@ -4052,7 +4052,7 @@ impl Project {
                             let end_within = range.start.cmp(&primary.end, buffer).is_le()
                                 && range.end.cmp(&primary.end, buffer).is_ge();
 
-                            //Skip addtional edits which overlap with the primary completion edit
+                            //Skip additional edits which overlap with the primary completion edit
                             //https://github.com/zed-industries/zed/pull/1871
                             if !start_within && !end_within {
                                 buffer.edit([(range, text)], None, cx);

crates/project/src/worktree.rs πŸ”—

@@ -157,7 +157,7 @@ impl RepositoryEntry {
                 self.statuses
                     .iter_from(&repo_path)
                     .take_while(|(key, _)| key.starts_with(&repo_path))
-                    // Short circut once we've found the highest level
+                    // Short circuit once we've found the highest level
                     .take_until(|(_, status)| status == &&GitFileStatus::Conflict)
                     .map(|(_, status)| status)
                     .reduce(
@@ -3623,7 +3623,7 @@ pub trait WorktreeHandle {
 
 impl WorktreeHandle for ModelHandle<Worktree> {
     // When the worktree's FS event stream sometimes delivers "redundant" events for FS changes that
-    // occurred before the worktree was constructed. These events can cause the worktree to perfrom
+    // occurred before the worktree was constructed. These events can cause the worktree to perform
     // extra directory scans, and emit extra scan-state notifications.
     //
     // This function mutates the worktree's directory and waits for those mutations to be picked up,

crates/project_symbols/src/project_symbols.rs πŸ”—

@@ -276,7 +276,7 @@ mod tests {
             .await
             .unwrap();
 
-        // Set up fake langauge server to return fuzzy matches against
+        // Set up fake language server to return fuzzy matches against
         // a fixed set of symbol names.
         let fake_symbols = [
             symbol("one", "/external"),

crates/rpc/proto/zed.proto πŸ”—

@@ -476,7 +476,7 @@ message Symbol {
     string name = 4;
     int32 kind = 5;
     string path = 6;
-    // Cannot use generate anchors for unopend files,
+    // Cannot use generate anchors for unopened files,
     // so we are forced to use point coords instead
     PointUtf16 start = 7;
     PointUtf16 end = 8;

crates/rpc/src/auth.rs πŸ”—

@@ -42,7 +42,7 @@ impl PublicKey {
 }
 
 impl PrivateKey {
-    /// Decrypt a base64-encoded string that was encrypted by the correspoding public key.
+    /// Decrypt a base64-encoded string that was encrypted by the corresponding public key.
     pub fn decrypt_string(&self, encrypted_string: &str) -> Result<String> {
         let encrypted_bytes = base64::decode_config(encrypted_string, base64::URL_SAFE)
             .context("failed to base64-decode encrypted string")?;

crates/sqlez/src/thread_safe_connection.rs πŸ”—

@@ -160,7 +160,7 @@ impl<M: Migrator> ThreadSafeConnection<M> {
 
         // Create a one shot channel for the result of the queued write
         // so we can await on the result
-        let (sender, reciever) = oneshot::channel();
+        let (sender, receiver) = oneshot::channel();
 
         let thread_safe_connection = (*self).clone();
         write_channel(Box::new(move || {
@@ -168,7 +168,7 @@ impl<M: Migrator> ThreadSafeConnection<M> {
             let result = connection.with_write(|connection| callback(connection));
             sender.send(result).ok();
         }));
-        reciever.map(|response| response.expect("Write queue unexpectedly closed"))
+        receiver.map(|response| response.expect("Write queue unexpectedly closed"))
     }
 
     pub(crate) fn create_connection(
@@ -245,10 +245,10 @@ pub fn background_thread_queue() -> WriteQueueConstructor {
     use std::sync::mpsc::channel;
 
     Box::new(|| {
-        let (sender, reciever) = channel::<QueuedWrite>();
+        let (sender, receiver) = channel::<QueuedWrite>();
 
         thread::spawn(move || {
-            while let Ok(write) = reciever.recv() {
+            while let Ok(write) = receiver.recv() {
                 write()
             }
         });

crates/terminal/src/mappings/colors.rs πŸ”—

@@ -45,7 +45,7 @@ pub fn convert_color(alac_color: &AnsiColor, style: &TerminalStyle) -> Color {
 }
 
 ///Converts an 8 bit ANSI color to it's GPUI equivalent.
-///Accepts usize for compatability with the alacritty::Colors interface,
+///Accepts usize for compatibility with the alacritty::Colors interface,
 ///Other than that use case, should only be called with values in the [0,255] range
 pub fn get_color_at_index(index: &usize, style: &TerminalStyle) -> Color {
     match index {
@@ -78,7 +78,7 @@ pub fn get_color_at_index(index: &usize, style: &TerminalStyle) -> Color {
             let step = (u8::MAX as f32 / 24.).floor() as u8; //Split the RGB grayscale values into 24 chunks
             Color::new(i * step, i * step, i * step, u8::MAX) //Map the ANSI-grayscale components to the RGB-grayscale
         }
-        //For compatability with the alacritty::Colors interface
+        //For compatibility with the alacritty::Colors interface
         256 => style.foreground,
         257 => style.background,
         258 => style.cursor,

crates/terminal_view/README.md πŸ”—

@@ -18,6 +18,6 @@ There are currently many distinct paths for getting keystrokes to the terminal:
 
 3. IME text. When the special character mappings fail, we pass the keystroke back to GPUI to hand it to the IME system. This comes back to us in the `View::replace_text_in_range()` method, and we then send that to the terminal directly, bypassing `try_keystroke()`.
 
-4. Pasted text has a seperate pathway. 
+4. Pasted text has a separate pathway. 
 
 Generally, there's a distinction between 'keystrokes that need to be mapped' and 'strings which need to be written'. I've attempted to unify these under the '.try_keystroke()' API and the `.input()` API (which try_keystroke uses) so we have consistent input handling across the terminal

crates/terminal_view/scripts/print256color.sh πŸ”—

@@ -40,7 +40,7 @@ function contrast_colour {
 
     # Uncomment the below for more precise luminance calculations
 
-    # # Calculate percieved brightness
+    # # Calculate perceived brightness
     # # See https://www.w3.org/TR/AERT#color-contrast
     # # and http://www.itu.int/rec/R-REC-BT.601
     # # Luminance is in range 0..5000 as each value is 0..5

crates/terminal_view/src/terminal_element.rs πŸ”—

@@ -34,7 +34,7 @@ use std::{mem, ops::Range};
 
 use crate::TerminalView;
 
-///The information generated during layout that is nescessary for painting
+///The information generated during layout that is necessary for painting
 pub struct LayoutState {
     cells: Vec<LayoutCell>,
     rects: Vec<LayoutRect>,
@@ -206,7 +206,7 @@ impl TerminalElement {
                 //Expand background rect range
                 {
                     if matches!(bg, Named(NamedColor::Background)) {
-                        //Continue to next cell, resetting variables if nescessary
+                        //Continue to next cell, resetting variables if necessary
                         cur_alac_color = None;
                         if let Some(rect) = cur_rect {
                             rects.push(rect);

crates/terminal_view/src/terminal_view.rs πŸ”—

@@ -804,7 +804,7 @@ mod tests {
             let workspace = workspace.read(cx);
             let active_entry = project.read(cx).active_entry();
 
-            //Make sure enviroment is as expeted
+            //Make sure environment is as expected
             assert!(active_entry.is_none());
             assert!(workspace.worktrees(cx).next().is_none());
 
@@ -825,7 +825,7 @@ mod tests {
             let workspace = workspace.read(cx);
             let active_entry = project.read(cx).active_entry();
 
-            //Make sure enviroment is as expeted
+            //Make sure environment is as expected
             assert!(active_entry.is_none());
             assert!(workspace.worktrees(cx).next().is_some());
 

crates/text/src/tests.rs πŸ”—

@@ -193,7 +193,7 @@ fn test_line_len() {
 }
 
 #[test]
-fn test_common_prefix_at_positionn() {
+fn test_common_prefix_at_position() {
     let text = "a = str; b = δα";
     let buffer = Buffer::new(0, 0, text.into());
 
@@ -216,7 +216,7 @@ fn test_common_prefix_at_positionn() {
         empty_range_after(text, "str"),
     );
 
-    // prefix matching is case insenstive.
+    // prefix matching is case insensitive.
     assert_eq!(
         buffer.common_prefix_at(offset1, "StrΞ±ngΞ΅"),
         range_of(text, "str"),

crates/vim/src/normal.rs πŸ”—

@@ -756,7 +756,7 @@ mod test {
                 Λ‡
                 The quick"})
             .await;
-        // Indoc disallows trailing whitspace.
+        // Indoc disallows trailing whitespace.
         cx.assert("   Λ‡ \nThe quick").await;
     }
 

crates/vim/src/test/neovim_connection.rs πŸ”—

@@ -29,7 +29,7 @@ use tokio::{
 use crate::state::Mode;
 use collections::VecDeque;
 
-// Neovim doesn't like to be started simultaneously from multiple threads. We use thsi lock
+// Neovim doesn't like to be started simultaneously from multiple threads. We use this lock
 // to ensure we are only constructing one neovim connection at a time.
 #[cfg(feature = "neovim")]
 lazy_static! {

crates/workspace/src/pane.rs πŸ”—

@@ -1022,7 +1022,7 @@ impl Pane {
         let is_active_item = target_item_id == active_item_id;
         let target_pane = cx.weak_handle();
 
-        // The `CloseInactiveItems` action should really be called "CloseOthers" and the behaviour should be dynamically based on the tab the action is ran on.  Currenlty, this is a weird action because you can run it on a non-active tab and it will close everything by the actual active tab
+        // The `CloseInactiveItems` action should really be called "CloseOthers" and the behaviour should be dynamically based on the tab the action is ran on.  Currently, this is a weird action because you can run it on a non-active tab and it will close everything by the actual active tab
 
         self.tab_context_menu.update(cx, |menu, cx| {
             menu.show(

crates/workspace/src/workspace.rs πŸ”—

@@ -4424,7 +4424,7 @@ mod tests {
             assert!(!panel.has_focus(cx));
         });
 
-        // Transfering focus back to the panel keeps it zoomed
+        // Transferring focus back to the panel keeps it zoomed
         workspace.update(cx, |workspace, cx| {
             workspace.toggle_panel_focus::<TestPanel>(cx);
         });

crates/zed/src/languages/typescript.rs πŸ”—

@@ -207,7 +207,7 @@ impl LspAdapter for EsLintLspAdapter {
         http: Arc<dyn HttpClient>,
     ) -> Result<Box<dyn 'static + Send + Any>> {
         // At the time of writing the latest vscode-eslint release was released in 2020 and requires
-        // special custom LSP protocol extensions be handled to fully initalize. Download the latest
+        // special custom LSP protocol extensions be handled to fully initialize. Download the latest
         // prerelease instead to sidestep this issue
         let release = latest_github_release("microsoft/vscode-eslint", true, http).await?;
         Ok(Box::new(GitHubLspBinaryVersion {

crates/zed/src/main.rs πŸ”—

@@ -1,4 +1,4 @@
-// Allow binary to be called Zed for a nice application menu when running executable direcly
+// Allow binary to be called Zed for a nice application menu when running executable directly
 #![allow(non_snake_case)]
 
 use anyhow::{anyhow, Context, Result};

styles/src/buildLicenses.ts πŸ”—

@@ -23,7 +23,7 @@ function checkLicenses(
     licenses: string[]
 ) {
     for (const { meta } of schemeMetaWithLicense) {
-        // FIXME: Add support for conjuctions and conditions
+        // FIXME: Add support for conjunctions and conditions
         if (licenses.indexOf(meta.license.SPDX) < 0) {
             throw Error(
                 `License for theme ${meta.name} (${meta.license.SPDX}) is not supported`

styles/src/styleTree/editor.ts πŸ”—

@@ -112,7 +112,7 @@ export default function editor(colorScheme: ColorScheme) {
             widthEm: 0.15,
             cornerRadius: 0.05,
         },
-        /** Highlights matching occurences of what is under the cursor
+        /** Highlights matching occurrences of what is under the cursor
          * as well as matched brackets
          */
         documentHighlightReadBackground: withOpacity(

styles/src/styleTree/search.ts πŸ”—

@@ -33,7 +33,7 @@ export default function search(colorScheme: ColorScheme) {
     };
 
     return {
-        // TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactive
+        // TODO: Add an activeMatchBackground on the rust side to differentiate between active and inactive
         matchBackground: withOpacity(foreground(layer, "accent"), 0.4),
         optionButton: {
             ...text(layer, "mono", "on"),

styles/src/system/types.ts πŸ”—

@@ -1,6 +1,6 @@
 import { Curve } from "./ref/curves"
 
-export interface ColorAccessiblityValue {
+export interface ColorAccessibilityValue {
     value: number
     aaPass: boolean
     aaaPass: boolean
@@ -12,14 +12,14 @@ export interface ColorAccessiblityValue {
  * @note This implementation is currently basic – Currently we only calculate contrasts against black and white, in the future will allow for dynamic color contrast calculation based on the colors present in a given palette.
  * @note The goal is to align with WCAG3 accessibility standards as they become stabilized. See the [WCAG 3 Introduction](https://www.w3.org/WAI/standards-guidelines/wcag/wcag3-intro/) for more information.
  */
-export interface ColorAccessiblity {
-    black: ColorAccessiblityValue
-    white: ColorAccessiblityValue
+export interface ColorAccessibility {
+    black: ColorAccessibilityValue
+    white: ColorAccessibilityValue
 }
 
 export type Color = {
     step: number
-    contrast: ColorAccessiblity
+    contrast: ColorAccessibility
     hex: string
     lch: number[]
     rgba: number[]