aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/dap.rs4
-rw-r--r--helix-term/src/commands/lsp.rs26
-rw-r--r--helix-term/src/commands/typed.rs4
3 files changed, 17 insertions, 17 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs
index dac1e9d5..8efdc9cf 100644
--- a/helix-term/src/commands/dap.rs
+++ b/helix-term/src/commands/dap.rs
@@ -2,7 +2,7 @@ use super::{Context, Editor};
use crate::{
compositor::{self, Compositor},
job::{Callback, Jobs},
- ui::{self, overlay::overlayed, FilePicker, Picker, Popup, Prompt, PromptEvent, Text},
+ ui::{self, overlay::overlaid, FilePicker, Picker, Popup, Prompt, PromptEvent, Text},
};
use dap::{StackFrame, Thread, ThreadStates};
use helix_core::syntax::{DebugArgumentValue, DebugConfigCompletion, DebugTemplate};
@@ -270,7 +270,7 @@ pub fn dap_launch(cx: &mut Context) {
let templates = config.templates.clone();
- cx.push_layer(Box::new(overlayed(Picker::new(
+ cx.push_layer(Box::new(overlaid(Picker::new(
templates,
(),
|cx, template, _action| {
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)));
}
}
}
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index afc3d706..3c954d20 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -116,7 +116,7 @@ fn open(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) ->
let call: job::Callback = job::Callback::EditorCompositor(Box::new(
move |editor: &mut Editor, compositor: &mut Compositor| {
let picker = ui::file_picker(path, &editor.config());
- compositor.push(Box::new(overlayed(picker)));
+ compositor.push(Box::new(overlaid(picker)));
},
));
Ok(call)
@@ -1335,7 +1335,7 @@ fn lsp_workspace_command(
let picker = ui::Picker::new(commands, (), |cx, command, _action| {
execute_lsp_command(cx.editor, command.clone());
});
- compositor.push(Box::new(overlayed(picker)))
+ compositor.push(Box::new(overlaid(picker)))
},
));
Ok(call)