Skip to content

Commit

Permalink
Fix Emacs Company Mode for External Packages
Browse files Browse the repository at this point in the history
Apply changes in mdempsky#79 to emacs company-go mode so auto-completion of non-local packages works. Mirrors changes in nsf#530. This way completion works if you just checkout this repo and point emacs to this instance of go-code.
  • Loading branch information
rfliam authored Feb 20, 2019
1 parent 7fb6523 commit 9a8bd76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion emacs-company/company-go.el
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ symbol is preceded by a \".\", ignoring `company-minimum-prefix-length'."
(defun company-go--invoke-autocomplete ()
(let ((code-buffer (current-buffer))
(gocode-args (append company-go-gocode-args
(list "-f=csv-with-package"
(list "-source"
"-f=csv"
"autocomplete"
(or (buffer-file-name) "")
(concat "c" (int-to-string (- (point) 1)))))))
Expand Down

1 comment on commit 9a8bd76

@stamblerre
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -source flag type-checks everything from source, causing a significant slowdown, so it definitely should not be a default. Why is this necessary?

Please sign in to comment.