liteide icon indicating copy to clipboard operation
liteide copied to clipboard

golang 插件

Open catsalt opened this issue 6 years ago • 7 comments

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)?

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

go1.13

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

win10

What did you do?

If possible, provide a recipe for reproducing the error.

What did you expect to see?

https://github.com/golang/tools/tree/master/gopls 可以使用golang 提供的插件.

What did you see instead?

catsalt avatar Sep 04 '19 05:09 catsalt

gopls并不那么美好,我在vscode中试过,当程序引入therecipe/qt后,它无法显示提示信息了,也许是therecipe/qt太庞大了,而gopls还不完善,处理能力有限。但是用godoc依然可以正常。

rocket049 avatar Oct 26 '19 03:10 rocket049

vscode 的gopls 兼职是噩梦 , module 折腾不清楚。 还是goland liteide 省时省心

fastfading avatar Nov 07 '19 06:11 fastfading

I have a very large project and godoc doesn't work anymore (fills up RAM like crazy). On the other hand gopls with VSCode works fine. I really like LiteIDE but I really need the autocomplete feature. I would love to see gopls gets used in LiteIDE.

epikur-io avatar Dec 16 '19 05:12 epikur-io

I have a very large project and godoc doesn't work anymore (fills up RAM like crazy). On the other hand gopls with VSCode works fine. I really like LiteIDE but I really need the autocomplete feature. I would love to see gopls gets used in LiteIDE.

vscode gopls does not work well with go mod. can not find all references in project outside gopath. however LiteIDE did it well

fastfading avatar Dec 17 '19 01:12 fastfading

@fastfading Thats simply not true. I'm currently using vs code 1.41.0 and the recent gopls build with the std Go extension. It's working correctly even with projects using go.mod. All references where resolved correctly also outside of GOPATH. Thats sad actually I really like LiteIDE but as I said the latest version of LiteIDE is kinda buggy in regards to gocode/autocompletion. I also think that supporting Go modules is a must.

epikur-io avatar Dec 21 '19 16:12 epikur-io

could u try this . mkdir outsidegopath #outsidegopath is a path outsiede gopath #main.go package main func main() { Add() } #add.go func Add() {}

open this folder (outsidegopath) in vscode find all reference Add

it did not work on my vscode , if it work, could u tell me how

epikur-io [email protected] 于2019年12月22日周日 上午12:23写道:

@fastfading https://github.com/fastfading Thats simply not true. I'm currently using vs code 1.41.0 and the recent gopls build with the std Go extension. It's working correctly even with projects using go.mod. Thats sad actually I really like LiteIDE but as I said the latest version of LiteIDE is kinda buggy in regards to gocode/autocompletion. I also think that supporting Go modules is a must.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/visualfc/liteide/issues/1068?email_source=notifications&email_token=AB7W75BRB2R5DHMBUJTHGXDQZY7G7A5CNFSM4ITNU3YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHO7BXQ#issuecomment-568193246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7W75EZZQSJCTBIJBSCA6TQZY7G7ANCNFSM4ITNU3YA .

fastfading avatar Dec 23 '19 01:12 fastfading

@fastfading Whats the point of that? Without Go modules you would have to set you GOPATH accordingly or use golang's vendor feature, which both is ugly and is the reason why Go modules were introduced. That was the way it worked with vs code and LiteIDE before go modules release. So basically I don't get your point because your example doesn't work either in LiteIDE (at least on my maching when I don' update the GOPATH for this "project"). Also that's just not how you should organize Go code, it's actually a really messy way of doing so and as your dependencies grow it's getting worse.

Could you please elaborate why you would want to organize your code like that? And what would be the problem of just using go modules? I mean really it's so easy. Just 1 command actually or two if you also want to also "vendorify" your dependencies. Also you can set your project base path inside the go.mod file like that:

module mymodule
replace (
	SomeName/mymodule => ./path/mymodule
        ...
)

With a configuration like that you completely isolate your project and its dependencies.

epikur-io avatar Dec 23 '19 10:12 epikur-io