gocode icon indicating copy to clipboard operation
gocode copied to clipboard

How can I get package name completion/suggestion?

Open ghost opened this issue 8 years ago • 2 comments

Hello, I've been using gocode on emacs with company mode, and completion works fairly well.

Once I write package name to import, I can get a list of suggestions for package functions.

However, I am wondering if I can have package name suggestion or completion with gocode on emacs.

For example,

import (
    "io/
)

or

import (
     "github.com/
)

I expect to have a list of package name completion at this point, but it does not seem to work.

Is there any ways to improve my completion, or is this function not implemented yet?

Here're my go and emacs settings

$PATH = '$HOME/git/go/bin:$HOME/go/bin'
$GOPATH='$HOME/go'
(require 'go-mode)                                                              
(require 'company-go)                                                           
(add-hook 'go-mode-hook                                                         
          (lambda ()                                                            
            (add-hook 'before-save-hook 'gofmt-before-save)                     
            (setq tab-width 4)                                                  
            (setq indent-tabs-mode 1)                                           
            (add-to-list 'company-backends '(                                   
                                             company-go                         
                                             company-keywords                   
                                             company-files))                    
            (company-mode)))

ghost avatar Jan 12 '18 01:01 ghost

Hello. This feature is not implemented in company-go plugin.

nsf avatar Jan 12 '18 15:01 nsf

OK, I see. Thank you for your response.

ghost avatar Jan 13 '18 01:01 ghost