aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands/lsp.rs
diff options
context:
space:
mode:
authorDaniel Sedlak2023-04-07 15:10:38 +0000
committerGitHub2023-04-07 15:10:38 +0000
commite856906f766aa6d58aba6f6bca9e2e1879b1629d (patch)
tree59befeebf031ab8de57df97f836bf08ccb7085f2 /helix-term/src/commands/lsp.rs
parent1148ce1fd9941e00bd416bce1f06a987d0e7b5f2 (diff)
Fix typos (#6643)
Diffstat (limited to 'helix-term/src/commands/lsp.rs')
-rw-r--r--helix-term/src/commands/lsp.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 78dbc0be..7a26b3cf 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -26,7 +26,7 @@ use helix_view::{
use crate::{
compositor::{self, Compositor},
ui::{
- self, lsp::SignatureHelp, overlay::overlayed, DynamicPicker, FileLocation, FilePicker,
+ self, lsp::SignatureHelp, overlay::overlaid, DynamicPicker, FileLocation, FilePicker,
Popup, PromptEvent,
},
};
@@ -372,7 +372,7 @@ pub fn symbol_picker(cx: &mut Context) {
};
let picker = sym_picker(symbols, current_url, offset_encoding);
- compositor.push(Box::new(overlayed(picker)))
+ compositor.push(Box::new(overlaid(picker)))
}
},
)
@@ -431,7 +431,7 @@ pub fn workspace_symbol_picker(cx: &mut Context) {
future.boxed()
};
let dyn_picker = DynamicPicker::new(picker, Box::new(get_symbols));
- compositor.push(Box::new(overlayed(dyn_picker)))
+ compositor.push(Box::new(overlaid(dyn_picker)))
},
)
}
@@ -454,7 +454,7 @@ pub fn diagnostics_picker(cx: &mut Context) {
DiagnosticsFormat::HideSourcePath,
offset_encoding,
);
- cx.push_layer(Box::new(overlayed(picker)));
+ cx.push_layer(Box::new(overlaid(picker)));
}
}
@@ -471,7 +471,7 @@ pub fn workspace_diagnostics_picker(cx: &mut Context) {
DiagnosticsFormat::ShowSourcePath,
offset_encoding,
);
- cx.push_layer(Box::new(overlayed(picker)));
+ cx.push_layer(Box::new(overlaid(picker)));
}
impl ui::menu::Item for lsp::CodeActionOrCommand {
@@ -491,7 +491,7 @@ impl ui::menu::Item for lsp::CodeActionOrCommand {
///
/// While the `kind` field is defined as open ended in the LSP spec (any value may be used)
/// in practice a closed set of common values (mostly suggested in the LSP spec) are used.
-/// VSCode displays each of these categories seperatly (seperated by a heading in the codeactions picker)
+/// VSCode displays each of these categories separately (separated by a heading in the codeactions picker)
/// to make them easier to navigate. Helix does not display these headings to the user.
/// However it does sort code actions by their categories to achieve the same order as the VScode picker,
/// just without the headings.
@@ -521,7 +521,7 @@ fn action_category(action: &CodeActionOrCommand) -> u32 {
}
}
-fn action_prefered(action: &CodeActionOrCommand) -> bool {
+fn action_preferred(action: &CodeActionOrCommand) -> bool {
matches!(
action,
CodeActionOrCommand::CodeAction(CodeAction {
@@ -600,12 +600,12 @@ pub fn code_action(cx: &mut Context) {
}
// Sort codeactions into a useful order. This behaviour is only partially described in the LSP spec.
- // Many details are modeled after vscode because langauge servers are usually tested against it.
+ // Many details are modeled after vscode because language servers are usually tested against it.
// VScode sorts the codeaction two times:
//
// First the codeactions that fix some diagnostics are moved to the front.
// If both codeactions fix some diagnostics (or both fix none) the codeaction
- // that is marked with `is_preffered` is shown first. The codeactions are then shown in seperate
+ // that is marked with `is_preferred` is shown first. The codeactions are then shown in separate
// submenus that only contain a certain category (see `action_category`) of actions.
//
// Below this done in in a single sorting step
@@ -627,10 +627,10 @@ pub fn code_action(cx: &mut Context) {
return order;
}
- // if one of the codeactions is marked as prefered show it first
+ // if one of the codeactions is marked as preferred show it first
// otherwise keep the original LSP sorting
- action_prefered(action1)
- .cmp(&action_prefered(action2))
+ action_preferred(action1)
+ .cmp(&action_preferred(action2))
.reverse()
});
@@ -955,7 +955,7 @@ fn goto_impl(
},
move |_editor, location| Some(location_to_file_location(location)),
);
- compositor.push(Box::new(overlayed(picker)));
+ compositor.push(Box::new(overlaid(picker)));
}
}
}