Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

import code completion is... too complete #572

Closed
mousetraps opened this issue Oct 26, 2016 · 6 comments · Fixed by #860
Closed

import code completion is... too complete #572

mousetraps opened this issue Oct 26, 2016 · 6 comments · Fixed by #860

Comments

@mousetraps
Copy link

Smoke testing, Windows

type import fmt, code completion appears
image

Pressing enter here now results in an extra "import fmt":
image

@mousetraps mousetraps changed the title import code completion is... to complete import code completion is... too complete Oct 26, 2016
@ramya-rao-a
Copy link
Contributor

The autocomplete for unimported packages shouldnt appear when part of import statements like this. This is a bug

@ramya-rao-a
Copy link
Contributor

Same thing happens in the package statement as well

@ramya-rao-a
Copy link
Contributor

Once microsoft/vscode#18485 is implemented, we can stop suggesting the unimported packages when the cursor is inside a string or comment or import block etc.

@ramya-rao-a
Copy link
Contributor

Re-opening as the current fix will not work for multi line imports

@ramya-rao-a
Copy link
Contributor

The latest update (0.6.56) to the Go extension has the fix for package statement and single line imports.

Multi line imports still has the issue

@ramya-rao-a
Copy link
Contributor

Now that there is active development on an official language server for Go via gopls which will provide the auto-completion feature as well, there is no further planned work in the auto-completion feature that is coming directly out of the extension.

This issue is being closed in favor of having the auto-completion feature from the language server which will not have the same problem.

For more on language server integration with this extension, please see Go language server

To go a feature request for gopls, use the Go issue tracker

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants