Skip to content

Commit

Permalink
fix suggestion of associated values on dot
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Jan 27, 2025
1 parent 7cdfbb2 commit 3ba73a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/internal/lsp/search/search_completion_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (s *Search) BuildCompletionList(
enumerator := prevIndexable.(*symbols.Enumerator)

for _, assoc := range enumerator.AssociatedValues {
if strings.HasPrefix(assoc.GetName(), symbolInPosition.Text()) {
if !filterMembers || strings.HasPrefix(assoc.GetName(), symbolInPosition.Text()) {
items = append(items, protocol.CompletionItem{
Label: assoc.GetName(),
Kind: &assoc.Kind,
Expand Down Expand Up @@ -357,7 +357,7 @@ func (s *Search) BuildCompletionList(
} else {
// This is an enum instance, so we can access associated values.
for _, assoc := range enum.GetAssociatedValues() {
if strings.HasPrefix(assoc.GetName(), symbolInPosition.Text()) {
if !filterMembers || strings.HasPrefix(assoc.GetName(), symbolInPosition.Text()) {
items = append(items, protocol.CompletionItem{
Label: assoc.GetName(),
Kind: &assoc.Kind,
Expand Down

0 comments on commit 3ba73a2

Please sign in to comment.