same for --model
@@ -359,6 +359,9 @@ func findDynamicSuggestions(annotation string, doc goprompt.Document) []goprompt
suggestions = append(suggestions, goprompt.Suggest{Text: name})
}
sort.Slice(suggestions, func(i, j int) bool {
+ if suggestions[i].Text == suggestions[j].Text {
+ return suggestions[i].Description < suggestions[j].Description
+ }
return suggestions[i].Text < suggestions[j].Text
})
return goprompt.FilterHasPrefix(suggestions, doc.GetWordBeforeCursor(), true)
