4

Is there any context-aware auto-completion for Go e.g if I enter "fmt." after importing the library, auto-completion should pop up and suggest me the functions like "Println" etc.

2 Answers2

0

Yes.

I got here while searching for the same thing. I am trying gocode together with auto-complete-mode.

I can't get it to complete on . though. Have to type one or two chars to get completion. Not sure if it is me or not possible. I am no emacs wizard..... yet.....

froderik
  • 155
  • 1
  • 6
0

There's a company-go backend available for the Go language in company-mode (installation advice, available elsewhere at Emacs Stack Exchange). It should be possible to activate any interactive function from company-mode, with a key-binding on the Full Stop character, "."

So far as in reviewing some existing reviews, it seems that company-mode is pretty widely adopted, for providing specialized code-completion functionality in Emacs. Guessing from some introductions, it may even provide a literal pop-up menu. Looking forward to seeing if the pop-up menu works out well with a local ncurses installation #HTH

Sean Champ
  • 60
  • 5