Introduce Label

This commit is contained in:
Aleksey Kladov 2020-08-18 16:41:21 +02:00
parent eb81731600
commit aa1a7a5414
8 changed files with 68 additions and 30 deletions

View file

@ -782,10 +782,9 @@ fn handle_fixes(
.filter_map(|d| d.fix)
.filter(|fix| fix.fix_trigger_range.intersect(range).is_some())
{
let title = fix.label;
let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?;
let action = lsp_ext::CodeAction {
title,
title: fix.label.to_string(),
id: None,
group: None,
kind: Some(CodeActionKind::QUICKFIX),

View file

@ -704,7 +704,7 @@ pub(crate) fn unresolved_code_action(
index: usize,
) -> Result<lsp_ext::CodeAction> {
let res = lsp_ext::CodeAction {
title: assist.label().to_string(),
title: assist.label.to_string(),
id: Some(format!("{}:{}", assist.id.0, index.to_string())),
group: assist.group.filter(|_| snap.config.client_caps.code_action_group).map(|gr| gr.0),
kind: Some(code_action_kind(assist.id.1)),