Skip to content

do not show completions for numbers#5398

Merged
lpil merged 1 commit into
gleam-lang:mainfrom
giacomocavalieri:do-not-complete-numbers
Feb 26, 2026
Merged

do not show completions for numbers#5398
lpil merged 1 commit into
gleam-lang:mainfrom
giacomocavalieri:do-not-complete-numbers

Conversation

@giacomocavalieri

Copy link
Copy Markdown
Member

This PR makes sure the completer won't return any completions when typing a number.
Right now when typing a number makes completions for functions with such number in the name pop up:

  2
// ^ [list.window_by_2]
//   [int.to_base32]
//   ...

This usually happens in IDEs like Zed that still ask for completions even if the programmer is typing in a number.
We can't control when an IDE asks for completions, but we can avoid replying with completions that are most likely not useful in this context.


  • Tests have been added for new behaviour
  • The changelog has been updated for any user-facing changes

@ankddev ankddev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change!

@lpil lpil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lpil
lpil merged commit 4bcd14f into gleam-lang:main Feb 26, 2026
12 checks passed
@giacomocavalieri
giacomocavalieri deleted the do-not-complete-numbers branch February 26, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants