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

x/tools/gopls: autocompletion stops working in certain cases #33098

Closed
vincepri opened this issue Jul 13, 2019 · 2 comments
Closed

x/tools/gopls: autocompletion stops working in certain cases #33098

vincepri opened this issue Jul 13, 2019 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Milestone

Comments

@vincepri
Copy link

Working with gopls@master, it seems that in certain cases autocompletion stops working. In particular, variables returned from other methods or functions don't trigger completion properly.

Example:

package main

import (
	"fmt"
	"sync"
)

func main() {
	localMap := sync.Map{}
	m := getSyncMap()

	// Try to complete `m` and `localMap` before this if condition:
	// `m._` fails with expected selector or type assertion, found 'if' (and 1 more errors);
	// `localMap._` works;
	if true {
		fmt.Println("true")
	}
}

func getSyncMap() sync.Map {
	return sync.Map{}
}
@gopherbot gopherbot added this to the Unreleased milestone Jul 13, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jul 13, 2019
@vincepri
Copy link
Author

/cc @stamblerre

@stamblerre
Copy link
Contributor

stamblerre commented Jul 14, 2019

Duplicate of #31687

@stamblerre stamblerre marked this as a duplicate of #31687 Jul 14, 2019
@golang golang locked and limited conversation to collaborators Jul 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Projects
None yet
Development

No branches or pull requests

3 participants