Skip to content

Commit d47f11e

Browse files
liuchengxuautozimu
authored andcommitted
Echo some info when calling gotoDefinition (#545)
* Echo some info when calling gotoDefinition * Use echomsg_ellipsis to avoid long messages
1 parent e2417cc commit d47f11e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/languageclient.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,8 @@ impl State {
963963
let loc = arr.get(0).ok_or_else(|| err_msg("Not found!"))?;
964964
self.edit(&goto_cmd, loc.uri.filepath()?)?;
965965
self.cursor(loc.range.start.line + 1, loc.range.start.character + 1)?;
966+
let cur_file: String = self.eval("expand('%')")?;
967+
self.echomsg_ellipsis(format!("[LC]: {} {}:{}", cur_file, loc.range.start.line + 1, loc.range.start.character + 1))?;
966968
}
967969
_ => self.display_locations(&arr)?,
968970
},

0 commit comments

Comments
 (0)