By delaying the function call to `yas-global-mode' until Emacs has finished starting up, it won't try to load the diminish package before its autoloads file has been read.