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

langserver-go keeps unexpectedly opening window with debug output #179

Closed
Dbz opened this issue Nov 25, 2018 · 14 comments
Closed

langserver-go keeps unexpectedly opening window with debug output #179

Dbz opened this issue Nov 25, 2018 · 14 comments
Labels
question Further information is requested

Comments

@Dbz
Copy link

Dbz commented Nov 25, 2018

Describe the bug
When I open a new file, langserver-go will open up a window in my vim terminal with output after attempting to run my file. I do not want this automatically happening.

To Reproduce
Steps to reproduce the behavior:

  1. Create file touch main.go
  2. open file vim main.go
    You will see output below the status line: [coc.nvim] service languageserver.golang started
  3. Start typing package main and a window will be created with debug output

image

Expected behavior
Nothing will happen as I am typing in a new file

Desktop (please complete the following information):

  • Terminal: iTerm2
  • Version: v3.2.5

Additional context
This also happens randomly when working on files, but it is very consistent when opening a new file. I don't know if it has to do my my directory structure. Here is my directory and path variables:

directory: /Users/dbz/development/go/src/github.com/udemy_channels
$GOPATH: /Users/dbz/development/go
($GOPATH is appended onto the very end of $PATH)
$PATH: /Users/dbz/apache-cassandra-3.11.2/bin:./bin:/Users/dbz/bin:/Users/dbz/.rbenv/bin:/Users/dbz/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/local/mysql/bin:/Users/dbz/bin:/Users/dbz/development/go/bin

@oblitum
Copy link
Member

oblitum commented Nov 25, 2018

I also got that window while in a working source, but after typing ( for a function. Choosing the function from the popup menu avoided the issue, but just keep typing it without using the menu and reaching ( caused the bug for me.

@chemzqm
Copy link
Member

chemzqm commented Nov 25, 2018

The output window will be opened when language server log errors by default.
Add "revealOutputChannelOn": "never", to configuration section of your server to disable this behavior.

@chemzqm
Copy link
Member

chemzqm commented Nov 25, 2018

There should be Message contains Error which should be fixed with your language server.

@chemzqm
Copy link
Member

chemzqm commented Nov 25, 2018

@Dbz
Try remove autocmd of showSignatureHelp like:

  autocmd CursorHoldI * silent call CocActionAsync('showSignatureHelp')

The error might caused by the server is not ready to parse signature.
You can still have triggered signature without this autocmd.

@Dbz
Copy link
Author

Dbz commented Nov 25, 2018

Is there a way to disable this only for Go and not for other languages like Ruby?

@oblitum
Copy link
Member

oblitum commented Nov 25, 2018

@chemzqm
Copy link
Member

chemzqm commented Nov 25, 2018

3 in [3 - 4:25 should be error, it's fixed on master.

@chemzqm chemzqm closed this as completed Nov 25, 2018
@Dbz
Copy link
Author

Dbz commented Nov 26, 2018

@oblitum just a note on the documentation. JSON doesn't support comments (ridiculous, I know), so if people copy/paste the json configs with comments (//), they will break and users may not know why.

@oblitum
Copy link
Member

oblitum commented Nov 26, 2018

@Dbz coc-settings.json uses cJSON format, which do accept comments.

@oblitum
Copy link
Member

oblitum commented Nov 26, 2018

@Dbz
Copy link
Author

Dbz commented Nov 26, 2018

My mistake!

Seriously though, thank you @oblitum and @chemzqm for working on this plugin. It is great.

@oblitum
Copy link
Member

oblitum commented Nov 26, 2018

@Dbz np, all kudos to @chemzqm, currently I'm just trying to help and playing with it.

@oblitum
Copy link
Member

oblitum commented Nov 26, 2018

@Dbz recommendation for Go, you may use it in parallel to vim-go, because the Go LSP server still doesn't offer many features.

@Dbz
Copy link
Author

Dbz commented Nov 26, 2018

Yeah, I am using vim-go as well! It might be worth mentioning that in the wiki near the Go server config.

rjoost pushed a commit to rjoost/coc.nvim that referenced this issue Dec 27, 2024
refactor(highlight): Deprecating style = string. Use style = table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants