When I start Emacs I get the error message
Error (use-package): Cannot load counsel
But when I open
init.el in a buffer and run
eval-buffer everything works fine. What I'm doing wrong?
;; Bootstrap straight.el (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (straight-use-package 'use-package) (use-package magit :bind ("C-x g" . magit-status)) (use-package counsel :config (counsel-mode 1)) ;; Display line numbers in programming major modes (add-hook 'prog-mode-hook 'display-line-numbers-mode) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(inhibit-startup-screen t) '(menu-bar-mode nil) '(scroll-bar-mode nil) '(straight-use-package-by-default t) '(tool-bar-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:inherit nil :stipple nil :background "#fcfcfc" :foreground "#232627" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 143 :width normal :foundry "FSD " :family "PragmataPro Mono Liga")))))