visualfc / liteide

LiteIDE is a simple, open source, cross-platform Go IDE.
GNU Lesser General Public License v2.1
7.6k stars 972 forks source link

最新版liteide/gocode/gotools泛型支持有问题,已提供例子复现(代码提示失效,声明跳转正常) #1256

Closed Lofanmi closed 1 year ago

Lofanmi commented 1 year ago

Please answer these questions before submitting your issue. Thanks! Please download LiteIDE latest version and test before submitting your issue. Thanks!

What version of LiteIDE are you using (LiteIDE About - Version and Build Qt Version)?

X38.1 Qt 5.15.2

What version of Go are you using (go version)?

What operating system and processor architecture are you using(go env)?

What did you do?

导入的包如果有泛型,代码补全就失效了。 代码跳转功能正常,自己包内的泛型支持也没问题。

If possible, provide a recipe for reproducing the error.

复现例子:

新建 main.go, go mod init xxx

package main

import (
    "fmt"

    radix "github.com/hashicorp/go-immutable-radix/v2"
)

func main() {
    var r *radix.Tree[string]
    _ = r
    // fmt.Println("")
    // go mod tidy 依赖安装下来后,就不会弹出补全了。
    // 正常输入 fmt. 就会代码提示,但是并不会提示。
}

What did you expect to see?

正常输入 fmt. 就会代码提示,但是并不会提示。

What did you see instead?

不会弹出代码提示。

visualfc commented 1 year ago

fixed, please update gocode to latest v1.5.0 请将 gotools & gocode 全部升级到最新版本,以解决之前工具 bug 。

go install github.com/visualfc/gotools@latest
go install github.com/visualfc/gocode@latest

Windows/Linux: copy GOPATH/bin gotools and gocode to liteide/bin
MacOS: copy GOPATH/bin gotools and gocode to LiteIDE.app/Contents/MacOS
Lofanmi commented 1 year ago

感谢作者!已经可以了!