Mark fixes from diagnostics as quick fixes
This commit is contained in:
parent
e644f64f2a
commit
9e71fc0314
@ -730,8 +730,13 @@ pub fn handle_code_action(
|
||||
for fix in fixes_from_diagnostics {
|
||||
let title = fix.label;
|
||||
let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?;
|
||||
let action =
|
||||
lsp_ext::CodeAction { title, group: None, kind: None, edit: Some(edit), command: None };
|
||||
let action = lsp_ext::CodeAction {
|
||||
title,
|
||||
group: None,
|
||||
kind: Some(lsp_types::code_action_kind::QUICKFIX.into()),
|
||||
edit: Some(edit),
|
||||
command: None,
|
||||
};
|
||||
res.push(action);
|
||||
}
|
||||
|
||||
|
@ -298,6 +298,7 @@ fn main() {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"kind": "quickfix",
|
||||
"title": "Create module"
|
||||
}]),
|
||||
);
|
||||
@ -368,6 +369,7 @@ fn main() {{}}
|
||||
}
|
||||
]
|
||||
},
|
||||
"kind": "quickfix",
|
||||
"title": "Create module"
|
||||
}]),
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user