I ran go get -u github.com/sourcegraph/go-langserver and go-langserver was installed in my $PATH, but Oni doesn't seem to use it. When I edit a Go file and type fmt. somewhere in a function body, no menu of completions comes up. It also doesn't come up if I hit ctrl+space. I also tried adding
"language.go.languageServer.command": "go/bin/go-langserver",
to the
export const configuration = {
section of the Oni config, but it seems not to have made any different. Is this broken or am I doing it wrong? Also, why can't this functionality just be included in Oni?
Some advice for troubleshooting:
$GOPATH/bin in you $PATH? If not, you may use absolute path "language.go.languageServer.command": "/ABSOLUTE/PATH/TO/go-langserver",
Or append $GOPATH/bin to environment.additionalPaths in config to include that path separately for Oni.
Shift-Ctrl/Command-P and type dev enter) and check the console for error message.Hope these would help.
@ijt
// language server configuration
"language.go.languageServer.rootFiles": [".git"],
"language.go.languageServer.command": ["go-langserver"],
"language.go.languageServer.arguments": ["--gocodecompletion", "--freeosmemory", "false"],
You must set the --gocodecompletion parameter to enable the completion function
Added your snippet @saibing to the documentation, thanks ๐
Thanks for that. I did indeed have a spinning circle before because my path
to the "language.go.languageServer.command" was wrong. So I restarted Oni
and opened a Go file, now seeing a lightning bolt. So far so good. But I
still have no indication of anything like Intellisense working in this
file. For example, I tried typing "os.
see any menu of completions.
On Mon, Mar 26, 2018 at 11:29 AM, Akin notifications@github.com wrote:
Added your snippet @saibing https://github.com/saibing to the
documentation, thanks ๐โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/onivim/oni/issues/1928#issuecomment-376265967, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAA8qsIFPiPFvlOrmbs7l4y1M-p6t3Oaks5tiTOkgaJpZM4S6j-M
.
My bad -- I hadn't included these lines:
"language.go.languageServer.rootFiles": [".git"],
"language.go.languageServer.arguments": ["--gocodecompletion",
"--freeosmemory", "false"],
I added them and now completion works fine.
On Tue, Mar 27, 2018 at 7:13 AM, Issac Trotts issac.trotts@gmail.com
wrote:
Thanks for that. I did indeed have a spinning circle before because my
path to the "language.go.languageServer.command" was wrong. So I
restarted Oni and opened a Go file, now seeing a lightning bolt. So far so
good. But I still have no indication of anything like Intellisense working
in this file. For example, I tried typing "os." and "os.E" and
didn't see any menu of completions.On Mon, Mar 26, 2018 at 11:29 AM, Akin notifications@github.com wrote:
Added your snippet @saibing https://github.com/saibing to the
documentation, thanks ๐โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/onivim/oni/issues/1928#issuecomment-376265967, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAA8qsIFPiPFvlOrmbs7l4y1M-p6t3Oaks5tiTOkgaJpZM4S6j-M
.
Since @ijt provided the fix and stated it's working, let's close this one.
Most helpful comment
Some advice for troubleshooting:
$GOPATH/binin you$PATH? If not, you may use absolute pathOr append
$GOPATH/binto environment.additionalPaths in config to include that path separately for Oni.Shift-Ctrl/Command-Pand typedeventer) and check the console for error message.Hope these would help.