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

use completion feature comes from go-langserver #1593

Closed
leaxoy opened this issue Mar 27, 2018 · 6 comments
Closed

use completion feature comes from go-langserver #1593

leaxoy opened this issue Mar 27, 2018 · 6 comments
Milestone

Comments

@leaxoy
Copy link
Contributor

leaxoy commented Mar 27, 2018

I notice that go-langserver has provider an experimental completion feature, so if we use go-langserver in vscode, should we use completion feature provided by go-langserver?

@ramya-rao-a
Copy link
Contributor

Yes, definitely. We should integrate the completion feature from the language server.
PRs are welcome.

@e-nikolov
Copy link

They seem to have added support for querying interface implementations as well.

sourcegraph/go-langserver@7e01637

@leaxoy
Copy link
Contributor Author

leaxoy commented May 5, 2018

This will meet some error when add new lines to file while using completion feature comes from go-langserver. So I suggest don't harry to integrate it.

@leaxoy
Copy link
Contributor Author

leaxoy commented May 5, 2018

ramya-rao-a pushed a commit that referenced this issue May 27, 2018
* When using go-languageserver, also use code completion

Instead of using go-code, use go-languageserver for providing
code completion results when enabled. Solves #1593

* Add naive feature detect for language server feature

In case executing the binary with an unknown flag does not yield
the -gocodecompletion flag in the help output, we assume the version
installed is out of date and prompt for updating

* Also consider case where -help might be added at some point in the future

* Pass func snippet completion pref, fall back to non-server completion when unsupported

* Check supported language server flags and filter before passing

* Use initializationOptions for triggering langserver based features

* Revert changes to langserver detection, merge onReady callbacks, show message about outdated langserver version

* Refactoring

* stricter checks
@ramya-rao-a
Copy link
Contributor

The changes for this are merged in and will be available in the next week.
The below settings are needed to get this feature

"go.useLanguageServer": true,
  "go.languageServerExperimentalFeatures": {
    "autoComplete": true
  }

@ramya-rao-a
Copy link
Contributor

This feature is now out in the latest update to the Go extension (0.6.81)

@ramya-rao-a ramya-rao-a added this to the 0.6.81 milestone Jun 4, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants