on master help sign in
fix typos (#2304)
commit3a398eec56c907f9d0f166e77242eb13ded229bc authorchunghha <chunghha@users.noreply.github.com> dateWed 27 Apr 2022, 14:21 (5 years ago) parent2e46961
24 files changed+52−52
CHANGELOG.md+1−1 book/src/configuration.md+1−1 book/src/generated/typable-cmd.md+2−2 book/src/guides/README.md+1−1 book/src/guides/indent.md+1−1 book/src/install.md+1−1 book/src/keymap.md+1−1 book/src/themes.md+1−1 book/theme/book.js+3−3 book/theme/css/chrome.css+1−1 book/theme/css/variables.css+8−8 helix-core/src/history.rs+4−4 helix-core/src/path.rs+1−1 helix-core/src/syntax.rs+6−6 helix-lsp/src/lib.rs+2−2 helix-term/src/commands.rs+1−1 helix-term/src/commands/typed.rs+2−2 helix-term/src/ui/editor.rs+1−1 helix-tui/src/buffer.rs+3−3 helix-tui/src/widgets/reflow.rs+2−2 helix-tui/src/widgets/table.rs+2−2 helix-tui/tests/terminal.rs+4−4 helix-view/src/document.rs+2−2 helix-view/src/view.rs+1−1
CHANGELOG.md+1−1
@@ -445,7 +445,7 @@ Fixes:
445445- A bunch of bugs regarding `o`/`O` behavior ([#281](https://github.com/helix-editor/helix/pull/281))
446446- `~` expansion now works in file completion ([#284](https://github.com/helix-editor/helix/pull/284))
447447- Several UI related overflow crashes ([#318](https://github.com/helix-editor/helix/pull/318))
448−- Fix a test failure occuring only on `test --release` ([`4f108ab1`](https://github.com/helix-editor/helix/commit/4f108ab1b2197809506bd7305ad903a3525eabfa))
448+- Fix a test failure occurring only on `test --release` ([`4f108ab1`](https://github.com/helix-editor/helix/commit/4f108ab1b2197809506bd7305ad903a3525eabfa))
449449- Prompts now support unicode input ([#295](https://github.com/helix-editor/helix/pull/295))
450450- Completion documentation no longer overlaps the popup ([#322](https://github.com/helix-editor/helix/pull/322))
451451- Fix a crash when trying to select `^` ([`9c534614`](https://github.com/helix-editor/helix/commit/9c53461429a3e72e3b1fb87d7ca490e168d7dee2))
book/src/configuration.md+1−1
@@ -43,7 +43,7 @@ hidden = false
4343| `completion-trigger-len` | The min-length of word under cursor to trigger autocompletion | `2` |
4444| `auto-info` | Whether to display infoboxes | `true` |
4545| `true-color` | Set to `true` to override automatic detection of terminal truecolor support in the event of a false negative. | `false` |
46−| `rulers` | List of column positions at which to display the rulers. Can be overidden by language specific `rulers` in `languages.toml` file. | `[]` |
46+| `rulers` | List of column positions at which to display the rulers. Can be overridden by language specific `rulers` in `languages.toml` file. | `[]` |
4747
4848### `[editor.lsp]` Section
4949
book/src/generated/typable-cmd.md+2−2
@@ -7,8 +7,8 @@
77| `:buffer-close!`, `:bc!`, `:bclose!` | Close the current buffer forcefully (ignoring unsaved changes). |
88| `:buffer-close-others`, `:bco`, `:bcloseother` | Close all buffers but the currently focused one. |
99| `:buffer-close-others!`, `:bco!`, `:bcloseother!` | Close all buffers but the currently focused one. |
10−| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers, without quiting. |
11−| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Close all buffers forcefully (ignoring unsaved changes), without quiting. |
10+| `:buffer-close-all`, `:bca`, `:bcloseall` | Close all buffers, without quitting. |
11+| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Close all buffers forcefully (ignoring unsaved changes), without quitting. |
1212| `:buffer-next`, `:bn`, `:bnext` | Go to next buffer. |
1313| `:buffer-previous`, `:bp`, `:bprev` | Go to previous buffer. |
1414| `:write`, `:w` | Write changes to disk. Accepts an optional path (:write some/path.txt) |
book/src/guides/README.md+1−1
@@ -1,4 +1,4 @@
11# Guides
22
33This section contains guides for adding new language server configurations,
4−tree-sitter grammers, textobject queries, etc.
4+tree-sitter grammars, textobject queries, etc.
book/src/guides/indent.md+1−1
@@ -39,7 +39,7 @@ changed by using a `#set!` declaration anywhere in the pattern:
3939## Capture Types
4040
4141- `@indent` (default scope `tail`):
42−Increase the indent level by 1. Multiple occurences in the same line
42+Increase the indent level by 1. Multiple occurrences in the same line
4343don't stack. If there is at least one `@indent` and one `@outdent`
4444capture on the same line, the indent level isn't changed at all.
4545
book/src/install.md+1−1
@@ -58,7 +58,7 @@ cargo install --path helix-term
5858This will install the `hx` binary to `$HOME/.cargo/bin`.
5959
6060Helix also needs it's runtime files so make sure to copy/symlink the `runtime/` directory into the
61−config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overriden
61+config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
6262via the `HELIX_RUNTIME` environment variable.
6363
6464| OS | command |
book/src/keymap.md+1−1
@@ -191,7 +191,7 @@ Jumps to various locations.
191191
192192#### Match mode
193193
194−Enter this mode using `m` from normal mode. See the relavant section
194+Enter this mode using `m` from normal mode. See the relevant section
195195in [Usage](./usage.md) for an explanation about [surround](./usage.md#surround)
196196and [textobject](./usage.md#textobject) usage.
197197
book/src/themes.md+1−1
@@ -158,7 +158,7 @@ We use a similar set of scopes as
158158 - `builtin`
159159 - `method`
160160 - `macro`
161− - `special` (preprocesor in C)
161+ - `special` (preprocessor in C)
162162
163163- `tag` - Tags (e.g. `<body>` in HTML)
164164
book/theme/book.js+3−3
@@ -601,10 +601,10 @@ function playground_text(playground) {
601601 });
602602})();
603603
604−(function controllMenu() {
604+(function controlMenu() {
605605 var menu = document.getElementById('menu-bar');
606606
607− (function controllPosition() {
607+ (function controlPosition() {
608608 var scrollTop = document.scrollingElement.scrollTop;
609609 var prevScrollTop = scrollTop;
610610 var minMenuY = -menu.clientHeight - 50;
@@ -647,7 +647,7 @@ function playground_text(playground) {
647647 prevScrollTop = scrollTop;
648648 }, { passive: true });
649649 })();
650− (function controllBorder() {
650+ (function controlBorder() {
651651 menu.classList.remove('bordered');
652652 document.addEventListener('scroll', function () {
653653 if (menu.offsetTop === 0) {
book/theme/css/chrome.css+1−1
@@ -390,7 +390,7 @@ ul#searchresults span.teaser em {
390390
391391.chapter li {
392392 display: flex;
393− color: var(--sidebar-non-existant);
393+ color: var(--sidebar-non-existent);
394394}
395395.chapter li a {
396396 display: block;
book/theme/css/variables.css+8−8
@@ -16,7 +16,7 @@
1616
1717 --sidebar-bg: #14191f;
1818 --sidebar-fg: #c8c9db;
19− --sidebar-non-existant: #5c6773;
19+ --sidebar-non-existent: #5c6773;
2020 --sidebar-active: #ffb454;
2121 --sidebar-spacer: #2d334f;
2222
@@ -56,7 +56,7 @@
5656
5757 --sidebar-bg: #292c2f;
5858 --sidebar-fg: #a1adb8;
59− --sidebar-non-existant: #505254;
59+ --sidebar-non-existent: #505254;
6060 --sidebar-active: #3473ad;
6161 --sidebar-spacer: #393939;
6262
@@ -96,7 +96,7 @@
9696
9797 --sidebar-bg: #fafafa;
9898 --sidebar-fg: hsl(0, 0%, 0%);
99− --sidebar-non-existant: #aaaaaa;
99+ --sidebar-non-existent: #aaaaaa;
100100 --sidebar-active: #1f1fff;
101101 --sidebar-spacer: #f4f4f4;
102102
@@ -136,7 +136,7 @@
136136
137137 --sidebar-bg: #282d3f;
138138 --sidebar-fg: #c8c9db;
139− --sidebar-non-existant: #505274;
139+ --sidebar-non-existent: #505274;
140140 --sidebar-active: #2b79a2;
141141 --sidebar-spacer: #2d334f;
142142
@@ -176,7 +176,7 @@
176176
177177 --sidebar-bg: #3b2e2a;
178178 --sidebar-fg: #c8c9db;
179− --sidebar-non-existant: #505254;
179+ --sidebar-non-existent: #505254;
180180 --sidebar-active: #e69f67;
181181 --sidebar-spacer: #45373a;
182182
@@ -217,7 +217,7 @@
217217
218218 --sidebar-bg: #292c2f;
219219 --sidebar-fg: #a1adb8;
220− --sidebar-non-existant: #505254;
220+ --sidebar-non-existent: #505254;
221221 --sidebar-active: #3473ad;
222222 --sidebar-spacer: #393939;
223223
@@ -259,7 +259,7 @@
259259
260260 --sidebar-bg: #281733;
261261 --sidebar-fg: #c8c9db;
262− --sidebar-non-existant: #505274;
262+ --sidebar-non-existent: #505274;
263263 --sidebar-active: #a4a0e8;
264264 --sidebar-spacer: #2d334f;
265265
@@ -304,7 +304,7 @@
304304
305305 --sidebar-bg: #281733;
306306 --sidebar-fg: #c8c9db;
307− --sidebar-non-existant: #505274;
307+ --sidebar-non-existent: #505274;
308308 --sidebar-active: #a4a0e8;
309309 --sidebar-spacer: #2d334f;
310310
helix-core/src/history.rs+4−4
@@ -22,10 +22,10 @@ use std::time::{Duration, Instant};
2222///
2323/// The current revision is the one currently displayed in the buffer.
2424///
25−/// Commiting a new revision to the history will update the last child of the
25+/// Committing a new revision to the history will update the last child of the
2626/// current revision, and push a new revision to the end of the vector.
2727///
28−/// Revisions are commited with a timestamp. :earlier and :later can be used
28+/// Revisions are committed with a timestamp. :earlier and :later can be used
2929/// to jump to the closest revision to a moment in time relative to the timestamp
3030/// of the current revision plus (:later) or minus (:earlier) the duration
3131/// given to the command. If a single integer is given, the editor will instead
@@ -33,7 +33,7 @@ use std::time::{Duration, Instant};
3333///
3434/// Limitations:
3535/// * Changes in selections currently don't commit history changes. The selection
36−/// will only be updated to the state after a commited buffer change.
36+/// will only be updated to the state after a committed buffer change.
3737/// * The vector of history revisions is currently unbounded. This might
3838/// cause the memory consumption to grow significantly large during long
3939/// editing sessions.
@@ -288,7 +288,7 @@ pub enum UndoKind {
288288 TimePeriod(std::time::Duration),
289289}
290290
291−/// A subset of sytemd.time time span syntax units.
291+/// A subset of systemd.time time span syntax units.
292292const TIME_UNITS: &[(&[&str], &str, u64)] = &[
293293 (&["seconds", "second", "sec", "s"], "seconds", 1),
294294 (&["minutes", "minute", "min", "m"], "minutes", 60),
helix-core/src/path.rs+1−1
@@ -14,7 +14,7 @@ pub fn fold_home_dir(path: &Path) -> PathBuf {
1414 path.to_path_buf()
1515}
1616
17−/// Expands tilde `~` into users home directory if avilable, otherwise returns the path
17+/// Expands tilde `~` into users home directory if available, otherwise returns the path
1818/// unchanged. The tilde will only be expanded when present as the first component of the path
1919/// and only slash follows it.
2020pub fn expand_tilde(path: &Path) -> PathBuf {
helix-core/src/syntax.rs+6−6
@@ -229,7 +229,7 @@ pub struct TextObjectQuery {
229229
230230pub enum CapturedNode<'a> {
231231 Single(Node<'a>),
232− /// Guarenteed to be not empty
232+ /// Guaranteed to be not empty
233233 Grouped(Vec<Node<'a>>),
234234}
235235
@@ -1141,7 +1141,7 @@ pub enum HighlightEvent {
11411141 HighlightEnd,
11421142}
11431143
1144−/// Contains the data neeeded to higlight code written in a particular language.
1144+/// Contains the data needed to highlight code written in a particular language.
11451145///
11461146/// This struct is immutable and can be shared between threads.
11471147#[derive(Debug)]
@@ -1976,7 +1976,7 @@ mod test {
19761976 let source = Rope::from_str(
19771977 r#"
19781978/// a comment on
1979−/// mutiple lines
1979+/// multiple lines
19801980 "#,
19811981 );
19821982
@@ -2006,10 +2006,10 @@ mod test {
20062006 )
20072007 };
20082008
2009− test("quantified_nodes", 1..35);
2009+ test("quantified_nodes", 1..36);
20102010 // NOTE: Enable after implementing proper node group capturing
2011− // test("quantified_nodes_grouped", 1..35);
2012− // test("multiple_nodes_grouped", 1..35);
2011+ // test("quantified_nodes_grouped", 1..36);
2012+ // test("multiple_nodes_grouped", 1..36);
20132013 }
20142014
20152015 #[test]
helix-lsp/src/lib.rs+2−2
@@ -428,7 +428,7 @@ impl LspProgressMap {
428428 Self::default()
429429 }
430430
431− /// Returns a map of all tokens coresponding to the lanaguage server with `id`.
431+ /// Returns a map of all tokens corresponding to the language server with `id`.
432432 pub fn progress_map(&self, id: usize) -> Option<&HashMap<lsp::ProgressToken, ProgressStatus>> {
433433 self.0.get(&id)
434434 }
@@ -466,7 +466,7 @@ impl LspProgressMap {
466466 self.0.get_mut(&id).and_then(|vals| vals.remove(token))
467467 }
468468
469− /// Updates the progess of `token` for server with `id` to `status`, returns the value replaced or `None`.
469+ /// Updates the progress of `token` for server with `id` to `status`, returns the value replaced or `None`.
470470 pub fn update(
471471 &mut self,
472472 id: usize,
helix-term/src/commands.rs+1−1
@@ -3715,7 +3715,7 @@ fn shrink_selection(cx: &mut Context) {
37153715 doc.set_selection(view.id, prev_selection);
37163716 return;
37173717 } else {
3718− // clear existing selection as they can't be shrinked to anyway
3718+ // clear existing selection as they can't be shrunk to anyway
37193719 view.object_selections.clear();
37203720 }
37213721 }
helix-term/src/commands/typed.rs+2−2
@@ -1169,14 +1169,14 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
11691169 TypableCommand {
11701170 name: "buffer-close-all",
11711171 aliases: &["bca", "bcloseall"],
1172− doc: "Close all buffers, without quiting.",
1172+ doc: "Close all buffers, without quitting.",
11731173 fun: buffer_close_all,
11741174 completer: None,
11751175 },
11761176 TypableCommand {
11771177 name: "buffer-close-all!",
11781178 aliases: &["bca!", "bcloseall!"],
1179− doc: "Close all buffers forcefully (ignoring unsaved changes), without quiting.",
1179+ doc: "Close all buffers forcefully (ignoring unsaved changes), without quitting.",
11801180 fun: force_buffer_close_all,
11811181 completer: None,
11821182 },
helix-term/src/ui/editor.rs+1−1
@@ -1239,7 +1239,7 @@ impl Component for EditorView {
12391239 view.ensure_cursor_in_view(doc, config.scrolloff);
12401240
12411241 // Store a history state if not in insert mode. This also takes care of
1242− // commiting changes when leaving insert mode.
1242+ // committing changes when leaving insert mode.
12431243 if doc.mode() != Mode::Insert {
12441244 doc.append_changes_to_history(view.id);
12451245 }
helix-tui/src/buffer.rs+3−3
@@ -322,7 +322,7 @@ impl Buffer {
322322 continue;
323323 }
324324 // `x_offset + width > max_offset` could be integer overflow on 32-bit machines if we
325− // change dimenstions to usize or u32 and someone resizes the terminal to 1x2^32.
325+ // change dimensions to usize or u32 and someone resizes the terminal to 1x2^32.
326326 if width > max_offset.saturating_sub(x_offset) {
327327 break;
328328 }
@@ -563,9 +563,9 @@ impl Buffer {
563563 let width = self.area.width;
564564
565565 let mut updates: Vec<(u16, u16, &Cell)> = vec![];
566− // Cells invalidated by drawing/replacing preceeding multi-width characters:
566+ // Cells invalidated by drawing/replacing preceding multi-width characters:
567567 let mut invalidated: usize = 0;
568− // Cells from the current buffer to skip due to preceeding multi-width characters taking their
568+ // Cells from the current buffer to skip due to preceding multi-width characters taking their
569569 // place (the skipped cells should be blank anyway):
570570 let mut to_skip: usize = 0;
571571 for (i, (current, previous)) in next_buffer.iter().zip(previous_buffer.iter()).enumerate() {
helix-tui/src/widgets/reflow.rs+2−2
@@ -128,7 +128,7 @@ pub struct LineTruncator<'a, 'b> {
128128 symbols: &'b mut dyn Iterator<Item = StyledGrapheme<'a>>,
129129 max_line_width: u16,
130130 current_line: Vec<StyledGrapheme<'a>>,
131− /// Record the offet to skip render
131+ /// Record the offset to skip render
132132 horizontal_offset: u16,
133133}
134134
@@ -439,7 +439,7 @@ mod test {
439439 assert_eq!(line_truncator, vec![" "]);
440440 }
441441
442− /// Tests an input starting with a letter, folowed by spaces - some of the behaviour is
442+ /// Tests an input starting with a letter, followed by spaces - some of the behaviour is
443443 /// incidental.
444444 #[test]
445445 fn line_composer_char_plus_lots_of_spaces() {
helix-tui/src/widgets/table.rs+2−2
@@ -68,7 +68,7 @@ where
6868/// Row::new(vec!["Cell1", "Cell2", "Cell3"]);
6969/// ```
7070///
71−/// But if you need a bit more control over individual cells, you can explicity create [`Cell`]s:
71+/// But if you need a bit more control over individual cells, you can explicitly create [`Cell`]s:
7272/// ```rust
7373/// # use helix_tui::widgets::{Row, Cell};
7474/// # use helix_view::graphics::{Style, Color};
@@ -109,7 +109,7 @@ impl<'a> Row<'a> {
109109 self
110110 }
111111
112− /// Set the [`Style`] of the entire row. This [`Style`] can be overriden by the [`Style`] of a
112+ /// Set the [`Style`] of the entire row. This [`Style`] can be overridden by the [`Style`] of a
113113 /// any individual [`Cell`] or event by their [`Text`] content.
114114 pub fn style(mut self, style: Style) -> Self {
115115 self.style = style;
helix-tui/tests/terminal.rs+4−4
@@ -17,15 +17,15 @@ fn terminal_buffer_size_should_be_limited() {
1717// let backend = TestBackend::new(10, 10);
1818// let mut terminal = Terminal::new(backend)?;
1919// let frame = terminal.draw(|f| {
20−// let paragrah = Paragraph::new("Test");
21−// f.render_widget(paragrah, f.size());
20+// let paragraph = Paragraph::new("Test");
21+// f.render_widget(paragraph, f.size());
2222// })?;
2323// assert_eq!(frame.buffer.get(0, 0).symbol, "T");
2424// assert_eq!(frame.area, Rect::new(0, 0, 10, 10));
2525// terminal.backend_mut().resize(8, 8);
2626// let frame = terminal.draw(|f| {
27−// let paragrah = Paragraph::new("test");
28−// f.render_widget(paragrah, f.size());
27+// let paragraph = Paragraph::new("test");
28+// f.render_widget(paragraph, f.size());
2929// })?;
3030// assert_eq!(frame.buffer.get(0, 0).symbol, "t");
3131// assert_eq!(frame.area, Rect::new(0, 0, 8, 8));
helix-view/src/document.rs+2−2
@@ -648,7 +648,7 @@ impl Document {
648648 .clone()
649649 // Map through changes
650650 .map(transaction.changes())
651− // Ensure all selections accross all views still adhere to invariants.
651+ // Ensure all selections across all views still adhere to invariants.
652652 .ensure_invariants(self.text.slice(..));
653653 }
654654
@@ -752,7 +752,7 @@ impl Document {
752752 self.undo_redo_impl(view_id, true)
753753 }
754754
755− /// Redo the last modification to the [`Document`]. Returns whether the redo was sucessful.
755+ /// Redo the last modification to the [`Document`]. Returns whether the redo was successful.
756756 pub fn redo(&mut self, view_id: ViewId) -> bool {
757757 self.undo_redo_impl(view_id, false)
758758 }
helix-view/src/view.rs+1−1
@@ -79,7 +79,7 @@ pub struct View {
7979 // uses two docs because we want to be able to swap between the
8080 // two last modified docs which we need to manually keep track of
8181 pub last_modified_docs: [Option<DocumentId>; 2],
82− /// used to store previous selections of tree-sitter objecs
82+ /// used to store previous selections of tree-sitter objects
8383 pub object_selections: Vec<Selection>,
8484 pub gutters: Vec<(Gutter, usize)>,
8585}