summaryrefslogtreecommitdiff
path: root/helix-term/src/commands/lsp.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-04-26 23:18:20 +0000
committerSkyler Hawthorne2022-06-19 03:57:45 +0000
commited950fcc56c480dc5a54c7e07918dca9192db200 (patch)
tree453e6f56c72d8c29fe9b1e39361a13d19c9722b1 /helix-term/src/commands/lsp.rs
parent1533f489340fb63eee31c12122d6233cb5f6abaf (diff)
Add more context; Editor::open doesn't need to own path
Diffstat (limited to 'helix-term/src/commands/lsp.rs')
-rw-r--r--helix-term/src/commands/lsp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index b6bea8d6..ff61ee63 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -61,7 +61,7 @@ fn jump_to_location(
return;
}
};
- let _id = editor.open(path, action).expect("editor.open failed");
+ let _id = editor.open(&path, action).expect("editor.open failed");
let (view, doc) = current!(editor);
let definition_pos = location.range.start;
// TODO: convert inside server
@@ -114,7 +114,7 @@ fn sym_picker(
return;
}
};
- if let Err(err) = cx.editor.open(path, action) {
+ if let Err(err) = cx.editor.open(&path, action) {
let err = format!("failed to open document: {}: {}", uri, err);
log::error!("{}", err);
cx.editor.set_error(err);
@@ -385,7 +385,7 @@ pub fn apply_workspace_edit(
};
let current_view_id = view!(editor).id;
- let doc_id = match editor.open(path, Action::Load) {
+ let doc_id = match editor.open(&path, Action::Load) {
Ok(doc_id) => doc_id,
Err(err) => {
let err = format!("failed to open document: {}: {}", uri, err);