diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rs index d8ae49bf90c2480e21530789591f28bff3d8480a..3b0d3b89ebe483b6636759a52a4ae0f3d1abf9ff 100644 --- a/crates/editor/src/display_map.rs +++ b/crates/editor/src/display_map.rs @@ -561,7 +561,7 @@ impl DisplaySnapshot { } } - // used by line_mode selections and tries to match vim behaviour + // used by line_mode selections and tries to match vim behavior pub fn expand_to_line(&self, range: Range) -> Range { let new_start = if range.start.row == 0 { MultiBufferPoint::new(0, 0) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index ce61a3f7d6744524c7c2347ac12488c3d6a99447..ea804f4b224c9d3a998f4487fe925d18cd12d582 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -11,7 +11,7 @@ //! //! All other submodules and structs are mostly concerned with holding editor data about the way it displays current buffer region(s). //! -//! If you're looking to improve Vim mode, you should check out Vim crate that wraps Editor and overrides its behaviour. +//! If you're looking to improve Vim mode, you should check out Vim crate that wraps Editor and overrides its behavior. pub mod actions; mod blame_entry_tooltip; mod blink_manager; diff --git a/crates/gpui_macros/src/gpui_macros.rs b/crates/gpui_macros/src/gpui_macros.rs index b45624b895fa0364c79fff37e267b6b2da518f1b..c4cf5358b3e756d7ca5dfc3d2b1aad6efa8850eb 100644 --- a/crates/gpui_macros/src/gpui_macros.rs +++ b/crates/gpui_macros/src/gpui_macros.rs @@ -96,7 +96,7 @@ pub fn box_shadow_style_methods(input: TokenStream) -> TokenStream { /// In addition to passing a TestAppContext, you can also ask for a `StdRnd` instance. /// this will be seeded with the `SEED` environment variable and is used internally by /// the ForegroundExecutor and BackgroundExecutor to run tasks deterministically in tests. -/// Using the same `StdRng` for behaviour in your test will allow you to exercise a wide +/// Using the same `StdRng` for behavior in your test will allow you to exercise a wide /// variety of scenarios and interleavings just by changing the seed. /// /// #[gpui::test] also takes three different arguments: diff --git a/crates/outline_panel/src/outline_panel_settings.rs b/crates/outline_panel/src/outline_panel_settings.rs index 0b5467dd0590742c4ce6946edb95191747b420d9..9c9e197cb1ef823bfae673ffc6adb5587b7356aa 100644 --- a/crates/outline_panel/src/outline_panel_settings.rs +++ b/crates/outline_panel/src/outline_panel_settings.rs @@ -30,7 +30,7 @@ pub struct OutlinePanelSettingsContent { /// /// Default: true pub button: Option, - /// Customise default width (in pixels) taken by outline panel + /// Customize default width (in pixels) taken by outline panel /// /// Default: 240 pub default_width: Option, diff --git a/crates/project/src/project_settings.rs b/crates/project/src/project_settings.rs index 63bdc6da74c097e1d0418b4b76cdd0944b511703..56d868fcf5837f8084ed7e8e453c8311fa3caaf7 100644 --- a/crates/project/src/project_settings.rs +++ b/crates/project/src/project_settings.rs @@ -38,7 +38,7 @@ pub enum DirenvSettings { ShellHook, /// Load direnv configuration directly using `direnv export json` /// - /// Warning: This option is experimental and might cause some inconsistent behaviour compared to using the shell hook. + /// Warning: This option is experimental and might cause some inconsistent behavior compared to using the shell hook. /// If it does, please report it to GitHub Direct, } diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index c93b88ce05656982d403f2da43b7fc7ab254d86e..880482aacce9f97b993578129feff4d419002fcc 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -654,7 +654,7 @@ impl ProjectPanel { pub fn collapse_all_entries(&mut self, _: &CollapseAllEntries, cx: &mut ViewContext) { // By keeping entries for fully collapsed worktrees, we avoid expanding them within update_visible_entries - // (which is it's default behaviour when there's no entry for a worktree in expanded_dir_ids). + // (which is it's default behavior when there's no entry for a worktree in expanded_dir_ids). self.expanded_dir_ids .retain(|_, expanded_entries| expanded_entries.is_empty()); self.update_visible_entries(None, cx); diff --git a/crates/project_panel/src/project_panel_settings.rs b/crates/project_panel/src/project_panel_settings.rs index ae565ba2ca131b62e8c5aca1eb0dd00bd5a60d75..c723eb947a6649c84bd2ced5ca2debb971adcfde 100644 --- a/crates/project_panel/src/project_panel_settings.rs +++ b/crates/project_panel/src/project_panel_settings.rs @@ -60,7 +60,7 @@ pub struct ProjectPanelSettingsContent { /// /// Default: true pub button: Option, - /// Customise default width (in pixels) taken by project panel + /// Customize default width (in pixels) taken by project panel /// /// Default: 240 pub default_width: Option, diff --git a/crates/vim/README.md b/crates/vim/README.md index 547ca686fb9c5b5146d254db808a9b61aa630804..7533b0697f1e4819e22834ab8e248c05a7cf3bd9 100644 --- a/crates/vim/README.md +++ b/crates/vim/README.md @@ -6,9 +6,9 @@ The backlog is maintained in the `#vim` channel notes. ## Testing against Neovim -If you are making a change to make Zed's behaviour more closely match vim/nvim, you can create a test using the `NeovimBackedTestContext`. +If you are making a change to make Zed's behavior more closely match vim/nvim, you can create a test using the `NeovimBackedTestContext`. -For example, the following test checks that Zed and Neovim have the same behaviour when running `*` in visual mode: +For example, the following test checks that Zed and Neovim have the same behavior when running `*` in visual mode: ```rust #[gpui::test] @@ -31,6 +31,6 @@ cargo test -p vim --features neovim test_visual_star_hash This will run your keystrokes against a headless neovim and cache the results in the test_data directory. -## Testing zed-only behaviour +## Testing zed-only behavior Zed does more than vim/neovim in their default modes. The `VimTestContext` can be used instead. This lets you test integration with the language server and other parts of zed's UI that don't have a NeoVim equivalent. diff --git a/crates/vim/src/test/neovim_backed_test_context.rs b/crates/vim/src/test/neovim_backed_test_context.rs index babee53505972a93d5ddf3b1d9f991e85456d380..e48b3782b83ba87b5424b62f0495c5ef9e498cb3 100644 --- a/crates/vim/src/test/neovim_backed_test_context.rs +++ b/crates/vim/src/test/neovim_backed_test_context.rs @@ -35,7 +35,7 @@ impl SharedState { pub fn assert_matches(&self) { if self.neovim != self.editor || self.neovim_mode != self.editor_mode { panic!( - indoc! {"Test failed (zed does not match nvim behaviour) + indoc! {"Test failed (zed does not match nvim behavior) # initial state: {} # keystrokes: @@ -67,7 +67,7 @@ impl SharedState { let message = if self.neovim != marked_text { "Test is incorrect (currently expected != neovim_state)" } else { - "Editor does not match nvim behaviour" + "Editor does not match nvim behavior" }; panic!( indoc! {"{} @@ -110,7 +110,7 @@ impl SharedClipboard { let message = if expected == self.neovim { "Test is incorrect (currently expected != neovim_state)" } else { - "Editor does not match nvim behaviour" + "Editor does not match nvim behavior" }; panic!( diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs index 63c6359c4f07b9d43c0c7a5f92fa92a87cf48430..cdc79d0564b01078acc19e4536c57f50d8d87532 100644 --- a/crates/vim/src/vim.rs +++ b/crates/vim/src/vim.rs @@ -392,7 +392,7 @@ impl Vim { } // When handling an action, you must create visual marks if you will switch to normal - // mode without the default selection behaviour. + // mode without the default selection behavior. fn store_visual_marks(&mut self, cx: &mut WindowContext) { let mode = self.state().mode; if mode.is_visual() { diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index e6cbf22a6c138c6b69a2bb881df2e42e96de81ce..173db500e4f7ca2447697625c4751ee45b49649a 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -92,7 +92,7 @@ use ui::{ use util::{maybe, ResultExt, TryFutureExt}; use uuid::Uuid; pub use workspace_settings::{ - AutosaveSetting, RestoreOnStartupBehaviour, TabBarSettings, WorkspaceSettings, + AutosaveSetting, RestoreOnStartupBehavior, TabBarSettings, WorkspaceSettings, }; use crate::notifications::NotificationId; diff --git a/crates/workspace/src/workspace_settings.rs b/crates/workspace/src/workspace_settings.rs index dfc2de8184dadcbf52d3617e26ec833161b28b21..5d038493f3716f30516f7c8fd0a7c7e7d21a2114 100644 --- a/crates/workspace/src/workspace_settings.rs +++ b/crates/workspace/src/workspace_settings.rs @@ -12,7 +12,7 @@ pub struct WorkspaceSettings { pub confirm_quit: bool, pub show_call_status_icon: bool, pub autosave: AutosaveSetting, - pub restore_on_startup: RestoreOnStartupBehaviour, + pub restore_on_startup: RestoreOnStartupBehavior, pub drop_target_size: f32, pub when_closing_with_no_tabs: CloseWindowWhenNoItems, pub use_system_path_prompts: bool, @@ -43,7 +43,7 @@ impl CloseWindowWhenNoItems { #[derive(Copy, Clone, Default, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "snake_case")] -pub enum RestoreOnStartupBehaviour { +pub enum RestoreOnStartupBehavior { /// Always start with an empty editor None, /// Restore the workspace that was closed last. @@ -78,7 +78,7 @@ pub struct WorkspaceSettingsContent { /// Controls previous session restoration in freshly launched Zed instance. /// Values: none, last_workspace, last_session /// Default: last_session - pub restore_on_startup: Option, + pub restore_on_startup: Option, /// The size of the workspace split drop targets on the outer edges. /// Given as a fraction that will be multiplied by the smaller dimension of the workspace. /// diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 05321809272afca9061dc3ac1135f827c03dcb73..6707d1e209ef6e0725fedb267d2fd04213f7b9ac 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -697,27 +697,27 @@ pub(crate) async fn restorable_workspace_locations( cx: &mut AsyncAppContext, app_state: &Arc, ) -> Option> { - let mut restore_behaviour = cx + let mut restore_behavior = cx .update(|cx| WorkspaceSettings::get(None, cx).restore_on_startup) .ok()?; let last_session_id = app_state.session.last_session_id(); if last_session_id.is_none() && matches!( - restore_behaviour, - workspace::RestoreOnStartupBehaviour::LastSession + restore_behavior, + workspace::RestoreOnStartupBehavior::LastSession ) { - restore_behaviour = workspace::RestoreOnStartupBehaviour::LastWorkspace; + restore_behavior = workspace::RestoreOnStartupBehavior::LastWorkspace; } - match restore_behaviour { - workspace::RestoreOnStartupBehaviour::LastWorkspace => { + match restore_behavior { + workspace::RestoreOnStartupBehavior::LastWorkspace => { workspace::last_opened_workspace_paths() .await .map(|location| vec![location]) } - workspace::RestoreOnStartupBehaviour::LastSession => { + workspace::RestoreOnStartupBehavior::LastSession => { if let Some(last_session_id) = last_session_id { workspace::last_session_workspace_locations(last_session_id) .filter(|locations| !locations.is_empty()) diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md index 07704a9a7964cf3c65a601c3cc175963e7e03e39..40e2ee55ee50e7a24f6eb30df208626b61445f1b 100644 --- a/docs/src/configuring-zed.md +++ b/docs/src/configuring-zed.md @@ -10,7 +10,7 @@ Your settings file can be opened with `cmd-,` (on macOS) or `ctrl-,` (on Linux). This configuration is merged with any local configuration inside your projects. You can open the project settings by running `zed: Open Local Settings` from the command palette. This will create a `.zed` directory containing`.zed/settings.json`. -Although most projects will only need one settings file at the root, you can add more local settings files for subdirectories as needed. Not all settings can be set in local files, just those that impact the behaviour of the editor and language tooling. For example you can set `tab_size`, `formatter` etc. but not `theme`, `vim_mode` and similar. +Although most projects will only need one settings file at the root, you can add more local settings files for subdirectories as needed. Not all settings can be set in local files, just those that impact the behavior of the editor and language tooling. For example you can set `tab_size`, `formatter` etc. but not `theme`, `vim_mode` and similar. The syntax for configuration files is a super-set of JSON that allows `//` comments. @@ -1562,7 +1562,7 @@ Run the `theme selector: toggle` action in the command palette to see a current ## Project Panel -- Description: Customise project panel +- Description: Customize project panel - Setting: `project_panel` - Default: @@ -1633,7 +1633,7 @@ Run the `theme selector: toggle` action in the command palette to see a current ### Default Width -- Description: Customise default width taken by project panel +- Description: Customize default width taken by project panel - Setting: `default_width` - Default: N/A width in pixels (eg: 420) @@ -1650,7 +1650,7 @@ Run the `theme selector: toggle` action in the command palette to see a current **Options** 1. Enable auto reveal entries - + ```json { "auto_reveal_entries": true, @@ -1658,7 +1658,7 @@ Run the `theme selector: toggle` action in the command palette to see a current ``` 2. Disable auto reveal entries - + ```json { "auto_reveal_entries": false, @@ -1674,7 +1674,7 @@ Run the `theme selector: toggle` action in the command palette to see a current **Options** 1. Enable auto fold dirs - + ```json { "auto_fold_dirs": true, @@ -1682,7 +1682,7 @@ Run the `theme selector: toggle` action in the command palette to see a current ``` 2. Disable auto fold dirs - + ```json { "auto_fold_dirs": false, @@ -1707,7 +1707,7 @@ Run the `theme selector: toggle` action in the command palette to see a current **Options** 1. Show scrollbar in project panel - + ```json { "scrollbar": { @@ -1717,7 +1717,7 @@ Run the `theme selector: toggle` action in the command palette to see a current ``` 2. Hide scrollbar in project panel - + ```json { "scrollbar": { @@ -1728,7 +1728,7 @@ Run the `theme selector: toggle` action in the command palette to see a current ## Calls -- Description: Customise behaviour when participating in a call +- Description: Customize behavior when participating in a call - Setting: `calls` - Default: