Remove post-init and use :commands to optimise loading of counsel-spotify

This commit is contained in:
Deepu Mohan Puthrote 2018-09-06 23:46:29 +01:00 committed by Codruț Constantin Gușoi
parent b8ca9f80d4
commit d68af4833f
1 changed files with 8 additions and 4 deletions

View File

@ -35,12 +35,16 @@
(use-package counsel-spotify
:defer t
:init (progn
(spacemacs/declare-prefix "amss" "counsel-spotify-search")
(spacemacs/declare-prefix "amssT" "search-tracks-by...")
(spacemacs/set-leader-keys
"amssa" 'counsel-spotify-search-artist
"amssA" 'counsel-spotify-search-album
"amsst" 'counsel-spotify-search-track
"amssTa" 'counsel-spotify-search-tracks-by-artist
"amssTA" 'counsel-spotify-search-tracks-by-album))))
(defun spotify/post-init-counsel-spotify ()
(load-library "counsel-spotify"))
"amssTA" 'counsel-spotify-search-tracks-by-album))
:commands (counsel-spotify-search-artist
counsel-spotify-search-album
counsel-spotify-search-track
counsel-spotify-search-tracks-by-artist
counsel-spotify-search-tracks-by-album)))