Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Support gopls daemon mode #2760

Closed
luisdavim opened this issue Mar 7, 2020 · 4 comments
Closed

[Feature request] Support gopls daemon mode #2760

luisdavim opened this issue Mar 7, 2020 · 4 comments

Comments

@luisdavim
Copy link

luisdavim commented Mar 7, 2020

It would be a nice performance improvement if vim-go could support talking to a daemon gopls or maybe even managing the daemon instance so other plugins like coc.vim or YouCompleteMe can use it.

Some relevant links

@luisdavim
Copy link
Author

Looks like all we have to do is to add -remote=auto to the gopls args, maybe all we need is to document this, here's an example with coc.nvim

vim-go relevant config:

  let g:go_gopls_enabled = 1
  let g:go_gopls_options = ['-remote=auto']
  let g:go_def_mode='gopls'
  let g:go_info_mode='gopls'
  let g:go_referrers_mode = 'gopls'

and got coc.nvim:

  "languageserver": {
    "golang": {
      "command": "gopls",
      "args": ["-remote=auto"],
      "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
      "filetypes": ["go"]
    }
  }

@bhcleek
Copy link
Collaborator

bhcleek commented Mar 7, 2020

Thank you for the suggestion.

Yes, this is already suported by using g:go_gopls_options; -remote=auto was one of the motivations for adding g:go_gopls_options. I don't intend to document it explicitly, because I intend to make the default for g:go_gopls_options be -remote=auto by the next release. I've been running my machine like since gopls v0.3.3 came out.

@ghost
Copy link

ghost commented Apr 20, 2020

@luisdavim Something I am doing is not working so I opened this issue.

@ericwq
Copy link

ericwq commented Sep 4, 2020

see this for the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants