summaryrefslogtreecommitdiff
path: root/helix-term/src/ui/completion.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-01 17:41:20 +0000
committerNathan Vegdahl2021-07-02 02:06:52 +0000
commit702a0491db0fef8ee15cd6fcff3138812da2c2aa (patch)
tree42a1194f0b43465ca1125c0c2209a75b0b158389 /helix-term/src/ui/completion.rs
parent79f096963c75d107cd1f415666fb21a9cfd3cbd6 (diff)
Remove #[allow(unused)] from helix-term, and fix unused imports.
Lots of other warning still left. Will address in subsequent commits.
Diffstat (limited to 'helix-term/src/ui/completion.rs')
-rw-r--r--helix-term/src/ui/completion.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs
index 74a82dab..5b418f75 100644
--- a/helix-term/src/ui/completion.rs
+++ b/helix-term/src/ui/completion.rs
@@ -1,19 +1,16 @@
-use crate::compositor::{Component, Compositor, Context, EventResult};
-use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
+use crate::compositor::{Component, Context, EventResult};
+use crossterm::event::{Event, KeyCode, KeyEvent};
use tui::buffer::Buffer as Surface;
use std::borrow::Cow;
-use helix_core::{Position, Transaction};
-use helix_view::{
- graphics::{Color, Rect, Style},
- Editor,
-};
+use helix_core::Transaction;
+use helix_view::{graphics::Rect, Editor};
use crate::commands;
use crate::ui::{menu, Markdown, Menu, Popup, PromptEvent};
-use helix_lsp::lsp;
+use helix_lsp::{lsp, util};
use lsp::CompletionItem;
impl menu::Item for CompletionItem {
@@ -88,8 +85,6 @@ impl Completion {
// always present here
let item = item.unwrap();
- use helix_lsp::{lsp, util};
-
// if more text was entered, remove it
let cursor = doc.selection(view.id).cursor();
if trigger_offset < cursor {
@@ -100,7 +95,6 @@ impl Completion {
doc.apply(&remove, view.id);
}
- use helix_lsp::OffsetEncoding;
let transaction = if let Some(edit) = &item.text_edit {
let edit = match edit {
lsp::CompletionTextEdit::Edit(edit) => edit.clone(),