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

keywords missing from completions list #558

Closed
mousetraps opened this issue Oct 26, 2016 · 5 comments
Closed

keywords missing from completions list #558

mousetraps opened this issue Oct 26, 2016 · 5 comments

Comments

@mousetraps
Copy link

Smoke testing, Windows

e.g. below, "import" is missing, but everything else is also missing from the completions list.
image

@ramya-rao-a
Copy link
Contributor

We use gocode for autocomplete + a little extra that we do on our on like

  • support for unimported packages
  • "package" completion with either "main" or the folder name

nsf/gocode#312 explains why there is no completion for keywords like

  • import
  • func
  • struct
    etc.

What are you referring to when you say

but everything else is also missing from the completions list.

@mousetraps
Copy link
Author

"everything else" == all other keywords 😃

Re: the issue linked to (nsf/gocode#312) doesn't seem to provide much of a reasoning as to why there are no completions for keywords - just says that there are no completions. May be worth considering contributing upstream because otherwise this behavior is inconsistent w/ the rest of the language services we integrate with

@ramya-rao-a ramya-rao-a changed the title kewywords missing from completions list keywords missing from completions list Jan 13, 2017
@ramya-rao-a
Copy link
Contributor

Now that we have the whitelist of keywords in https://github.com/Microsoft/vscode-go/blob/master/src/util.ts#L16, this is very easy to implement, if anyone wants to take a crack at it.

Hint: Start at goSuggest.ts

@francknouama
Copy link

+1

@ramya-rao-a
Copy link
Contributor

The latest update (0.6.56) to the Go extension has this feature.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants