go: use go-packages and remove my-go-list-packages

This commit is contained in:
Łukasz Pankowski 2019-12-09 22:27:30 +01:00
parent b65486d279
commit 41076b7c15

10
init.el
View File

@ -517,19 +517,11 @@ inserted between the braces between the braces."
(insert "}")
(indent-according-to-mode))))
(defun my-go-list-packages ()
"Return list of Go packages."
(split-string
(with-temp-buffer
(shell-command "go list ... 2>/dev/null" (current-buffer))
(buffer-substring-no-properties (point-min) (point-max)))
"\n"))
(defun my-godoc-package ()
"Display godoc for given package (with completion)."
(interactive)
(godoc (helm :sources (helm-build-sync-source "Go packages"
:candidates (my-go-list-packages))
:candidates (go-packages))
:buffer "*godoc packages*")))
(use-package lsp-mode