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

[features request] Add a command to restart language server just like restart a typescript language server #2324

Closed
shynome opened this issue Feb 12, 2019 · 9 comments
Labels
go-modules Related to Go modules needs more info

Comments

@shynome
Copy link

shynome commented Feb 12, 2019

somtimes go language server can't found I have add a new pkg to go.mod, then I can't get any tips from the pkg until I exec reload the window command if have a command to restart language server I can just reload go language server and don't lose my running cmd or others

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Feb 17, 2019

  • Have you opted in to use the language server explicitly by adding the setting "go.useLanguageServer": true?
  • Have you tried running Go: Build current Package command after updating the go.mod file to see if that helps?

@ramya-rao-a ramya-rao-a added needs more info go-modules Related to Go modules labels Feb 17, 2019
@shynome
Copy link
Author

shynome commented Feb 17, 2019

  • I have added this setting "go.useLanguageServer": true
  • Go: Build current Package the command seem is helpful, but I'm not sure , because vscode notice me go.mod changed, rebuild module , and then the tips have worked.

the rebuild progress sometimes spend too much time, enough to make me think it stuck and want restart it, I can't find a way to restart language server , so I have to run commad reload the window to restart it

@OneOfOne
Copy link
Contributor

IMO this is related to #2253, go-langserver is just broken right now.

@ramya-rao-a
Copy link
Contributor

@shynome It is not clear to me if you set "go.useLanguageServer": true before or after my question.

Can you share all you go related settings?

@shynome
Copy link
Author

shynome commented Feb 25, 2019

@ramya-rao-a it like this

{
    "go.useLanguageServer": true,
    "go.alternateTools": {
        "go-langserver": "bingo"
    },
    "go.languageServerFlags": ["--format-style", "goimports"],
    "go.languageServerExperimentalFeatures": {
        "format": true,
        "autoComplete": true
    },
}

@ramya-rao-a
Copy link
Contributor

Ok, looks like you are using the bingo language server. Please log an issue at https:/saibing/bingo/issues first. If it is determined there that this is an issue with the Go extension, then we can re-open this issue.

@shynome
Copy link
Author

shynome commented Feb 28, 2019

if use anthor language server also need a command to restart language server, so this is not about bingo or others language server.

@ramya-rao-a
Copy link
Contributor

I can't get any tips from the pkg until I exec reload the window common

The original problem was with getting auto-completions and other features when adding packages to the go.mod file.

The language server should be able to give you these features without needing a restart which is why I suggested that this should be an issue for the language server.

@shynome
Copy link
Author

shynome commented Feb 28, 2019

Thank's your reply.
I will log an issue to bingo

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
go-modules Related to Go modules needs more info
Projects
None yet
Development

No branches or pull requests

3 participants