Skip to content

Commit

Permalink
cmd/govim: allow duplicate items in completion candidates (#866)
Browse files Browse the repository at this point in the history
When it comes to unimported completions, it is entirely possible that
two packages might have the same name. Generally however, we rely
entirely on gopls to "dedupe" the completion candidate list. So make
this change unconditionally is safe.
  • Loading branch information
myitcv committed May 5, 2020
1 parent 00e6a70 commit e10617c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/govim/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (v *vimstate) complete(args ...json.RawMessage) (interface{}, error) {
Menu: i.Detail,
Word: i.TextEdit.NewText,
Info: i.Documentation,
Dup: 1,
UserData: "govim",
})
}
Expand Down
1 change: 1 addition & 0 deletions complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type CompleteItem struct {
Info string `json:"info"`
Menu string `json:"menu"`
UserData string `json:"user_data"`
Dup int `json:"dup"`
}

type CompleteInfo struct {
Expand Down

0 comments on commit e10617c

Please sign in to comment.