Skip to content

Only show completions for prelude items when not in a module qualifier #4443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

GearsDatapacks
Copy link
Member

I noticed that when the LSP provides autocomplete for types and values after a module select, e.g.

pub fn main() {
  let x = option.|
}

It was including completions for prelude values, like Ok, which would not be valid after option.
This PR fixes that behaviour

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Oh much better! Thank you!

@lpil lpil merged commit a629a6d into gleam-lang:main Apr 4, 2025
12 checks passed
@GearsDatapacks GearsDatapacks deleted the fix-prelude-completions branch April 4, 2025 09:43
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.

2 participants