-
Notifications
You must be signed in to change notification settings - Fork 65
Let gocode do the work #2
Comments
A couple minor points gocode is an external depedency: https://github.com/nsf/gocode. Second it doesn't do syntax highlighting instead it does auto-completion. Go does distribute in its misc directory syntax highlighting files for vim/emacs/sublime. |
atom-jshint has an example that could be used as a prototype for gocode integration. Might play around with this this weekend. |
I think gocode support would be great but it should live as its own package, not part of the core lang package. |
I can see value in it being part of the core package (perhaps disabled by default). I am also sympathetic to the argument that it is an external dependency and so should be a separate package. On the one hand you have ease of use for new users (who are most likely to need auto-completion, and who might not know where to go to get it if it requires additional action) and on the other hand you have valid concerns about scope and modularity. Not sure who the ultimate arbitrator is between the two positions. @kevinsawicki is there any scope boundary for a |
👍 for something like "language-go-autocomplete" Gocode will only do autocomplete based on the compiled symbols it can find, so it's nice to still have a the regular auto-complete (or something like godef) as a backup. I have a bit of code that will call out to gocode and get a definition, but without the Issue#18 from atom/autocomplete it seems like i'd have to replace autocomplete with a go-specific autocomplete? |
@joefitzgerald the current scope of the That's not to say they couldn't do more, but none of them currently do more than those things. So I would think gocode integration would be in a separate package as @mattetti mentioned |
I've added an issue in the go-plus repo for this: joefitzgerald/go-plus#2 @apires Can you share the code you have that calls out to gocode? |
It's a bit overly symplistic, it has my name hardcoded in it in this form (that should be $GOPATH/bin/gocode) and doesn't do anything too clever: |
It looks like @joefitzgerald's go-plus package is doing a lot of the things mentioned in this issue. |
Just to add to @probablycorey's statement, joefitzgerald/go-plus#2 will specifically address autocomplete, but is blocked behind work required to extend autocomplete-plus and its provider API so that it is asynchronous. v2.0 of go-plus will be released next week, after which autocomplete-plus work and then gocode integration will occur. |
The Go toolchain contains gocode, a daemon that does everything for you (not sure about snippets), you just have to interface it. That way the extension doesn't have to be changed for different go syntax versions and always works with the installed version of go. The current parser should be kept as fallback though, so it still works if the official go toolchain is not installed/properly configured.
The text was updated successfully, but these errors were encountered: