Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit ea1984e

Browse files
committed
use 'var : type' for variables, instead of 'var -> type'
1 parent 34ca046 commit ea1984e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/clang_complete.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,12 @@ void BuildCompletionItemTexts(std::vector<lsCompletionItem>& out,
250250

251251
if (!result_type.empty()) {
252252
for (unsigned i = out_first; i < out.size(); ++i) {
253-
out[i].label += " -> ";
253+
if (out[i].label == out[i].filterText) {
254+
// for variable, use ' : ' instead of ' -> '
255+
out[i].label += " : ";
256+
} else {
257+
out[i].label += " -> ";
258+
}
254259
out[i].label += result_type;
255260
}
256261
}

0 commit comments

Comments
 (0)