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

gopls: no autoimport, no autocomplete, no hover docs #2476

@bitfield

Description

@bitfield

Code Version 1.33.1 (1.33.1),
vscode-go 0.10.0

Steps to reproduce:

  1. Create a main.go file.
  2. Enter this code:
package main

func main() {
	os.Exit(1)
}
  1. Save

I would expect to see an automatic import "os" added, but it is not.

If I add it manually, I would expect to be able to hover over the os.Exit and see pop-up information about the function. I do not.

If I delete the Exit(1), place the cursor after os. and hit Ctrl-Space, I expect to see an auto-complete menu showing the available functions in os. Instead I see only the identifiers in the current file (func, import, main, and so on).

Settings as here: https://github.com/golang/go/wiki/gopls

gopls is running, as shown in the process list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions