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

Method names don't show in breadcrumbs, only function names #3021

Closed
sampart opened this issue Jan 31, 2020 · 4 comments
Closed

Method names don't show in breadcrumbs, only function names #3021

sampart opened this issue Jan 31, 2020 · 4 comments

Comments

@sampart
Copy link

sampart commented Jan 31, 2020

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version go1.13.7 darwin/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • Those commands didn't work for me on MacOS, but here's what the About box says:

Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:57:51.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.2.0

  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.12.0
  • Run go env GOOS GOARCH to get the operating system and processor arhcitecture details
    • darwin
      amd64

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] prefixes.

"go.useLanguageServer": true,

Describe the bug

If I'm in the body of a function in Go, the function's name is shown in the breadcrumbs. Example:

In

func NewResultsServer(...)

I see

image

However, if I'm inside a method, the function name is not shown. For example, in

func (s *ResultsResolver) GetAll(...)

the breadcrumbs look like this:

image

Furthermore, the menu which appears when clicking ... only includes functions, not methods.

Steps to reproduce the behavior

See description above.

Screenshots or recordings

See description above.

@sampart
Copy link
Author

sampart commented Jan 31, 2020

Turning off "go.useLanguageServer": true, solved this.

@sampart sampart closed this as completed Jan 31, 2020
@hyangah
Copy link
Contributor

hyangah commented Jan 31, 2020

@stamblerre When using gopls, the breadcrumbs behave as @sampart described. We should take a look.

@stamblerre
Copy link
Contributor

Filed golang/go#36949 to track this issue. By the way, @sampart: Turning off the language server may have additional consequences beyond this issue, particularly if you are using modules.

@sampart
Copy link
Author

sampart commented Feb 3, 2020

@stamblerre thanks for the heads-up, and for filing the issue 👍

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants