Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Faster external package indexing for go-mode
(defun go-packages-find ()
(sort
(delete-dups
(cl-mapcan (lambda (topdir)
(let ((pkgdir (concat topdir "/pkg")))
(mapcar (lambda (file)
(let ((sub (substring file 0 -2)))
(mapconcat #'identity (cdr (split-string sub "/")) "/")))
(split-string (shell-command-to-string
(format "find \"%s\" -not -path \"%s/tool*\" -not -path \"%s/obj/*\" -name \"*.a\" -printf \"%%P\\n\""
pkgdir pkgdir pkgdir))))))
(go-root-and-paths)))
#'string<))
(setq go-packages-function 'go-packages-find)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment