From 4a3a525ea93cc5761e03aa066f6703dc9563bcaa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 19 May 2020 21:39:27 +0200 Subject: Use new format for all assists that don't change cursor positon --- crates/rust-analyzer/src/to_proto.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 2b1a3378f..af54f81b7 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -639,7 +639,7 @@ fn main() { } pub(crate) fn code_action(world: &WorldSnapshot, assist: Assist) -> Result { - let res = if assist.source_change.is_snippet { + let res = if assist.source_change.cursor_position.is_none() { lsp_ext::CodeAction { title: assist.label, kind: Some(String::new()), @@ -647,6 +647,7 @@ pub(crate) fn code_action(world: &WorldSnapshot, assist: Assist) -> Result