Skip to content
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

Filter module source registry completion requests #1053

Closed
dbanck opened this issue Aug 29, 2022 · 1 comment · Fixed by #1062
Closed

Filter module source registry completion requests #1053

dbanck opened this issue Aug 29, 2022 · 1 comment · Fixed by #1062
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dbanck
Copy link
Member

dbanck commented Aug 29, 2022

Background

After the introduction of completion for registry module sources in #1024, we're now seeing an increasing amount of queries for . and .. in Algolia.

CleanShot 2022-08-29 at 10 29 42@2x

Sending these queries doesn't yield any results, so we should filter and avoid them in the language server.

Proposal

Rework the existing logic of checking for local module sources to a more generic blocklist of terms.

if isModuleSourceLocal(prefix) {
// We're dealing with a local module source here, no need to search the registry
return candidates, nil
}

The new blocklist should include entries for . and ...

@github-actions
Copy link

github-actions bot commented Oct 6, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant