Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'src/act.rs')
-rw-r--r--src/act.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/act.rs b/src/act.rs
index d35cd3a..0428ddb 100644
--- a/src/act.rs
+++ b/src/act.rs
@@ -1,7 +1,8 @@
use dsb::Cell;
use dsb::cell::Style;
use itertools::Itertools;
-use lsp_types::{CodeAction, CodeActionKind};
+use lsp_types::CodeActionKind;
+use rust_analyzer::lsp::ext::CodeAction;
#[derive(Debug, Clone)]
pub enum N<T> {
@@ -165,14 +166,15 @@ fn write(x: &CodeAction, c: usize, selected: bool, to: &mut Vec<Cell>) {
vec![Cell { style: Style::new(FG, bg), ..Default::default() }; c];
let t = match &x.kind {
- Some(x) if x == &CodeActionKind::QUICKFIX => '󰁨',
- Some(x)
- if x == &CodeActionKind::REFACTOR
- || x == &CodeActionKind::REFACTOR_EXTRACT
- || x == &CodeActionKind::REFACTOR_INLINE
- || x == &CodeActionKind::REFACTOR_REWRITE =>
- '󰷥',
- Some(x) if x == &CodeActionKind::SOURCE => '󱇧',
+ Some(CodeActionKind::QuickFix) => '󰁨',
+ Some(
+ CodeActionKind::Refactor
+ | CodeActionKind::RefactorExtract
+ | CodeActionKind::RefactorInline
+ | CodeActionKind::RefactorRewrite
+ | CodeActionKind::RefactorMove,
+ ) => '󰷥',
+ Some(CodeActionKind::Source) => '󱇧',
_ => '', /* 󱢇☭ */
};
into[0].style.fg = col!("#E5C07B");