Skip to content

Commit

Permalink
Use proper symbols (derived from type hints) for suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mk0x9 committed Apr 5, 2015
1 parent ff777d6 commit 117bb5c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions emacs/go-autocomplete.el
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@

(defun ac-go-get-candidates (strings)
(let ((prop (lambda (entry)
(let ((name (nth 0 entry))
(summary (nth 1 entry)))
(let* ((name (nth 0 entry))
(summary (nth 1 entry))
(symbol (substring summary 0 1)))
(propertize name
'summary summary))))
'summary summary
'symbol symbol))))
(split (lambda (strings)
(mapcar (lambda (str)
(split-string str ",," t))
Expand Down Expand Up @@ -189,8 +191,7 @@
(action . ac-go-action)
(prefix . ac-go-prefix)
(requires . 0)
(cache)
(symbol . "g")))
(cache)))

(add-to-list 'ac-modes 'go-mode)

Expand Down

0 comments on commit 117bb5c

Please sign in to comment.